1 25 26 package org.objectweb.easybeans.tests.common.ejbs.entity.ebstore; 27 28 import javax.persistence.Entity; 29 import javax.persistence.Id; 30 import javax.persistence.Table; 31 32 37 @Entity 38 @Table(name = "STORE") 39 public class EBStore implements java.io.Serializable { 40 41 44 private static final long serialVersionUID = 9126890320818098157L; 45 46 49 public static final String DEFAULT_NAME = "default"; 50 53 private int id; 54 55 58 private String name; 59 60 63 public EBStore(){ 64 } 65 66 71 public EBStore(final int id, final String name){ 72 setId(id); 73 setName(name); 74 } 75 76 80 public EBStore(final int id){ 81 setId(id); 82 setName(DEFAULT_NAME); 83 } 84 85 89 @Id 90 public int getId() { 91 return id; 92 } 93 94 98 public void setId(final int id) { 99 this.id = id; 100 } 101 102 106 public void setName(final String name) { 107 this.name = name; 108 } 109 110 114 public String getName() { 115 return name; 116 } 117 118 122 @Override 123 public String toString() { 124 StringBuilder sb = new StringBuilder (); 125 sb.append("EBStore[id=").append(id).append(", name=").append(getName()).append("]"); 126 return sb.toString(); 127 } 128 129 } 130 | Popular Tags |