Class AbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.model.AbstractStateObjectBuilder
-
- org.eclipse.persistence.jpa.jpql.tools.model.AbstractScalarExpressionStateObjectBuilder<T>
-
- org.eclipse.persistence.jpa.jpql.tools.model.AbstractConditionalExpressionStateObjectBuilder<T>
-
- All Implemented Interfaces:
IAbstractConditionalExpressionStateObjectBuilder<T>
,IScalarExpressionStateObjectBuilder<T>
- Direct Known Subclasses:
AbstractCaseExpressionStateObjectBuilder
,DefaultConditionalExpressionStateObjectBuilder
,EclipseLinkConditionalStateObjectBuilder
public abstract class AbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>> extends AbstractScalarExpressionStateObjectBuilder<T> implements IAbstractConditionalExpressionStateObjectBuilder<T>
The abstract implementation ofIConditionalExpressionStateObjectBuilder
that supports the creation of the conditional expression based on the JPQL grammar defined in JPA 2.0.- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Constructor Summary
Constructors Constructor Description AbstractConditionalExpressionStateObjectBuilder(StateObject parent)
Creates a newAbstractStateObjectBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
all(SimpleSelectStatementStateObject subquery)
Creates the expressionALL(subquery)
.protected void
allOrAny(java.lang.String identifier, SimpleSelectStatementStateObject subquery)
T
and(T builder)
Creates the expressionx AND y
.T
any(SimpleSelectStatementStateObject subquery)
Creates the expressionANY(subquery)
.protected void
between(boolean not)
T
between(T lowerBoundExpression, T upperBoundExpression)
Creates the expressionx BETWEEN y AND z
.T
collectionPath(java.lang.String path)
Creates a new collection-valued path expression.protected void
comparison(java.lang.String identifier)
protected void
comparison(java.lang.String identifier, StateObject rightStateObject)
T
different(java.lang.Number number)
T
different(java.lang.String literal)
T
different(T builder)
T
equal(java.lang.Number number)
T
equal(java.lang.String literal)
T
equal(T builder)
protected void
exists(boolean not, SimpleSelectStatementStateObject subquery)
T
exists(SimpleSelectStatementStateObject subquery)
T
FALSE()
T
greaterThan(java.lang.Number number)
T
greaterThan(java.lang.String literal)
T
greaterThan(T builder)
T
greaterThanOrEqual(java.lang.Number number)
T
greaterThanOrEqual(java.lang.String literal)
T
greaterThanOrEqual(T builder)
protected void
in(boolean not, java.lang.String... inItems)
protected void
in(boolean not, java.util.List<StateObject> inItems)
protected void
in(boolean not, T... inItems)
T
in(java.lang.String... inItems)
T
in(SimpleSelectStatementStateObject subquery)
T
in(T... inItems)
protected void
isEmpty(boolean not, java.lang.String path)
T
isEmpty(java.lang.String path)
T
isNotEmpty(java.lang.String path)
T
isNotNull(java.lang.String path)
protected void
isNull(boolean not, java.lang.String path)
T
isNull(java.lang.String path)
protected void
keyword(java.lang.String identifier)
protected void
like(boolean not, java.lang.String escapeCharacter)
T
like(java.lang.String patternValue)
T
like(T patternValue)
T
like(T patternValue, java.lang.String escapeCharacter)
T
lower(T builder)
T
lowerThan(java.lang.Number number)
T
lowerThan(java.lang.String literal)
T
lowerThan(T builder)
T
lowerThanOrEqual(java.lang.Number number)
T
lowerThanOrEqual(java.lang.String literal)
T
lowerThanOrEqual(T builder)
protected void
member(boolean not, boolean of, java.lang.String collectionValuedPathExpression)
T
member(java.lang.String path)
T
memberOf(java.lang.String path)
T
notBetween(T lowerBoundExpression, T upperBoundExpression)
T
notExists(SimpleSelectStatementStateObject subquery)
T
notIn(java.lang.String... inItems)
T
notIn(SimpleSelectStatementStateObject subquery)
T
notIn(T... inItems)
T
notLike(java.lang.String patternValue)
T
notLike(T builder)
T
notLike(T builder, java.lang.String escapeCharacter)
T
notMember(java.lang.String path)
T
notMemberOf(java.lang.String path)
T
NULL()
T
or(T builder)
T
some(SimpleSelectStatementStateObject subquery)
T
sub(StateObject stateObject)
T
substring(T parameter1, T parameter2, T parameter3)
T
trim(TrimExpression.Specification specification, java.lang.String trimCharacter, T builder)
T
trim(TrimExpression.Specification specification, T builder)
T
TRUE()
T
upper(T builder)
T
variable(java.lang.String variable)
Creates the expression representing an identification variable.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.AbstractScalarExpressionStateObjectBuilder
abs, add, arithmetic, avg, avg, avgDistinct, buildCollectionPath, buildIdentificationVariable, buildInputParameter, buildNumeric, buildNumeric, buildStateFieldPath, buildStringLiteral, case_, coalesce, concat, count, count, countDistinct, currentDate, currentTime, currentTimestamp, date, divide, entityType, enumLiteral, function, function, getCaseBuilder, getParent, index, length, literal, literals, locate, locate, max, max, maxDistinct, min, min, minDistinct, minus, mod, multiply, nullIf, numeric, numeric, parameter, path, plus, size, sqrt, stateObjects, stateObjects, string, sub, subtract, sum, sum, sumDistinct, type
-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.AbstractStateObjectBuilder
add, checkBuilder, checkBuilders, hasStateObjects, pop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder
abs, add, avg, avgDistinct, case_, coalesce, concat, count, countDistinct, currentDate, currentTime, currentTimestamp, date, divide, entityType, enumLiteral, function, function, getCaseBuilder, index, length, locate, locate, max, maxDistinct, min, minDistinct, minus, mod, multiply, nullIf, numeric, numeric, parameter, path, plus, size, sqrt, string, sub, subtract, sum, sumDistinct, type
-
-
-
-
Constructor Detail
-
AbstractConditionalExpressionStateObjectBuilder
public AbstractConditionalExpressionStateObjectBuilder(StateObject parent)
Creates a newAbstractStateObjectBuilder
.- Parameters:
parent
- The parent of the expression to build, which is only required when a JPQL fragment needs to be parsed
-
-
Method Detail
-
all
public T all(SimpleSelectStatementStateObject subquery)
Creates the expressionALL(subquery)
.- Specified by:
all
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
- Parameters:
subquery
- The already constructed subquery- Returns:
- This builder
-
allOrAny
protected void allOrAny(java.lang.String identifier, SimpleSelectStatementStateObject subquery)
-
and
public T and(T builder)
Creates the expressionx AND y
.- Specified by:
and
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
- Parameters:
builder
- The right side of the logical expression- Returns:
- This builder
-
any
public T any(SimpleSelectStatementStateObject subquery)
Creates the expressionANY(subquery)
.- Specified by:
any
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
- Parameters:
subquery
- The already constructed subquery- Returns:
- This builder
-
between
protected void between(boolean not)
-
between
public T between(T lowerBoundExpression, T upperBoundExpression)
Creates the expressionx BETWEEN y AND z
.- Specified by:
between
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
- Parameters:
lowerBoundExpression
- The lower bound expressionupperBoundExpression
- The upper bound expression- Returns:
- This builder
-
collectionPath
public T collectionPath(java.lang.String path)
Creates a new collection-valued path expression.- Specified by:
collectionPath
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
- Parameters:
path
- The collection-valued path expression- Returns:
- This builder
-
comparison
protected void comparison(java.lang.String identifier)
-
comparison
protected void comparison(java.lang.String identifier, StateObject rightStateObject)
-
different
public T different(java.lang.Number number)
- Specified by:
different
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
different
public T different(java.lang.String literal)
- Specified by:
different
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
different
public T different(T builder)
- Specified by:
different
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
equal
public T equal(java.lang.Number number)
- Specified by:
equal
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
equal
public T equal(java.lang.String literal)
- Specified by:
equal
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
equal
public T equal(T builder)
- Specified by:
equal
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
exists
protected void exists(boolean not, SimpleSelectStatementStateObject subquery)
-
exists
public T exists(SimpleSelectStatementStateObject subquery)
- Specified by:
exists
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
FALSE
public T FALSE()
- Specified by:
FALSE
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
greaterThan
public T greaterThan(java.lang.Number number)
- Specified by:
greaterThan
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
greaterThan
public T greaterThan(java.lang.String literal)
- Specified by:
greaterThan
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
greaterThan
public T greaterThan(T builder)
- Specified by:
greaterThan
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
greaterThanOrEqual
public T greaterThanOrEqual(java.lang.Number number)
- Specified by:
greaterThanOrEqual
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
greaterThanOrEqual
public T greaterThanOrEqual(java.lang.String literal)
- Specified by:
greaterThanOrEqual
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
greaterThanOrEqual
public T greaterThanOrEqual(T builder)
- Specified by:
greaterThanOrEqual
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
in
protected void in(boolean not, java.util.List<StateObject> inItems)
-
in
protected void in(boolean not, java.lang.String... inItems)
-
in
protected void in(boolean not, T... inItems)
-
in
public T in(SimpleSelectStatementStateObject subquery)
- Specified by:
in
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
in
public T in(java.lang.String... inItems)
- Specified by:
in
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
in
public T in(T... inItems)
- Specified by:
in
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
isEmpty
protected void isEmpty(boolean not, java.lang.String path)
-
isEmpty
public T isEmpty(java.lang.String path)
- Specified by:
isEmpty
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
isNotEmpty
public T isNotEmpty(java.lang.String path)
- Specified by:
isNotEmpty
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
isNotNull
public T isNotNull(java.lang.String path)
- Specified by:
isNotNull
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
isNull
protected void isNull(boolean not, java.lang.String path)
-
isNull
public T isNull(java.lang.String path)
- Specified by:
isNull
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
keyword
protected void keyword(java.lang.String identifier)
-
like
protected void like(boolean not, java.lang.String escapeCharacter)
-
like
public T like(java.lang.String patternValue)
- Specified by:
like
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
like
public T like(T patternValue)
- Specified by:
like
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
like
public T like(T patternValue, java.lang.String escapeCharacter)
- Specified by:
like
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
lower
public T lower(T builder)
- Specified by:
lower
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
lowerThan
public T lowerThan(java.lang.Number number)
- Specified by:
lowerThan
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
lowerThan
public T lowerThan(java.lang.String literal)
- Specified by:
lowerThan
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
lowerThan
public T lowerThan(T builder)
- Specified by:
lowerThan
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
lowerThanOrEqual
public T lowerThanOrEqual(java.lang.Number number)
- Specified by:
lowerThanOrEqual
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
lowerThanOrEqual
public T lowerThanOrEqual(java.lang.String literal)
- Specified by:
lowerThanOrEqual
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
lowerThanOrEqual
public T lowerThanOrEqual(T builder)
- Specified by:
lowerThanOrEqual
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
member
protected void member(boolean not, boolean of, java.lang.String collectionValuedPathExpression)
-
member
public T member(java.lang.String path)
- Specified by:
member
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
memberOf
public T memberOf(java.lang.String path)
- Specified by:
memberOf
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notBetween
public T notBetween(T lowerBoundExpression, T upperBoundExpression)
- Specified by:
notBetween
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notExists
public T notExists(SimpleSelectStatementStateObject subquery)
- Specified by:
notExists
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notIn
public T notIn(SimpleSelectStatementStateObject subquery)
- Specified by:
notIn
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notIn
public T notIn(java.lang.String... inItems)
- Specified by:
notIn
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notIn
public T notIn(T... inItems)
- Specified by:
notIn
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notLike
public T notLike(java.lang.String patternValue)
- Specified by:
notLike
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notLike
public T notLike(T builder)
- Specified by:
notLike
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notLike
public T notLike(T builder, java.lang.String escapeCharacter)
- Specified by:
notLike
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notMember
public T notMember(java.lang.String path)
- Specified by:
notMember
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
notMemberOf
public T notMemberOf(java.lang.String path)
- Specified by:
notMemberOf
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
NULL
public T NULL()
- Specified by:
NULL
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
or
public T or(T builder)
- Specified by:
or
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
some
public T some(SimpleSelectStatementStateObject subquery)
- Specified by:
some
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
sub
public T sub(StateObject stateObject)
- Specified by:
sub
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
substring
public T substring(T parameter1, T parameter2, T parameter3)
- Specified by:
substring
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
trim
public T trim(TrimExpression.Specification specification, java.lang.String trimCharacter, T builder)
- Specified by:
trim
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
trim
public T trim(TrimExpression.Specification specification, T builder)
- Specified by:
trim
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
TRUE
public T TRUE()
- Specified by:
TRUE
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
upper
public T upper(T builder)
- Specified by:
upper
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
-
variable
public T variable(java.lang.String variable)
Creates the expression representing an identification variable.- Specified by:
variable
in interfaceIAbstractConditionalExpressionStateObjectBuilder<T extends IAbstractConditionalExpressionStateObjectBuilder<T>>
- Parameters:
variable
- The identification variable- Returns:
- This builder
-
-