Interface IAggregateDefinition
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AggregateDefinition
The definition of an aggregate. An aggregate represents a certain grouping of entity definitions. The aggregate does
not "contain" the entity definitions (the meta model "contains" them), it just groups them in different ways.
Therefore, an aggregate doesn't contain entity definitions, but entity references. The definition of an aggregate
consists of a unique name for the aggregate and a list of entity references.
- Author:
- voicu
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsEntityReference
(String entityName) This method is responsible for indicating whether the aggregate contains the entity reference.boolean
containsMetadata
(String metadataName) This method is responsible for indicating whether the aggregate contains the metadata given by its name.getEntityReference
(String entityName) This method returns the entity reference for the supplied entity name.This method returns an array containing all the entity references that are present in the aggregate definition.This method returns the functional name of the aggregate as defined in studio.This method returns an array containing all the metadata entities that are present in the aggregate definition.getMetadata
(String metadataName) This method returns the metadata for the supplied name.getName()
This method returns the name of the aggregate as defined in studio.String[]
getRoles()
This method returns the roles of the aggregate as defined in studio.boolean
hasAnyRole
(String[] rolesName) Indicates whether this aggregate has any of the given roles.boolean
Indicates whether this aggregate has the given role.
-
Method Details
-
getName
String getName()This method returns the name of the aggregate as defined in studio.- Returns:
- The name.
-
getFunctionalName
String getFunctionalName()This method returns the functional name of the aggregate as defined in studio.- Returns:
- The functional name.
-
containsEntityReference
This method is responsible for indicating whether the aggregate contains the entity reference.- Parameters:
entityName
- The name of the entity for which the corresponding entity reference is required.- Returns:
true
when entity reference is present,false
otherwise.
-
getEntityReferences
EntityReference[] getEntityReferences()This method returns an array containing all the entity references that are present in the aggregate definition.- Returns:
- Array of all the entity references. Never
null
.
-
getEntityReference
This method returns the entity reference for the supplied entity name. If the entity reference is not found by name, the method returns (null).- Parameters:
entityName
- The name of the entity for which the reference is required.- Returns:
- The entity reference or null
- Throws:
UnknownEntityException
- If the the entity name is null or an empty string.
-
getMetadata
IMetadataDefinition[] getMetadata()This method returns an array containing all the metadata entities that are present in the aggregate definition.- Returns:
- Array of all the metadata. Never
null
.
-
getMetadata
This method returns the metadata for the supplied name.- Parameters:
metadataName
- The name of the metadata.- Returns:
- The metadata.
- Throws:
UnknownMetadataException
- if this aggregate doesn't contain a metadata with the given name
-
containsMetadata
This method is responsible for indicating whether the aggregate contains the metadata given by its name.- Parameters:
metadataName
- The name of the metadata.- Returns:
true
when the metadata is present,false
otherwise.
-
getRoles
String[] getRoles()This method returns the roles of the aggregate as defined in studio.- Returns:
- The roles of the aggregate
-
hasRole
Indicates whether this aggregate has the given role. If this method returns true, then the given role will be present in the array returned bygetRoles()
.- Parameters:
roleName
- the name of the role (may be null)- Returns:
- true if this aggregate has the given role, false otherwise.
-
hasAnyRole
Indicates whether this aggregate has any of the given roles. If this method returns true, then at least one of the given roles will be present in the array returned bygetRoles()
.- Parameters:
rolesName
- the role names (must not be null)- Returns:
- true if this aggregate has at least one of the given roles, false otherwise.
-