From afba72a860e0e4f6393f48e1387e1cd7cfe64290 Mon Sep 17 00:00:00 2001 From: wilian Date: Tue, 4 Aug 2020 18:56:06 +0000 Subject: [PATCH] fixes bug#19807 dev:valdevir qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@102766 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/entidad/ContaMD.java | 25 +++++++++++++++++++ .../ventaboletos/enums/MDOrigem.java | 19 ++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 src/com/rjconsultores/ventaboletos/enums/MDOrigem.java diff --git a/src/com/rjconsultores/ventaboletos/entidad/ContaMD.java b/src/com/rjconsultores/ventaboletos/entidad/ContaMD.java index 4c8df10e5..c1604ec54 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/ContaMD.java +++ b/src/com/rjconsultores/ventaboletos/entidad/ContaMD.java @@ -179,4 +179,29 @@ public class ContaMD implements Serializable { public String toString() { return getNome(); } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getContaId() == null) ? 0 : getContaId().hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (!(obj instanceof ContaMD)) + return false; + ContaMD other = (ContaMD) obj; + if (getContaId() == null) { + if (other.getContaId() != null) + return false; + } else if (!getContaId().equals(other.getContaId())) + return false; + return true; + } } diff --git a/src/com/rjconsultores/ventaboletos/enums/MDOrigem.java b/src/com/rjconsultores/ventaboletos/enums/MDOrigem.java new file mode 100644 index 000000000..e1dd73c98 --- /dev/null +++ b/src/com/rjconsultores/ventaboletos/enums/MDOrigem.java @@ -0,0 +1,19 @@ +package com.rjconsultores.ventaboletos.enums; + +public enum MDOrigem { + + INTERNO("IN"), + EVENTO_EXTRA("EE"), + FORMA_PAGAMENTO("FP"); + + private String value; + + private MDOrigem(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + +}