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

Hibernate example source code file (SomeEntityId.java)

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

embeddable, integer, integer, io, serializable, serializable, someentity, someentity, someentityid, someentityid

The Hibernate SomeEntityId.java source code

package org.hibernate.test.annotations.cid;
import java.io.Serializable;
import javax.persistence.Embeddable;

/**
 * @author bartek
 */
@Embeddable
public class SomeEntityId implements Serializable {
	private Integer id;

	private Integer version;

	@org.hibernate.annotations.Parent
	private SomeEntity parent;

	/**
	 *
	 */
	public SomeEntityId() {
		super();
	}

	/**
	 * @param i
	 * @param j
	 */
	public SomeEntityId(int id, int version) {
		super();
		this.id = id;
		this.version = version;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the version
	 */
	public int getVersion() {
		return version;
	}

	/**
	 * @param version the version to set
	 */
	public void setVersion(int version) {
		this.version = version;
	}

	/**
	 * @return the parent
	 */
	public SomeEntity getParent() {
		return parent;
	}

	/**
	 * @param parent the parent to set
	 */
	public void setParent(SomeEntity parent) {
		this.parent = parent;
	}
}

Other Hibernate examples (source code examples)

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