Class EntityTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.model.EntityTemplate
This template may be used to initialize an entity definition.
- Since:
- 6.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
EntityTemplate
(com.aquima.interactions.foundation.report.IInitializationReport report, MetaModelTemplate metamodel, String name, String parent, boolean singleton) -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute
(String name, com.aquima.interactions.foundation.DataType type, boolean multivalue) This method may be used to add an attribute to the entity definition.addRelation
(String attributeName, boolean multivalue, String entityType) This method may be used to add a relation attribute to the entity definition with no reverse relation.addRelation
(String attributeName, boolean multivalue, String entityType, String reverseAttribute, boolean reverseMultivalue) This method may be used to add a relation attribute to the entity definition with a reverse relation.protected AttributeTemplate
getAttribute
(String attributeName) protected AttributeTemplate
getAttribute
(String attributeName, boolean includeSuperTypes) protected Iterator
<AttributeTemplate> protected String
getId()
protected String
getName()
protected String
protected boolean
protected boolean
void
setAbstractTemplate
(boolean isAbstractEntity) This method may be used to specify if the entity type is abstract.com.aquima.interactions.metamodel.ds.IEntityDS
This method converts the template to a data source that can be used to initialize an entity definition.Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
Constructor Details
-
EntityTemplate
protected EntityTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, MetaModelTemplate metamodel, String name, String parent, boolean singleton)
-
-
Method Details
-
getId
-
getName
-
getParent
-
isSingleton
protected boolean isSingleton() -
isAbstract
protected boolean isAbstract() -
setAbstractTemplate
public void setAbstractTemplate(boolean isAbstractEntity) This method may be used to specify if the entity type is abstract. Abstract entity types my be used to extend from, but can't be instantiated in the profile.- Parameters:
isAbstractEntity
- boolean specifying if the entity type is abstract.
-
getAttribute
-
getAttribute
-
getAttributes
-
addAttribute
public AttributeTemplate addAttribute(String name, com.aquima.interactions.foundation.DataType type, boolean multivalue) This method may be used to add an attribute to the entity definition.- Parameters:
name
- The name of the attribute.type
- The data type of the attributemultivalue
- Boolean indicating if the attribute can have multiple values.- Returns:
- Attribute template representing the added attribute.
-
addRelation
This method may be used to add a relation attribute to the entity definition with no reverse relation.- Parameters:
attributeName
- The name of the attribute.multivalue
- Boolean indicating if the attribute can have multiple values.entityType
- Name of the entity this relation is linked to.- Returns:
- template representing the added attribute.
-
addRelation
public AttributeTemplate addRelation(String attributeName, boolean multivalue, String entityType, String reverseAttribute, boolean reverseMultivalue) This method may be used to add a relation attribute to the entity definition with a reverse relation.- Parameters:
attributeName
- The name of the attribute.multivalue
- Boolean indicating if the attribute can have multiple values.entityType
- Name of the entity this relation is linked to.reverseAttribute
- Name of the reverse attribute.reverseMultivalue
- Boolean indicating if the reverse attribute can have multiple values.- Returns:
- template representing the added attribute.
-
toDataSource
public com.aquima.interactions.metamodel.ds.IEntityDS toDataSource()This method converts the template to a data source that can be used to initialize an entity definition.- Returns:
- a data source that can be used to initialize an entity definition.
-