Advertisement
Guest User

contribution

a guest
Sep 16th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. package com.beligum.futuretalents.fttv.models;
  2.  
  3. import com.beligum.core.framework.models.BasicModel;
  4. import com.beligum.futuretalents.fttv.models.project.Project;
  5. import com.beligum.futuretalents.fttv.models.taxonomy.Job;
  6. import com.beligum.futuretalents.fttv.models.user.Student;
  7. import com.beligum.futuretalents.fttv.models.user.User;
  8. import org.joda.time.DateTime;
  9. import org.joda.time.LocalDateTime;
  10.  
  11. import javax.persistence.*;
  12. import javax.xml.bind.annotation.XmlTransient;
  13.  
  14. /**
  15. * Created by ruben on 8-8-2014.
  16. */
  17.  
  18. @Entity
  19. @Table(name = "contributions")
  20. public class Contribution extends BasicModel {
  21.  
  22. @ManyToOne()
  23. private Student student;
  24.  
  25. @ManyToOne()
  26. private Project project;
  27.  
  28. @OneToOne()
  29. private Job job;
  30.  
  31.  
  32. public Contribution() {
  33. }
  34.  
  35. public Contribution(Student student, boolean owner, Project project, Job job) {
  36. this.student = student;
  37. this.project = project;
  38. this.job = job;
  39. }
  40.  
  41. @XmlTransient
  42. public Student getStudent() {
  43. return student;
  44. }
  45.  
  46. public void setStudent(Student student) {
  47. this.student = student;
  48. }
  49.  
  50. @XmlTransient
  51. public Project getProject() {
  52. return project;
  53. }
  54.  
  55. public void setProject(Project project) {
  56. this.project = project;
  57. }
  58.  
  59. @XmlTransient
  60. public Job getJob() {
  61. return job;
  62. }
  63.  
  64. public void setJob(Job job) {
  65. this.job = job;
  66. }
  67.  
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement