Class TslObjectDefinition
java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.scope.TslObjectDefinition
- All Implemented Interfaces:
IObjectDefinition
This class is used to wrap object definitions inside a TSL loop. Within a TSL loop all objects get an additional
member 'foreach_index', which may be used in expressions to retrieve the index of the object within the loop.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()
This method returns the data type of the value.This method returns the name of the type the value belongs to.getValueDefinition
(String name) This method will return the value definition of the member-value identified by the specified name.boolean
Returns whether this object is a singleton defined object.
-
Constructor Details
-
TslObjectDefinition
-
-
Method Details
-
getValueDefinition
Description copied from interface:IObjectDefinition
This method will return the value definition of the member-value identified by the specified name. If the specified name does not identify a member value of this compound object, a parse exception may be thrown. example: getDefinition( "person.address.housenumber" ); ValueNode( "person.address.housenumber" ); ObjectNode( "person", new ObjectNode( "address", new ValueNode( "housenumber" ) ) ) Second structure is preferred:- Each FieldNode represents a call to getValue in the IValueSource interface (parsing only needed here, and not during evaluation)
- The value cannot be requested at once through the IValueSource interface, as the objects that are traversed to get at the ValueNode may need to be activated.
getValue( "person.address.housenumber" ); getValue( "person" ).getValue( "address" ).getValue( "housenumber" );- Specified by:
getValueDefinition
in interfaceIObjectDefinition
- Parameters:
name
- The name of the member value for which the definition is requested.- Returns:
- The value definition of the member with the specified name.
-
getType
Description copied from interface:IObjectDefinition
This method returns the data type of the value.- Specified by:
getType
in interfaceIObjectDefinition
- Returns:
- the data type of the value.
-
getTypeName
Description copied from interface:IObjectDefinition
This method returns the name of the type the value belongs to. The type name is only relevant for values which belong to a domain or entity.- Specified by:
getTypeName
in interfaceIObjectDefinition
- Returns:
- the name of the type the value belongs to.
-
isSingleton
public boolean isSingleton()Description copied from interface:IObjectDefinition
Returns whether this object is a singleton defined object.- Specified by:
isSingleton
in interfaceIObjectDefinition
- Returns:
- A boolean indicating this object is singleton.
-