Package org.hibernate.type
Interface SingleColumnType<T>
-
- All Superinterfaces:
java.io.Serializable
,Type
- All Known Implementing Classes:
AbstractSingleColumnStandardBasicType
,AdaptedImmutableType
,AttributeConverterTypeAdapter
,BigDecimalType
,BigIntegerType
,BinaryType
,BlobType
,BooleanType
,ByteType
,CalendarDateType
,CalendarTimeType
,CalendarType
,CharacterArrayClobType
,CharacterArrayNClobType
,CharacterArrayType
,CharacterNCharType
,CharacterType
,CharArrayType
,ClassType
,ClobType
,CurrencyType
,DateType
,DbTimestampType
,DoubleType
,DurationType
,FloatType
,ImageType
,InstantType
,IntegerType
,LocalDateTimeType
,LocalDateType
,LocaleType
,LocalTimeType
,LongType
,MaterializedBlobType
,MaterializedClobType
,MaterializedNClobType
,NClobType
,NTextType
,NumericBooleanType
,OffsetDateTimeType
,OffsetTimeType
,PostgresUUIDType
,PrimitiveCharacterArrayClobType
,PrimitiveCharacterArrayNClobType
,RowVersionType
,SerializableToBlobType
,SerializableType
,ShortType
,StandardBasicTypeTemplate
,StringNVarcharType
,StringType
,TextType
,TimestampType
,TimeType
,TimeZoneType
,TrueFalseType
,UrlType
,UUIDBinaryType
,UUIDCharType
,WrappedMaterializedBlobType
,WrapperBinaryType
,YesNoType
,ZonedDateTimeType
public interface SingleColumnType<T> extends Type
Provide convenient methods for binding and extracting values for use withBasicType
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
fromStringValue(java.lang.String xml)
java.lang.Object
get(java.sql.ResultSet rs, java.lang.String name, SharedSessionContractImplementor session)
Get a column value from a result set, without worrying about the possibility of null values.T
nullSafeGet(java.sql.ResultSet rs, java.lang.String name, SharedSessionContractImplementor session)
Get a column value from a result set by name.void
set(java.sql.PreparedStatement st, T value, int index, SharedSessionContractImplementor session)
Set a parameter value without worrying about the possibility of null values.int
sqlType()
java.lang.String
toString(T value)
-
Methods inherited from interface org.hibernate.type.Type
assemble, beforeAssemble, compare, deepCopy, defaultSizes, dictatedSizes, disassemble, getColumnSpan, getHashCode, getHashCode, getName, getReturnedClass, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, resolve, resolve, semiResolve, sqlTypes, toColumnNullness, toLoggableString
-
-
-
-
Method Detail
-
sqlType
int sqlType()
-
toString
java.lang.String toString(T value) throws HibernateException
- Throws:
HibernateException
-
fromStringValue
T fromStringValue(java.lang.String xml) throws HibernateException
- Throws:
HibernateException
-
nullSafeGet
T nullSafeGet(java.sql.ResultSet rs, java.lang.String name, SharedSessionContractImplementor session) throws HibernateException, java.sql.SQLException
Get a column value from a result set by name.- Parameters:
rs
- The result set from which to extract the value.name
- The name of the value to extract.session
- The session from which the request originates- Returns:
- The extracted value.
- Throws:
HibernateException
- Generally some form of mismatch error.java.sql.SQLException
- Indicates problem making the JDBC call(s).
-
get
java.lang.Object get(java.sql.ResultSet rs, java.lang.String name, SharedSessionContractImplementor session) throws HibernateException, java.sql.SQLException
Get a column value from a result set, without worrying about the possibility of null values.- Parameters:
rs
- The result set from which to extract the value.name
- The name of the value to extract.session
- The session from which the request originates- Returns:
- The extracted value.
- Throws:
HibernateException
- Generally some form of mismatch error.java.sql.SQLException
- Indicates problem making the JDBC call(s).
-
set
void set(java.sql.PreparedStatement st, T value, int index, SharedSessionContractImplementor session) throws HibernateException, java.sql.SQLException
Set a parameter value without worrying about the possibility of null values. Called fromType.nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int, boolean[], org.hibernate.engine.spi.SharedSessionContractImplementor)
after nullness checks have been performed.- Parameters:
st
- The statement into which to bind the parameter value.value
- The parameter value to bind.index
- The position or index at which to bind the param value.session
- The session from which the request originates- Throws:
HibernateException
- Generally some form of mismatch error.java.sql.SQLException
- Indicates problem making the JDBC call(s).
-
-