Class AggregateTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.model.AggregateTemplate
This template may be used to initialize an aggregate definition.
- Author:
- voicu
-
Constructor Summary
ConstructorsConstructorDescriptionAggregateTemplate
(com.aquima.interactions.foundation.report.IInitializationReport report, MetaModelTemplate metaModel, String name, String functionalName) Creates a new Aggregate template instance. -
Method Summary
Modifier and TypeMethodDescriptionaddEntityReference
(String entityName) Adds an entity reference to the aggregate.addEntityReference
(String entityName, boolean includeAllRelations) Adds an entity reference to the aggregate.addMetadata
(String name, com.aquima.interactions.foundation.DataType dataType, boolean multiValued, String expression, String domainName) This method may be used to add a matadata definition to aggregate definition.addRelationReference
(String sourceEntityName, String relationName) Includes a relation in the aggregate.void
protected Iterator
<com.aquima.interactions.test.templates.model.EntityReferenceDS> protected String
protected Iterator
<MetadataTemplate> protected String
getName()
protected String[]
getRoles()
com.aquima.interactions.metamodel.ds.IAggregateDS
This method converts the template to a data source that can be used to initialize an aggregate definition.Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
Constructor Details
-
AggregateTemplate
public AggregateTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, MetaModelTemplate metaModel, String name, String functionalName) Creates a new Aggregate template instance.- Parameters:
report
- The errors/warnings reporting object.metaModel
- The meta model template.name
- The name of the aggregate.functionalName
- The functional name of the aggregate.
-
-
Method Details
-
getName
-
getFunctionalName
-
addEntityReference
Adds an entity reference to the aggregate. All relations are recursively included. This method is equivalent to addEntityReference(entityName, true).- Parameters:
entityName
- The name of the entity reference.- Returns:
- This aggregate template.
-
addEntityReference
Adds an entity reference to the aggregate. If the includeAllRelations attribute is true, all relations are recursively included. Otherwise, no relations are included and relations must be added manually usingaddRelationReference(String, String)
If includedAllRelations is true, the referenced entity must already exist in the metamodel and all its relations must already exist. Only relations that exist in the metamodel at the time this method is called will be included.
- Parameters:
entityName
- the name of the entityincludeAllRelations
- whether to recursively include all relations- Returns:
- This aggregate template.
-
addRelationReference
Includes a relation in the aggregate. The entity whose relation is included must already be added to the aggregate usingaddEntityReference(String)
. The related entity is added as a non-root entity reference. No relations of the referred entity are included.- Parameters:
sourceEntityName
- the name of the entity who owns the forward relationrelationName
- the name of the relation- Returns:
- this aggregate template
-
addMetadata
public MetadataTemplate addMetadata(String name, com.aquima.interactions.foundation.DataType dataType, boolean multiValued, String expression, String domainName) This method may be used to add a matadata definition to aggregate definition.- Parameters:
name
- The name of the metadata.dataType
- The dataType of metadata.multiValued
- The multiValued flag of metadata.expression
- The expression of metadata.- Returns:
- The metadata template.
-
toDataSource
public com.aquima.interactions.metamodel.ds.IAggregateDS toDataSource()This method converts the template to a data source that can be used to initialize an aggregate definition.- Returns:
- a data source that can be used to initialize an aggregate definition.
-
getEntityReferences
protected Iterator<com.aquima.interactions.test.templates.model.EntityReferenceDS> getEntityReferences() -
getMetadata
-
addRole
-
getRoles
-