|
jTransfo, 0.14 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface JTransfo
jTransfo main access point.
| Field Summary | |
|---|---|
static String |
DEFAULT_TAG_WHEN_NO_TAGS
Default tag which is activated when not tags are specified in the convert call. |
| Method Summary | ||
|---|---|---|
Object |
convert(Object source)
Create a new domain object from the source transfer object. |
|
|
convert(Object source,
T target,
String... tags)
Fill the target object with the values from the source object. |
|
|
convertList(List<?> source,
Class<T> targetClass,
String... tags)
Convert a list of object to the given type. |
|
|
convertTo(Object source,
Class<T> targetClass,
String... tags)
Create a new domain object from the source transfer object. |
|
|
findTarget(Object source,
Class<T> targetClass)
Get the base target (domain) object for the source (transfer) object. |
|
Class<?> |
getDomainClass(Class<?> toClass)
Get domain class for transfer object. |
|
Class<?> |
getToSubType(Class<?> toType,
Object domainObject)
Get the correct transfer object type for the given domain object. |
|
boolean |
isToClass(Class<?> toClass)
Is the given class a transfer object class? True when there is a DomainClass annotation on the class. |
|
| Field Detail |
|---|
static final String DEFAULT_TAG_WHEN_NO_TAGS
| Method Detail |
|---|
<T> T convert(Object source,
T target,
String... tags)
T - type of object for targetsource - source object. Should not be null.target - target object. Should not be null.tags - tags which indicate which fields can be converted based on MapOnly annotations.
Tags are processed from left to right.
Object convert(Object source)
source - source transfer object
<T> T convertTo(Object source,
Class<T> targetClass,
String... tags)
T - type of object for targetsource - source transfer objecttargetClass - target class to convert totags - tags which indicate which fields can be converted based on MapOnly annotations.
Tags are processed from left to right.
<T> List<T> convertList(List<?> source,
Class<T> targetClass,
String... tags)
convertTo(Object, Class, String...) on each object.
When the source is null, the result is also null.
T - type of object for targetsource - source list of objectstargetClass - target class to convert each object totags - tags which indicate which fields can be converted based on MapOnly annotations.
Tags are processed from left to right.
<T> T findTarget(Object source,
Class<T> targetClass)
T - type of object for targetsource - source transfer objecttargetClass - target class to convert to
Class<?> getDomainClass(Class<?> toClass)
toClass - transfer object class
boolean isToClass(Class<?> toClass)
DomainClass annotation on the class.
toClass - object class to test
Class<?> getToSubType(Class<?> toType,
Object domainObject)
toType - base transfer object typedomainObject - domain object (instance)
|
jTransfo, 0.14 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||