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

Hibernate example source code file (Image.java)

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

details, details, image, image, long, long, string, string

The Hibernate Image.java source code

package org.hibernate.test.interceptor;


public class Image {

	private Long id;
	private String name;
	private Details details;

	public Details getDetails() {
		return details;
	}

	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public void setDetails(Details details) {
		this.details = details;
	}

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

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

	public String toString() {
		return "Image/" + ( details == null ? "no details" : details.toString() );
	}

	public static class Details {
		private long perm1 = -1; // all bits turned on.
		private String comment;

		protected long getPerm1() {
			return this.perm1;
		}

		protected void setPerm1(long value) {
			this.perm1 = value;
		}

		public String getComment() {
			return comment;
		}

		public void setComment(String comment) {
			this.comment = comment;
		}

		public String toString() {
			return "Details=" + perm1;
		}
	}

}

Other Hibernate examples (source code examples)

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