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 aJdbcMappingand acts as its ownMappingModelExpressible.- See Also:
QueryLiteral
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesConsumer
-
-
Field Summary
-
Fields inherited from interface org.hibernate.sql.exec.spi.JdbcParameterBinder
NOOP
-
-
Constructor Summary
Constructors Constructor Description JdbcLiteral(T literalValue, JdbcMapping jdbcMapping)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue
-
Methods inherited from interface org.hibernate.sql.ast.tree.expression.Expression
createSqlSelection, getColumnReference
-
-
-
-
Constructor Detail
-
JdbcLiteral
public JdbcLiteral(T literalValue, JdbcMapping jdbcMapping)
-
-
Method Detail
-
getLiteralValue
public Object getLiteralValue()
- Specified by:
getLiteralValuein interfaceLiteral
-
getJdbcMapping
public JdbcMapping getJdbcMapping()
- Specified by:
getJdbcMappingin interfaceLiteral
-
accept
public void accept(SqlAstWalker sqlTreeWalker)
- 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
public MappingModelExpressible 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
-
getJdbcMappings
public List<JdbcMapping> getJdbcMappings()
Description copied from interface:BindableThe list of JDBC mappings- Specified by:
getJdbcMappingsin interfaceBindable- Specified by:
getJdbcMappingsin interfaceJdbcMappingContainer
-
forEachJdbcType
public int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
disassemble
public Object disassemble(Object value, SharedSessionContractImplementor session)
- Specified by:
disassemblein interfaceBindable- See Also:
As an example, consider the following domain model: ````
-
forEachDisassembledJdbcValue
public int forEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
- Specified by:
forEachDisassembledJdbcValuein interfaceBindable
-
forEachJdbcValue
public int forEachJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
- Specified by:
forEachJdbcValuein interfaceBindable
-
createDomainResult
public DomainResult<T> createDomainResult(String resultVariable, DomainResultCreationState creationState)
- Specified by:
createDomainResultin interfaceorg.hibernate.query.sqm.sql.internal.DomainResultProducer<T>
-
applySqlSelections
public void applySqlSelections(DomainResultCreationState creationState)
- Specified by:
applySqlSelectionsin interfaceorg.hibernate.query.sqm.sql.internal.DomainResultProducer<T>
-
getExpressibleJavaType
public JavaType<T> getExpressibleJavaType()
- Specified by:
getExpressibleJavaTypein interfaceJavaTypedExpressible<T>
-
-