|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
T - Type of Configured Classpublic 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. 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. 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
| Method Summary | ||
|---|---|---|
|
manyToOne(S source)
This method returns a new instance of Configured Class with this setting: NullPointerControlSOURCE
MappingType of DestinationALL_FIELDS |
|
|
manyToOne(S source,
MappingType mtSource)
This method returns a new instance of Configured Class with this setting: NullPointerControlSOURCE
MappingType of DestinationALL_FIELDS |
|
|
manyToOne(S source,
NullPointerControl nullPointerControl,
MappingType mtSource)
This method returns a new instance of Configured Class with this setting: NullPointerControlnullPointerControl
MappingType of DestinationALL_FIELDS |
|
|
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 |
|
|
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
|
|
|
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
|
|
|
manyToOneWithoutControl(S source)
This method returns a new instance of Configured Class with this setting: NullPointerControlNOT_ANY
MappingType of DestinationALL_FIELDS |
|
|
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 |
|
|
oneToMany(Class<D> destinationClass,
T source)
This method returns a new instance of Target Class with this setting: NullPointerControlSOURCE
MappingType of DestinationALL_FIELDS |
|
|
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 |
|
|
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 |
|
|
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 |
|
|
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
|
|
|
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
|
|
|
oneToManyWithoutControl(Class<D> destinationClass,
T source)
This method returns a new instance of Target Class with this setting: NullPointerControlNOT_ANY
MappingType of DestinationALL_FIELDS |
|
|
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 |
|
| Method Detail |
|---|
<S> T manyToOne(S source)
NullPointerControl | SOURCE |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | ALL_FIELDS |
source - instance of Target Class type that contains the data
NullPointerControl,
MappingType<S> T manyToOneWithoutControl(S source)
NullPointerControl | NOT_ANY |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | ALL_FIELDS |
source - instance of Target Class type that contains the data
NullPointerControl,
MappingType
<S> T manyToOne(T destination,
S source)
NullPointerControl | ALL |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | ALL_FIELDS |
destination - instance of Configured Class type to enrichsource - instance of Target Class type that contains the data
NullPointerControl,
MappingType
<S> T manyToOneWithoutControl(T destination,
S source)
NullPointerControl | NOT_ANY |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | ALL_FIELDS |
destination - instance of Configured Class type to enrichsource - instance of Target Class type that contains the data
NullPointerControl,
MappingType
<S> T manyToOne(S source,
MappingType mtSource)
NullPointerControl | SOURCE |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | mtSource |
source - instance of Target Class type that contains the datamtSource - type of mapping of source instance
NullPointerControl,
MappingType
<S> T manyToOne(S source,
NullPointerControl nullPointerControl,
MappingType mtSource)
NullPointerControl | nullPointerControl |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | mtSource |
source - instance of Target Class type that contains the datanullPointerControl - type of null pointer controlmtSource - type of mapping of source instance
NullPointerControl,
MappingType
<S> T manyToOne(T destination,
S source,
MappingType mtDestination,
MappingType mtSource)
NullPointerControl | ALL |
MappingType of Destination | mtDestination |
MappingType of Source | mtSource |
destination - instance of Configured Class type to enrichsource - instance of Target Class type that contains the datamtDestination - type of mapping of destination instancemtSource - type of mapping of source instance
NullPointerControl,
MappingType
<S> T manyToOne(T destination,
S source,
NullPointerControl nullPointerControl,
MappingType mtDestination,
MappingType mtSource)
NullPointerControl | nullPointerControl |
MappingType of Destination | mtDestination |
MappingType of Source | mtSource |
destination - instance of Configured Class type to enrichsource - instance of Target Class type that contains the datanullPointerControl - type of null pointer controlmtDestination - type of mapping of destination instancemtSource - type of mapping of source instance
NullPointerControl,
MappingType
<D> D oneToMany(Class<D> destinationClass,
T source)
NullPointerControl | SOURCE |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | ALL_FIELDS |
destinationClass - class to createsource - instance of Configured Class that contains the data
NullPointerControl,
MappingType
<D> D oneToManyWithoutControl(Class<D> destinationClass,
T source)
NullPointerControl | NOT_ANY |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | ALL_FIELDS |
source - instance of Configured Class that contains the data
NullPointerControl,
MappingType
<D> D oneToMany(D destination,
T source)
NullPointerControl | ALL |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | ALL_FIELDS |
destination - instance of Target Class to enrichsource - instance of Configured Class that contains the data
NullPointerControl,
MappingType
<D> D oneToManyWithoutControl(D destination,
T source)
NullPointerControl | NOT_ANY |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | ALL_FIELDS |
destination - instance of Target Class to enrichsource - instance of Configured Class that contains the data
NullPointerControl,
MappingType
<D> D oneToMany(Class<D> destinationClass,
T source,
MappingType mtSource)
NullPointerControl | SOURCE |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | mtSource |
source - instance of Configured Class that contains the datamtSource - type of mapping of source instance
NullPointerControl,
MappingType
<D> D oneToMany(Class<D> destinationClass,
T source,
NullPointerControl nullPointerControl,
MappingType mtSource)
NullPointerControl | nullPointerControl |
MappingType of Destination | ALL_FIELDS |
MappingType of Source | mtSource |
source - instance of Configured Class that contains the datanullPointerControl - type of controlmtSource - type of mapping of source instance
NullPointerControl,
MappingType
<D> D oneToMany(D destination,
T source,
MappingType mtDestination,
MappingType mtSource)
NullPointerControl | ALL |
MappingType of Destination | mtDestination |
MappingType of Source | mtSource |
destination - instance of Target Class to enrichsource - instance of Configured Class that contains the datamtDestination - type of mapping of destination instancemtSource - type of mapping of source instance
NullPointerControl,
MappingType
<D> D oneToMany(D destination,
T source,
NullPointerControl nullPointerControl,
MappingType mtDestination,
MappingType mtSource)
NullPointerControl | nullPointerControl |
MappingType of Destination | mtDestination |
MappingType of Source | mtSource |
destination - instance of Target Class to enrichsource - instance of Configured Class that contains the datanullPointerControl - type of null pointer controlmtDestination - type of mapping of destination instancemtSource - type of mapping of source instance
NullPointerControl,
MappingType
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||