Class DependencyInstance

java.lang.Object
com.aquima.interactions.profile.wrapper.ReadonlyInstance
com.aquima.interactions.rule.inference.DependencyInstance
All Implemented Interfaces:
IEventChannel, IPropertyContainer, IEntityInstance, Serializable

public class DependencyInstance extends ReadonlyInstance
Entity instance wrapper that keeps track of all the attributes that are used. This wrapper is used to gather dependecies during the evaluation of a rule.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

  • Method Details

    • wrapInstance

      protected IEntityInstance wrapInstance(IEntityInstance instance)
      Overrides:
      wrapInstance in class ReadonlyInstance
    • getInstanceValue

      public IEntityInstance getInstanceValue(String attributeName)
      Description copied from interface: IEntityInstance
      This method returns the instances that is referred to by the given attribute. If the attribute does not refer to an instance, a null value is returned.
      Specified by:
      getInstanceValue in interface IEntityInstance
      Overrides:
      getInstanceValue in class ReadonlyInstance
      Parameters:
      attributeName - The name of the attribute containing the instance.
      Returns:
      The IEntityInstance referred to by the attribute.
    • getInstanceValues

      public IEntityInstance[] getInstanceValues(String attributeName)
      Description copied from interface: IEntityInstance
      This method returns an array containing all the instances that are referred to by the given attribute. If the attribute does not refer to any instance, an empty array is returned.
      Specified by:
      getInstanceValues in interface IEntityInstance
      Overrides:
      getInstanceValues in class ReadonlyInstance
      Parameters:
      attributeName - The name of the attribute containing the instances.
      Returns:
      An array containing all the instances that are referred to by the attribute.
    • getValue

      public IValue getValue(String attributeName)
      Description copied from interface: IEntityInstance
      This method can be used to retrieve a value for an attribute of this instance in a non-type safe manner.
      • DataType.Boolean returns a BooleanValue
      • DataType.Currency returns a DoubleValue
      • DataType.Date returns a DateValue
      • DataType.Number returns a NumberValue
      • DataType.Integer returns a IntegerValue
      • DataType.Percentage returns a DoubleValue
      • DataType.String returns a StringValue
      • DataType.Domain returns a StringValue containing the short value, and has the display value as well.
      • DataType.Entity returns an EntityValue object denoting the instance this relation was pointing to.
      N.B.
      1. If the value was not answered the return value is as specified but on the IValue object the isUnknown function renders true
      2. If the value was answered and the single value was null the return value is not null, but the isUnknown function results in true
      3. If the value is a multivalued attribute a collection containing the only the object types listed above.
      Specified by:
      getValue in interface IEntityInstance
      Overrides:
      getValue in class ReadonlyInstance
      Parameters:
      attributeName - String (without the entity name)
      Returns:
      The value for the specified attribute name.
    • getAttributeState

      public IAttributeValue getAttributeState(String attributeName)
      Description copied from interface: IEntityInstance
      When the attribute is known, it will return the state of the attribute.
      Specified by:
      getAttributeState in interface IEntityInstance
      Overrides:
      getAttributeState in class ReadonlyInstance
      Parameters:
      attributeName - String Preferably without the entity name
      Returns:
      The state information of the attribute.