1 25 26 package org.objectweb.easybeans.examples.entitybean; 27 28 import javax.persistence.Entity; 29 import javax.persistence.Id; 30 import javax.persistence.Table; 31 32 36 @Entity 37 @Table(name = "EMPLOYEES") 38 public class Employee implements java.io.Serializable { 39 40 43 private static final long serialVersionUID = -2366200007462547454L; 44 45 48 private int id; 49 50 53 private String name; 54 55 59 @Id 60 public int getId() { 61 return id; 62 } 63 64 68 public void setId(final int id) { 69 this.id = id; 70 } 71 72 76 public void setName(final String name) { 77 this.name = name; 78 } 79 80 84 public String getName() { 85 return name; 86 } 87 88 92 @Override 93 public String toString() { 94 StringBuilder sb = new StringBuilder (); 95 sb.append("Employee[id=").append(id).append(", name=").append(getName()).append("]"); 96 return sb.toString(); 97 } 98 99 } 100 | Popular Tags |