View Javadoc

1   package ecar.servlet.relatorio.PPA_LinhaAcao;
2   
3   import java.io.Serializable;
4   import java.math.BigDecimal;
5   
6   
7   public class PPA_LinhaAcaoBean implements Serializable {
8   
9   
10  	private static final long serialVersionUID = 1618823163312063271L;
11  
12  	/**
13  	 * Descricao do item
14  	 */
15  	private String nome;
16  
17  	/**
18  	 * Sigla do Orgao
19  	 */
20  	private String siglaOrgao;
21  	
22  	/**
23  	 * valor do Exercicio 1
24  	 */
25  	private BigDecimal valor1;
26  	
27  	/**
28  	 * valor do Exercicio 2 
29  	 */
30  	private BigDecimal valor2;
31  	
32  	/**
33  	 * valor do Exercicio 3 
34  	 */	
35  	private BigDecimal valor3;
36  	
37  	/**
38  	 * valor do Exercicio 4 
39  	 */	
40  	private BigDecimal valor4;
41  	
42  	/**
43  	 * valor total dos exercicios 
44  	 */	
45  	private BigDecimal total;
46  
47  	
48  	private Integer nivelItem;
49  	
50  	private Integer indice;
51  	
52  	final private BigDecimal ZERO = new BigDecimal(0);
53  
54  
55  	public Integer getNivelItem() {
56  		return nivelItem;
57  	}
58  
59  
60  	public void setNivelItem(Integer nivelItem) {
61  		this.nivelItem = nivelItem;
62  	}
63  
64  
65  	public String getNome() {
66  		return nome;
67  	}
68  
69  
70  	public String getSiglaOrgao() {
71  		return siglaOrgao;
72  	}
73  
74  
75  	public BigDecimal getTotal() {
76  		return total==null?ZERO:total;
77  	}
78  
79  	public BigDecimal getValor1() {
80  		return valor1==null?ZERO:valor1;
81  	}
82  
83  	public BigDecimal getValor2() {
84  		return valor2==null?ZERO:valor2;
85  	}
86  
87  	public BigDecimal getValor3() {
88  		return valor3==null?ZERO:valor3;
89  	}
90  
91  	public BigDecimal getValor4() {
92  		return valor4==null?ZERO:valor4;
93  	}
94  
95  
96  	public void setNome(String nome) {
97  		this.nome = nome;
98  	}
99  
100 
101 	public void setSiglaOrgao(String siglaOrgao) {
102 		this.siglaOrgao = siglaOrgao;
103 	}
104 
105 
106 	public void setTotal(BigDecimal total) {
107 		this.total = total;
108 	}
109 
110 
111 	public void setValor1(BigDecimal valor1) {
112 		this.valor1 = valor1;
113 	}
114 
115 
116 	public void setValor2(BigDecimal valor2) {
117 		this.valor2 = valor2;
118 	}
119 
120 
121 	public void setValor3(BigDecimal valor3) {
122 		this.valor3 = valor3;
123 	}
124 
125 
126 	public void setValor4(BigDecimal valor4) {
127 		this.valor4 = valor4;
128 	}
129 	
130 	public String toString() {
131 		return "\n" +
132 				"nome: " + nome +
133 				"\t nivel: " + nivelItem + 
134 				"\t siglaOrgao: " + siglaOrgao +
135 				"\t valor1: " + valor1 +
136 				"\t valor2: " + valor2 +
137 				"\t valor3: " + valor3 +
138 				"\t valor4: " + valor4 +
139 				"\t total: " + total;		
140 	}
141 
142 
143 	@Override
144 	public int hashCode() {
145 		final int PRIME = 31;
146 		int result = 1;
147 		result = PRIME * result + ((nivelItem == null) ? 0 : nivelItem.hashCode());
148 		result = PRIME * result + ((nome == null) ? 0 : nome.hashCode());
149 		result = PRIME * result + ((siglaOrgao == null) ? 0 : siglaOrgao.hashCode());
150 		return result;
151 	}
152 
153 
154 	@Override
155 	public boolean equals(Object obj) {
156 		if (this == obj)
157 			return true;
158 		if (obj == null)
159 			return false;
160 		if (getClass() != obj.getClass())
161 			return false;
162 		final PPA_LinhaAcaoBean other = (PPA_LinhaAcaoBean) obj;
163 		if (nivelItem == null) {
164 			if (other.nivelItem != null)
165 				return false;
166 		} else if (!nivelItem.equals(other.nivelItem))
167 			return false;
168 		if (nome == null) {
169 			if (other.nome != null)
170 				return false;
171 		} else if (!nome.equals(other.nome))
172 			return false;
173 		if (siglaOrgao == null) {
174 			if (other.siglaOrgao != null)
175 				return false;
176 		} else if (!siglaOrgao.equals(other.siglaOrgao))
177 			return false;
178 		return true;
179 	}
180 
181 
182 	public Integer getIndice() {
183 		return indice;
184 	}
185 
186 
187 	public void setIndice(Integer indice) {
188 		this.indice = indice;
189 	}
190 
191 
192 	
193 	
194 }