About Brian Porter
So using JPA, Hibernate or EBeans is cool when you can just annotate your Java classes, but haven’t you always wished you could “generate” documentation of your data model from the code? Pulling information of the the JPA / Hibernate and other validation annotations?
Assuming you have all those nice Annotations in your beans:
@Entity@Table(name = "project_bills")public class Bill extends Model { private static final long serialVersionUID = 1L; @Id @Column(name="PBI_ID") public Long id; @DoubleFormat @Column(name="PBI_BILL_AMOUNT",length=22) public Double billAmount; @Column(name="PBI_BILL_DATE") @DateTime(pattern="dd.MM.yyyy") public Date billDate; @Column(name="PBI_BILL_NUMBER",length=10) public String billNumber; @Column(name="PBI_CAN_BILL") public Boolean canBill; @Column(name="PBI_COMMENT",length=65535) public String comment; @Column(name="PBI_PAID_DATE") @DateTime(pattern="dd.MM.yyyy") public Date paidDate; Source : http://www.javacodegeeks.com/2013/07/how-to-use-reflection-to-document-your-data-model-based-on-jpa-annotations.html