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

Hibernate example source code file (Stuff.java)

This example Hibernate source code file (Stuff.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

fooproxy, fooproxy, io, morestuff, morestuff, serializable, stuff, stuff, timezone, timezone, util

The Hibernate Stuff.java source code

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

public class Stuff implements Serializable {
	
	public int hashCode() {
		return new Long(id).hashCode();
	}
	
	public boolean equals(Object other) {
		if ( ! (other instanceof Stuff) ) return false;
		Stuff otherStuff = (Stuff) other;
		return otherStuff.getId()==id && otherStuff.getFoo().getKey().equals( foo.getKey() ) && otherStuff.getMoreStuff().equals(moreStuff);
	}
	
	private long id;
	private FooProxy foo;
	private MoreStuff moreStuff;
	private TimeZone property;
	/**
	 * Returns the foo.
	 * @return Foo
	 */
	public FooProxy getFoo() {
		return foo;
	}
	
	/**
	 * Returns the id.
	 * @return long
	 */
	public long getId() {
		return id;
	}
	
	/**
	 * Returns the property.
	 * @return TimeZone
	 */
	public TimeZone getProperty() {
		return property;
	}
	
	/**
	 * Sets the foo.
	 * @param foo The foo to set
	 */
	public void setFoo(FooProxy foo) {
		this.foo = foo;
	}
	
	/**
	 * Sets the id.
	 * @param id The id to set
	 */
	public void setId(long id) {
		this.id = id;
	}
	
	/**
	 * Sets the property.
	 * @param property The property to set
	 */
	public void setProperty(TimeZone property) {
		this.property = property;
	}
	
	/**
	 * Returns the moreStuff.
	 * @return MoreStuff
	 */
	public MoreStuff getMoreStuff() {
		return moreStuff;
	}
	
	/**
	 * Sets the moreStuff.
	 * @param moreStuff The moreStuff to set
	 */
	public void setMoreStuff(MoreStuff moreStuff) {
		this.moreStuff = moreStuff;
	}
	
}






Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate Stuff.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.