1 22 package org.jboss.ejb3.test.stateful; 23 import javax.persistence.GeneratedValue; 24 import javax.persistence.GenerationType; 25 import javax.persistence.Id; 26 import javax.persistence.Table; 27 28 31 @javax.persistence.Entity 32 @Table(name = "ENTITY") 33 public class Entity implements java.io.Serializable 34 { 35 private Long id; 36 private String name; 37 38 39 @Id 40 @GeneratedValue(strategy= GenerationType.IDENTITY) 41 public Long getId() 42 { 43 return id; 44 } 45 46 public void setId(Long id) 47 { 48 this.id = id; 49 } 50 51 public String getName() 52 { 53 return name; 54 } 55 56 public void setName(String name) 57 { 58 this.name = name; 59 } 60 } 61 | Popular Tags |