T - the type of the parameter expressionpublic class ParameterExpressionImpl<T> extends AbstractExpression<T> implements ParameterExpression<T>
| Constructor and Description |
|---|
ParameterExpressionImpl(TypeImpl<T> type,
Class<T> paramClass,
String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureAlias(BaseQueryImpl<?> query)
Ensures the alias has been created.
|
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.
|
int |
getExpandedCount(MetamodelImpl metamodelImpl)
Returns the number of SQL parameters when expanded.
|
String |
getName() |
Class<T> |
getParameterType() |
Integer |
getPosition() |
String[] |
getSqlRestrictionFragments(BaseQueryImpl<?> query)
Returns the SQL restriction fragments.
|
T |
handle(QueryImpl<?> query,
SessionImpl session,
ResultSet row)
Handles the row.
|
void |
setParameter(MetamodelImpl metamodel,
Object[] parameters,
org.apache.commons.lang.mutable.MutableInt sqlIndex,
Object value)
Sets the parameters expanding if necessary.
|
as, getConverter, in, in, in, in, isNotNull, isNull, setConverteralias, getAlias, getCompoundSelectionItems, isCompoundSelection, isEntityListgetJavaTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitas, in, in, in, in, isNotNull, isNullalias, getCompoundSelectionItems, isCompoundSelectiongetAlias, getJavaTypeprotected void ensureAlias(BaseQueryImpl<?> query)
query - the querypublic String generateJpqlRestriction(BaseQueryImpl<?> query)
generateJpqlRestriction in class AbstractExpression<T>query - the querypublic String generateJpqlSelect(AbstractCriteriaQueryImpl<?> query, boolean selected)
generateJpqlSelect in class AbstractSelection<T>query - the criteria queryselected - if the selection is selectedpublic String generateSqlSelect(AbstractCriteriaQueryImpl<?> query, boolean selected)
generateSqlSelect in class AbstractSelection<T>query - the queryselected - if the selection is selectedpublic int getExpandedCount(MetamodelImpl metamodelImpl)
metamodelImpl - the metamodelpublic Class<T> getParameterType()
getParameterType in interface Parameter<T>public Integer getPosition()
getPosition in interface Parameter<T>public String[] getSqlRestrictionFragments(BaseQueryImpl<?> query)
getSqlRestrictionFragments in class AbstractSelection<T>query - the querypublic T handle(QueryImpl<?> query, SessionImpl session, ResultSet row) throws SQLException
handle in class AbstractSelection<T>query - the querysession - the sessionrow - the rowSQLException - thrown in case of an underlying SQL Errorpublic void setParameter(MetamodelImpl metamodel, Object[] parameters, org.apache.commons.lang.mutable.MutableInt sqlIndex, Object value)
metamodel - the metamodelparameters - the SQL parameterssqlIndex - the index corresponding to expanded SQL parametervalue - the value to set to the parameterCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.