18 package org.turro.financials.entity;
20 import java.util.HashSet;
22 import javax.persistence.CascadeType;
23 import javax.persistence.Column;
24 import javax.persistence.Entity;
25 import javax.persistence.FetchType;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.GenerationType;
28 import javax.persistence.Id;
29 import javax.persistence.OneToMany;
30 import javax.persistence.Transient;
37 public class LineType implements java.io.Serializable {
40 @GeneratedValue(strategy=GenerationType.IDENTITY)
41 @Column(name=
"IDENTIFIER")
44 @Column(name=
"LTYPE_NAME")
47 private double stockCoefficient;
49 @OneToMany(mappedBy =
"lineType", fetch = FetchType.EAGER, cascade = CascadeType.ALL, orphanRemoval=
true)
50 private Set<LineTypeAccount> lineTypeAccounts =
new HashSet<LineTypeAccount>();
56 private String composedName;
67 if(composedName ==
null) {
74 this.composedName = composedName;
78 return contractPreference;
82 this.contractPreference = contractPreference;
83 if(contractPreference !=
null) {
84 if(
"#".equals(contractPreference.
getName())) {
85 composedName = name.replaceAll(
"\\%n",
"");
87 composedName = name.replaceAll(
"\\%n", contractPreference.
getName());
93 return lineTypeAccounts;
97 this.lineTypeAccounts = lineTypeAccounts;
109 return stockCoefficient;
113 this.stockCoefficient = stockCoefficient;
ContractPreference getContractPreference()
double getStockCoefficient()
void setStockCoefficient(double stockCoefficient)
void setLineTypeAccounts(Set< LineTypeAccount > lineTypeAccounts)
void setContractPreference(ContractPreference contractPreference)
Set< LineTypeAccount > getLineTypeAccounts()
void setComposedName(String composedName)
void setName(String name)