Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.hibernate.type.AbstractType
org.hibernate.type.NullableType
org.hibernate.type.MutableType
org.hibernate.type.AbstractBynaryType
Method Summary | |
int |
|
int |
|
Object |
|
Object |
|
Object |
|
Comparator |
|
int |
|
abstract String |
|
boolean |
|
Object |
|
Object |
|
void |
|
int |
|
protected abstract Object |
|
protected abstract byte[] |
|
String |
|
Methods inherited from class org.hibernate.type.MutableType | |
deepCopy , deepCopyNotNull , isMutable , replace |
Methods inherited from class org.hibernate.type.NullableType | |
fromStringValue , fromXMLNode , fromXMLString , get , getColumnSpan , isDirty , isEqual , isEqual , nullSafeGet , nullSafeGet , nullSafeGet , nullSafeGet , nullSafeSet , nullSafeSet , nullSafeSet , nullSafeToString , set , setToXMLNode , sqlType , sqlTypes , toColumnNullness , toLoggableString , toString , toXMLString |
Methods inherited from class org.hibernate.type.AbstractType | |
assemble , beforeAssemble , compare , disassemble , getHashCode , getHashCode , getSemiResolvedType , hydrate , isAnyType , isAssociationType , isCollectionType , isComponentType , isDirty , isEntityType , isEqual , isEqual , isModified , isSame , isXMLElement , replace , replaceNode , resolve , semiResolve |
public int compare(Object o1, Object o2)
public int compare(Object x, Object y, EntityMode entityMode)
compare two instances of the type
- Overrides:
- compare in interface AbstractType
- Parameters:
entityMode
-
public Object deepCopyNotNull(Object value)
- Overrides:
- deepCopyNotNull in interface MutableType
public Object fromStringValue(String xml) throws HibernateException
- Overrides:
- fromStringValue in interface NullableType
public Object get(ResultSet rs, String name) throws HibernateException, SQLException
- Overrides:
- get in interface NullableType
public Comparator getComparator()
Get a comparator for version values.
- Specified by:
- getComparator in interface VersionType
- Returns:
- The comparator to use to compare different version values.
public int getHashCode(Object x, EntityMode entityMode)
Get a hashcode, consistent with persistence "equality"
- Specified by:
- getHashCode in interface Type
- Overrides:
- getHashCode in interface AbstractType
- Parameters:
x
-entityMode
-
public abstract String getName()
Returns the abbreviated name of the type.
- Returns:
- String the Hibernate type name
public boolean isEqual(Object x, Object y)
Are the two version values considered equal?
- Specified by:
- isEqual in interface VersionType
- Overrides:
- isEqual in interface NullableType
- Parameters:
x
- One value to check.y
- The other value to check.
- Returns:
- true if the values are equal, false otherwise.
public Object next(Object current, SessionImplementor session)
Increment the version.
- Specified by:
- next in interface VersionType
- Parameters:
current
- the current versionsession
- The session from which this request originates.
- Returns:
- an instance of the type
public Object seed(SessionImplementor session)
Generate an initial version.
- Specified by:
- seed in interface VersionType
- Parameters:
session
- The session from which this request originates.
- Returns:
- an instance of the type
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException
- Overrides:
- set in interface NullableType
protected abstract Object toExternalFormat(byte[] bytes)
Convert the byte[] into the expected object type
protected abstract byte[] toInternalFormat(Object bytes)
Convert the object into the internal byte[] representation