Class DependencyInstance
java.lang.Object
com.aquima.interactions.profile.wrapper.ReadonlyInstance
com.aquima.interactions.rule.inference.DependencyInstance
- All Implemented Interfaces:
IEventChannel
,IPropertyContainer
,IEntityInstance
,Serializable
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 Summary
ConstructorsModifierConstructorDescriptionprotected
DependencyInstance
(IEntityInstance instance, DependencyProfile parent) -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeState
(String attributeName) When the attribute is known, it will return the state of the attribute.getInstanceValue
(String attributeName) This method returns the instances that is referred to by the given attribute.getInstanceValues
(String attributeName) This method returns an array containing all the instances that are referred to by the given attribute.This method can be used to retrieve a value for an attribute of this instance in a non-type safe manner.protected IEntityInstance
wrapInstance
(IEntityInstance instance) Methods inherited from class com.aquima.interactions.profile.wrapper.ReadonlyInstance
addEventListener, addValue, clearValue, equals, getEntityDefinition, getId, getInstanceReference, getName, getProperty, getPropertyNames, getReferringInstances, getSupportedEvents, hashCode, hasProperty, instanceOf, isDeleted, isSingletonInstance, isStaticInstance, removeEventListener, removeValue, setProperty, setValue, toString
-
Constructor Details
-
DependencyInstance
-
-
Method Details
-
wrapInstance
- Overrides:
wrapInstance
in classReadonlyInstance
-
getInstanceValue
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 interfaceIEntityInstance
- Overrides:
getInstanceValue
in classReadonlyInstance
- Parameters:
attributeName
- The name of the attribute containing the instance.- Returns:
- The IEntityInstance referred to by the attribute.
-
getInstanceValues
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 interfaceIEntityInstance
- Overrides:
getInstanceValues
in classReadonlyInstance
- 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
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.
- If the value was not answered the return value is as specified but on the IValue object the isUnknown function renders true
- If the value was answered and the single value was
null
the return value is not null, but the isUnknown function results in true - If the value is a multivalued attribute a collection containing the only the object types listed above.
- Specified by:
getValue
in interfaceIEntityInstance
- Overrides:
getValue
in classReadonlyInstance
- Parameters:
attributeName
- String (without the entity name)- Returns:
- The value for the specified attribute name.
-
getAttributeState
Description copied from interface:IEntityInstance
When the attribute is known, it will return the state of the attribute.- Specified by:
getAttributeState
in interfaceIEntityInstance
- Overrides:
getAttributeState
in classReadonlyInstance
- Parameters:
attributeName
- String Preferably without the entity name- Returns:
- The state information of the attribute.
-