Class EntityTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.model.EntityTemplate

public class EntityTemplate extends AbstractReportingTemplate
This template may be used to initialize an entity definition.
Since:
6.0
Author:
O. Kerpershoek
  • Constructor Details

    • EntityTemplate

      protected EntityTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, MetaModelTemplate metamodel, String name, String parent, boolean singleton)
  • Method Details

    • getId

      protected String getId()
    • getName

      protected String getName()
    • getParent

      protected String 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

      protected AttributeTemplate getAttribute(String attributeName)
    • getAttribute

      protected AttributeTemplate getAttribute(String attributeName, boolean includeSuperTypes)
    • getAttributes

      protected Iterator<AttributeTemplate> 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 attribute
      multivalue - Boolean indicating if the attribute can have multiple values.
      Returns:
      Attribute template representing the added attribute.
    • addRelation

      public AttributeTemplate 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.
      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.