|
Hibernate example source code file (Person.java)
The Hibernate Person.java source code//$Id$ package org.hibernate.ejb.test.callbacks; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.Table; /** * @author Emmanuel Bernard */ @Entity @Table(name = "PERSON_TABLE") @Inheritance(strategy = InheritanceType.JOINED) public class Person { private long id; private String name; private String address; private String zip; private String country; private char sex; @Id @GeneratedValue public long getId() { return id; } public void setId(long id) { this.id = id; } public char getSex() { return sex; } public void setSex(char sex) { this.sex = sex; } public String getName() { return name; } public void setName(String identity) { this.name = identity; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getZip() { return zip; } public void setZip(String zip) { this.zip = zip; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Person.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
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.