C - the type of the case expressionR - the type of the result expressionpublic class SimpleCaseImpl<C,R> extends AbstractExpression<R> implements javax.persistence.criteria.CriteriaBuilder.SimpleCase<C,R>
CriteriaBuilder.SimpleCase.| Constructor and Description |
|---|
SimpleCaseImpl(javax.persistence.criteria.Expression<? extends C> inner) |
| Modifier and Type | Method and Description |
|---|---|
String |
generateJpqlRestriction(BaseQueryImpl<?> query)
Returns the JPQL where fragment.
|
String |
generateJpqlSelect(AbstractCriteriaQueryImpl<?> query,
boolean selected)
Returns the JPQL select fragment.
|
String |
generateSqlSelect(AbstractCriteriaQueryImpl<?> query,
boolean selected)
Returns the SQL select fragment.
|
javax.persistence.criteria.Expression<C> |
getExpression() |
String[] |
getSqlRestrictionFragments(BaseQueryImpl<?> query)
Returns the SQL restriction fragments.
|
R |
handle(QueryImpl<?> query,
SessionImpl session,
ResultSet row)
Handles the row.
|
javax.persistence.criteria.Expression<R> |
otherwise(javax.persistence.criteria.Expression<? extends R> result) |
javax.persistence.criteria.Expression<R> |
otherwise(R result) |
SimpleCaseImpl<C,R> |
when(AbstractExpression<C> condition,
AbstractExpression<R> result)
Add a when/then clause to the case expression.
|
javax.persistence.criteria.CriteriaBuilder.SimpleCase<C,R> |
when(C condition,
javax.persistence.criteria.Expression<? extends R> result) |
javax.persistence.criteria.CriteriaBuilder.SimpleCase<C,R> |
when(C condition,
R result) |
as, getConverter, in, in, in, in, isNotNull, isNull, notIn, notIn, notIn, notIn, setConverteralias, getAlias, getCompoundSelectionItems, isCompoundSelection, isEntityListgetJavaTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitas, in, in, in, in, isNotNull, isNullpublic SimpleCaseImpl(javax.persistence.criteria.Expression<? extends C> inner)
inner - the inner expressionpublic String generateJpqlRestriction(BaseQueryImpl<?> query)
generateJpqlRestriction in class AbstractExpression<R>query - the querypublic String generateJpqlSelect(AbstractCriteriaQueryImpl<?> query, boolean selected)
generateJpqlSelect in class AbstractSelection<R>query - the criteria queryselected - if the selection is selectedpublic String generateSqlSelect(AbstractCriteriaQueryImpl<?> query, boolean selected)
generateSqlSelect in class AbstractSelection<R>query - the queryselected - if the selection is selectedpublic javax.persistence.criteria.Expression<C> getExpression()
public String[] getSqlRestrictionFragments(BaseQueryImpl<?> query)
getSqlRestrictionFragments in class AbstractSelection<R>query - the querypublic R handle(QueryImpl<?> query, SessionImpl session, ResultSet row) throws SQLException
handle in class AbstractSelection<R>query - the querysession - the sessionrow - the rowSQLException - thrown in case of an underlying SQL Errorpublic javax.persistence.criteria.Expression<R> otherwise(javax.persistence.criteria.Expression<? extends R> result)
public SimpleCaseImpl<C,R> when(AbstractExpression<C> condition, AbstractExpression<R> result)
condition - "when" conditionresult - "then" result expressionpublic javax.persistence.criteria.CriteriaBuilder.SimpleCase<C,R> when(C condition, javax.persistence.criteria.Expression<? extends R> result)
Copyright © 2012-2013 Batoo. All Rights Reserved.