Class UnparsedNumericLiteral<N extends Number>
- java.lang.Object
-
- org.hibernate.sql.ast.tree.expression.UnparsedNumericLiteral<N>
-
- All Implemented Interfaces:
DomainResultProducer<N>
,SqlSelectionProducer
,Expression
,Literal
,SqlAstNode
,JdbcParameterBinder
public class UnparsedNumericLiteral<N extends Number> extends Object implements Literal, DomainResultProducer<N>
A numeric literal coming from an HQL query, which needs special handling- See Also:
SqmHqlNumericLiteral
-
-
Field Summary
-
Fields inherited from interface org.hibernate.sql.exec.spi.JdbcParameterBinder
NOOP
-
-
Constructor Summary
Constructors Constructor Description UnparsedNumericLiteral(String literalValue, NumericTypeCategory typeCategory, JdbcMapping jdbcMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(SqlAstWalker sqlTreeWalker)
void
applySqlSelections(DomainResultCreationState creationState)
Used when this producer is a selection in a sub-query.void
bindParameterValue(PreparedStatement statement, int startPosition, JdbcParameterBindings jdbcParameterBindings, ExecutionContext executionContext)
Bind the appropriate value in the JDBC statementDomainResult<N>
createDomainResult(String resultVariable, DomainResultCreationState creationState)
Produce the domain queryJdbcMappingContainer
getExpressionType()
The type for this expressionJdbcMapping
getJdbcMapping()
N
getLiteralValue()
String
getUnparsedLiteralValue()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.ast.tree.expression.Expression
createDomainResultSqlSelection, createSqlSelection, getColumnReference
-
-
-
-
Constructor Detail
-
UnparsedNumericLiteral
public UnparsedNumericLiteral(String literalValue, NumericTypeCategory typeCategory, JdbcMapping jdbcMapping)
-
-
Method Detail
-
getLiteralValue
public N getLiteralValue()
- Specified by:
getLiteralValue
in interfaceLiteral
-
bindParameterValue
public void bindParameterValue(PreparedStatement statement, int startPosition, JdbcParameterBindings jdbcParameterBindings, ExecutionContext executionContext) throws SQLException
Description copied from interface:JdbcParameterBinder
Bind the appropriate value in the JDBC statement- Specified by:
bindParameterValue
in interfaceJdbcParameterBinder
- Throws:
SQLException
-
getUnparsedLiteralValue
public String getUnparsedLiteralValue()
-
getJdbcMapping
public JdbcMapping getJdbcMapping()
- Specified by:
getJdbcMapping
in interfaceLiteral
-
getExpressionType
public JdbcMappingContainer getExpressionType()
Description copied from interface:Expression
The type for this expression- Specified by:
getExpressionType
in interfaceExpression
-
createDomainResult
public DomainResult<N> createDomainResult(String resultVariable, DomainResultCreationState creationState)
Description copied from interface:DomainResultProducer
Produce the domain query- Specified by:
createDomainResult
in interfaceDomainResultProducer<N extends Number>
-
applySqlSelections
public void applySqlSelections(DomainResultCreationState creationState)
Description copied from interface:DomainResultProducer
Used when this producer is a selection in a sub-query. The DomainResult is only needed for root query of a SELECT statement. This default impl assumes this producer is a true (Sql)Expression- Specified by:
applySqlSelections
in interfaceDomainResultProducer<N extends Number>
-
accept
public void accept(SqlAstWalker sqlTreeWalker)
- Specified by:
accept
in interfaceSqlAstNode
-
-