org.omnaest.utils.beans.replicator
Interface TypeToTypeMappingDeclarer

All Known Subinterfaces:
BeanReplicator.DeclarationSupport

public interface TypeToTypeMappingDeclarer

Author:
Omnaest

Method Summary
 void addPropertyNameMapping(String propertyNameFrom, String propertyNameTo)
          Adds a generally applied mapping from one property name to another regardless where the properties are located.
 void addPropertyNameMapping(String path, String propertyNameFrom, String propertyNameTo)
          Adds a mapping from one property name to another for the specific path
 void addTypeAndPropertyNameMapping(Class<?> typeFrom, String propertyNameFrom, Class<?> typeTo, String propertyNameTo)
          Adds a mapping for any property having the given name and type to another property with a new name and a new type
 void addTypeAndPropertyNameMapping(String path, Class<?> typeFrom, String propertyNameFrom, Class<?> typeTo, String propertyNameTo)
          Similar to addTypeAndPropertyNameMapping(Class, String, Class, String) but allows to further specify a path
 void addTypeMapping(Class<?> typeFrom, Class<?> typeTo)
          Adds a generally applied mapping from a source type to another target type regardless where the type is located
 void addTypeMappingForPath(String path, Class<?> typeFrom, Class<?> typeTo)
          Adds a type to type mapping for a special path
 

Method Detail

addTypeMapping

void addTypeMapping(Class<?> typeFrom,
                    Class<?> typeTo)
Adds a generally applied mapping from a source type to another target type regardless where the type is located

Parameters:
typeFrom -
typeTo -
See Also:
addTypeMappingForPath(String, Class, Class), addTypeAndPropertyNameMapping(Class, String, Class, String)

addPropertyNameMapping

void addPropertyNameMapping(String propertyNameFrom,
                            String propertyNameTo)
Adds a generally applied mapping from one property name to another regardless where the properties are located.

Parameters:
propertyNameFrom -
propertyNameTo -
See Also:
addPropertyNameMapping(String, String)

addPropertyNameMapping

void addPropertyNameMapping(String path,
                            String propertyNameFrom,
                            String propertyNameTo)
Adds a mapping from one property name to another for the specific path

Parameters:
path -
propertyNameFrom -
propertyNameTo -

addTypeAndPropertyNameMapping

void addTypeAndPropertyNameMapping(Class<?> typeFrom,
                                   String propertyNameFrom,
                                   Class<?> typeTo,
                                   String propertyNameTo)
Adds a mapping for any property having the given name and type to another property with a new name and a new type

Parameters:
typeFrom -
propertyNameFrom -
typeTo -
propertyNameTo -

addTypeAndPropertyNameMapping

void addTypeAndPropertyNameMapping(String path,
                                   Class<?> typeFrom,
                                   String propertyNameFrom,
                                   Class<?> typeTo,
                                   String propertyNameTo)
Similar to addTypeAndPropertyNameMapping(Class, String, Class, String) but allows to further specify a path

Parameters:
path -
typeFrom -
propertyNameFrom -
typeTo -
propertyNameTo -

addTypeMappingForPath

void addTypeMappingForPath(String path,
                           Class<?> typeFrom,
                           Class<?> typeTo)
Adds a type to type mapping for a special path

Parameters:
path -
typeFrom -
typeTo -


Copyright © 2013. All Rights Reserved.