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

Hibernate example source code file (Person.java)

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

address, address, person, person, string, string

The Hibernate Person.java source code

//$Id: Person.java 7192 2005-06-18 14:40:15Z oneovthafew $
package org.hibernate.test.unionsubclass2;



/**
 * @author Gavin King
 */
public class Person {
	private long id;
	private String name;
	private char sex;
	private double heightInches;
	private Address address = new Address();
	/**
	 * @return Returns the address.
	 */
	public Address getAddress() {
		return address;
	}

	public void setAddress(String string) {
		this.address.address = string;
	}

	public void setZip(String string) {
		this.address.zip = string;
	}

	public void setCountry(String string) {
		this.address.country = string;
	}

	
	/**
	 * @return Returns the sex.
	 */
	public char getSex() {
		return sex;
	}
	/**
	 * @param sex The sex to set.
	 */
	public void setSex(char sex) {
		this.sex = sex;
	}
	/**
	 * @return Returns the id.
	 */
	public long getId() {
		return id;
	}
	/**
	 * @param id The id to set.
	 */
	public void setId(long id) {
		this.id = id;
	}
	/**
	 * @return Returns the identity.
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param identity The identity to set.
	 */
	public void setName(String identity) {
		this.name = identity;
	}
	/**
	 * @return Returns the height in inches.
	 */
	public double getHeightInches() {
		return heightInches;
	}
	/**
	 * @param heightInches The height in inches to set.
	 */
	public void setHeightInches(double heightInches) {
		this.heightInches = heightInches;
	}
}

Other Hibernate examples (source code examples)

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