1 package ecar.servlet.relatorio.PPA_funcao.bean; 2 3 import java.io.Serializable; 4 import java.math.BigDecimal; 5 import java.util.ArrayList; 6 import java.util.Iterator; 7 import java.util.TreeSet; 8 9 import ecar.pojo.AreaAre; 10 11 public class FuncaoAreaAreBean implements Serializable { 12 13 private static final long serialVersionUID = -3879525783241417242L; 14 15 private AreaAre areaAre; 16 17 private Long codigoIdentAre; 18 19 private String nomeAre; 20 21 private TreeSet<FuncaoSubAreaSareBean> subAreaList; 22 23 private BigDecimal valor1; 24 25 private BigDecimal valor2; 26 27 private BigDecimal valor3; 28 29 private BigDecimal valor4; 30 31 private BigDecimal total; 32 33 private ArrayList<Long> codIettList; 34 35 36 public ArrayList<Long> getCodIettList() { 37 return codIettList; 38 } 39 40 public void setCodIettList(ArrayList<Long> codIettList) { 41 this.codIettList = codIettList; 42 } 43 44 public AreaAre getAreaAre() { 45 return areaAre; 46 } 47 48 public void setAreaAre(AreaAre areaAre) { 49 this.areaAre = areaAre; 50 } 51 52 public TreeSet<FuncaoSubAreaSareBean> getSubAreaList() { 53 return subAreaList; 54 } 55 56 public void setSubAreaList(TreeSet<FuncaoSubAreaSareBean> subAreaList) { 57 this.subAreaList = subAreaList; 58 } 59 60 public BigDecimal getTotal() { 61 return total; 62 } 63 64 public void setTotal(BigDecimal total) { 65 this.total = total; 66 } 67 68 public BigDecimal getValor1() { 69 return valor1; 70 } 71 72 public void setValor1(BigDecimal valor1) { 73 this.valor1 = valor1; 74 } 75 76 public BigDecimal getValor2() { 77 return valor2; 78 } 79 80 public void setValor2(BigDecimal valor2) { 81 this.valor2 = valor2; 82 } 83 84 public BigDecimal getValor3() { 85 return valor3; 86 } 87 88 public void setValor3(BigDecimal valor3) { 89 this.valor3 = valor3; 90 } 91 92 public BigDecimal getValor4() { 93 return valor4; 94 } 95 96 public void setValor4(BigDecimal valor4) { 97 this.valor4 = valor4; 98 } 99 100 @Override 101 public int hashCode() { 102 final int PRIME = 31; 103 int result = 1; 104 result = PRIME * result + ((areaAre == null) ? 0 : areaAre.hashCode()); 105 return result; 106 } 107 108 @Override 109 public boolean equals(Object obj) { 110 if (this == obj) 111 return true; 112 if (obj == null) 113 return false; 114 if (getClass() != obj.getClass()) 115 return false; 116 final FuncaoAreaAreBean other = (FuncaoAreaAreBean) obj; 117 if (areaAre == null) { 118 if (other.areaAre != null) 119 return false; 120 } else if (!areaAre.equals(other.areaAre)) 121 return false; 122 return true; 123 } 124 125 public String toString() { 126 127 StringBuilder iettStr = new StringBuilder(); 128 for (Iterator iter = codIettList.iterator(); iter.hasNext();) { 129 Long element = (Long) iter.next(); 130 iettStr.append( element.toString() + " " ); 131 } 132 133 return areaAre.getCodigoIdentAre().toString() + " " + areaAre.getNomeAre() + " " + 134 valor1.toString() + " " + valor2.toString() + " " + valor3.toString() + " " + 135 valor4.toString() + " " + total.toString() + " Itens:: " + iettStr.toString(); 136 137 } 138 139 public Long getCodigoIdentAre() { 140 return codigoIdentAre; 141 } 142 143 public void setCodigoIdentAre(Long codigoIdentAre) { 144 this.codigoIdentAre = codigoIdentAre; 145 } 146 147 public String getNomeAre() { 148 return nomeAre; 149 } 150 151 public void setNomeAre(String nomeAre) { 152 this.nomeAre = nomeAre; 153 } 154 155 }