19 package org.turro.financials.entity;
21 import java.util.HashSet;
23 import javax.persistence.CascadeType;
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.FetchType;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.GenerationType;
29 import javax.persistence.Id;
30 import javax.persistence.ManyToOne;
31 import javax.persistence.OneToMany;
32 import org.turro.string.Strings;
33 import org.turro.jpa.entity.EntityCollections;
34 import org.turro.jpa.entity.IDaoEntity;
44 @GeneratedValue(strategy=GenerationType.IDENTITY)
45 @Column(name=
"IDENTIFIER")
51 private String description;
56 @OneToMany(mappedBy =
"contractFlow", fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval=
true)
57 private Set<ContractExpiry> contractExpiries =
new HashSet<ContractExpiry>();
72 this.contract = contract;
76 return documentDefinition;
80 this.documentDefinition = documentDefinition;
84 return contractExpiries;
88 this.contractExpiries = contractExpiries;
96 this.description = description;
108 return Strings.isBlank(description) || contractExpiries.isEmpty();
121 amount = ce.generateFlow(document, amount, count++);
Set< ContractExpiry > getContractExpiries()
void setDocumentDefinition(DocumentDefinition documentDefinition)
void generateFlows(Document document)
void setDescription(String description)
void setContract(Contract contract)
void setContractExpiries(Set< ContractExpiry > contractExpiries)
DocumentDefinition getDocumentDefinition()
static EntityCollections entities(Collection values)