Package org.hibernate.sql.exec.internal
Class AbstractJdbcParameter
java.lang.Object
org.hibernate.sql.exec.internal.AbstractJdbcParameter
- All Implemented Interfaces:
BasicValuedMapping,Bindable,JdbcMappingContainer,MappingModelExpressible,SqlExpressible,ValueMapping,SqlSelectionProducer,Expression,JdbcParameter,SqlAstNode,JdbcParameterBinder,JavaTypedExpressible
- Direct Known Subclasses:
ColumnValueParameter,JdbcParameterImpl,SqlTypedMappingJdbcParameter,VersionTypeSeedParameterSpecification
public abstract class AbstractJdbcParameter
extends Object
implements JdbcParameter, JdbcParameterBinder, MappingModelExpressible, SqlExpressible, BasicValuedMapping
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesBiConsumer<X,Y>, Bindable.JdbcValuesConsumer -
Field Summary
Fields inherited from interface org.hibernate.sql.exec.spi.JdbcParameterBinder
NOOP -
Constructor Summary
ConstructorsConstructorDescriptionAbstractJdbcParameter(JdbcMapping jdbcMapping) AbstractJdbcParameter(JdbcMapping jdbcMapping, @Nullable Integer parameterId) -
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.voidbindParameterValue(PreparedStatement statement, int startPosition, JdbcParameterBindings jdbcParamBindings, ExecutionContext executionContext) Bind the appropriate value in the JDBC statementprotected voidbindParameterValue(JdbcMapping jdbcMapping, PreparedStatement statement, Object bindValue, int startPosition, ExecutionContext executionContext) 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, 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 expressionAnything that is expressible at the SQL AST level would be of basic type.intThe number of JDBC mappingsDescriptor for the type of this mapping@Nullable IntegerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.mapping.BasicValuedMapping
getJdbcMappingMethods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValueMethods inherited from interface org.hibernate.sql.ast.tree.expression.Expression
createDomainResultSqlSelection, createSqlSelection, getColumnReferenceMethods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
getExpressibleJavaType, treatAs
-
Constructor Details
-
AbstractJdbcParameter
-
AbstractJdbcParameter
-
-
Method Details
-
getParameterBinder
- Specified by:
getParameterBinderin interfaceJdbcParameter
-
getJdbcMapping
Description copied from interface:SqlExpressibleAnything that is expressible at the SQL AST level would be of basic type.- Specified by:
getJdbcMappingin interfaceBasicValuedMapping- Specified by:
getJdbcMappingin interfaceSqlExpressible
-
getMappedType
Description copied from interface:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfaceValueMapping
-
getParameterId
- Specified by:
getParameterIdin interfaceJdbcParameter
-
accept
- Specified by:
acceptin interfaceSqlAstNode
-
getSingleJdbcMapping
- Specified by:
getSingleJdbcMappingin interfaceBasicValuedMapping- Specified by:
getSingleJdbcMappingin interfaceJdbcMappingContainer
-
bindParameterValue
public void bindParameterValue(PreparedStatement statement, int startPosition, JdbcParameterBindings jdbcParamBindings, ExecutionContext executionContext) throws SQLException Description copied from interface:JdbcParameterBinderBind the appropriate value in the JDBC statement- Specified by:
bindParameterValuein interfaceJdbcParameterBinder- Throws:
SQLException
-
bindParameterValue
protected void bindParameterValue(JdbcMapping jdbcMapping, PreparedStatement statement, Object bindValue, int startPosition, ExecutionContext executionContext) throws SQLException - 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 interfaceBasicValuedMapping- Specified by:
getJdbcTypeCountin interfaceBindable- Specified by:
getJdbcTypeCountin interfaceJdbcMappingContainer
-
forEachJdbcType
Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-