org.openxava.types
Class SiNoType

java.lang.Object
  extended by org.hibernate.type.AbstractStandardBasicType<T>
      extended by org.hibernate.type.AbstractSingleColumnStandardBasicType<java.lang.Boolean>
          extended by org.openxava.types.SiNoType
All Implemented Interfaces:
java.io.Serializable, org.hibernate.type.BasicType, org.hibernate.type.DiscriminatorType<java.lang.Boolean>, org.hibernate.type.IdentifierType<java.lang.Boolean>, org.hibernate.type.LiteralType<java.lang.Boolean>, org.hibernate.type.PrimitiveType<java.lang.Boolean>, org.hibernate.type.SingleColumnType<java.lang.Boolean>, org.hibernate.type.StringRepresentableType<java.lang.Boolean>, org.hibernate.type.Type, org.hibernate.type.XmlRepresentableType<java.lang.Boolean>

public class SiNoType
extends org.hibernate.type.AbstractSingleColumnStandardBasicType<java.lang.Boolean>
implements org.hibernate.type.PrimitiveType<java.lang.Boolean>, org.hibernate.type.DiscriminatorType<java.lang.Boolean>

Stores a boolean value as 'S' or 'N' in database.

Author:
Javier Paniza
See Also:
Serialized Form

Field Summary
static org.hibernate.type.YesNoType INSTANCE
           
 
Constructor Summary
SiNoType()
           
 
Method Summary
 java.io.Serializable getDefaultValue()
           
 java.lang.String getName()
           
 java.lang.Class getPrimitiveClass()
           
 java.lang.String objectToSQLString(java.lang.Boolean value, org.hibernate.dialect.Dialect dialect)
           
 java.lang.Boolean stringToObject(java.lang.String xml)
           
 
Methods inherited from class org.hibernate.type.AbstractSingleColumnStandardBasicType
get, nullSafeGet, nullSafeSet, nullSafeSet, set, sqlType
 
Methods inherited from class org.hibernate.type.AbstractStandardBasicType
assemble, beforeAssemble, compare, deepCopy, deepCopy, disassemble, fromString, fromStringValue, fromXMLNode, fromXMLString, get, getColumnSpan, getHashCode, getHashCode, getHashCode, getJavaTypeDescriptor, getMutabilityPlan, getRegistrationKeys, getReplacement, getReturnedClass, getSemiResolvedType, getSqlTypeDescriptor, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEntityType, isEqual, isEqual, isEqual, isModified, isMutable, isSame, isSame, isXMLElement, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, registerUnderJavaType, replace, replace, resolve, semiResolve, set, setToXMLNode, sqlTypes, toColumnNullness, toLoggableString, toString, toXMLString
 
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.PrimitiveType
toString
 
Methods inherited from interface org.hibernate.type.Type
assemble, beforeAssemble, compare, deepCopy, disassemble, fromXMLNode, getColumnSpan, getHashCode, getHashCode, getReturnedClass, 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
 
Methods inherited from interface org.hibernate.type.SingleColumnType
fromStringValue, get, nullSafeGet, set, toString
 

Field Detail

INSTANCE

public static final org.hibernate.type.YesNoType INSTANCE
Constructor Detail

SiNoType

public SiNoType()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface org.hibernate.type.Type

getPrimitiveClass

public java.lang.Class getPrimitiveClass()
Specified by:
getPrimitiveClass in interface org.hibernate.type.PrimitiveType<java.lang.Boolean>

stringToObject

public java.lang.Boolean stringToObject(java.lang.String xml)
                                 throws java.lang.Exception
Specified by:
stringToObject in interface org.hibernate.type.IdentifierType<java.lang.Boolean>
Throws:
java.lang.Exception

getDefaultValue

public java.io.Serializable getDefaultValue()
Specified by:
getDefaultValue in interface org.hibernate.type.PrimitiveType<java.lang.Boolean>

objectToSQLString

public java.lang.String objectToSQLString(java.lang.Boolean value,
                                          org.hibernate.dialect.Dialect dialect)
                                   throws java.lang.Exception
Specified by:
objectToSQLString in interface org.hibernate.type.LiteralType<java.lang.Boolean>
Throws:
java.lang.Exception