~raginggoblin/infolog/infolog

« back to all changes in this revision

Viewing changes to InfologServer/lib/hibernate-annotations-3.4.0.GA/test/org/hibernate/test/annotations/entity/Flight.java

  • Committer: Raging Goblin
  • Date: 2013-11-16 16:51:32 UTC
  • Revision ID: raging_goblin-20131116165132-weujnptzc88uy4ah
Mavenized the project, now using shared project InfologSync

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//$Id: Flight.java 14736 2008-06-04 14:23:42Z hardy.ferentschik $
2
 
package org.hibernate.test.annotations.entity;
3
 
 
4
 
import java.io.Serializable;
5
 
import javax.persistence.Entity;
6
 
import javax.persistence.Id;
7
 
import javax.persistence.Inheritance;
8
 
import javax.persistence.InheritanceType;
9
 
import javax.persistence.Table;
10
 
 
11
 
import org.hibernate.annotations.Formula;
12
 
 
13
 
/**
14
 
 * @author Emmanuel Bernard
15
 
 */
16
 
@Entity()
17
 
@Table(name = "Formula_flight")
18
 
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
19
 
public class Flight implements Serializable {
20
 
        Long id;
21
 
        long maxAltitudeInMilimeter;
22
 
        long maxAltitude;
23
 
 
24
 
        @Id
25
 
        public Long getId() {
26
 
                return id;
27
 
        }
28
 
 
29
 
        public void setId(Long long1) {
30
 
                id = long1;
31
 
        }
32
 
 
33
 
        public long getMaxAltitude() {
34
 
                return maxAltitude;
35
 
        }
36
 
 
37
 
        public void setMaxAltitude(long maxAltitude) {
38
 
                this.maxAltitude = maxAltitude;
39
 
        }
40
 
 
41
 
        @Formula("maxAltitude * 1000")
42
 
        public long getMaxAltitudeInMilimeter() {
43
 
                return maxAltitudeInMilimeter;
44
 
        }
45
 
 
46
 
        public void setMaxAltitudeInMilimeter(long maxAltitudeInMilimeter) {
47
 
                this.maxAltitudeInMilimeter = maxAltitudeInMilimeter;
48
 
        }
49
 
}
 
 
b'\\ No newline at end of file'