View Javadoc

1   package org.kuali.student.enrollment.class2.courseofferingset.model;
2   
3   import javax.persistence.Column;
4   import javax.persistence.Entity;
5   import javax.persistence.Id;
6   import javax.persistence.JoinColumn;
7   import javax.persistence.ManyToOne;
8   import javax.persistence.PrePersist;
9   import javax.persistence.Table;
10  
11  import javax.persistence.UniqueConstraint;
12  import org.kuali.student.common.util.UUIDHelper;
13  
14  @Entity
15  @Table(name = "KSEN_SOC_ROR_OPTION", uniqueConstraints = {
16      @UniqueConstraint(columnNames = {"OPTION_ID", "ROR_ID"})})
17  public class SocRolloverResultOptionEntity {
18  
19      @Id
20      @Column(name = "ID")
21      private String id;
22      @ManyToOne
23      @JoinColumn(name = "ROR_ID")
24      private SocRolloverResultEntity socRolloverResult;
25      @Column(name = "OPTION_ID")
26      private String optionId;
27  
28      public SocRolloverResultOptionEntity() {
29      }
30  
31      public SocRolloverResultOptionEntity(String optionId, SocRolloverResultEntity socRolloverResult) {
32          this.socRolloverResult = socRolloverResult;
33          this.optionId = optionId;
34      }
35  
36      @PrePersist
37      public void prePersist() {
38          this.id = UUIDHelper.genStringUUID();
39      }
40  
41      public String getId() {
42          return id;
43      }
44  
45      public void setId(String id) {
46          this.id = id;
47      }
48  
49      public SocRolloverResultEntity getSocRolloverResult() {
50          return socRolloverResult;
51      }
52  
53      public void setSocRolloverResult(SocRolloverResultEntity socRolloverResult) {
54          this.socRolloverResult = socRolloverResult;
55      }
56  
57      public String getOptionId() {
58          return optionId;
59      }
60  
61      public void setOptionId(String optionId) {
62          this.optionId = optionId;
63      }
64  }