com.ferri.core.vo.hibernate.type
Class CustomCharBooleanType

java.lang.Object
  extended by org.hibernate.type.AbstractType
      extended by org.hibernate.type.NullableType
          extended by org.hibernate.type.ImmutableType
              extended by org.hibernate.type.PrimitiveType
                  extended by org.hibernate.type.BooleanType
                      extended by org.hibernate.type.CharBooleanType
                          extended by com.ferri.core.vo.hibernate.type.CustomCharBooleanType
All Implemented Interfaces:
Serializable, org.hibernate.type.DiscriminatorType, org.hibernate.type.IdentifierType, org.hibernate.type.LiteralType, org.hibernate.type.Type, org.hibernate.usertype.ParameterizedType

public class CustomCharBooleanType
extends org.hibernate.type.CharBooleanType
implements org.hibernate.usertype.ParameterizedType

a Customizable Class for types that map an SQL CHAR(1) to a Java Boolean.

Author:
dferri
See Also:
for specific configuration, Serialized Form

Field Summary
static String FALSE_STRING_VALUE
           
private  String falseStringValue
           
static String NAME_VALUE
           
private  String nameValue
           
private static long serialVersionUID
           
static String TRUE_STRING_VALUE
           
private  String trueStringValue
           
 
Constructor Summary
CustomCharBooleanType()
           
 
Method Summary
protected  String getFalseString()
           
 String getFalseStringValue()
           
 String getName()
           
 String getNameValue()
           
protected  String getTrueString()
           
 String getTrueStringValue()
           
 void setFalseStringValue(String falseStringValue)
           
 void setNameValue(String nameValue)
           
 void setParameterValues(Properties parameters)
           
 void setTrueStringValue(String trueStringValue)
           
private  String validPropertyValue(Properties parameters, String propertyName)
           
 
Methods inherited from class org.hibernate.type.CharBooleanType
get, objectToSQLString, set, sqlType, stringToObject
 
Methods inherited from class org.hibernate.type.BooleanType
fromStringValue, getDefaultValue, getPrimitiveClass, getReturnedClass
 
Methods inherited from class org.hibernate.type.PrimitiveType
toString
 
Methods inherited from class org.hibernate.type.ImmutableType
deepCopy, isMutable, replace
 
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
 

Field Detail

NAME_VALUE

public static final String NAME_VALUE
See Also:
Constant Field Values

TRUE_STRING_VALUE

public static final String TRUE_STRING_VALUE
See Also:
Constant Field Values

FALSE_STRING_VALUE

public static final String FALSE_STRING_VALUE
See Also:
Constant Field Values

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

falseStringValue

private String falseStringValue

trueStringValue

private String trueStringValue

nameValue

private String nameValue
Constructor Detail

CustomCharBooleanType

public CustomCharBooleanType()
Method Detail

getFalseString

protected String getFalseString()
Specified by:
getFalseString in class org.hibernate.type.CharBooleanType
See Also:
CharBooleanType.getFalseString()

getTrueString

protected String getTrueString()
Specified by:
getTrueString in class org.hibernate.type.CharBooleanType
See Also:
CharBooleanType.getTrueString()

getName

public String getName()
Specified by:
getName in interface org.hibernate.type.Type
Overrides:
getName in class org.hibernate.type.BooleanType
See Also:
BooleanType.getName()

setParameterValues

public void setParameterValues(Properties parameters)
Specified by:
setParameterValues in interface org.hibernate.usertype.ParameterizedType

validPropertyValue

private String validPropertyValue(Properties parameters,
                                  String propertyName)
Parameters:
parameters -
propertyName -
Returns:

getFalseStringValue

public String getFalseStringValue()
Returns:
the falseStringValue

setFalseStringValue

public void setFalseStringValue(String falseStringValue)
Parameters:
falseStringValue - the falseStringValue to set

getTrueStringValue

public String getTrueStringValue()
Returns:
the trueStringValue

setTrueStringValue

public void setTrueStringValue(String trueStringValue)
Parameters:
trueStringValue - the trueStringValue to set

getNameValue

public String getNameValue()
Returns:
the nameValue

setNameValue

public void setNameValue(String nameValue)
Parameters:
nameValue - the nameValue to set