Interface OpenJPACriteriaBuilder

All Superinterfaces:
jakarta.persistence.criteria.CriteriaBuilder
All Known Implementing Classes:
CriteriaBuilderImpl

public interface OpenJPACriteriaBuilder extends jakarta.persistence.criteria.CriteriaBuilder
OpenJPA-specific extension to JPA 2.0 Criteria Query Builder API.
Since:
2.0.0
Author:
Pinaki Poddar
  • Nested Class Summary

    Nested classes/interfaces inherited from interface jakarta.persistence.criteria.CriteriaBuilder

    jakarta.persistence.criteria.CriteriaBuilder.Case<R extends Object>, jakarta.persistence.criteria.CriteriaBuilder.Coalesce<T extends Object>, jakarta.persistence.criteria.CriteriaBuilder.In<T extends Object>, jakarta.persistence.criteria.CriteriaBuilder.SimpleCase<C extends Object,R extends Object>, jakarta.persistence.criteria.CriteriaBuilder.Trimspec
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The mnemonic to identify the query language.
  • Method Summary

    Modifier and Type
    Method
    Description
    Create a CriteriaQuery object.
    createQuery(Class<T> resultClass)
    Create a CriteriaQuery object with the specified result type.
    OpenJPACriteriaQuery<jakarta.persistence.Tuple>
    Create a CriteriaQuery object that returns a tuple of objects as its result.
    jakarta.persistence.metamodel.Metamodel
    Gets the metamodel for the managed, persistent domain entities.
    <T> jakarta.persistence.criteria.Predicate
    qbe(jakarta.persistence.criteria.From<?,T> from, T example)
    Overloaded with default comparison style and no extra attribute to exclude.
    <T> jakarta.persistence.criteria.Predicate
    qbe(jakarta.persistence.criteria.From<?,T> from, T example, jakarta.persistence.metamodel.Attribute<?,?>... excludes)
    Overloaded with default comparison style.
    <T> jakarta.persistence.criteria.Predicate
    qbe(jakarta.persistence.criteria.From<?,T> from, T example, ComparisonStyle style)
    Overloaded with no extra attribute to exclude.
    <T> jakarta.persistence.criteria.Predicate
    qbe(jakarta.persistence.criteria.From<?,T> from, T example, ComparisonStyle style, jakarta.persistence.metamodel.Attribute<?,?>... excludes)
    Create a predicate based upon the attribute values of a given "example" entity instance.
    Create a mutable style to apply on query-by-example.

    Methods inherited from interface jakarta.persistence.criteria.CriteriaBuilder

    abs, all, and, and, any, array, asc, avg, between, between, coalesce, coalesce, coalesce, concat, concat, concat, conjunction, construct, count, countDistinct, createCriteriaDelete, createCriteriaUpdate, currentDate, currentTime, currentTimestamp, desc, diff, diff, diff, disjunction, equal, equal, exists, function, ge, ge, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, greatest, gt, gt, in, isEmpty, isFalse, isMember, isMember, isNotEmpty, isNotMember, isNotMember, isNotNull, isNull, isTrue, keys, le, le, least, length, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo, like, like, like, like, like, like, literal, locate, locate, locate, locate, lower, lt, lt, max, min, mod, mod, mod, neg, not, notEqual, notEqual, notLike, notLike, notLike, notLike, notLike, notLike, nullif, nullif, nullLiteral, or, or, parameter, parameter, prod, prod, prod, quot, quot, quot, selectCase, selectCase, size, size, some, sqrt, substring, substring, substring, substring, sum, sum, sum, sum, sumAsDouble, sumAsLong, toBigDecimal, toBigInteger, toDouble, toFloat, toInteger, toLong, toString, treat, treat, treat, treat, treat, treat, treat, trim, trim, trim, trim, trim, trim, tuple, upper, values
  • Field Details

  • Method Details

    • qbe

      <T> jakarta.persistence.criteria.Predicate qbe(jakarta.persistence.criteria.From<?,T> from, T example, ComparisonStyle style, jakarta.persistence.metamodel.Attribute<?,?>... excludes)
      Create a predicate based upon the attribute values of a given "example" entity instance. The predicate is the conjunction or disjunction of predicates for subset of attribute of the entity.
      All the singular entity attributes (the basic, embedded and uni-cardinality relations) that have a non-null or non-default value for the example instance and are not an identity or version attribute are included. The comparable attributes can be further pruned by specifying variable list of attributes for exclusion.
      Parameters:
      example - a non-null instance of a persistent entity.
      style - specifies various aspects of comparison such as whether non-null attribute values be included, how string-valued attribute be compared, whether the individual attribute based predicates are ANDed or ORed etc. Can be null to designate default comparison style.
      excludes - list of attributes that are excluded from comparison. Can be null.
      Returns:
      a predicate
    • qbe

      <T> jakarta.persistence.criteria.Predicate qbe(jakarta.persistence.criteria.From<?,T> from, T example, ComparisonStyle style)
      Overloaded with no extra attribute to exclude.
    • qbe

      <T> jakarta.persistence.criteria.Predicate qbe(jakarta.persistence.criteria.From<?,T> from, T example, jakarta.persistence.metamodel.Attribute<?,?>... excludes)
      Overloaded with default comparison style.
    • qbe

      <T> jakarta.persistence.criteria.Predicate qbe(jakarta.persistence.criteria.From<?,T> from, T example)
      Overloaded with default comparison style and no extra attribute to exclude.
    • qbeStyle

      ComparisonStyle qbeStyle()
      Create a mutable style to apply on query-by-example.
    • getMetamodel

      jakarta.persistence.metamodel.Metamodel getMetamodel()
      Gets the metamodel for the managed, persistent domain entities.
    • createQuery

      Create a CriteriaQuery object.
      Specified by:
      createQuery in interface jakarta.persistence.criteria.CriteriaBuilder
      Returns:
      criteria query object
    • createQuery

      <T> OpenJPACriteriaQuery<T> createQuery(Class<T> resultClass)
      Create a CriteriaQuery object with the specified result type.
      Specified by:
      createQuery in interface jakarta.persistence.criteria.CriteriaBuilder
      Parameters:
      resultClass - type of the query result
      Returns:
      criteria query object
    • createTupleQuery

      OpenJPACriteriaQuery<jakarta.persistence.Tuple> createTupleQuery()
      Create a CriteriaQuery object that returns a tuple of objects as its result.
      Specified by:
      createTupleQuery in interface jakarta.persistence.criteria.CriteriaBuilder
      Returns:
      criteria query object