Advertisement
Guest User

Temp Java POJO

a guest
Feb 12th, 2011
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.63 KB | None | 0 0
  1. import java.util.Date;
  2.  
  3. import javax.persistence.Column;
  4. import javax.persistence.Entity;
  5. import javax.persistence.GeneratedValue;
  6. import javax.persistence.Id;
  7.  
  8. import net.arnx.jsonic.JSON;
  9.  
  10. import org.hibernate.annotations.Table;
  11.  
  12. @Entity(name = "temp")
  13. @Table(appliesTo = "temp")
  14. public class Temp {
  15.  
  16.     @Id
  17.     @GeneratedValue
  18.     private Long id;
  19.  
  20.     @Column(name = "student_id")
  21.     private Long studentId;
  22.  
  23.     @Column(name = "current")
  24.     private Boolean current;
  25.  
  26.     @Column(name = "closed_at")
  27.     private Date closedAt;
  28.  
  29.     /**
  30.      * @return the id
  31.      */
  32.     public Long getId() {
  33.         return id;
  34.     }
  35.  
  36.     /**
  37.      * @param id the id to set
  38.      */
  39.     public void setId(Long id) {
  40.         this.id = id;
  41.     }
  42.  
  43.     /**
  44.      * @return the studentId
  45.      */
  46.     public Long getStudentId() {
  47.         return studentId;
  48.     }
  49.  
  50.     /**
  51.      * @param studentId the studentId to set
  52.      */
  53.     public void setStudentId(Long studentId) {
  54.         this.studentId = studentId;
  55.     }
  56.  
  57.     /**
  58.      * @return the current
  59.      */
  60.     public Boolean getCurrent() {
  61.         return current;
  62.     }
  63.  
  64.     /**
  65.      * @param current the current to set
  66.      */
  67.     public void setCurrent(Boolean current) {
  68.         this.current = current;
  69.     }
  70.  
  71.     /**
  72.      * @return the closedAt
  73.      */
  74.     public Date getClosedAt() {
  75.         return closedAt;
  76.     }
  77.  
  78.     /**
  79.      * @param closedAt the closedAt to set
  80.      */
  81.     public void setClosedAt(Date closedAt) {
  82.         this.closedAt = closedAt;
  83.     }
  84.  
  85.     @Override
  86.     public String toString() {
  87.         return JSON.encode(this);
  88.     }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement