SRJRCFrames
v0.1.296

de.schwarzrot.data.support
Class FileConverter

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

public class FileConverter
extends Object
implements Converter

converts files into persistence representation and back from persistence. Files in persistence are always represented by *nix-paths, whereas the applications representation may vary depending on the operating system.

Author:
Reinhard Mantey

Field Summary
protected static SysInfo sysInfo
           
 
Constructor Summary
FileConverter()
           
 
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
 

Field Detail

sysInfo

protected static SysInfo sysInfo
Constructor Detail

FileConverter

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