1 25 package org.objectweb.easybeans.tests.common.ejbs.entity.entitytest02; 26 27 import javax.persistence.GeneratedValue; 28 import javax.persistence.GenerationType; 29 import javax.persistence.Id; 30 import javax.persistence.MappedSuperclass; 31 import javax.persistence.TableGenerator; 32 33 39 @MappedSuperclass 40 @TableGenerator(name = "PROGRAM_SEQ", allocationSize = 1) 41 public class Program { 42 43 46 private Long programId; 47 48 51 private String name; 52 53 57 public String getName() { 58 return name; 59 } 60 61 65 public void setName(final String name) { 66 this.name = name; 67 } 68 69 73 @Id 74 @GeneratedValue(strategy = GenerationType.TABLE, generator = "PROGRAM_SEQ") 75 public Long getProgramId() { 76 return programId; 77 } 78 79 83 public void setProgramId(final Long programId) { 84 this.programId = programId; 85 } 86 87 } 88 | Popular Tags |