KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > annotations > query > SpaceShip


1 //$Id: SpaceShip.java,v 1.2 2005/06/10 18:13:00 epbernard Exp $
2
package org.hibernate.test.annotations.query;
3
4 import javax.persistence.Entity;
5 import javax.persistence.EntityResult;
6 import javax.persistence.GeneratorType;
7 import javax.persistence.Id;
8 import javax.persistence.NamedNativeQuery;
9 import javax.persistence.SqlResultSetMapping;
10
11 /**
12  * @author Emmanuel Bernard
13  */

14 @Entity
15 @SqlResultSetMapping(name="implicit", entities=@EntityResult(name="org.hibernate.test.annotations.query.SpaceShip"))
16 @NamedNativeQuery(name="implicitSample", queryString="select * from SpaceShip", resultSetMapping="implicit")
17 public class SpaceShip {
18     private String JavaDoc name;
19     private String JavaDoc model;
20     private double speed;
21
22     @Id(generate = GeneratorType.NONE)
23     public String JavaDoc getName() {
24         return name;
25     }
26
27     public void setName(String JavaDoc name) {
28         this.name = name;
29     }
30
31     public String JavaDoc getModel() {
32         return model;
33     }
34
35     public void setModel(String JavaDoc model) {
36         this.model = model;
37     }
38
39     public double getSpeed() {
40         return speed;
41     }
42
43     public void setSpeed(double speed) {
44         this.speed = speed;
45     }
46 }
47
Popular Tags