Class AttributeTemplate

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

public class AttributeTemplate extends AbstractReportingTemplate
Template that can be used to initialize an attribute definition.
Since:
6.0
Author:
O. Kerpershoek
  • Constructor Details

    • AttributeTemplate

      protected AttributeTemplate(String name, String entityName, com.aquima.interactions.foundation.DataType type, boolean multivalue)
      Constructs the template with the required parameters.
      Parameters:
      name - The name of the attribute.
      entityName - The entity name of the attribute.
      type - The data type of the attribute.
      multivalue - Boolean indicating if the attribute can hold multiple values.
    • AttributeTemplate

      protected AttributeTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String name, String entityName, com.aquima.interactions.foundation.DataType type, boolean multiValue)
  • Method Details

    • setReverse

      public void setReverse(boolean isReverseAttribute)
      This method allows setting the attribute as a reverse relation attribute.
      Parameters:
      isReverseAttribute - Option to set the attribute as a reverse relation attribute.
    • isReverse

      public boolean isReverse()
      This method returns a boolean indicating this attribute is a reverse relation attribute.
      Returns:
      A boolean indicating this attribute is a reverse relation attribute.
    • getId

      public String getId()
      This method returns the ID of the attribute.
      Returns:
      the ID of the attribute.
    • getName

      public String getName()
      This method returns the name of the attribute.
      Returns:
      the name of the attribute.
    • getEntityName

      public String getEntityName()
      This method returns the entity name of the attribute.
      Returns:
      the entity name of the attribute.
    • getFullName

      public String getFullName()
      This method returns the full name (entity.attribute) of the attribute.
      Returns:
      the full name (entity.attribute) of the attribute.
    • getType

      public com.aquima.interactions.foundation.DataType getType()
      This method returns the data type of the attribute.
      Returns:
      the data type of the attribute.
    • isMultivalue

      public boolean isMultivalue()
      This method returns a boolean indicating if the attribute can hold multiple values.
      Returns:
      a boolean indicating if the attribute can hold multiple values.
    • setDomainName

      public void setDomainName(String domainName)
      This method can be used to specify the domain of the attribute.
      Parameters:
      domainName - The name of the domain that should be used for this attribute.
    • getDomainName

      protected String getDomainName()
    • setDescription

      public void setDescription(String description)
      This method can be used to specify the description of the attribute.
      Parameters:
      description - The description that should be used for this attribute.
    • getDescription

      protected String getDescription()
    • setRelation

      public void setRelation(String entityType, String reverseAttribute)
      This method may be used to specify the relation of the attribute.
      Parameters:
      entityType - The entity type the attribute refers to.
      reverseAttribute - The attribute of the referred entity that links back to the entity of this attribute.
    • setRelation

      public void setRelation(com.aquima.interactions.metamodel.RelationType relationType, boolean owner, String entityType, String reverseAttribute)
      This method may be used to specify the relation of the attribute.
      Parameters:
      relationType - The type of the relation.
      owner - Boolean indicating if this attribute is the owner of the referred instance.
      entityType - The entity type the attribute refers to.
      reverseAttribute - The attribute of the referred entity that links back to the entity of this attribute.
    • setReference

      public void setReference(com.aquima.interactions.metamodel.ReferenceType referenceType, String connection, String referencedId)
    • setReference

      public void setReference(com.aquima.interactions.metamodel.ReferenceType referenceType)
    • setQuestionText

      public void setQuestionText(com.aquima.interactions.foundation.text.IMultilingualText text)
      Sets attribute question.
      Parameters:
      text - the question text
    • setExplainText

      public void setExplainText(com.aquima.interactions.foundation.text.IMultilingualText text)
      Sets attribute explain text;
      Parameters:
      text - the explain text
    • getEntityTypeName

      protected String getEntityTypeName()
    • getReverseAttribute

      protected String getReverseAttribute()
    • getRelationType

      protected com.aquima.interactions.metamodel.RelationType getRelationType()
    • referrerIsOwner

      protected boolean referrerIsOwner()
    • getReferenceType

      protected com.aquima.interactions.metamodel.ReferenceType getReferenceType()
    • getConnection

      protected String getConnection()
    • getReferencedId

      protected String getReferencedId()
    • getQuestionText

      protected com.aquima.interactions.foundation.text.IMultilingualText getQuestionText()
    • getExplainText

      protected com.aquima.interactions.foundation.text.IMultilingualText getExplainText()
    • toDataSource

      public com.aquima.interactions.metamodel.ds.IAttributeDS toDataSource()
      This method converts the template to a data source that can be used to initialize an attribute definition.
      Returns:
      a data source that can be used to initialize an attribute definition.
    • getFunctionalName

      public String getFunctionalName()
    • setFunctionalName

      public void setFunctionalName(String functionalName)