org.hibernate.type
Class LongType
- DiscriminatorType, IdentifierType, Serializable, LiteralType, Serializable, Type, VersionType
long: A type that maps an SQL BIGINT to a Java Long.
Object | fromStringValue(String xml)
|
Object | get(ResultSet rs, String name) - Get a column value from a result set, without worrying about the
possibility of null values.
|
Comparator | getComparator() - Get a comparator for version values.
|
Serializable | getDefaultValue()
|
String | getName() - Returns the abbreviated name of the type.
|
Class | getPrimitiveClass()
|
Class | getReturnedClass() - The class returned by nullSafeGet() methods.
|
Object | next(Object current, SessionImplementor session) - Increment the version.
|
String | objectToSQLString(Object value, Dialect dialect) - String representation of the value, suitable for embedding in
an SQL statement.
|
Object | seed(SessionImplementor session) - Generate an initial version.
|
void | set(PreparedStatement st, Object value, int index) - Set a parameter value without worrying about the possibility of null
values.
|
int | sqlType() - A convenience form of
NullableType.sqlTypes(Mapping) , returning
just a single type value since these are explicitly dealing with single column
mappings.
|
Object | stringToObject(String xml) - Convert the value from the mapping file to a Java object.
|
fromStringValue , fromXMLNode , fromXMLString , get , getColumnSpan , isDirty , isEqual , isEqual , nullSafeGet , nullSafeGet , nullSafeGet , nullSafeGet , nullSafeSet , nullSafeSet , nullSafeSet , nullSafeToString , set , setToXMLNode , sqlType , sqlTypes , toColumnNullness , toLoggableString , toString , toXMLString |
assemble , beforeAssemble , compare , disassemble , getHashCode , getHashCode , getSemiResolvedType , hydrate , isAnyType , isAssociationType , isCollectionType , isComponentType , isDirty , isEntityType , isEqual , isEqual , isModified , isSame , isXMLElement , replace , replaceNode , resolve , semiResolve |
get
public Object get(ResultSet rs,
String name)
throws SQLException
Get a column value from a result set, without worrying about the
possibility of null values. Called from nullSafeGet
after
nullness checks have been performed.
- get in interface NullableType
rs
- The result set from which to extract the value.name
- The name of the value to extract.
getComparator
public Comparator getComparator()
Get a comparator for version values.
- getComparator in interface VersionType
- The comparator to use to compare different version values.
getName
public String getName()
Returns the abbreviated name of the type.
- getName in interface Type
- String the Hibernate type name
getReturnedClass
public Class getReturnedClass()
The class returned by nullSafeGet() methods. This is used to
establish the class of an array of this type.
- getReturnedClass in interface Type
next
public Object next(Object current,
SessionImplementor session)
Increment the version.
- next in interface VersionType
current
- the current versionsession
- The session from which this request originates.
objectToSQLString
public String objectToSQLString(Object value,
Dialect dialect)
throws Exception
String representation of the value, suitable for embedding in
an SQL statement.
- objectToSQLString in interface LiteralType
- String the value, as it appears in a SQL query
seed
public Object seed(SessionImplementor session)
Generate an initial version.
- seed in interface VersionType
session
- The session from which this request originates.
set
public void set(PreparedStatement st,
Object value,
int index)
throws SQLException
Set a parameter value without worrying about the possibility of null
values. Called from nullSafeSet
after nullness checks have
been performed.
- set in interface NullableType
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.
sqlType
public int sqlType()
A convenience form of
NullableType.sqlTypes(Mapping)
, returning
just a single type value since these are explicitly dealing with single column
mappings.
- sqlType in interface NullableType
- The
java.sql.Types
mapping value.
stringToObject
public Object stringToObject(String xml)
throws Exception
Convert the value from the mapping file to a Java object.
- stringToObject in interface IdentifierType
xml
- the value of discriminator-value or unsaved-value attribute