it.avutils.jmapper
Interface IRelationalJMapper<T>

Type Parameters:
T - Type of Configured Class
All Known Implementing Classes:
RelationalJMapper

public interface IRelationalJMapper<T>

RelationalJMapper takes as input one configured Class.
For configured Class, we mean a Class that contains fields configured with annotation or XML.
It is mandatory that all fields have defined classes.
For example:

class Destination {
 
   @JMap(  attributes={"field1Class1","field1Class2","field1Class3"}, 
          classes={Class1.class,Class2.class,Class3.class})
         private String field1;
   @JMap(  attributes={"field2Class1","field2Class2","field2Class3"}, 
          classes={Class1.class,Class2.class,Class3.class})
         private String field2;
   @JMap(  attributes={"field3Class1","field3Class2","field3Class3"}, 
          classes={Class1.class,Class2.class,Class3.class})
         private String field3;
  
  // getter and setter
 }
then invoke the methods manyToOne or oneToMany.

With manyToOne method, the mapped classes are the source and the configured Class is the destination.
manyToOne example:
    AnnotatedClass manyToOne = null;
        Class1 class1 = new Class1("field1Class1", "field2Class1", "field3Class1");
        Class2 class2 = new Class2("field1Class2", "field2Class2", "field3Class2");
        Class3 class3 = new Class3("field1Class3", "field2Class3", "field3Class3");

        RelationalJMapper rm = new RelationalJMapper(AnnotatedClass.class);

        manyToOne = rm.manyToOne(class1);
        manyToOne = rm.manyToOne(class2);
        manyToOne = rm.manyToOne(class3);
With oneToMany method, the mapped classes are the destination and the configured Class is the source.
oneToMany example:
    AnnotatedClass annotatedClass = new AnnotatedClass("field1", "field2", "field3");

        RelationalJMapper rm = new RelationalJMapper(AnnotatedClass.class);

        Class1 class1 = rm.setDestinationClass(Class1.class).oneToMany(annotatedClass);
        Class2 class2 = rm.setDestinationClass(Class2.class).oneToMany(annotatedClass);
        Class3 class3 = rm.setDestinationClass(Class3.class).oneToMany(annotatedClass);
For more information see manyToOne and oneToMany Methods

Author:
Alessandro Vurro

Method Summary
<S> T
manyToOne(S source)
          This method returns a new instance of Configured Class with this setting: NullPointerControlSOURCE MappingType of DestinationALL_FIELDS MappingType of SourceALL_FIELDS
<S> T
manyToOne(S source, MappingType mtSource)
          This method returns a new instance of Configured Class with this setting: NullPointerControlSOURCE MappingType of DestinationALL_FIELDS MappingType of SourcemtSource
<S> T
manyToOne(S source, NullPointerControl nullPointerControl, MappingType mtSource)
          This method returns a new instance of Configured Class with this setting: NullPointerControlnullPointerControl MappingType of DestinationALL_FIELDS MappingType of SourcemtSource
<S> T
manyToOne(T destination, S source)
          This Method returns the configured instance given in input enriched with data contained in source given in input
with this setting: NullPointerControlALL MappingType of DestinationALL_FIELDS MappingType of SourceALL_FIELDS
<S> T
manyToOne(T destination, S source, MappingType mtDestination, MappingType mtSource)
          This Method returns the configured instance given in input enriched with data contained in source given in input
with this setting: NullPointerControlALL MappingType of DestinationmtDestination MappingType of SourcemtSource
<S> T
manyToOne(T destination, S source, NullPointerControl nullPointerControl, MappingType mtDestination, MappingType mtSource)
          This Method returns the configured instance given in input enriched with data contained in source given in input
with this setting: NullPointerControlnullPointerControl MappingType of DestinationmtDestination MappingType of SourcemtSource
<S> T
manyToOneWithoutControl(S source)
          This method returns a new instance of Configured Class with this setting: NullPointerControlNOT_ANY MappingType of DestinationALL_FIELDS MappingType of SourceALL_FIELDS
<S> T
manyToOneWithoutControl(T destination, S source)
          This Method returns the configured instance given in input enriched with data contained in source given in input
with this setting: NullPointerControlNOT_ANY MappingType of DestinationALL_FIELDS MappingType of SourceALL_FIELDS
<D> D
oneToMany(Class<D> destinationClass, T source)
          This method returns a new instance of Target Class with this setting: NullPointerControlSOURCE MappingType of DestinationALL_FIELDS MappingType of SourceALL_FIELDS
<D> D
oneToMany(Class<D> destinationClass, T source, MappingType mtSource)
          This method returns a new instance of Target Class with this setting: NullPointerControlSOURCE MappingType of DestinationALL_FIELDS MappingType of SourcemtSource
<D> D
oneToMany(Class<D> destinationClass, T source, NullPointerControl nullPointerControl, MappingType mtSource)
          This method returns a new instance of Target Class with this setting: NullPointerControlnullPointerControl MappingType of DestinationALL_FIELDS MappingType of SourcemtSource
<D> D
oneToMany(D destination, T source)
          This Method returns the destination given in input enriched with data contained in source given in input
with this setting: NullPointerControlALL MappingType of DestinationALL_FIELDS MappingType of SourceALL_FIELDS
<D> D
oneToMany(D destination, T source, MappingType mtDestination, MappingType mtSource)
          This Method returns the destination given in input enriched with data contained in source given in input
with this setting: NullPointerControlALL MappingType of DestinationmtDestination MappingType of SourcemtSource
<D> D
oneToMany(D destination, T source, NullPointerControl nullPointerControl, MappingType mtDestination, MappingType mtSource)
          This Method returns the destination given in input enriched with data contained in source given in input
with this setting: NullPointerControlnullPointerControl MappingType of DestinationmtDestination MappingType of SourcemtSource
<D> D
oneToManyWithoutControl(Class<D> destinationClass, T source)
          This method returns a new instance of Target Class with this setting: NullPointerControlNOT_ANY MappingType of DestinationALL_FIELDS MappingType of SourceALL_FIELDS
<D> D
oneToManyWithoutControl(D destination, T source)
          This Method returns the destination given in input enriched with data contained in source given in input
with this setting: NullPointerControlNOT_ANY MappingType of DestinationALL_FIELDS MappingType of SourceALL_FIELDS
 

Method Detail

manyToOne

<S> T manyToOne(S source)
This method returns a new instance of Configured Class with this setting:
NullPointerControlSOURCE
MappingType of DestinationALL_FIELDS
MappingType of SourceALL_FIELDS

Parameters:
source - instance of Target Class type that contains the data
Returns:
new instance of Configured Class
See Also:
NullPointerControl, MappingType

manyToOneWithoutControl

<S> T manyToOneWithoutControl(S source)
This method returns a new instance of Configured Class with this setting:
NullPointerControlNOT_ANY
MappingType of DestinationALL_FIELDS
MappingType of SourceALL_FIELDS

Parameters:
source - instance of Target Class type that contains the data
Returns:
new instance of Configured Class
See Also:
NullPointerControl, MappingType

manyToOne

<S> T manyToOne(T destination,
                S source)
This Method returns the configured instance given in input enriched with data contained in source given in input
with this setting:
NullPointerControlALL
MappingType of DestinationALL_FIELDS
MappingType of SourceALL_FIELDS

Parameters:
destination - instance of Configured Class type to enrich
source - instance of Target Class type that contains the data
Returns:
destination enriched
See Also:
NullPointerControl, MappingType

manyToOneWithoutControl

<S> T manyToOneWithoutControl(T destination,
                              S source)
This Method returns the configured instance given in input enriched with data contained in source given in input
with this setting:
NullPointerControlNOT_ANY
MappingType of DestinationALL_FIELDS
MappingType of SourceALL_FIELDS

Parameters:
destination - instance of Configured Class type to enrich
source - instance of Target Class type that contains the data
Returns:
destination enriched
See Also:
NullPointerControl, MappingType

manyToOne

<S> T manyToOne(S source,
                MappingType mtSource)
This method returns a new instance of Configured Class with this setting:
NullPointerControlSOURCE
MappingType of DestinationALL_FIELDS
MappingType of SourcemtSource

Parameters:
source - instance of Target Class type that contains the data
mtSource - type of mapping of source instance
Returns:
new instance of Configured Class
See Also:
NullPointerControl, MappingType

manyToOne

<S> T manyToOne(S source,
                NullPointerControl nullPointerControl,
                MappingType mtSource)
This method returns a new instance of Configured Class with this setting:
NullPointerControlnullPointerControl
MappingType of DestinationALL_FIELDS
MappingType of SourcemtSource

Parameters:
source - instance of Target Class type that contains the data
nullPointerControl - type of null pointer control
mtSource - type of mapping of source instance
Returns:
new instance of Configured Class
See Also:
NullPointerControl, MappingType

manyToOne

<S> T manyToOne(T destination,
                S source,
                MappingType mtDestination,
                MappingType mtSource)
This Method returns the configured instance given in input enriched with data contained in source given in input
with this setting:
NullPointerControlALL
MappingType of DestinationmtDestination
MappingType of SourcemtSource

Parameters:
destination - instance of Configured Class type to enrich
source - instance of Target Class type that contains the data
mtDestination - type of mapping of destination instance
mtSource - type of mapping of source instance
Returns:
destination enriched
See Also:
NullPointerControl, MappingType

manyToOne

<S> T manyToOne(T destination,
                S source,
                NullPointerControl nullPointerControl,
                MappingType mtDestination,
                MappingType mtSource)
This Method returns the configured instance given in input enriched with data contained in source given in input
with this setting:
NullPointerControlnullPointerControl
MappingType of DestinationmtDestination
MappingType of SourcemtSource

Parameters:
destination - instance of Configured Class type to enrich
source - instance of Target Class type that contains the data
nullPointerControl - type of null pointer control
mtDestination - type of mapping of destination instance
mtSource - type of mapping of source instance
Returns:
destination enriched
See Also:
NullPointerControl, MappingType

oneToMany

<D> D oneToMany(Class<D> destinationClass,
                T source)
This method returns a new instance of Target Class with this setting:
NullPointerControlSOURCE
MappingType of DestinationALL_FIELDS
MappingType of SourceALL_FIELDS

Parameters:
destinationClass - class to create
source - instance of Configured Class that contains the data
Returns:
new instance of Target Class
See Also:
NullPointerControl, MappingType

oneToManyWithoutControl

<D> D oneToManyWithoutControl(Class<D> destinationClass,
                              T source)
This method returns a new instance of Target Class with this setting:
NullPointerControlNOT_ANY
MappingType of DestinationALL_FIELDS
MappingType of SourceALL_FIELDS

Parameters:
source - instance of Configured Class that contains the data
Returns:
new instance of Target Class
See Also:
NullPointerControl, MappingType

oneToMany

<D> D oneToMany(D destination,
                T source)
This Method returns the destination given in input enriched with data contained in source given in input
with this setting:
NullPointerControlALL
MappingType of DestinationALL_FIELDS
MappingType of SourceALL_FIELDS

Parameters:
destination - instance of Target Class to enrich
source - instance of Configured Class that contains the data
Returns:
destination enriched
See Also:
NullPointerControl, MappingType

oneToManyWithoutControl

<D> D oneToManyWithoutControl(D destination,
                              T source)
This Method returns the destination given in input enriched with data contained in source given in input
with this setting:
NullPointerControlNOT_ANY
MappingType of DestinationALL_FIELDS
MappingType of SourceALL_FIELDS

Parameters:
destination - instance of Target Class to enrich
source - instance of Configured Class that contains the data
Returns:
destination enriched
See Also:
NullPointerControl, MappingType

oneToMany

<D> D oneToMany(Class<D> destinationClass,
                T source,
                MappingType mtSource)
This method returns a new instance of Target Class with this setting:
NullPointerControlSOURCE
MappingType of DestinationALL_FIELDS
MappingType of SourcemtSource

Parameters:
source - instance of Configured Class that contains the data
mtSource - type of mapping of source instance
Returns:
new instance of Target Class
See Also:
NullPointerControl, MappingType

oneToMany

<D> D oneToMany(Class<D> destinationClass,
                T source,
                NullPointerControl nullPointerControl,
                MappingType mtSource)
This method returns a new instance of Target Class with this setting:
NullPointerControlnullPointerControl
MappingType of DestinationALL_FIELDS
MappingType of SourcemtSource

Parameters:
source - instance of Configured Class that contains the data
nullPointerControl - type of control
mtSource - type of mapping of source instance
Returns:
new instance of Target Class
See Also:
NullPointerControl, MappingType

oneToMany

<D> D oneToMany(D destination,
                T source,
                MappingType mtDestination,
                MappingType mtSource)
This Method returns the destination given in input enriched with data contained in source given in input
with this setting:
NullPointerControlALL
MappingType of DestinationmtDestination
MappingType of SourcemtSource

Parameters:
destination - instance of Target Class to enrich
source - instance of Configured Class that contains the data
mtDestination - type of mapping of destination instance
mtSource - type of mapping of source instance
Returns:
destination enriched
See Also:
NullPointerControl, MappingType

oneToMany

<D> D oneToMany(D destination,
                T source,
                NullPointerControl nullPointerControl,
                MappingType mtDestination,
                MappingType mtSource)
This Method returns the destination given in input enriched with data contained in source given in input
with this setting:
NullPointerControlnullPointerControl
MappingType of DestinationmtDestination
MappingType of SourcemtSource

Parameters:
destination - instance of Target Class to enrich
source - instance of Configured Class that contains the data
nullPointerControl - type of null pointer control
mtDestination - type of mapping of destination instance
mtSource - type of mapping of source instance
Returns:
destination enriched
See Also:
NullPointerControl, MappingType


Copyright © 2013. All Rights Reserved.