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 DocumentWorkflow implements java.io.Serializable, Comparable<DocumentWorkflow> {
36 @GeneratedValue(strategy=GenerationType.IDENTITY)
37 @Column(name=
"IDENTIFIER")
40 private String description;
54 private boolean allowNewDescendants;
57 return allowNewDescendants;
61 this.allowNewDescendants = allowNewDescendants;
69 this.ancestor = ancestor;
73 return contractDefinition;
77 this.contractDefinition = contractDefinition;
85 this.descendant = descendant;
89 if(description ==
null) {
90 description = ancestor !=
null ? ancestor.getName() :
"";
92 description += descendant !=
null ? descendant.getName() :
"";
93 description += lineType !=
null ?
" [" + lineType.getName() +
"]" :
"";
99 this.description = description;
115 this.lineType = lineType;
120 int result = CompareUtil.compare(ancestor.getId(), o.ancestor.
getId());
122 result = CompareUtil.compare(
id, o.id);
void setLineType(LineType lineType)
DocumentDefinition getDescendant()
ContractDefinition getContractDefinition()
void setDescription(String description)
void setAncestor(DocumentDefinition ancestor)
boolean isAllowNewDescendants()
void setContractDefinition(ContractDefinition contractDefinition)
DocumentDefinition getAncestor()
void setDescendant(DocumentDefinition descendant)
int compareTo(DocumentWorkflow o)
void setAllowNewDescendants(boolean allowNewDescendants)