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

Hibernate example source code file (KeyManyToOneEntity.java)

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

id, id, io, keymanytooneentity, keymanytooneentity, keymanytoonekeyentity, keymanytoonekeyentity, serializable, string, string

The Hibernate KeyManyToOneEntity.java source code

// $Id: KeyManyToOneEntity.java 7091 2005-06-08 19:31:26Z steveebersole $
package org.hibernate.test.hql;
import java.io.Serializable;

/**
 * Implementation of KeyManyToOneEntity.
 *
 * @author Steve Ebersole
 */
public class KeyManyToOneEntity {
	private Id id;
	private String name;

	public KeyManyToOneEntity(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static class Id implements Serializable {
		private KeyManyToOneKeyEntity key1;
		private String key2;

		public Id(KeyManyToOneKeyEntity key1, String key2) {
			this.key1 = key1;
			this.key2 = key2;
		}

		public KeyManyToOneKeyEntity getKey1() {
			return key1;
		}

		public void setKey1(KeyManyToOneKeyEntity key1) {
			this.key1 = key1;
		}

		public String getKey2() {
			return key2;
		}

		public void setKey2(String key2) {
			this.key2 = key2;
		}
	}
}

Other Hibernate examples (source code examples)

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