package gcom.gerencial.micromedicao.bean; /** * Classe respons�vel por ajudar o caso de uso [UC0343] Resumo de Anormalidades * * @author Thiago Toscano * @date 20/04/2006 */ public class ResumoAnormalidadeHelper { private Integer idImovel; private Integer idGerenciaRegional; private Integer idLocalidade; private Integer idSetorComercial; private Integer idRota; private Integer idQuadra; private Integer codigoSetorComercial; private Integer numeroQuadra; private Integer idPerfilImovel; private Integer idSituacaoLigacaoAgua; private Integer idSituacaoLigacaoEsgoto; private Integer idCategoria; private Integer idEsfera; private Integer idLeituraAnormalidadeFaturada; private Integer idLigacaoAgua; private Integer idMedicaoTipo; private Integer idFaturamentoGrupo; private String descricaoLeituraAnormalidadeFaturada; private int quantidadeImovel = 1; public ResumoAnormalidadeHelper(){ } public boolean equal(Object obj) { if (obj instanceof ResumoAnormalidadeHelper) { ResumoAnormalidadeHelper irleh = (ResumoAnormalidadeHelper) obj; if (irleh.getIdGerenciaRegional() != null) { // se os atributos forem diferentes if (!irleh.getIdGerenciaRegional().equals(this.getIdGerenciaRegional())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdGerenciaRegional() != null) { return false; } if (irleh.getIdLocalidade() != null) { // se os atributos forem diferentes if (!irleh.getIdLocalidade().equals(this.getIdLocalidade())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdLocalidade() != null) { return false; } if (irleh.getIdSetorComercial() != null) { // se os atributos forem diferentes if (!irleh.getIdSetorComercial().equals(this.getIdSetorComercial())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdSetorComercial() != null) { return false; } if (irleh.getIdRota() != null) { // se os atributos forem diferentes if (!irleh.getIdRota().equals(this.getIdRota())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdRota() != null) { return false; } if (irleh.getIdQuadra() != null) { // se os atributos forem diferentes if (!irleh.getIdQuadra().equals(this.getIdQuadra())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdQuadra() != null) { return false; } if (irleh.getCodigoSetorComercial() != null) { // se os atributos forem diferentes if (!irleh.getCodigoSetorComercial().equals(this.getCodigoSetorComercial())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getCodigoSetorComercial() != null) { return false; } if (irleh.getNumeroQuadra() != null) { // se os atributos forem diferentes if (!irleh.getNumeroQuadra().equals(this.getNumeroQuadra())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getNumeroQuadra() != null) { return false; } if (irleh.getIdPerfilImovel() != null) { // se os atributos forem diferentes if (!irleh.getIdPerfilImovel().equals(this.getIdPerfilImovel())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdPerfilImovel() != null) { return false; } if (irleh.getIdSituacaoLigacaoAgua() != null) { // se os atributos forem diferentes if (!irleh.getIdSituacaoLigacaoAgua().equals(this.getIdSituacaoLigacaoAgua())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdSituacaoLigacaoAgua() != null) { return false; } if (irleh.getIdSituacaoLigacaoEsgoto() != null) { // se os atributos forem diferentes if (!irleh.getIdSituacaoLigacaoEsgoto().equals(this.getIdSituacaoLigacaoEsgoto())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdSituacaoLigacaoEsgoto() != null) { return false; } if (irleh.getIdCategoria() != null) { // se os atributos forem diferentes if (!irleh.getIdCategoria().equals(this.getIdCategoria())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdCategoria() != null) { return false; } if (irleh.getIdEsfera() != null) { // se os atributos forem diferentes if (!irleh.getIdEsfera().equals(this.getIdEsfera())) { return false; } // se o atributo no obj for null e nesse objeto for diferente de null, entao retorna falso } else if (this.getIdEsfera() != null) { return false; } } else { // se o objeto passado nao for do tipo ImovelResumoLigacaoEconomiaHelper return false; } // todos os parametros sao iguais return true; } public int hashCode() { String retorno = this.getIdImovel() + "sdf" + this.getIdGerenciaRegional() + "sdf" + this.getIdLocalidade() + "sdf" + this.getIdSetorComercial() + "sdf" + this.getIdRota() + "sdf" + this.getIdQuadra() + "sdf" + this.getCodigoSetorComercial() + "sdf" + this.getNumeroQuadra() + "sdf" + this.getIdPerfilImovel() + "sdf" + this.getIdSituacaoLigacaoAgua() + "sdf" + this.getIdSituacaoLigacaoEsgoto() + "sdf" + this.getIdCategoria() + "sdf" + this.getIdEsfera() + "sdf"; return retorno.hashCode(); } /** * @return Retorna o campo codigoSetorComercial. */ public Integer getCodigoSetorComercial() { return codigoSetorComercial; } /** * @param codigoSetorComercial O codigoSetorComercial a ser setado. */ public void setCodigoSetorComercial(Integer codigoSetorComercial) { this.codigoSetorComercial = codigoSetorComercial; } /** * @return Retorna o campo idCategoria. */ public Integer getIdCategoria() { return idCategoria; } /** * @param idCategoria O idCategoria a ser setado. */ public void setIdCategoria(Integer idCategoria) { this.idCategoria = idCategoria; } /** * @return Retorna o campo idEsfera. */ public Integer getIdEsfera() { return idEsfera; } /** * @param idEsfera O idEsfera a ser setado. */ public void setIdEsfera(Integer idEsfera) { this.idEsfera = idEsfera; } /** * @return Retorna o campo idGerenciaRegional. */ public Integer getIdGerenciaRegional() { return idGerenciaRegional; } /** * @param idGerenciaRegional O idGerenciaRegional a ser setado. */ public void setIdGerenciaRegional(Integer idGerenciaRegional) { this.idGerenciaRegional = idGerenciaRegional; } /** * @return Retorna o campo idImovel. */ public Integer getIdImovel() { return idImovel; } /** * @param idImovel O idImovel a ser setado. */ public void setIdImovel(Integer idImovel) { this.idImovel = idImovel; } /** * @return Retorna o campo idLocalidade. */ public Integer getIdLocalidade() { return idLocalidade; } /** * @param idLocalidade O idLocalidade a ser setado. */ public void setIdLocalidade(Integer idLocalidade) { this.idLocalidade = idLocalidade; } /** * @return Retorna o campo idPerfilImovel. */ public Integer getIdPerfilImovel() { return idPerfilImovel; } /** * @param idPerfilImovel O idPerfilImovel a ser setado. */ public void setIdPerfilImovel(Integer idPerfilImovel) { this.idPerfilImovel = idPerfilImovel; } /** * @return Retorna o campo idQuadra. */ public Integer getIdQuadra() { return idQuadra; } /** * @param idQuadra O idQuadra a ser setado. */ public void setIdQuadra(Integer idQuadra) { this.idQuadra = idQuadra; } /** * @return Retorna o campo idRota. */ public Integer getIdRota() { return idRota; } /** * @param idRota O idRota a ser setado. */ public void setIdRota(Integer idRota) { this.idRota = idRota; } /** * @return Retorna o campo idSetorComercial. */ public Integer getIdSetorComercial() { return idSetorComercial; } /** * @param idSetorComercial O idSetorComercial a ser setado. */ public void setIdSetorComercial(Integer idSetorComercial) { this.idSetorComercial = idSetorComercial; } /** * @return Retorna o campo idSituacaoLigacaoAgua. */ public Integer getIdSituacaoLigacaoAgua() { return idSituacaoLigacaoAgua; } /** * @param idSituacaoLigacaoAgua O idSituacaoLigacaoAgua a ser setado. */ public void setIdSituacaoLigacaoAgua(Integer idSituacaoLigacaoAgua) { this.idSituacaoLigacaoAgua = idSituacaoLigacaoAgua; } /** * @return Retorna o campo idSituacaoLigacaoEsgoto. */ public Integer getIdSituacaoLigacaoEsgoto() { return idSituacaoLigacaoEsgoto; } /** * @param idSituacaoLigacaoEsgoto O idSituacaoLigacaoEsgoto a ser setado. */ public void setIdSituacaoLigacaoEsgoto(Integer idSituacaoLigacaoEsgoto) { this.idSituacaoLigacaoEsgoto = idSituacaoLigacaoEsgoto; } /** * @return Retorna o campo numeroQuadra. */ public Integer getNumeroQuadra() { return numeroQuadra; } /** * @param numeroQuadra O numeroQuadra a ser setado. */ public void setNumeroQuadra(Integer numeroQuadra) { this.numeroQuadra = numeroQuadra; } /** * @return Retorna o campo quantidadeImovel. */ public int getQuantidadeImovel() { return quantidadeImovel; } /** * @param quantidadeImovel O quantidadeImovel a ser setado. */ public void setQuantidadeImovel(int quantidadeImovel) { this.quantidadeImovel = quantidadeImovel; } public ResumoAnormalidadeHelper(Integer idImovel, Integer idGerenciaRegional, Integer idLocalidade, Integer idSetorComercial, Integer idRota, Integer idQuadra, Integer codigoSetorComercial, Integer numeroQuadra, Integer idPerfilImovel, Integer idSituacaoLigacaoAgua, Integer idSituacaoLigacaoEsgoto, Integer idCategoria, Integer idEsfera) { super(); this.idImovel = idImovel; this.idGerenciaRegional = idGerenciaRegional; this.idLocalidade = idLocalidade; this.idSetorComercial = idSetorComercial; this.idRota = idRota; this.idQuadra = idQuadra; this.codigoSetorComercial = codigoSetorComercial; this.numeroQuadra = numeroQuadra; this.idPerfilImovel = idPerfilImovel; this.idSituacaoLigacaoAgua = idSituacaoLigacaoAgua; this.idSituacaoLigacaoEsgoto = idSituacaoLigacaoEsgoto; this.idCategoria = idCategoria; this.idEsfera = idEsfera; } public ResumoAnormalidadeHelper(Integer idImovel, Integer idGerenciaRegional, Integer idLocalidade, Integer idSetorComercial, Integer idRota, Integer idQuadra, Integer codigoSetorComercial, Integer numeroQuadra, Integer idPerfilImovel, Integer idSituacaoLigacaoAgua, Integer idSituacaoLigacaoEsgoto, Integer idEsfera) { super(); this.idImovel = idImovel; this.idGerenciaRegional = idGerenciaRegional; this.idLocalidade = idLocalidade; this.idSetorComercial = idSetorComercial; this.idRota = idRota; this.idQuadra = idQuadra; this.codigoSetorComercial = codigoSetorComercial; this.numeroQuadra = numeroQuadra; this.idPerfilImovel = idPerfilImovel; this.idSituacaoLigacaoAgua = idSituacaoLigacaoAgua; this.idSituacaoLigacaoEsgoto = idSituacaoLigacaoEsgoto; this.idEsfera = idEsfera; } public Integer getIdLeituraAnormalidadeFaturada() { return idLeituraAnormalidadeFaturada; } public void setIdLeituraAnormalidadeFaturada( Integer idLeituraAnormalidadeFaturada) { this.idLeituraAnormalidadeFaturada = idLeituraAnormalidadeFaturada; } public Integer getIdLigacaoAgua() { return idLigacaoAgua; } public void setIdLigacaoAgua(Integer idLigacaoAgua) { this.idLigacaoAgua = idLigacaoAgua; } public Integer getIdMedicaoTipo() { return idMedicaoTipo; } public void setIdMedicaoTipo(Integer idMedicaoTipo) { this.idMedicaoTipo = idMedicaoTipo; } public Integer getIdFaturamentoGrupo() { return idFaturamentoGrupo; } public void setIdFaturamentoGrupo(Integer idFaturamentoGrupo) { this.idFaturamentoGrupo = idFaturamentoGrupo; } public String getDescricaoLeituraAnormalidadeFaturada() { return descricaoLeituraAnormalidadeFaturada; } public void setDescricaoLeituraAnormalidadeFaturada( String descricaoLeituraAnormalidadeFaturada) { this.descricaoLeituraAnormalidadeFaturada = descricaoLeituraAnormalidadeFaturada; } }