1 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 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 name; 19 private String model; 20 private double speed; 21 22 @Id(generate = GeneratorType.NONE) 23 public String getName() { 24 return name; 25 } 26 27 public void setName(String name) { 28 this.name = name; 29 } 30 31 public String getModel() { 32 return model; 33 } 34 35 public void setModel(String 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 |