18 package org.turro.financials.entity;
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.GeneratedValue;
23 import javax.persistence.GenerationType;
24 import javax.persistence.Id;
25 import javax.persistence.ManyToOne;
26 import org.turro.util.CompareUtil;
33 public class RelatedColumn implements java.io.Serializable, Comparable<RelatedColumn> {
36 @GeneratedValue(strategy=GenerationType.IDENTITY)
37 @Column(name=
"IDENTIFIER")
45 private int columnOrder;
52 this.columnOrder = columnOrder;
56 return documentColumn;
60 this.documentColumn = documentColumn;
61 if(columnOrder == 0 && documentColumn !=
null) {
62 columnOrder = documentColumn.
getOrder();
67 return documentDefinition;
71 this.documentDefinition = documentDefinition;
84 int result = CompareUtil.compare(columnOrder, o.columnOrder);
86 result = CompareUtil.compare(
id, o.id);