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

Hibernate example source code file (Thing.java)

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

person, person, string, string, thing, thing

The Hibernate Thing.java source code

//$Id: Thing.java 7715 2005-08-01 16:46:57Z oneovthafew $
package org.hibernate.test.version;


public class Thing {
	private String description;
	private Person person;
	private int version;
	private String longDescription;
	
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	Thing() {}
	public Thing(String description, Person person) {
		this.description = description;
		this.person = person;
		person.getThings().add(this);
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Person getPerson() {
		return person;
	}
	public void setPerson(Person person) {
		this.person = person;
	}
	public String getLongDescription() {
		return longDescription;
	}
	public void setLongDescription(String longDescription) {
		this.longDescription = longDescription;
	}
}

Other Hibernate examples (source code examples)

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