Interface DomainObject

All Superinterfaces:
Expression, OrderByItem, PathExpression, PredicateOperand, QueryDefinition, SelectItem, Subquery
All Known Implementing Classes:
AbstractDomainObject, EntryExpression, FetchPath, JoinPath, KeyExpression, OperatorPath, RootPath, ValueExpression

public interface DomainObject extends PathExpression, QueryDefinition
Domain objects define the domain over which a query operates. A domain object plays a role analogous to that of a Java Persistence query language identification variable.
  • Method Details

    • join

      DomainObject join(String attribute)
      Extend the query domain by joining with a class that can be navigated to or that is embedded in the class corresponding to the domain object on which the method is invoked. This method is permitted to be invoked only when defining the domain of the query. It must not be invoked within the context of the select, where, groupBy, or having operations. The domain object must correspond to a class that contains the referenced attribute. The query definition is modified to include the newly joined domain object.
      Parameters:
      attribute - - name of the attribute that references the target of the join
      Returns:
      the new DomainObject that is added for the target of the join
    • leftJoin

      DomainObject leftJoin(String attribute)
      Extend the query domain by left outer joining with a class that can be navigated to or that is embedded in the class corresponding to the domain object on which the method is invoked. This method is permitted to be invoked only when defining the domain of the query. It must not be invoked within the context of the select, where, groupBy, or having operations. The domain object must correspond to a class that contains the referenced attribute. The query definition is modified to include the newly joined domain object.
      Parameters:
      attribute - - name of the attribute that references the target of the join
      Returns:
      the new DomainObject that is added for the target of the join
    • joinFetch

      FetchJoinObject joinFetch(String attribute)
      Specify that the association or element collection that is referenced by the attribute be eagerly fetched through use of an inner join. The domain object must correspond to a class that contains the referenced attribute. The query is modified to include the joined domain object.
      Parameters:
      attribute - - name of the attribute that references the target of the join
      Returns:
      the FetchJoinObject that is added for the target of the join
    • leftJoinFetch

      FetchJoinObject leftJoinFetch(String attribute)
      Specify that the association or element collection that is referenced by the attribute be eagerly fetched through use of a left outer join. The domain object must correspond to a class that contains the referenced attribute. The query is modified to include the joined domain object.
      Parameters:
      attribute - - name of the attribute that references the target of the join
      Returns:
      the FetchJoinObject that is added for the target of the join
    • value

      Return a path expression corresponding to the value of a map-valued association or element collection. This method is only permitted to be invoked upon a domain object that corresponds to a map-valued association or element collection.
      Returns:
      PathExpression corresponding to the map value
    • key

      Return a path expression corresponding to the key of a map-valued association or element collection. This method is only permitted to be invoked upon a domain object that corresponds to a map-valued association or element collection.
      Returns:
      PathExpression corresponding to the map key
    • entry

      SelectItem entry()
      Return a select item corresponding to the map entry of a map-valued association or element collection. This method is only permitted to be invoked upon a domain object that corresponds to a map-valued association or element collection.
      Returns:
      SelectItem corresponding to the map entry
    • index

      Expression index()
      Return an expression that corresponds to the index. of the domain object in the referenced association or element collection. This method is only permitted to be invoked upon a domain object that corresponds to a multi-valued association or element collection for which an order column has been defined.
      Returns:
      Expression denoting the index