Package org.hibernate.type
Interface BasicType<T>
-
- All Superinterfaces:
BasicDomainType<T>,BasicType<T>,BasicValuedMapping,Bindable,BindableType<T>,DomainType<T>,JavaTypedExpressible,JdbcMapping,JdbcMappingContainer,MappingModelExpressible,MappingType,OutputableType<T>,ReturnableType<T>,Serializable,SimpleDomainType<T>,SqlExpressible,SqmExpressible<T>,Type<T>,Type,ValueMapping
- All Known Subinterfaces:
AdjustableBasicType<J>,BasicPluralType<C,E>,ConvertedBasicType<J>
- All Known Implementing Classes:
AbstractSingleColumnStandardBasicType,AbstractStandardBasicType,BasicArrayType,BasicCollectionType,CustomType,DbTimestampType,DiscriminatorType,JavaObjectType,NullType,SerializableToBlobType,SerializableType,StandardBasicTypeTemplate
public interface BasicType<T> extends Type, BasicDomainType<T>, MappingType, BasicValuedMapping, JdbcMapping
Marker interface for basic types.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable
Bindable.JdbcValuesConsumer
-
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Type
Type.PersistenceType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Objectdisassemble(Object value, SharedSessionContractImplementor session)default intforEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)default intforEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)Visit each JdbcMapping starting from the given offsetdefault intforEachJdbcType(IndexedConsumer<JdbcMapping> action)Visit each of JdbcMappingdefault JavaType<T>getExpressibleJavaType()The descriptor for the Java type (i.e.default JavaType<T>getJavaTypeDescriptor()The descriptor for the Java type represented by this expressible typedefault JdbcLiteralFormatter<T>getJdbcLiteralFormatter()The strategy for formatting values of this expressible type to a SQL literal.default JdbcMappinggetJdbcMapping()Anything that is expressible at the SQL AST level would be of basic type.default List<JdbcMapping>getJdbcMappings()The list of JDBC mappingsdefault intgetJdbcTypeCount()The number of JDBC mappingsdefault ValueBinder<T>getJdbcValueBinder()The strategy for binding values of this expressible type to JDBCPreparedStatements andCallableStatements.default ValueExtractor<T>getJdbcValueExtractor()The strategy for extracting values of this expressible type from JDBC ResultSets, CallableStatements, etcdefault JavaType<T>getMappedJavaType()default MappingTypegetMappedType()Descriptor for the type of this mappingString[]getRegistrationKeys()Get the names under which this type should be registered in the type registry.default BasicValueConverter<T,?>getValueConverter()Returns the converter that this basic type uses for transforming from the domain type, to the relational type, ornullif there is no conversion.-
Methods inherited from interface org.hibernate.metamodel.model.domain.BasicDomainType
areEqual, getPersistenceType
-
Methods inherited from interface org.hibernate.metamodel.mapping.Bindable
forEachDisassembledJdbcValue, forEachJdbcValue, forEachJdbcValue
-
Methods inherited from interface org.hibernate.metamodel.model.domain.DomainType
getTypeName
-
Methods inherited from interface org.hibernate.metamodel.mapping.JdbcMapping
getCastType, getJdbcJavaType, getJdbcType
-
Methods inherited from interface org.hibernate.query.OutputableType
canDoExtraction, extract, extract, getJdbcType
-
Methods inherited from interface org.hibernate.metamodel.model.domain.SimpleDomainType
getBindableJavaType
-
Methods inherited from interface org.hibernate.query.sqm.SqmExpressible
isInstance, resolveExpressible
-
Methods inherited from interface jakarta.persistence.metamodel.Type
getJavaType
-
Methods inherited from interface org.hibernate.type.Type
assemble, beforeAssemble, compare, deepCopy, disassemble, disassemble, getColumnSpan, getHashCode, getHashCode, getName, getReturnedClass, getSqlTypeCodes, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeSet, nullSafeSet, replace, replace, toColumnNullness, toLoggableString
-
Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping
treatAs
-
-
-
-
Method Detail
-
getRegistrationKeys
String[] getRegistrationKeys()
Get the names under which this type should be registered in the type registry.- Returns:
- The keys under which to register this type.
-
getMappedType
default MappingType getMappedType()
Description copied from interface:ValueMappingDescriptor for the type of this mapping- Specified by:
getMappedTypein interfaceValueMapping
-
getJavaTypeDescriptor
default JavaType<T> getJavaTypeDescriptor()
Description copied from interface:JdbcMappingThe descriptor for the Java type represented by this expressible type- Specified by:
getJavaTypeDescriptorin interfaceJdbcMapping
-
getExpressibleJavaType
default JavaType<T> getExpressibleJavaType()
Description copied from interface:DomainTypeThe descriptor for the Java type (i.e.Class) represented by this DomainType.- Specified by:
getExpressibleJavaTypein interfaceDomainType<T>- Specified by:
getExpressibleJavaTypein interfaceJavaTypedExpressible<T>- Specified by:
getExpressibleJavaTypein interfaceSqmExpressible<T>- Specified by:
getExpressibleJavaTypein interfaceValueMapping- See Also:
DomainType.getTypeName()
-
forEachJdbcType
default int forEachJdbcType(IndexedConsumer<JdbcMapping> action)
Description copied from interface:BindableVisit each of JdbcMapping- Specified by:
forEachJdbcTypein interfaceBindable- Specified by:
forEachJdbcTypein interfaceJdbcMapping- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
getJdbcMapping
default JdbcMapping 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
-
getJdbcTypeCount
default int getJdbcTypeCount()
Description copied from interface:BindableThe number of JDBC mappings- Specified by:
getJdbcTypeCountin interfaceBasicValuedMapping- Specified by:
getJdbcTypeCountin interfaceBindable- Specified by:
getJdbcTypeCountin interfaceJdbcMapping- Specified by:
getJdbcTypeCountin interfaceJdbcMappingContainer
-
getJdbcMappings
default List<JdbcMapping> getJdbcMappings()
Description copied from interface:BindableThe list of JDBC mappings- Specified by:
getJdbcMappingsin interfaceBasicValuedMapping- Specified by:
getJdbcMappingsin interfaceBindable- Specified by:
getJdbcMappingsin interfaceJdbcMapping- Specified by:
getJdbcMappingsin interfaceJdbcMappingContainer
-
getMappedJavaType
default JavaType<T> getMappedJavaType()
- Specified by:
getMappedJavaTypein interfaceJdbcMapping- Specified by:
getMappedJavaTypein interfaceMappingType
-
getValueConverter
default BasicValueConverter<T,?> getValueConverter()
Description copied from interface:JdbcMappingReturns the converter that this basic type uses for transforming from the domain type, to the relational type, ornullif there is no conversion.- Specified by:
getValueConverterin interfaceJdbcMapping
-
getJdbcValueExtractor
default ValueExtractor<T> getJdbcValueExtractor()
Description copied from interface:JdbcMappingThe strategy for extracting values of this expressible type from JDBC ResultSets, CallableStatements, etc- Specified by:
getJdbcValueExtractorin interfaceJdbcMapping
-
getJdbcValueBinder
default ValueBinder<T> getJdbcValueBinder()
Description copied from interface:JdbcMappingThe strategy for binding values of this expressible type to JDBCPreparedStatements andCallableStatements.- Specified by:
getJdbcValueBinderin interfaceJdbcMapping
-
getJdbcLiteralFormatter
default JdbcLiteralFormatter<T> getJdbcLiteralFormatter()
Description copied from interface:JdbcMappingThe strategy for formatting values of this expressible type to a SQL literal.- Specified by:
getJdbcLiteralFormatterin interfaceJdbcMapping
-
forEachJdbcType
default int forEachJdbcType(int offset, IndexedConsumer<JdbcMapping> action)Description copied from interface:JdbcMappingContainerVisit each JdbcMapping starting from the given offset- Specified by:
forEachJdbcTypein interfaceJdbcMapping- Specified by:
forEachJdbcTypein interfaceJdbcMappingContainer
-
disassemble
default Object disassemble(Object value, SharedSessionContractImplementor session)
- Specified by:
disassemblein interfaceBindable- See Also:
As an example, consider the following domain model: ````
-
forEachDisassembledJdbcValue
default int forEachDisassembledJdbcValue(Object value, Clause clause, int offset, Bindable.JdbcValuesConsumer valuesConsumer, SharedSessionContractImplementor session)
- Specified by:
forEachDisassembledJdbcValuein interfaceBindable
-
-