com.atlassian.crowd.util.persistence.hibernate
Class BooleanTypeDescriptor

java.lang.Object
  extended by org.hibernate.type.descriptor.java.AbstractTypeDescriptor<Boolean>
      extended by com.atlassian.crowd.util.persistence.hibernate.BooleanTypeDescriptor
All Implemented Interfaces:
Serializable, org.hibernate.type.descriptor.java.JavaTypeDescriptor<Boolean>

public class BooleanTypeDescriptor
extends org.hibernate.type.descriptor.java.AbstractTypeDescriptor<Boolean>

An AbstractTypeDescriptor which maps Java Boolean values to String values containing either "true" or "false".

By default, Hibernate includes types which manage Booleans as Numbers or chars (containing "T"/"Y" for true and "F"/"N" for false). This type provides backward compatibility for behaviour applied by previous versions of Crowd.

See Also:
Serialized Form

Field Summary
static BooleanTypeDescriptor INSTANCE
           
 
Constructor Summary
BooleanTypeDescriptor()
           
 
Method Summary
 Boolean fromString(String string)
           
 String toString(Boolean value)
           
<X> X
unwrap(Boolean value, Class<X> type, org.hibernate.type.descriptor.WrapperOptions options)
           
<X> Boolean
wrap(X value, org.hibernate.type.descriptor.WrapperOptions options)
           
 
Methods inherited from class org.hibernate.type.descriptor.java.AbstractTypeDescriptor
areEqual, extractHashCode, extractLoggableRepresentation, getComparator, getJavaTypeClass, getMutabilityPlan, unknownUnwrap, unknownWrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final BooleanTypeDescriptor INSTANCE
Constructor Detail

BooleanTypeDescriptor

public BooleanTypeDescriptor()
Method Detail

fromString

public Boolean fromString(String string)

toString

public String toString(Boolean value)

unwrap

public <X> X unwrap(Boolean value,
                    Class<X> type,
                    org.hibernate.type.descriptor.WrapperOptions options)

wrap

public <X> Boolean wrap(X value,
                        org.hibernate.type.descriptor.WrapperOptions options)


Copyright © 2013 Atlassian. All Rights Reserved.