Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
bgColorwhite

IS A


Use this function to check Checks the entity type of an instance. The function returns TRUE if the selected instance is of the specified entity. 


Syntax

Code Block
instance IS A entity_name



Inputs
  • instance - Instance to check.
  • entity_name - Name of the entity as string.


Return type

  • Boolean


Examples

Suppose a domain model in which there is a singleton entity Residence that has a multivalued relation hasRooms with Room. Room is the base entity for singleton Kitchen and not singletons Bedroom and Bathroom.

If you want to determine the number of bedrooms is the residence:

  • COUNT ( COLLECT Room FROM Residence.hasRooms WHERE ( Room IS A “Bedroom” ) )

If you want to determine the number of bathrooms is the residence:

  • COUNT ( COLLECT Room FROM Residence.hasRooms WHERE ( Room IS A “Bathroom” ) )

Back to top

...