Posted By

thebugslayer on 09/23/07


Tagged

java jpa


Versions (?)

JPA Annotated/Persistent Class


 / Published in: Java
 

  1. package deng.myhibernatejpa;
  2.  
  3. import javax.persistence.*;
  4.  
  5. @Table(name="category")
  6. public class Category {
  7. @Id
  8. @GeneratedValue
  9. @Column(name="id")
  10. private Short id;
  11.  
  12. @Column(name="name")
  13. private String name;
  14.  
  15. public Short getId() {
  16. return id;
  17. }
  18.  
  19. public void setId(Short id) {
  20. this.id = id;
  21. }
  22.  
  23. public String getName() {
  24. return name;
  25. }
  26.  
  27. public void setName(String name) {
  28. this.name = name;
  29. }
  30.  
  31. }

Report this snippet  

You need to login to post a comment.