|
Hibernate example source code file (ZImpl.java)
The Hibernate ZImpl.java source code//$Id$ package org.hibernate.test.annotations.xml.hbm; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity @Inheritance( strategy = InheritanceType.JOINED ) @org.hibernate.annotations.Proxy( proxyClass = Z.class ) @Table( name = "Z" ) public class ZImpl implements Z { private static final long serialVersionUID = 1L; private Integer zId = null; private B b = null; @Id @GeneratedValue @Column( name = "zID" ) public Integer getZId() { return zId; } public void setZId(Integer zId) { this.zId = zId; } @ManyToOne( optional = false, targetEntity = BImpl.class, fetch = FetchType.LAZY ) @JoinColumn( name = "bID", referencedColumnName = "bID") public B getB() { return b; } public void setB(B b) { this.b = b; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate ZImpl.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.