Class DomainDefinition

All Implemented Interfaces:
IConvertable, IListValue, IValue, IDomainDefinition, Serializable

public class DomainDefinition extends ListValue implements IDomainDefinition
Implementation of the domain definition interface. The domain definition holds the static definition of a domain defined in the meta model. The order of the values in a domain is important, hence this class extends the ListValue class, as to avoid automatic reshuffling of the values.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: IDomainDefinition
      Name of the domain definition as defined in the studio.
      Specified by:
      getName in interface IDomainDefinition
      Returns:
      Name of the domain definition as defined in the studio
    • getDescription

      public String getDescription()
      Description copied from interface: IDomainDefinition
      This method returns the description of the domain. The description of a domain is only used for informational purposes.
      Specified by:
      getDescription in interface IDomainDefinition
      Returns:
      the description of the domain.
    • isExternalDomain

      public boolean isExternalDomain()
      Description copied from interface: IDomainDefinition
      This method returns a boolean indicating if the values for the domain will be provided by an external source. The boolean is used mainly for validation purposes, as an external domain will not have any values during definition in studio.
      Specified by:
      isExternalDomain in interface IDomainDefinition
      Returns:
      a boolean indicating if the values for the domain will be provided by an external source.
    • getDomainValue

      public IDomainValueDefinition getDomainValue(IPrimitiveValue value)
      Description copied from interface: IDomainDefinition
      Obtains the domain value definition for a particular value, if it exists. null is returned if no corresponding domain value exists.
      Specified by:
      getDomainValue in interface IDomainDefinition
      Parameters:
      value - the primitive value for which the corresponding domain value definition should be retrieved.
      Returns:
      the domain value definition corresponding with `value`, or null if none exists.
    • getDomainValueAt

      public IDomainValueDefinition getDomainValueAt(int index)
      Description copied from interface: IDomainDefinition
      Returns the domain value definition at the specified zero-based index. The value of the returned domain value definition is the same as the value returned by IListValue.getValueAt(int) at the same index.

      This method should be used over IListValue.getValueAt(int) when additional information about the domain value is needed (such as presentation styles).

      The total number of domain values may be obtained using IListValue.getValueCount().

      Specified by:
      getDomainValueAt in interface IDomainDefinition
      Parameters:
      index - the index of the domain value definition
      Returns:
      the domain value definition
    • getDomainValues

      public IDomainValueDefinition[] getDomainValues()
      Description copied from interface: IDomainDefinition
      Returns all the domain value definitions. The values in each domain value definition at index n is the same as the value at index n in the array returned by IListValue.getValues().

      This method should be used over IListValue.getValues() when additional information about the domain values is needed (such as presentation styles).

      Specified by:
      getDomainValues in interface IDomainDefinition
      Returns:
      all domain values
    • addValue

      protected void addValue(IDomainValueDefinition definition)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class ListValue
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ListValue
    • toString

      public String toString()
      Overrides:
      toString in class ListValue