BrightSide Workbench Full Report + Source Code
LineTypeAccount.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2011 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 package org.turro.financials.entity;
19 
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.PhraseBuilder;
27 
32 @Entity
33 public class LineTypeAccount implements java.io.Serializable {
34 
35  @Id
36  @GeneratedValue(strategy=GenerationType.IDENTITY)
37  @Column(name="IDENTIFIER")
38  private long id;
39 
40  private LineTypeAccountType type;
41 
42  private double typeValue;
43 
44  private String pattern;
45 
46  private AccountPosition position;
47 
48  @ManyToOne
49  private RegisterView view;
50 
51  private double coefficient;
52 
53  @ManyToOne
54  private LineType lineType;
55 
56  private OperatingModifier operatingModifier;
57 
58  public double getCoefficient() {
59  return coefficient;
60  }
61 
62  public void setCoefficient(double coefficient) {
63  this.coefficient = coefficient;
64  }
65 
66  public long getId() {
67  return id;
68  }
69 
70  public void setId(long id) {
71  this.id = id;
72  }
73 
74  public LineType getLineType() {
75  return lineType;
76  }
77 
78  public void setLineType(LineType lineType) {
79  this.lineType = lineType;
80  }
81 
83  return operatingModifier;
84  }
85 
86  public void setOperatingModifier(OperatingModifier operatingModifier) {
87  this.operatingModifier = operatingModifier;
88  }
89 
90  public String getPattern() {
91  return pattern;
92  }
93 
94  public void setPattern(String pattern) {
95  this.pattern = pattern;
96  }
97 
99  return position;
100  }
101 
102  public void setPosition(AccountPosition position) {
103  this.position = position;
104  }
105 
107  return type;
108  }
109 
110  public void setType(LineTypeAccountType type) {
111  this.type = type;
112  }
113 
114  public double getTypeValue() {
115  return typeValue;
116  }
117 
118  public void setTypeValue(double typeValue) {
119  this.typeValue = typeValue;
120  }
121 
123  return view;
124  }
125 
126  public void setView(RegisterView view) {
127  this.view = view;
128  }
129 
130  /* Helpers */
131 
132  public String getDescription() {
133  PhraseBuilder pb = new PhraseBuilder();
134  pb.addWord(type.name());
135  pb.addWord(pattern);
136  pb.addWord(position.name());
137  pb.addWord(view.getName());
138  pb.addWord(coefficient + "");
139  return pb.toString();
140  }
141 
142 }
void setOperatingModifier(OperatingModifier operatingModifier)
void setType(LineTypeAccountType type)
void setPosition(AccountPosition position)