| 1 |  |   | 
  | 2 |  |   | 
  | 3 |  |   | 
  | 4 |  |   | 
  | 5 |  |   | 
  | 6 |  |   | 
  | 7 |  |   | 
  | 8 |  |   | 
  | 9 |  |   | 
  | 10 |  |   | 
  | 11 |  |   | 
  | 12 |  |   | 
  | 13 |  |   | 
  | 14 |  |   | 
  | 15 |  |   | 
  | 16 |  |  package org.kuali.student.lum.lu.entity; | 
  | 17 |  |   | 
  | 18 |  |  import java.util.Date; | 
  | 19 |  |  import java.util.List; | 
  | 20 |  |   | 
  | 21 |  |  import javax.persistence.CascadeType; | 
  | 22 |  |  import javax.persistence.Column; | 
  | 23 |  |  import javax.persistence.Entity; | 
  | 24 |  |  import javax.persistence.JoinColumn; | 
  | 25 |  |  import javax.persistence.ManyToOne; | 
  | 26 |  |  import javax.persistence.NamedQueries; | 
  | 27 |  |  import javax.persistence.NamedQuery; | 
  | 28 |  |  import javax.persistence.OneToMany; | 
  | 29 |  |  import javax.persistence.Table; | 
  | 30 |  |  import javax.persistence.Temporal; | 
  | 31 |  |  import javax.persistence.TemporalType; | 
  | 32 |  |   | 
  | 33 |  |  import org.kuali.student.core.entity.AttributeOwner; | 
  | 34 |  |  import org.kuali.student.core.entity.MetaEntity; | 
  | 35 |  |   | 
  | 36 |  |  @Entity | 
  | 37 |  |  @Table(name = "KSLU_CLU_PUBL") | 
  | 38 |  |  @NamedQueries( { | 
  | 39 |  |      @NamedQuery(name = "CluPublication.findCluPublicationsByType",  | 
  | 40 |  |                         query = "SELECT cp FROM CluPublication cp WHERE cp.type.id = :luPublicationTypeKey"), | 
  | 41 |  |      @NamedQuery(name = "CluPublication.findPublicationsByCluId",  | 
  | 42 |  |                         query = "SELECT cp FROM CluPublication cp WHERE cp.clu.id = :cluId")}) | 
  | 43 | 185 |  public class CluPublication extends MetaEntity implements AttributeOwner<CluPublicationAttribute> { | 
  | 44 |  |   | 
  | 45 |  |          @ManyToOne | 
  | 46 |  |          @JoinColumn(name = "CLU_ID") | 
  | 47 |  |          Clu clu; | 
  | 48 |  |           | 
  | 49 |  |          @Column(name = "START_CYCLE") | 
  | 50 |  |          private String startCycle; | 
  | 51 |  |   | 
  | 52 |  |          @Column(name = "END_CYCLE") | 
  | 53 |  |          private String endCycle; | 
  | 54 |  |   | 
  | 55 |  |          @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") | 
  | 56 |  |          private List<CluPublicationAttribute> attributes; | 
  | 57 |  |   | 
  | 58 |  |          @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") | 
  | 59 |  |          private List<CluPublicationVariant> variants; | 
  | 60 |  |           | 
  | 61 |  |      @ManyToOne | 
  | 62 |  |      @JoinColumn(name = "CLU_PUB_TYPE_ID") | 
  | 63 |  |      private CluPublicationType type; | 
  | 64 |  |   | 
  | 65 |  |          @Column(name = "ST") | 
  | 66 |  |          private String state; | 
  | 67 |  |   | 
  | 68 |  |          @Temporal(TemporalType.TIMESTAMP) | 
  | 69 |  |      @Column(name = "EFF_DT") | 
  | 70 |  |      private Date effectiveDate; | 
  | 71 |  |   | 
  | 72 |  |      @Temporal(TemporalType.TIMESTAMP) | 
  | 73 |  |      @Column(name = "EXPIR_DT") | 
  | 74 |  |      private Date expirationDate; | 
  | 75 |  |           | 
  | 76 |  |          public String getStartCycle() { | 
  | 77 | 247 |                  return startCycle; | 
  | 78 |  |          } | 
  | 79 |  |   | 
  | 80 |  |          public void setStartCycle(String startCycle) { | 
  | 81 | 78 |                  this.startCycle = startCycle; | 
  | 82 | 78 |          } | 
  | 83 |  |   | 
  | 84 |  |          public String getEndCycle() { | 
  | 85 | 247 |                  return endCycle; | 
  | 86 |  |          } | 
  | 87 |  |   | 
  | 88 |  |          public void setEndCycle(String endCycle) { | 
  | 89 | 78 |                  this.endCycle = endCycle; | 
  | 90 | 78 |          } | 
  | 91 |  |   | 
  | 92 |  |          public List<CluPublicationAttribute> getAttributes() { | 
  | 93 | 481 |                  return attributes; | 
  | 94 |  |          } | 
  | 95 |  |   | 
  | 96 |  |          public void setAttributes(List<CluPublicationAttribute> attributes) { | 
  | 97 | 136 |                  this.attributes = attributes; | 
  | 98 | 136 |          } | 
  | 99 |  |   | 
  | 100 |  |          public CluPublicationType getType() { | 
  | 101 | 247 |                  return type; | 
  | 102 |  |          } | 
  | 103 |  |   | 
  | 104 |  |          public void setType(CluPublicationType type) { | 
  | 105 | 78 |                  this.type = type; | 
  | 106 | 78 |          } | 
  | 107 |  |   | 
  | 108 |  |          public String getState() { | 
  | 109 | 247 |                  return state; | 
  | 110 |  |          } | 
  | 111 |  |   | 
  | 112 |  |          public void setState(String state) { | 
  | 113 | 78 |                  this.state = state; | 
  | 114 | 78 |          } | 
  | 115 |  |   | 
  | 116 |  |          public void setVariants(List<CluPublicationVariant> variants) { | 
  | 117 | 116 |                  this.variants = variants; | 
  | 118 | 116 |          } | 
  | 119 |  |   | 
  | 120 |  |          public List<CluPublicationVariant> getVariants() { | 
  | 121 | 482 |                  return variants; | 
  | 122 |  |          } | 
  | 123 |  |           | 
  | 124 |  |      public Clu getClu() { | 
  | 125 | 247 |                  return clu; | 
  | 126 |  |          } | 
  | 127 |  |   | 
  | 128 |  |          public void setClu(Clu clu) { | 
  | 129 | 78 |                  this.clu = clu; | 
  | 130 | 78 |          } | 
  | 131 |  |   | 
  | 132 |  |          public Date getEffectiveDate() { | 
  | 133 | 247 |                  return effectiveDate; | 
  | 134 |  |          } | 
  | 135 |  |   | 
  | 136 |  |          public void setEffectiveDate(Date effectiveDate) { | 
  | 137 | 78 |                  this.effectiveDate = effectiveDate; | 
  | 138 | 78 |          } | 
  | 139 |  |   | 
  | 140 |  |          public Date getExpirationDate() { | 
  | 141 | 247 |                  return expirationDate; | 
  | 142 |  |          } | 
  | 143 |  |   | 
  | 144 |  |          public void setExpirationDate(Date expirationDate) { | 
  | 145 | 78 |                  this.expirationDate = expirationDate; | 
  | 146 | 78 |          } | 
  | 147 |  |  } |