jTransfo, 0.10

org.jtransfo
Class NoConversionTypeConverter

java.lang.Object
  extended by org.jtransfo.NoConversionTypeConverter
All Implemented Interfaces:
TypeConverter<Object,Object>

public class NoConversionTypeConverter
extends Object
implements TypeConverter<Object,Object>

Fallback type converter which does no conversion at all.


Constructor Summary
NoConversionTypeConverter()
           
 
Method Summary
 boolean canConvert(Class<?> realToType, Class<?> realDomainType)
          Can this type converter handle conversions between the given transfer and domain object types?
 Object convert(Object object, SyntheticField domainField, Object domainObject, String... tags)
          Convert a transfer object field value to the value for the domain object.
 Object reverse(Object object, SyntheticField toField, Object toObject, String... tags)
          Convert a domain object field value to the value for the transfer object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoConversionTypeConverter

public NoConversionTypeConverter()
Method Detail

canConvert

public boolean canConvert(Class<?> realToType,
                          Class<?> realDomainType)
Description copied from interface: TypeConverter
Can this type converter handle conversions between the given transfer and domain object types?

Specified by:
canConvert in interface TypeConverter<Object,Object>
Parameters:
realToType - real class for the type in the transfer object
realDomainType - real class for the type in the domain object
Returns:
true is this type converter can handle the type conversions

convert

public Object convert(Object object,
                      SyntheticField domainField,
                      Object domainObject,
                      String... tags)
               throws JTransfoException
Description copied from interface: TypeConverter
Convert a transfer object field value to the value for the domain object.

Specified by:
convert in interface TypeConverter<Object,Object>
Parameters:
object - object to convert
domainField - target domain field
domainObject - target domain object
tags - tags which indicate which fields can be converted based on MapOnly annotations.
Returns:
converted object
Throws:
JTransfoException - problem during type conversion

reverse

public Object reverse(Object object,
                      SyntheticField toField,
                      Object toObject,
                      String... tags)
               throws JTransfoException
Description copied from interface: TypeConverter
Convert a domain object field value to the value for the transfer object.

Specified by:
reverse in interface TypeConverter<Object,Object>
Parameters:
object - object to convert
toField - target transfer object field
toObject - target transfer object
tags - tags which indicate which fields can be converted based on MapOnly annotations.
Returns:
converted object
Throws:
JTransfoException - problem during type conversion

jTransfo, 0.10

Copyright © 2013. All rights reserved.