|
Hibernate example source code file (Flight.java)
The Hibernate Flight.java source code//$Id$ package org.hibernate.test.annotations.entity; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.Table; import org.hibernate.annotations.Formula; /** * @author Emmanuel Bernard */ @Entity() @Table(name = "Formula_flight") @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public class Flight implements Serializable { Long id; long maxAltitudeInMilimeter; long maxAltitude; @Id public Long getId() { return id; } public void setId(Long long1) { id = long1; } public long getMaxAltitude() { return maxAltitude; } public void setMaxAltitude(long maxAltitude) { this.maxAltitude = maxAltitude; } @Formula("maxAltitude * 1000") public long getMaxAltitudeInMilimeter() { return maxAltitudeInMilimeter; } public void setMaxAltitudeInMilimeter(long maxAltitudeInMilimeter) { this.maxAltitudeInMilimeter = maxAltitudeInMilimeter; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Flight.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.