Class TslObjectDefinition

java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.scope.TslObjectDefinition
All Implemented Interfaces:
IObjectDefinition

public class TslObjectDefinition extends Object implements 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 Details

  • Method Details

    • getValueDefinition

      public IValueDefinition getValueDefinition(String name)
      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 interface IObjectDefinition
      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

      public DataType getType()
      Description copied from interface: IObjectDefinition
      This method returns the data type of the value.
      Specified by:
      getType in interface IObjectDefinition
      Returns:
      the data type of the value.
    • getTypeName

      public String 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 interface IObjectDefinition
      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 interface IObjectDefinition
      Returns:
      A boolean indicating this object is singleton.