You are viewing the documentation for Blueriq 16. Documentation for other versions is available in our documentation directory.

IS A


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


Syntax

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