org.joda.time.contrib.hibernate
Class PersistentPeriod

java.lang.Object
  extended by org.joda.time.contrib.hibernate.AbstractStringBasedJodaType
      extended by org.joda.time.contrib.hibernate.PersistentPeriod
All Implemented Interfaces:
Serializable, org.hibernate.usertype.UserType

public class PersistentPeriod
extends AbstractStringBasedJodaType

Converts a org.joda.time.Period to and from Sql for Hibernate. It simply stores and retrieves the value as a varchar using Period.toString.

Author:
gjoseph
See Also:
Serialized Form

Constructor Summary
PersistentPeriod()
           
 
Method Summary
protected  Object fromNonNullString(String s)
           
 Class returnedClass()
           
protected  String toNonNullString(Object value)
           
 
Methods inherited from class org.joda.time.contrib.hibernate.AbstractStringBasedJodaType
assemble, deepCopy, disassemble, equals, hashCode, isMutable, nullSafeGet, nullSafeSet, replace, sqlTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentPeriod

public PersistentPeriod()
Method Detail

returnedClass

public Class returnedClass()

fromNonNullString

protected Object fromNonNullString(String s)
Specified by:
fromNonNullString in class AbstractStringBasedJodaType

toNonNullString

protected String toNonNullString(Object value)
Specified by:
toNonNullString in class AbstractStringBasedJodaType


Copyright © 2005-2011 Joda.org. All Rights Reserved.