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

Hibernate example source code file (ComponentNotNullMaster.java)

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

componentnotnull, componentnotnull, componentnotnullmaster, containerinnerclass, containerinnerclass, list, list, many, one, simple, string, string, util

The Hibernate ComponentNotNullMaster.java source code

//$Id: ComponentNotNullMaster.java 4599 2004-09-26 05:18:27Z oneovthafew $
package org.hibernate.test.legacy;
import java.util.List;

/**
 * Entity containing components for not-null testing
 * 
 * @author Emmanuel Bernard
 */
public class ComponentNotNullMaster {
	
	private int id;
	private String test;
	private ComponentNotNull nullable;
	private ComponentNotNull supercomp;
	private List components;
	private List componentsImplicit;

	public int getId() {
		return id;
	}

	public ComponentNotNull getNullable() {
		return nullable;
	}

	public void setId(int i) {
		id = i;
	}

	public void setNullable(ComponentNotNull component) {
		nullable = component;
	}

	public static final class ContainerInnerClass {
		private Simple simple;
		private String name;
		private One one;
		private Many many;
		private int count;
		private ContainerInnerClass nested;
		private String nestedproperty;
		
		public void setSimple(Simple simple) {
			this.simple = simple;
		}
		
		public Simple getSimple() {
			return simple;
		}

		public String getName() {
			return name;
		}
		

		public void setName(String name) {
			this.name = name;
		}
		
		public String toString() {
			return name +  " = " + simple.getCount() +
			 "/"  + ( one==null ? "nil" : one.getKey().toString() ) +
			 "/"  + ( many==null ? "nil" : many.getKey().toString() );
		}
		
		public One getOne() {
			return one;
		}
		
		public void setOne(One one) {
			this.one = one;
		}
		
		public Many getMany() {
			return many;
		}

		public void setMany(Many many) {
			this.many = many;
		}
		
		public int getCount() {
			return count;
		}

		public void setCount(int count) {
			this.count = count;
		}

		public ContainerInnerClass getNested() {
			return nested;
		}

		public void setNested(ContainerInnerClass class1) {
			nested = class1;
		}

		public String getNestedproperty() {
			return nestedproperty;
		}

		public void setNestedproperty(String string) {
			nestedproperty = string;
		}

	}

	public List getComponents() {
		return components;
	}

	public void setComponents(List list) {
		components = list;
	}

	public List getComponentsImplicit() {
		return componentsImplicit;
	}

	public void setComponentsImplicit(List list) {
		componentsImplicit = list;
	}

	public ComponentNotNull getSupercomp() {
		return supercomp;
	}

	public void setSupercomp(ComponentNotNull component) {
		supercomp = component;
	}

	public String getTest() {
		return test;
	}

	public void setTest(String string) {
		test = string;
	}

}

Other Hibernate examples (source code examples)

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