1 package org.hibernate.test.annotations.id; 3 4 import javax.persistence.Entity; 5 import javax.persistence.Id; 6 7 import org.hibernate.annotations.GenericGenerator; 8 9 12 @Entity 13 public class SoundSystem { 14 private String id; 15 private String brand; 16 private String model; 17 18 @Id(generator="system-uuid") 19 @GenericGenerator(name="system-uuid", strategy = "uuid") 20 public String getId() { 21 return id; 22 } 23 24 public void setId(String id) { 25 this.id = id; 26 } 27 28 public String getBrand() { 29 return brand; 30 } 31 32 public void setBrand(String brand) { 33 this.brand = brand; 34 } 35 36 public String getModel() { 37 return model; 38 } 39 40 public void setModel(String model) { 41 this.model = model; 42 } 43 } 44 | Popular Tags |