Class AggregateDefinition

java.lang.Object
com.aquima.interactions.metamodel.impl.AggregateDefinition
All Implemented Interfaces:
IAggregateDefinition, Serializable

public class AggregateDefinition extends Object implements IAggregateDefinition
This class holds the static definition of an aggregate.
Author:
V. Moldovan
See Also:
  • Constructor Details

    • AggregateDefinition

      public AggregateDefinition(IMetaModel metamodel, IAggregateDS datasource)
      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

      public String getName()
      Description copied from interface: IAggregateDefinition
      This method returns the name of the aggregate as defined in studio.
      Specified by:
      getName in interface IAggregateDefinition
      Returns:
      The name.
    • getFunctionalName

      public String getFunctionalName()
      Description copied from interface: IAggregateDefinition
      This method returns the functional name of the aggregate as defined in studio.
      Specified by:
      getFunctionalName in interface IAggregateDefinition
      Returns:
      The functional name.
    • containsEntityReference

      public boolean containsEntityReference(String entityName)
      Description copied from interface: IAggregateDefinition
      This method is responsible for indicating whether the aggregate contains the entity reference.
      Specified by:
      containsEntityReference in interface IAggregateDefinition
      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

      public EntityReference[] 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 interface IAggregateDefinition
      Returns:
      Array of all the entity references. Never null.
    • getEntityReference

      public EntityReference getEntityReference(String entityName)
      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 interface IAggregateDefinition
      Parameters:
      entityName - The name of the entity for which the reference is required.
      Returns:
      The entity reference or null
    • getMetadata

      public IMetadataDefinition[] 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 interface IAggregateDefinition
      Returns:
      Array of all the metadata. Never null.
    • getMetadata

      public IMetadataDefinition getMetadata(String metadataName)
      Description copied from interface: IAggregateDefinition
      This method returns the metadata for the supplied name.
      Specified by:
      getMetadata in interface IAggregateDefinition
      Parameters:
      metadataName - The name of the metadata.
      Returns:
      The metadata.
    • containsMetadata

      public boolean containsMetadata(String metadataName)
      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 interface IAggregateDefinition
      Parameters:
      metadataName - The name of the metadata.
      Returns:
      true when the metadata is present, false otherwise.
    • addMetadata

      protected void addMetadata(IMetaModel metamodel, IMetadataDS datasource)
    • getRoles

      public String[] getRoles()
      Description copied from interface: IAggregateDefinition
      This method returns the roles of the aggregate as defined in studio.
      Specified by:
      getRoles in interface IAggregateDefinition
      Returns:
      The roles of the aggregate
    • hasRole

      public boolean hasRole(String roleName)
      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 by IAggregateDefinition.getRoles().
      Specified by:
      hasRole in interface IAggregateDefinition
      Parameters:
      roleName - the name of the role (may be null)
      Returns:
      true if this aggregate has the given role, false otherwise.
    • hasAnyRole

      public boolean hasAnyRole(String[] rolesName)
      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 by IAggregateDefinition.getRoles().
      Specified by:
      hasAnyRole in interface IAggregateDefinition
      Parameters:
      rolesName - the role names (must not be null)
      Returns:
      true if this aggregate has at least one of the given roles, false otherwise.