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

Hibernate example source code file (Address.java)

This example Hibernate source code file (Address.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, long, long, person, person, string, string

The Hibernate Address.java source code

package org.hibernate.test.ops;


/**
 * {@inheritDoc}
 *
 * @author Steve Ebersole
 */
public class Address {
	private Long id;
	private String streetAddress;
	private String city;
	private String country;
	private Person resident;

	public Address() {
	}

	public Address(String streetAddress, String city, String country, Person resident) {
		this.streetAddress = streetAddress;
		this.city = city;
		this.country = country;
		this.resident = resident;
		resident.setAddress( this );
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getStreetAddress() {
		return streetAddress;
	}

	public void setStreetAddress(String streetAddress) {
		this.streetAddress = streetAddress;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCountry() {
		return country;
	}

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

	public Person getResident() {
		return resident;
	}

	public void setResident(Person resident) {
		this.resident = resident;
	}
}

Other Hibernate examples (source code examples)

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