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

Hibernate example source code file (MoreStuff.java)

This example Hibernate source code file (MoreStuff.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, io, morestuff, morestuff, serializable, serializable, string, string, util

The Hibernate MoreStuff.java source code

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


public class MoreStuff implements Serializable {
	private String stringId;
	private int intId;
	private Collection stuffs;
	private String name;
	
	public boolean equals(Object other) {
		return ( (MoreStuff) other ).getIntId()==intId && ( (MoreStuff) other ).getStringId().equals(stringId);
	}
	
	public int hashCode() {
		return stringId.hashCode();
	}
	
	/**
	 * Returns the stuffs.
	 * @return Collection
	 */
	public Collection getStuffs() {
		return stuffs;
	}
	
	/**
	 * Sets the stuffs.
	 * @param stuffs The stuffs to set
	 */
	public void setStuffs(Collection stuffs) {
		this.stuffs = stuffs;
	}
	
	/**
	 * Returns the name.
	 * @return String
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * Sets the name.
	 * @param name The name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * Returns the intId.
	 * @return int
	 */
	public int getIntId() {
		return intId;
	}
	
	/**
	 * Returns the stringId.
	 * @return String
	 */
	public String getStringId() {
		return stringId;
	}
	
	/**
	 * Sets the intId.
	 * @param intId The intId to set
	 */
	public void setIntId(int intId) {
		this.intId = intId;
	}
	
	/**
	 * Sets the stringId.
	 * @param stringId The stringId to set
	 */
	public void setStringId(String stringId) {
		this.stringId = stringId;
	}
	
}






Other Hibernate examples (source code examples)

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