Class AggregateDefinition
java.lang.Object
com.aquima.interactions.metamodel.impl.AggregateDefinition
- All Implemented Interfaces:
IAggregateDefinition
,Serializable
This class holds the static definition of an aggregate.
- Author:
- V. Moldovan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAggregateDefinition
(IMetaModel metamodel, IAggregateDS datasource) Constructs an aggregate definition using the meta model and the data source providing the aggregate information. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addMetadata
(IMetaModel metamodel, IMetadataDS datasource) boolean
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.
-
Constructor Details
-
AggregateDefinition
Constructs an aggregate definition using the meta model and the data source providing the aggregate information.- Parameters:
metamodel
- The meta model definition the aggregate will be part of.datasource
- The data source providing the aggregate information.- Throws:
InitializationException
- This error is thrown when structural errors are encountered during initialization.
-
-
Method Details
-
getName
Description copied from interface:IAggregateDefinition
This method returns the name of the aggregate as defined in studio.- Specified by:
getName
in interfaceIAggregateDefinition
- Returns:
- The name.
-
getFunctionalName
Description copied from interface:IAggregateDefinition
This method returns the functional name of the aggregate as defined in studio.- Specified by:
getFunctionalName
in interfaceIAggregateDefinition
- Returns:
- The functional name.
-
containsEntityReference
Description copied from interface:IAggregateDefinition
This method is responsible for indicating whether the aggregate contains the entity reference.- Specified by:
containsEntityReference
in interfaceIAggregateDefinition
- 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
Description copied from interface:IAggregateDefinition
This method returns an array containing all the entity references that are present in the aggregate definition.- Specified by:
getEntityReferences
in interfaceIAggregateDefinition
- Returns:
- Array of all the entity references. Never
null
.
-
getEntityReference
Description copied from interface:IAggregateDefinition
This method returns the entity reference for the supplied entity name. If the entity reference is not found by name, the method returns (null).- Specified by:
getEntityReference
in interfaceIAggregateDefinition
- Parameters:
entityName
- The name of the entity for which the reference is required.- Returns:
- The entity reference or null
-
getMetadata
Description copied from interface:IAggregateDefinition
This method returns an array containing all the metadata entities that are present in the aggregate definition.- Specified by:
getMetadata
in interfaceIAggregateDefinition
- Returns:
- Array of all the metadata. Never
null
.
-
getMetadata
Description copied from interface:IAggregateDefinition
This method returns the metadata for the supplied name.- Specified by:
getMetadata
in interfaceIAggregateDefinition
- Parameters:
metadataName
- The name of the metadata.- Returns:
- The metadata.
-
containsMetadata
Description copied from interface:IAggregateDefinition
This method is responsible for indicating whether the aggregate contains the metadata given by its name.- Specified by:
containsMetadata
in interfaceIAggregateDefinition
- Parameters:
metadataName
- The name of the metadata.- Returns:
true
when the metadata is present,false
otherwise.
-
addMetadata
-
getRoles
Description copied from interface:IAggregateDefinition
This method returns the roles of the aggregate as defined in studio.- Specified by:
getRoles
in interfaceIAggregateDefinition
- Returns:
- The roles of the aggregate
-
hasRole
Description copied from interface:IAggregateDefinition
Indicates whether this aggregate has the given role. If this method returns true, then the given role will be present in the array returned byIAggregateDefinition.getRoles()
.- Specified by:
hasRole
in interfaceIAggregateDefinition
- Parameters:
roleName
- the name of the role (may be null)- Returns:
- true if this aggregate has the given role, false otherwise.
-
hasAnyRole
Description copied from interface:IAggregateDefinition
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 byIAggregateDefinition.getRoles()
.- Specified by:
hasAnyRole
in interfaceIAggregateDefinition
- Parameters:
rolesName
- the role names (must not be null)- Returns:
- true if this aggregate has at least one of the given roles, false otherwise.
-