alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Hibernate example source code file (Single.java)

This example Hibernate source code file (Single.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Hibernate tags/keywords

collection, collection, hashset, io, serializable, serializable, single, single, string, string, util

The Hibernate Single.java source code

//$Id: Single.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy;
import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;


public class Single implements Serializable {
	private String id;
	private String prop;
	private String string;
	private Collection several = new HashSet();
	/**
	 * Returns the id.
	 * @return String
	 */
	public String getId() {
		return id;
	}
	
	/**
	 * Returns the prop.
	 * @return String
	 */
	public String getProp() {
		return prop;
	}
	
	/**
	 * Returns the several.
	 * @return Set
	 */
	public Collection getSeveral() {
		return several;
	}
	
	/**
	 * Sets the id.
	 * @param id The id to set
	 */
	public void setId(String id) {
		this.id = id;
	}
	
	/**
	 * Sets the prop.
	 * @param prop The prop to set
	 */
	public void setProp(String prop) {
		this.prop = prop;
	}
	
	/**
	 * Sets the several.
	 * @param several The several to set
	 */
	public void setSeveral(Collection several) {
		this.several = several;
	}
	
	/**
	 * Returns the string.
	 * @return String
	 */
	public String getString() {
		return string;
	}
	
	/**
	 * Sets the string.
	 * @param string The string to set
	 */
	public void setString(String string) {
		this.string = string;
	}
	
	/*public boolean equals(Object other) {
		if ( !(other instanceof Single) ) return false;
		return ( (Single) other ).id.equals(id) && ( (Single) other ).string.equals(string);
	}
	
	public int hashCode() {
		return id.hashCode();
	}*/
	
}






Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate Single.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.