All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mentawai.list.ListDataItemJPA Maven / Gradle / Ivy

Go to download

A Java full-stack web framework with programmatic configuration instead of XML and Annotations.

There is a newer version: 2.5.6
Show newest version
/*
 * Mentawai Web Framework http://mentawai.lohis.com.br/
 * Copyright (C) 2005  Sergio Oliveira Jr. ([email protected])
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
package org.mentawai.list;

import java.io.Serializable;


/**
 * Get database values for lists using  method
 * 
 * @author Fernando Boaglio
 */

public class ListDataItemJPA implements Serializable {
	
	private static final long serialVersionUID = -8058386025726520172L;
	
	private String key;
	private String value;
	private String loc;
	
	
	public ListDataItemJPA(String key, String value) {
		super();
		this.key = key;
		this.value = value;
	}
	public ListDataItemJPA(String key, String value, String loc) {
		super();
		this.key = key;
		this.value = value;
		this.loc = loc;
	}
	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getLoc() {
		return loc;
	}
	public void setLoc(String loc) {
		this.loc = loc;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((key == null) ? 0 : key.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ListDataItemJPA other = (ListDataItemJPA) obj;
		if (key == null) {
			if (other.key != null)
				return false;
		} else if (!key.equals(other.key))
			return false;
		return true;
	}
	
	@Override
	public String toString() {
		return "ListDataItemJPA[key="+this.key+",value="+this.value+",loc="+this.loc+"]";
	}
 
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy