Download Latest Version Transformer4J-1.0-sources.jar (10.2 kB)
Email in envelope

Get an email when there's a new version of Transformer4j

Home
Name Modified Size InfoDownloads / Week
README.txt 2013-08-13 960 Bytes
Transformer4J-1.0.jar 2013-08-13 11.6 kB
Transformer4J-1.0-sources.jar 2013-08-13 10.2 kB
Totals: 3 Items   22.7 kB 0
Goals:
 1. transfer a POJO into another POJO or entity.
 2. annotate only the less important classes. 
 Exmple: You want to transfor the data - from external System using a WebService, which creates a WS-POJO.java - into your Entity. And to print your Entity into PDF, you must transfer the data from the Entity into PDF-POJO using 
Transformer#transformObject(...)

For this work you annotate the WS-POJO to transfoer the data from WS-POJO into Entity.
 Then To transfor the data from Entity into PDF-POJO you annotate the PDF-POJO and use the inverse funtion
Transformer#transformObjectInverse(...)

In both cases you dont need to add any annotations in the Entity, which keeps your core clean and readable.

HowToUse:

@TransMember
 private String name;

@TransMember(targetMemberName = "model")
 private String version;

@TransMember(targetMemberName = "speedValue.hp")
 private Integer hp;

However, for mare examples check the JUnit Classes in source.jar
Source: README.txt, updated 2013-08-13