identification-variable IS OF TYPE ( [ONLY] type-1, [ONLY] type-2, ..... )
Example: IS OF TYPE predicate
Suppose that bean ManagerBean is defined as a subtype of EmpBean and ExecutiveBean is a subtype of ManagerBean in an EJB inheritance hierarchy.
SELECT OBJECT(e) FROM EmpBean e
SELECT OBJECT(e) FROM EmpBean e WHERE e IS OF TYPE( ONLY EmpBean )
SELECT OBJECT(e) FROM EmpBean e WHERE e IS OF TYPE( ManagerBean)The above query is equivalent to the following query:
SELECT OBJECT(e) FROM ManagerBean e
SELECT OBJECT(e) FROM EmpBean e WHERE e IS OF TYPE( ONLY ManagerBean)or:
SELECT OBJECT(e) FROM ManagerBean e WHERE e IS OF TYPE (ONLY ManagerBean)
Related concepts
EJB query language
WHERE clause
Related tasks
Using EJB query