org.joda.time.contrib.hibernate
Class PersistentDuration

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

public class PersistentDuration
extends AbstractStringBasedJodaType

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

Author:
gjoseph
See Also:
Serialized Form

Constructor Summary
PersistentDuration()
           
 
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

PersistentDuration

public PersistentDuration()
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.