SRJRCFrames
v0.1.296

de.schwarzrot.data.support
Class EnumConverter

java.lang.Object
  extended by de.schwarzrot.data.support.EnumConverter
All Implemented Interfaces:
Converter

public class EnumConverter
extends Object
implements Converter


Constructor Summary
EnumConverter()
           
 
Method Summary
 Object fromPersistence(Class type, Object value)
          convert a value from persistence into a value of the java world.
 Class<?> getValueType()
          returns the type, this converter cares about
 Object toPersistence(Object value, int notUsed)
          convert a value from java world into a value for persistence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumConverter

public EnumConverter()
Method Detail

fromPersistence

public Object fromPersistence(Class type,
                              Object value)
Description copied from interface: Converter
convert a value from persistence into a value of the java world.

Specified by:
fromPersistence in interface Converter
Parameters:
type - the type of the property (target type)
value - the value from persistence
Returns:
the converted value

getValueType

public Class<?> getValueType()
Description copied from interface: Converter
returns the type, this converter cares about

Specified by:
getValueType in interface Converter
Returns:
a Class

toPersistence

public Object toPersistence(Object value,
                            int notUsed)
Description copied from interface: Converter
convert a value from java world into a value for persistence.

Specified by:
toPersistence in interface Converter
Parameters:
value - a property value
notUsed - size of physical datafield (i.e. database column)
Returns:
the converted value

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.