Class BasicTypeImpl<J>
- java.lang.Object
-
- org.hibernate.metamodel.model.domain.internal.BasicTypeImpl<J>
-
- All Implemented Interfaces:
BasicType<J>
,Type<J>
,Serializable
,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>, 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canDoExtraction()
Can the given instance of this type actually perform the parameter value extractions?J
extract(CallableStatement statement, int paramIndex, SharedSessionContractImplementor session)
Perform the extractionJ
extract(CallableStatement statement, String paramName, SharedSessionContractImplementor session)
Perform the extractionJavaType<J>
getExpressibleJavaType()
The descriptor for the Java type (i.e.Class<J>
getJavaType()
JdbcType
getJdbcType()
Descriptor for the SQL type mapped by this type.Type.PersistenceType
getPersistenceType()
-
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
getTypeName
-
Methods inherited from interface org.hibernate.metamodel.model.domain.SimpleDomainType
getBindableJavaType
-
Methods inherited from interface org.hibernate.query.sqm.SqmExpressible
getRelationalJavaType, isInstance, resolveExpressible
-
-
-
-
Method Detail
-
getPersistenceType
public Type.PersistenceType getPersistenceType()
- Specified by:
getPersistenceType
in interfaceBasicDomainType<J>
- Specified by:
getPersistenceType
in interfaceType<J>
-
getExpressibleJavaType
public JavaType<J> getExpressibleJavaType()
Description copied from interface:DomainType
The descriptor for the Java type (i.e.Class
) represented by this DomainType.- Specified by:
getExpressibleJavaType
in interfaceDomainType<J>
- Specified by:
getExpressibleJavaType
in interfaceSqmExpressible<J>
- See Also:
DomainType.getTypeName()
-
getJavaType
public Class<J> getJavaType()
- Specified by:
getJavaType
in interfaceType<J>
-
canDoExtraction
public boolean canDoExtraction()
Description copied from interface:OutputableType
Can the given instance of this type actually perform the parameter value extractions?- Specified by:
canDoExtraction
in interfaceOutputableType<J>
- Returns:
true
indicates 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:OutputableType
Descriptor for the SQL type mapped by this type.- Specified by:
getJdbcType
in interfaceOutputableType<J>
-
extract
public J extract(CallableStatement statement, int paramIndex, SharedSessionContractImplementor session) throws SQLException
Description copied from interface:OutputableType
Perform the extraction- Specified by:
extract
in 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:OutputableType
Perform the extraction- Specified by:
extract
in 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
-
-