org.hibernate.type
Class NumericBooleanType
java.lang.Object
org.hibernate.type.AbstractType
org.hibernate.type.NullableType
org.hibernate.type.ImmutableType
org.hibernate.type.PrimitiveType
org.hibernate.type.BooleanType
org.hibernate.type.NumericBooleanType
- All Implemented Interfaces:
- DiscriminatorType, IdentifierType, LiteralType, Serializable, Type
- public class NumericBooleanType
- extends BooleanType
Maps interger
database values to boolean java values. Zero is considered false;
NULL maps to BooleanType.getDefaultValue()
; any other value is considered true.
- Author:
- Steve Ebersole
- See Also:
getName()
,
Serialized Form
Methods inherited from class org.hibernate.type.NullableType |
fromXMLNode, fromXMLString, getColumnSpan, isDirty, isEqual, isEqual, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, nullSafeSet, nullSafeToString, setToXMLNode, sqlTypes, toColumnNullness, toLoggableString, toXMLString |
Methods inherited from class org.hibernate.type.AbstractType |
assemble, beforeAssemble, compare, disassemble, getHashCode, 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 |
assemble, beforeAssemble, compare, deepCopy, disassemble, fromXMLNode, getColumnSpan, getHashCode, getHashCode, 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 |
NumericBooleanType
public NumericBooleanType()
getName
public String getName()
-
This type's name is numeric_boolean
- Specified by:
getName
in interface Type
- Overrides:
getName
in class BooleanType
get
public Object get(ResultSet rs,
String name)
throws SQLException
-
- Overrides:
get
in class BooleanType
- Throws:
SQLException
set
public void set(PreparedStatement st,
Object value,
int index)
throws SQLException
-
- Overrides:
set
in class BooleanType
- Throws:
SQLException
objectToSQLString
public String objectToSQLString(Object value,
Dialect dialect)
throws Exception
-
- Specified by:
objectToSQLString
in interface LiteralType
- Overrides:
objectToSQLString
in class BooleanType
- Throws:
Exception
sqlType
public int sqlType()
-
- Overrides:
sqlType
in class BooleanType