org.apache.openjpa.persistence.criteria
Interface OpenJPACriteriaBuilder

All Superinterfaces:
javax.persistence.criteria.QueryBuilder
All Known Implementing Classes:
CriteriaBuilder

public interface OpenJPACriteriaBuilder
extends javax.persistence.criteria.QueryBuilder

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 javax.persistence.criteria.QueryBuilder
javax.persistence.criteria.QueryBuilder.Case<R>, javax.persistence.criteria.QueryBuilder.Coalesce<T>, javax.persistence.criteria.QueryBuilder.In<T>, javax.persistence.criteria.QueryBuilder.SimpleCase<C,R>, javax.persistence.criteria.QueryBuilder.Trimspec
 
Method Summary
 javax.persistence.metamodel.Metamodel getMetamodel()
          Gets the metamodel for the managed, persistent domain entities.
<T> javax.persistence.criteria.Predicate
qbe(javax.persistence.criteria.From<?,T> from, T example)
          Overloaded with default comparison style and no extra attribute to exclude.
<T> javax.persistence.criteria.Predicate
qbe(javax.persistence.criteria.From<?,T> from, T example, javax.persistence.metamodel.Attribute<?,?>... excludes)
          Overloaded with default comparison style.
<T> javax.persistence.criteria.Predicate
qbe(javax.persistence.criteria.From<?,T> from, T example, ComparisonStyle style)
          Overloaded with no extra attribute to exclude.
<T> javax.persistence.criteria.Predicate
qbe(javax.persistence.criteria.From<?,T> from, T example, ComparisonStyle style, javax.persistence.metamodel.Attribute<?,?>... excludes)
          Create a predicate based upon the attribute values of a given "example" entity instance.
 ComparisonStyle qbeStyle()
          Create a mutable style to apply on query-by-example.
 
Methods inherited from interface javax.persistence.criteria.QueryBuilder
abs, all, and, and, any, array, asc, avg, between, between, coalesce, coalesce, coalesce, concat, concat, concat, conjunction, construct, count, countDistinct, createQuery, createQuery, createTupleQuery, 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, toBigDecimal, toBigInteger, toDouble, toFloat, toInteger, toLong, toString, trim, trim, trim, trim, trim, trim, tuple, upper, values
 

Method Detail

qbe

<T> javax.persistence.criteria.Predicate qbe(javax.persistence.criteria.From<?,T> from,
                                             T example,
                                             ComparisonStyle style,
                                             javax.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> javax.persistence.criteria.Predicate qbe(javax.persistence.criteria.From<?,T> from,
                                             T example,
                                             ComparisonStyle style)
Overloaded with no extra attribute to exclude.


qbe

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


qbe

<T> javax.persistence.criteria.Predicate qbe(javax.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

javax.persistence.metamodel.Metamodel getMetamodel()
Gets the metamodel for the managed, persistent domain entities.



Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.