Class JdbcLiteral<T>
java.lang.Object
org.hibernate.sql.ast.tree.expression.JdbcLiteral<T>
- All Implemented Interfaces:
Bindable, JdbcMappingContainer, MappingModelExpressible<T>, org.hibernate.query.sqm.sql.internal.DomainResultProducer<T>, SqlSelectionProducer, Expression, Literal, SqlAstNode, JdbcParameterBinder, JavaTypedExpressible<T>
public class JdbcLiteral<T>
extends Object
implements Literal, MappingModelExpressible<T>, org.hibernate.query.sqm.sql.internal.DomainResultProducer<T>, JavaTypedExpressible<T>
Represents a literal in the SQL AST. This form accepts a
JdbcMapping and acts
as its own MappingModelExpressible.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer -
Field Summary
Fields inherited from interface JdbcParameterBinder
NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(SqlAstWalker sqlTreeWalker) voidaddToCacheKey(MutableCacheKeyBuilder cacheKey, Object value, SharedSessionContractImplementor session) Add to the MutableCacheKey the values obtained disassembling the value and the hasCode generated from the disassembled value.voidapplySqlSelections(DomainResultCreationState creationState) voidbindParameterValue(PreparedStatement statement, int startPosition, JdbcParameterBindings jdbcParameterBindings, ExecutionContext executionContext) Bind the appropriate value in the JDBC statementcreateDomainResult(String resultVariable, DomainResultCreationState creationState) disassemble(Object value, SharedSessionContractImplementor session) Breaks down a value ofJinto its simple pieces.<X,Y> int forEachDisassembledJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) LikeBindable.forEachDisassembledJdbcValue(Object, Object, Object, JdbcValuesBiConsumer, SharedSessionContractImplementor), but additionally receives an offset by which the selectionIndex is incremented when callingBindable.JdbcValuesBiConsumer.consume(int, Object, Object, Object, JdbcMapping).intforEachJdbcType(int offset, org.hibernate.internal.util.IndexedConsumer<JdbcMapping> action) Visit each JdbcMapping starting from the given offset<X,Y> int forEachJdbcValue(Object value, int offset, X x, Y y, Bindable.JdbcValuesBiConsumer<X, Y> valuesConsumer, SharedSessionContractImplementor session) Visit each constituent JDBC value extracted from the entity instance itself.The type for this expressiongetJdbcMapping(int index) intThe number of JDBC mappingsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface Expression
createDomainResultSqlSelection, createSqlSelection, getColumnReference
-
Constructor Details
-
JdbcLiteral
-
-
Method Details
-
getLiteralValue
- Specified by:
getLiteralValuein interfaceLiteral
-
getJdbcMapping
- Specified by:
getJdbcMappingin interfaceLiteral
-
accept
- Specified by:
acceptin interfaceSqlAstNode
-
bindParameterValue
public void bindParameterValue(PreparedStatement statement, int startPosition, JdbcParameterBindings jdbcParameterBindings, ExecutionContext executionContext) throws SQLException Description copied from interface:JdbcParameterBinderBind the appropriate value in the JDBC statement- Specified by:
bindParameterValuein interfaceJdbcParameterBinder- Throws:
SQLException
-
getExpressionType
Description copied from interface:ExpressionThe type for this expression- Specified by:
getExpressionTypein interfaceExpression
-
getJdbcTypeCount
public int getJdbcTypeCount()Description copied from interface:BindableThe number of JDBC mappings- Specified by:
getJdbcTypeCountin interfaceBindable- Specified by:
getJdbcTypeCountin interfaceJdbcMappingContainer
-
getJdbcMapping
- Specified by:
getJdbcMappingin interfaceJdbcMappingContainer
-
getSingleJdbcMapping
- Specified by:
getSingleJdbcMappingin interfaceJdbcMappingContainer
-
forEachJdbcType
public int forEachJdbcType(int offset, org.hibernate.internal.util.IndexedConsumer<JdbcMapping> action) Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
createDomainResult
public DomainResult<T> createDomainResult(String resultVariable, DomainResultCreationState creationState) - Specified by:
createDomainResultin interfaceorg.hibernate.query.sqm.sql.internal.DomainResultProducer<T>
-
applySqlSelections
- Specified by:
applySqlSelectionsin interfaceorg.hibernate.query.sqm.sql.internal.DomainResultProducer<T>
-
getExpressibleJavaType
- Specified by:
getExpressibleJavaTypein interfaceJavaTypedExpressible<T>
-