Interface IAttributeValue

All Superinterfaces:
IEventChannel, IPropertyContainer, Serializable
All Known Implementing Classes:
AttributeState, TmsAttributeState, TxAttributeValue

public interface IAttributeValue extends Serializable, IPropertyContainer, IEventChannel
This interface defines several methods that can be used to retrieve static information about an attribute.
Since:
5.0
Author:
O. Kerpershoek, F. v.d. Meer
  • Method Details

    • getValueReference

      ValueReference getValueReference()
      This method return an object containing a reference to this attribute value. The method is available to simplify interaction with legacy components using the old profile interface.
      Returns:
      ValueReference object containing various ids needed to locate this specific attribute value.
    • isAnswered

      boolean isAnswered()
      This method returns a boolean indicating if the attributes has been assigned a value.
      Returns:
      boolean indicating if the attributes has been assigned a value.
    • isUnknown

      boolean isUnknown()
      This method can be used to determine if the value of the attribute is empty. Note: An empty attribute can still be answered.
      Returns:
      boolean indicating if the value of the attribute is empty.
    • isMultiValue

      boolean isMultiValue()
      This method returns a boolean indicating if the attribute can have multiple values. Use the hasMultipleValues or hasSingleValue to determine if the attribute actually hold multiple values.
      Returns:
      boolean indicating if the attribute can hold multiple values.
    • hasSingleValue

      boolean hasSingleValue()
      This method returns a boolean indicating if the attribute holds exactly one value.
      Returns:
      boolean indicating if the attribute holds exactly one value.
    • hasMultipleValues

      boolean hasMultipleValues()
      This method returns a boolean indicating if this value consists of multiple primitive values. When this value is unknown or only represents a single value, this method will return false.
      Returns:
      boolean indicating if this value contains multiple primitive values.
    • getDataType

      DataType getDataType()
      This method returns the data type of the value.
      Returns:
      the data type of the value.
    • getSourceType

      SourceType getSourceType()
      This method returns the source type of the value. The source type can be used to identify how the attribute got it's value.
      Returns:
      SourceType identifying the source of the value.
    • getValue

      IValue getValue()
      This states value, as defined in IEntityInstance.getValue(String).
      Returns:
      IValue containing the current value of the attribute.
    • getDefinition

      IAttributeDefinition getDefinition()
      This method return the definition of this attribute.
      Returns:
      IAttributeDefinition never null
    • getDomain

      IDomain getDomain()
      This method returns the domain (set of values) that is currently valid for the attribute. This domain will hold at most all values from the domain definition, but this domain may also be empty when there is no value valid in the current context. The domain definition for this attribute may be requested through this domain, or by using the getDomain method from the attribute definition. This method may return null for attributes that don't have a domain.
      Returns:
      The actual domain for this attribute.
      Throws:
      AppException - This exception is thrown when the domain could not be determined.
    • setAttachment

      void setAttachment(String key, Serializable attachment)
      Associates the specified value with the specified key in the attachments map. If the map previously contained a mapping for the key, the old value is replaced. An attachment can be anything as long as it is Serializable
      For a null key, nothing will be set
      Parameters:
      key - the key for which to set the attachment
      attachment - - the Serializable attachment to be stored
    • getAttachment

      Serializable getAttachment(String key)
      Returns the available attachment that this attribute value has and is located at the specified key, otherwise returns null
      Parameters:
      key - the key for with to return the value for
      Returns:
      the Serializable object that is stored at the specified key, if nothing found for the key, null is returned