|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.type.AbstractType org.hibernate.type.AbstractLobType
@Deprecated public abstract class AbstractLobType
Field Summary |
---|
Fields inherited from class org.hibernate.type.AbstractType |
---|
LEGACY_DEFAULT_SIZE, LEGACY_DICTATED_SIZE |
Constructor Summary | |
---|---|
AbstractLobType()
Deprecated. |
Method Summary | |
---|---|
Size[] |
defaultSizes(Mapping mapping)
Deprecated. Defines the column sizes to use according to this type if the user did not explicitly say (and if no Type.dictatedSizes(org.hibernate.engine.spi.Mapping) were given). |
Size[] |
dictatedSizes(Mapping mapping)
Deprecated. Return the column sizes dictated by this type. |
protected abstract Object |
get(ResultSet rs,
String name)
Deprecated. |
int |
getColumnSpan(Mapping mapping)
Deprecated. How many columns are used to persist this type. |
int |
getHashCode(Object x)
Deprecated. Get a hash code, consistent with persistence "equality". |
String |
getName()
Deprecated. Returns the abbreviated name of the type. |
boolean |
isDirty(Object old,
Object current,
boolean[] checkable,
SessionImplementor session)
Deprecated. Should the parent be considered dirty, given both the old and current value? |
boolean |
isEqual(Object x,
Object y)
Deprecated. Compare two instances of the class mapped by this type for persistence "equality" (equality of persistent state). |
Object |
nullSafeGet(ResultSet rs,
String[] names,
SessionImplementor session,
Object owner)
Deprecated. Extract a value of the mapped class from the JDBC result set. |
Object |
nullSafeGet(ResultSet rs,
String name,
SessionImplementor session,
Object owner)
Deprecated. Extract a value of the mapped class from the JDBC result set. |
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
boolean[] settable,
SessionImplementor session)
Deprecated. Bind a value represented by an instance of the mapped class to the JDBC prepared
statement, ignoring some columns as dictated by the 'settable' parameter. |
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
SessionImplementor session)
Deprecated. Bind a value represented by an instance of the mapped class to the JDBC prepared
statement. |
protected abstract void |
set(PreparedStatement st,
Object value,
int index,
SessionImplementor session)
Deprecated. |
Methods inherited from class org.hibernate.type.AbstractType |
---|
assemble, beforeAssemble, compare, disassemble, getHashCode, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isEntityType, isEqual, isModified, isSame, isXMLElement, replace, replaceNode, resolve, semiResolve |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.hibernate.type.Type |
---|
deepCopy, fromXMLNode, getReturnedClass, isMutable, replace, setToXMLNode, sqlTypes, toColumnNullness, toLoggableString |
Constructor Detail |
---|
public AbstractLobType()
Method Detail |
---|
public boolean isDirty(Object old, Object current, boolean[] checkable, SessionImplementor session) throws HibernateException
Type
isDirty
in interface Type
old
- the old valuecurrent
- the current valuecheckable
- An array of booleans indicating which columns making up the value are actually checkablesession
- The session from which the request originated.
HibernateException
- A problem occurred performing the checkingpublic Size[] dictatedSizes(Mapping mapping) throws MappingException
Type
char
/Character
would
have a dictated length limit of 1; for a string-based UUID
would have a size limit of 36; etc.
NOTE: The number of elements in this array matches the return from Type.getColumnSpan(org.hibernate.engine.spi.Mapping)
.
dictatedSizes
in interface Type
mapping
- The mapping object :/
MappingException
- Generally indicates an issue accessing the passed mapping object.public Size[] defaultSizes(Mapping mapping) throws MappingException
Type
Type.dictatedSizes(org.hibernate.engine.spi.Mapping)
were given).
NOTE: The number of elements in this array matches the return from Type.getColumnSpan(org.hibernate.engine.spi.Mapping)
.
defaultSizes
in interface Type
mapping
- The mapping object :/
MappingException
- Generally indicates an issue accessing the passed mapping object.public boolean isEqual(Object x, Object y)
Type
isEqual
in interface Type
isEqual
in class AbstractType
x
- The first valuey
- The second value
public int getHashCode(Object x)
Type
hashCode
.
getHashCode
in interface Type
getHashCode
in class AbstractType
x
- The value for which to retrieve a hash code
public String getName()
Type
getName
in interface Type
public int getColumnSpan(Mapping mapping) throws MappingException
Type
sqlTypes(mapping).length
getColumnSpan
in interface Type
mapping
- The mapping object :/
MappingException
- Generally indicates an issue accessing the passed mapping object.protected abstract Object get(ResultSet rs, String name) throws SQLException
SQLException
public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
mapped class
from the JDBC result set. Implementors
should handle possibility of null values.
nullSafeGet
in interface Type
rs
- The result set from which to extract value.names
- the column names making up this type value (use to read from result set)session
- The originating sessionowner
- the parent entity
HibernateException
- An error from Hibernate
SQLException
- An error from the JDBC driveralternative, 2-phase property initialization
public Object nullSafeGet(ResultSet rs, String name, SessionImplementor session, Object owner) throws HibernateException, SQLException
Type
mapped class
from the JDBC result set. Implementors
should handle possibility of null values. This form might be called if the type is known to be a
single-column type.
nullSafeGet
in interface Type
rs
- The result set from which to extract value.name
- the column name making up this type value (use to read from result set)session
- The originating sessionowner
- the parent entity
HibernateException
- An error from Hibernate
SQLException
- An error from the JDBC driverpublic void nullSafeSet(PreparedStatement st, Object value, int index, boolean[] settable, SessionImplementor session) throws HibernateException, SQLException
Type
mapped class
to the JDBC prepared
statement, ignoring some columns as dictated by the 'settable' parameter. Implementors should handle the
possibility of null values. A multi-column type should bind parameters starting from index.
nullSafeSet
in interface Type
st
- The JDBC prepared statement to which to bindvalue
- the object to writeindex
- starting parameter bind indexsettable
- an array indicating which columns to bind/ignoresession
- The originating session
HibernateException
- An error from Hibernate
SQLException
- An error from the JDBC driverprotected abstract void set(PreparedStatement st, Object value, int index, SessionImplementor session) throws SQLException
SQLException
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException
Type
mapped class
to the JDBC prepared
statement. Implementors should handle possibility of null values. A multi-column type should bind parameters
starting from index.
nullSafeSet
in interface Type
st
- The JDBC prepared statement to which to bindvalue
- the object to writeindex
- starting parameter bind indexsession
- The originating session
HibernateException
- An error from Hibernate
SQLException
- An error from the JDBC driver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |