SRJRCFrames
v0.1.296

de.schwarzrot.data.support
Interface Converter

All Known Implementing Classes:
BooleanConverter, ByteConverter, ColorConverter, DateConverter, DoubleConverter, EntityConverter, EnumConverter, FileConverter, FloatConverter, IntConverter, LongConverter, NullConverter, ShortConverter, StringConverter

public interface Converter

interface for property conversion between java world and persistence. Converters are requested from a ConverterFactory, with the (java-)property type as value type. The ConverterFactory is setup by ApplicationContext.

Author:
Reinhard Mantey
See Also:
EntityUtils.fillEntity(de.schwarzrot.data.Entity, de.schwarzrot.data.access.support.EntityDescriptor, de.schwarzrot.data.access.DataAccessor, de.schwarzrot.data.access.support.EntityIntrospector)

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 physicalSize)
          convert a value from java world into a value for persistence.
 

Method Detail

fromPersistence

Object fromPersistence(Class<?> type,
                       Object value)
convert a value from persistence into a value of the java world.

Parameters:
type - the type of the property (target type)
value - the value from persistence
Returns:
the converted value

getValueType

Class<?> getValueType()
returns the type, this converter cares about

Returns:
a Class

toPersistence

Object toPersistence(Object value,
                     int physicalSize)
convert a value from java world into a value for persistence.

Parameters:
value - a property value
physicalSize - 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.