/*
* The MIT License
*
* Copyright 2012 Universidad de Montemorelos A. C.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package mx.edu.um.mateo.general.utils;
import java.io.Serializable;
import java.util.Objects;
/**
*
* @author J. David Mendoza <jdmendoza@um.edu.mx>
*/
public class LabelValueBean implements Serializable {
/**
*
*/
private static final long serialVersionUID = -3629077799108569942L;
private Long id;
private String value;
private String nombre;
public LabelValueBean() {
}
public LabelValueBean(Long id, String value) {
this.id = id;
this.value = value;
}
public LabelValueBean(Long id, String value, String nombre) {
this.id = id;
this.value = value;
this.nombre = nombre;
}
/**
* @return the id
*/
public Long getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
/**
* @param value
* the value to set
*/
public void setValue(String value) {
this.value = value;
}
public String getLabel() {
return value;
}
/**
* @return the nombre
*/
public String getNombre() {
return nombre;
}
/**
* @param nombre
* the nombre to set
*/
public void setNombre(String nombre) {
this.nombre = nombre;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final LabelValueBean other = (LabelValueBean) obj;
if (!Objects.equals(this.id, other.id)) {
return false;
}
if (!Objects.equals(this.value, other.value)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int hash = 5;
hash = 89 * hash + Objects.hashCode(this.id);
hash = 89 * hash + Objects.hashCode(this.value);
return hash;
}
@Override
public String toString() {
return "LabelValueBean{" + "id=" + id + ", value=" + value + '}';
}
}