From 0030901f477919a6c73053273209fbd74fea0cf4 Mon Sep 17 00:00:00 2001 From: valdir Date: Wed, 27 Jan 2021 19:16:47 +0000 Subject: [PATCH] =?UTF-8?q?0021355:=20Andorinha=20-=20GLPI=2032964=20ALTER?= =?UTF-8?q?A=C3=87=C3=83O=20NOME=20E=20CORES=20AMBIENTE=20HOMOLOGA=C3=87?= =?UTF-8?q?=C3=83O=20bug#21355=20dev:valdevir=20qua:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@105161 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/enums/CustomTipo.java | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/enums/CustomTipo.java b/src/com/rjconsultores/ventaboletos/enums/CustomTipo.java index 1734509eb..b604c36b2 100644 --- a/src/com/rjconsultores/ventaboletos/enums/CustomTipo.java +++ b/src/com/rjconsultores/ventaboletos/enums/CustomTipo.java @@ -2,17 +2,35 @@ package com.rjconsultores.ventaboletos.enums; public enum CustomTipo { - TIPO_CLIENTE(1), - TIPO_SERVIDOR(4); + TIPO_CLIENTE(1, "Cliente"), + TIPO_SKIN(2, "Skin"), + TIPO_MENU(3, "Menu"), + TIPO_SERVIDOR(4, "Servidor"); private Integer valor; + private String descricao; - private CustomTipo(Integer valor) { + private CustomTipo(Integer valor, String descricao) { this.valor = valor; + this.descricao = descricao; } public Integer getValor() { return valor; } + @Override + public String toString() { + return this.descricao; + } + + public static CustomTipo getCustomTipo(Integer tValor) { + for (CustomTipo valor : CustomTipo.values()) { + if (valor.getValor().equals(tValor)) { + return valor; + } + } + return null; + } + }