com.vladmihalcea.hibernate.type.basic
Class NullableCharacterType
java.lang.Object
com.vladmihalcea.hibernate.type.ImmutableType<Character>
com.vladmihalcea.hibernate.type.basic.NullableCharacterType
- All Implemented Interfaces:
- Serializable, org.hibernate.type.Type, org.hibernate.usertype.UserType
public class NullableCharacterType
- extends ImmutableType<Character>
Maps an Character
to a nullable CHAR column type.
For more details about how to use it, check out this article on vladmihalcea.com.
- Author:
- Vlad Mihalcea
- See Also:
- Serialized Form
Methods inherited from class com.vladmihalcea.hibernate.type.ImmutableType |
assemble, assemble, beforeAssemble, compare, deepCopy, deepCopy, defaultSizes, dictatedSizes, disassemble, disassemble, equals, getColumnSpan, getConfiguration, getHashCode, getHashCode, getName, getReturnedClass, getSemiResolvedType, hashCode, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, replace, resolve, returnedClass, semiResolve, sqlTypes, toColumnNullness, toLoggableString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final NullableCharacterType INSTANCE
NullableCharacterType
public NullableCharacterType()
sqlTypes
public int[] sqlTypes()
get
public Character get(ResultSet rs,
String[] names,
org.hibernate.engine.spi.SessionImplementor session,
Object owner)
throws SQLException
- Description copied from class:
ImmutableType
- Get the column value from the JDBC
ResultSet
.
- Specified by:
get
in class ImmutableType<Character>
- Parameters:
rs
- JDBC ResultSet
names
- database column namesession
- current Hibernate Session
owner
- current Hibernate SessionFactory
- Returns:
- column value
- Throws:
SQLException
- in case of failure
set
public void set(PreparedStatement st,
Character value,
int index,
org.hibernate.engine.spi.SessionImplementor session)
throws SQLException
- Description copied from class:
ImmutableType
- Set the column value on the provided JDBC
PreparedStatement
.
- Specified by:
set
in class ImmutableType<Character>
- Parameters:
st
- JDBC PreparedStatement
value
- database column valueindex
- database column indexsession
- current Hibernate Session
- Throws:
SQLException
- in case of failure
Copyright © 2021. All rights reserved.