Class BasicTypeImpl<J>
- java.lang.Object
-
- org.hibernate.metamodel.model.domain.internal.BasicTypeImpl<J>
-
- All Implemented Interfaces:
BasicType<J>,Type<J>,Serializable,JdbcMapping,JdbcMappingContainer,MappingType,BasicDomainType<J>,DomainType<J>,SimpleDomainType<J>,BindableType<J>,OutputableType<J>,ReturnableType<J>,SqmExpressible<J>
- Direct Known Subclasses:
PrimitiveBasicTypeImpl
public class BasicTypeImpl<J> extends Object implements BasicDomainType<J>, JdbcMapping, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Type
Type.PersistenceType
-
-
Constructor Summary
Constructors Constructor Description BasicTypeImpl(JavaType<J> javaType, JdbcType jdbcType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDoExtraction()Can the given instance of this type actually perform the parameter value extractions?Jextract(CallableStatement statement, int paramIndex, SharedSessionContractImplementor session)Perform the extractionJextract(CallableStatement statement, String paramName, SharedSessionContractImplementor session)Perform the extractionJavaType<J>getExpressibleJavaType()The Java type descriptor for this expressibleClass<J>getJavaType()JavaTypegetJavaTypeDescriptor()The descriptor for the Java type represented by this expressible typeJdbcTypegetJdbcType()Descriptor for the SQL type mapped by this type.ValueBindergetJdbcValueBinder()The strategy for binding values of this expressible type to JDBCPreparedStatements andCallableStatements.ValueExtractor<?>getJdbcValueExtractor()The strategy for extracting values of this expressible type from JDBC ResultSets, CallableStatements, etcType.PersistenceTypegetPersistenceType()-
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.model.domain.BasicDomainType
areEqual
-
Methods inherited from interface org.hibernate.metamodel.model.domain.DomainType
getSqmType, getTupleLength
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMapping
convertToDomainValue, convertToRelationalValue, forEachJdbcType, forEachJdbcType, getCastType, getJdbcJavaType, getJdbcLiteralFormatter, getJdbcMapping, getJdbcTypeCount, getMappedJavaType, getSingleJdbcMapping, getValueConverter
-
Methods inherited from interface org.hibernate.metamodel.model.domain.SimpleDomainType
getBindableJavaType
-
Methods inherited from interface org.hibernate.query.sqm.SqmExpressible
getRelationalJavaType, getTypeName, isInstance, resolveExpressible
-
-
-
-
Method Detail
-
getPersistenceType
public Type.PersistenceType getPersistenceType()
- Specified by:
getPersistenceTypein interfaceBasicDomainType<J>- Specified by:
getPersistenceTypein interfaceType<J>
-
getExpressibleJavaType
public JavaType<J> getExpressibleJavaType()
Description copied from interface:SqmExpressibleThe Java type descriptor for this expressible- Specified by:
getExpressibleJavaTypein interfaceSqmExpressible<J>
-
getJavaType
public Class<J> getJavaType()
- Specified by:
getJavaTypein interfaceType<J>
-
canDoExtraction
public boolean canDoExtraction()
Description copied from interface:OutputableTypeCan the given instance of this type actually perform the parameter value extractions?- Specified by:
canDoExtractionin interfaceOutputableType<J>- Returns:
trueindicates thatOutputableType.extract(java.sql.CallableStatement, int, org.hibernate.engine.spi.SharedSessionContractImplementor)calls will not fail due toIllegalStateException.
-
getJdbcType
public JdbcType getJdbcType()
Description copied from interface:OutputableTypeDescriptor for the SQL type mapped by this type.- Specified by:
getJdbcTypein interfaceJdbcMapping- Specified by:
getJdbcTypein interfaceOutputableType<J>
-
extract
public J extract(CallableStatement statement, int paramIndex, SharedSessionContractImplementor session) throws SQLException
Description copied from interface:OutputableTypePerform the extraction- Specified by:
extractin interfaceOutputableType<J>- Parameters:
statement- The CallableStatement from which to extract the parameter value(s).paramIndex- The parameter index from which to extractsession- The originating session- Returns:
- The extracted value.
- Throws:
SQLException- Indicates an issue calling into the CallableStatement
-
extract
public J extract(CallableStatement statement, String paramName, SharedSessionContractImplementor session) throws SQLException
Description copied from interface:OutputableTypePerform the extraction- Specified by:
extractin interfaceOutputableType<J>- Parameters:
statement- The CallableStatement from which to extract the parameter value(s).paramName- The parameter names.session- The originating session- Returns:
- The extracted value.
- Throws:
SQLException- Indicates an issue calling into the CallableStatement
-
getJavaTypeDescriptor
public JavaType getJavaTypeDescriptor()
Description copied from interface:JdbcMappingThe descriptor for the Java type represented by this expressible type- Specified by:
getJavaTypeDescriptorin interfaceJdbcMapping
-
getJdbcValueExtractor
public ValueExtractor<?> getJdbcValueExtractor()
Description copied from interface:JdbcMappingThe strategy for extracting values of this expressible type from JDBC ResultSets, CallableStatements, etc- Specified by:
getJdbcValueExtractorin interfaceJdbcMapping
-
getJdbcValueBinder
public ValueBinder getJdbcValueBinder()
Description copied from interface:JdbcMappingThe strategy for binding values of this expressible type to JDBCPreparedStatements andCallableStatements.- Specified by:
getJdbcValueBinderin interfaceJdbcMapping
-
-