## org.hibernate.type
Interface SingleColumnType<T>

All Superinterfaces:
  Serializable, Type

All Known Implementing Classes:
  AbstractSingleColumnStandardBasicType, AdaptedImmutableType, BigDecimalType, BigIntegerType, BinaryType, BlobType, BooleanType, ByteType, CalendarDateType, CalendarType, CharacterArrayClobType, CharacterArrayType, CharacterType, CharArrayType, CharBooleanType, ClassType, ClobType, CurrencyType, DateType, DbTimestampType, DoubleType, FloatType, ImageType, IntegerType, LobType, LocaleType, LongType, MaterializedBlobType, MaterializedClobType, NumericBooleanType, PostgresUUIDType, PrimitiveCharacterArrayClobType, SerializableType, ShortType, StringType, TextType, TimestampType, TimeType, TimeZoneType, TrueFalseType, UrlType, UUIDBinaryType, UUIDCharType, WrappedMaterializedBlobType, WrapperBinaryType, YesNoType

    public interface SingleColumnType<T>

extends Type

Provide convenient methods for binding and extracting values for use with `BasicType`. Most of this is copied from the (now deprecated) `NullableType`.

Glaring omission are the forms that do not take

Author:
  Steve Ebersole

Method Summary
`T` `fromStringValue(String xml)`
`Object` `get(ResultSet rs, String name)` Deprecated. Use `get(ResultSet, String, SessionImplementor)` instead.
`Object` `get(ResultSet rs, String name, SessionImplementor session)` Get a column value from a result set, without worrying about the possibility of null values.
`T` `nullSafeGet(ResultSet rs, String name)` Deprecated. Use `nullSafeGet(ResultSet, String, SessionImplementor)` instead
`T` `nullSafeGet(ResultSet rs, String name, SessionImplementor session)` Get a column value from a result set by name.
`void` `nullSafeSet(PreparedStatement st, T value, int index)` Deprecated. Use `Type.nullSafeSet(PreparedStatement, Object, int, SessionImplementor)` instead.
`void` `set(PreparedStatement st, T value, int index)` Deprecated. Use `set(PreparedStatement, Object, int, SessionImplementor)` instead.
`void` `set(PreparedStatement st, T value, int index, SessionImplementor session)` Set a parameter value without worrying about the possibility of null values.
`int` `sqlType()`
`String` `toString(T value)`

Methods inherited from interface org.hibernate.type.Type

`assemble, beforeAssemble, compare, deepCopy, disassemble, fromXMLNode, getColumnSpan, getHashCode, getHashCode, getName, getReturnedClass, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, isXMLElement, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, resolve, semiResolve, setToXMLNode, sqlTypes, toColumnNullness, toLoggableString`

Method Detail

### sqlType

    int sqlType()

### toString

    String toString(T value)
                    throws HibernateException

  Throws:
    `HibernateException`

### fromStringValue

    T fromStringValue(String xml)
                      throws HibernateException

  Throws:
    `HibernateException`

### nullSafeGet

    T nullSafeGet(ResultSet rs,
                  String name)
                  throws HibernateException,
                         SQLException

  Deprecated. Use `nullSafeGet(ResultSet, String, SessionImplementor)` instead

  Throws:
    `HibernateException`
    `SQLException`

### nullSafeGet

    T nullSafeGet(ResultSet rs,
                  String name,
                  SessionImplementor session)
                  throws HibernateException,
                         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.
    `SQLException` - Indicates problem making the JDBC call(s).

### get

    Object get(ResultSet rs,
               String name)
               throws HibernateException,
                      SQLException

  Deprecated. Use `get(ResultSet, String, SessionImplementor)` instead.

  DO NOT USER THIS FORM!

  Throws:
    `HibernateException`
    `SQLException`

### get

    Object get(ResultSet rs,
               String name,
               SessionImplementor session)
               throws HibernateException,
                      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.
    `SQLException` - Indicates problem making the JDBC call(s).

### nullSafeSet

    void nullSafeSet(PreparedStatement st,
                     T value,
                     int index)
                     throws HibernateException,
                            SQLException

  Deprecated. Use `Type.nullSafeSet(PreparedStatement, Object, int, SessionImplementor)` instead.

  DO NOT USE THIS FORM!

  Throws:
    `HibernateException`
    `SQLException`

### set

    void set(PreparedStatement st,
             T value,
             int index)
             throws HibernateException,
                    SQLException

  Deprecated. Use `set(PreparedStatement, Object, int, SessionImplementor)` instead.

  DO NOT USE THIS FORM!

  Throws:
    `HibernateException`
    `SQLException`

### set

    void set(PreparedStatement st,
             T value,
             int index,
             SessionImplementor session)
             throws HibernateException,
                    SQLException

  Set a parameter value without worrying about the possibility of null values. Called from `nullSafeSet(java.sql.PreparedStatement, T, int)` 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.
    `SQLException` - Indicates problem making the JDBC call(s).

Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.