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

net.sf.xmlform.config.RelationDefinition Maven / Gradle / Ivy

package net.sf.xmlform.config;

/**
 * @author Liu Zhikun
 */

public class RelationDefinition implements Cloneable {
	String name;
	String field;
	public RelationDefinition() {
		super();
	}
	public RelationDefinition(String name, String field) {
		super();
		this.name = name;
		this.field = field;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getField() {
		return field;
	}
	public void setField(String field) {
		this.field = field;
	}
	public Object clone() {
		try {		    
			RelationDefinition cloneObj=(RelationDefinition)super.clone();
			cloneObj.name=name;
			cloneObj.field=field;
			return cloneObj;
		} catch (CloneNotSupportedException e) {
		    throw new IllegalStateException(e);
		}
	}
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((field == null) ? 0 : field.hashCode());
		return result;
	}
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RelationDefinition other = (RelationDefinition) obj;
		if (field == null) {
			if (other.field != null)
				return false;
		} else if (!field.equals(other.field))
			return false;
		return true;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy