1 7 package org.jboss.tutorial.merge.bean; 8 9 import javax.persistence.Column; 10 import javax.persistence.Entity; 11 import javax.persistence.GeneratorType; 12 import javax.persistence.Id; 13 import javax.persistence.Table; 14 import javax.persistence.Table; 15 import javax.persistence.Column; 16 import javax.persistence.Id; 17 18 @Entity 19 @Table(name = "CUSTOMER") 20 public class Customer implements java.io.Serializable 21 { 22 private int id; 23 private String first; 24 private String last; 25 private String street; 26 private String city; 27 private String state; 28 private String zip; 29 30 public Customer() 31 { 32 } 33 34 public Customer(String first, String last, String street, String city, String state, String zip) 35 { 36 this.first = first; 37 this.last = last; 38 this.street = street; 39 this.city = city; 40 this.state = state; 41 this.zip = zip; 42 } 43 44 @Id(generate = GeneratorType.AUTO) 45 public int getId() 46 { 47 return id; 48 } 49 50 public void setId(int id) 51 { 52 this.id = id; 53 } 54 55 @Column(name = "FIRST") 56 public String getFirst() 57 { 58 return first; 59 } 60 61 public void setFirst(String first) 62 { 63 this.first = first; 64 } 65 66 @Column(name = "LAST") 67 public String getLast() 68 { 69 return last; 70 } 71 72 public void setLast(String last) 73 { 74 this.last = last; 75 } 76 77 @Column(name = "STREET") 78 public String getStreet() 79 { 80 return street; 81 } 82 83 public void setStreet(String street) 84 { 85 this.street = street; 86 } 87 88 @Column(name = "CITY") 89 public String getCity() 90 { 91 return city; 92 } 93 94 public void setCity(String city) 95 { 96 this.city = city; 97 } 98 99 @Column(name = "STATE") 100 public String getState() 101 { 102 return state; 103 } 104 105 public void setState(String state) 106 { 107 this.state = state; 108 } 109 110 @Column(name = "ZIP") 111 public String getZip() 112 { 113 return zip; 114 } 115 116 public void setZip(String zip) 117 { 118 this.zip = zip; 119 } 120 } 121 | Popular Tags |