Package org.hibernate.query
Interface OutputableType<J>
-
- All Superinterfaces:
BindableType<J>
- All Known Subinterfaces:
AdjustableBasicType<J>
,BasicDomainType<J>
,BasicPluralType<C,E>
,BasicType<T>
,ConvertedBasicType<J>
,DiscriminatorType<O>
,ProcedureParameterExtractionAware<T>
- All Known Implementing Classes:
AbstractSingleColumnStandardBasicType
,AbstractStandardBasicType
,BasicArrayType
,BasicCollectionType
,BasicTypeImpl
,BasicTypeImpl
,BottomType
,ComponentType
,ConvertedBasicArrayType
,ConvertedBasicCollectionType
,ConvertedBasicTypeImpl
,CustomMutabilityConvertedBasicTypeImpl
,CustomMutabilityConvertedPrimitiveBasicTypeImpl
,CustomType
,DiscriminatorType
,DiscriminatorTypeImpl
,EmbeddedComponentType
,ImmutableNamedBasicTypeImpl
,JavaObjectType
,NamedBasicTypeImpl
,NullType
,PrimitiveBasicTypeImpl
,QueryParameterJavaObjectType
,SerializableToBlobType
,SerializableType
,StandardBasicTypeTemplate
,UserComponentType
@Incubating public interface OutputableType<J> extends BindableType<J>
Specialization ofDomainType
for types that can be used as a parameter output for aProcedureCall
.- API Note:
- We assume a type that maps to exactly one SQL value, hence
getJdbcType()
-
-
Method Summary
All Methods Instance Methods Abstract 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 extractionJdbcType
getJdbcType()
Descriptor for the SQL type mapped by this type.-
Methods inherited from interface org.hibernate.query.BindableType
getBindableJavaType, isInstance, resolveExpressible
-
-
-
-
Method Detail
-
canDoExtraction
boolean canDoExtraction()
Can the given instance of this type actually perform the parameter value extractions?- Returns:
true
indicates thatextract(java.sql.CallableStatement, int, org.hibernate.engine.spi.SharedSessionContractImplementor)
calls will not fail due toIllegalStateException
.
-
getJdbcType
JdbcType getJdbcType()
Descriptor for the SQL type mapped by this type.
-
extract
J extract(CallableStatement statement, int paramIndex, SharedSessionContractImplementor session) throws SQLException
Perform the extraction- 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 CallableStatementIllegalStateException
- Thrown if this method is called on instances that returnfalse
forcanDoExtraction()
-
extract
J extract(CallableStatement statement, String paramName, SharedSessionContractImplementor session) throws SQLException
Perform the extraction- 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 CallableStatementIllegalStateException
- Thrown if this method is called on instances that returnfalse
forcanDoExtraction()
-
-