|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectma.glasnost.orika.metadata.FieldMapBuilder<A,B>
A - B - public class FieldMapBuilder<A,B>
FieldMapBuilder is used in cooperation with the ClassMapBuilder fluent api to
configure the details of a given FieldMap instance.
A FieldMapBuilder instance is obtained from a ClassMapBuilder instance via
the fieldMap(...) method; it may then be used to further
configure that field mapping. Finally, the add() is used to add
the associated field mapping to the containing ClassMapBuilder.
| Method Summary | |
|---|---|
ClassMapBuilder<A,B> |
add()
Adds the FieldMap configured by this builder to it's containing ClassMapBuilder; use this method to complete specifications on a given field mapping and return to the containing builder. |
FieldMapBuilder<A,B> |
aElementType(Class<?> rawType)
Specify element type for A side property When dealing with legacy code, prior to Java 1.5 you can add element type of collections, this is not required when using generics |
FieldMapBuilder<A,B> |
aElementType(Type<?> elementType)
Specify element type for A side property When dealing with legacy code, prior to Java 1.5 you can add element type of collections, this is not required when using generics |
FieldMapBuilder<A,B> |
aInverse(String aInverse)
|
FieldMapBuilder<A,B> |
aToB()
Specify that the configured field mapping (property) should only be used when mapping in the direction from A to B |
FieldMapBuilder<A,B> |
bElementType(Class<?> rawType)
Specify element type for B side property When dealing with legacy code, prior to Java 1.5 you can add element type of collections, this is not required when using generics |
FieldMapBuilder<A,B> |
bElementType(Type<?> elementType)
Specify element type for B side property When dealing with legacy code, prior to Java 1.5 you can add element type of collections, this is not required when using generics |
FieldMapBuilder<A,B> |
bInverse(String bInverse)
|
FieldMapBuilder<A,B> |
bToA()
Specify that the configured field mapping (property) should only be used when mapping in the direction from B to A |
FieldMapBuilder<A,B> |
converter(String id)
Specify that the converter (which was previously registered with the specified id) should be applied to this specific field mapping. |
FieldMapBuilder<A,B> |
exclude()
Specify that the property should be excluded from mapping |
static FieldMap |
mapKeys(Type<?> aType,
Type<?> bType)
|
FieldMapBuilder<A,B> |
mapNulls(boolean destinationMappedOnNull)
|
FieldMapBuilder<A,B> |
mapNullsInReverse(boolean sourceMappedOnNull)
|
static FieldMap |
mapValues(Type<?> aType,
Type<?> bType)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public ClassMapBuilder<A,B> add()
public FieldMapBuilder<A,B> aInverse(String aInverse)
aInverse -
public FieldMapBuilder<A,B> bInverse(String bInverse)
bInverse -
public FieldMapBuilder<A,B> mapNullsInReverse(boolean sourceMappedOnNull)
sourceMappedOnNull - true|false to indicate whether the source property of this
field map should be set to null (when mapping in the reverse
direction) if the destination property's value is null
public FieldMapBuilder<A,B> mapNulls(boolean destinationMappedOnNull)
destinationMappedOnNull - true|false to indicate whether the destination property of
this field map should be set to null (when mapping in the
forward direction) if the source property's value is null
public FieldMapBuilder<A,B> aToB()
public FieldMapBuilder<A,B> bToA()
public FieldMapBuilder<A,B> converter(String id)
id - the id with which the converter to use was registered
public FieldMapBuilder<A,B> exclude()
public FieldMapBuilder<A,B> aElementType(Class<?> rawType)
public FieldMapBuilder<A,B> aElementType(Type<?> elementType)
public FieldMapBuilder<A,B> bElementType(Class<?> rawType)
public FieldMapBuilder<A,B> bElementType(Type<?> elementType)
public static FieldMap mapKeys(Type<?> aType,
Type<?> bType)
public static FieldMap mapValues(Type<?> aType,
Type<?> bType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||