1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.core.organization.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.JoinTable; |
26 | |
import javax.persistence.ManyToMany; |
27 | |
import javax.persistence.ManyToOne; |
28 | |
import javax.persistence.NamedQueries; |
29 | |
import javax.persistence.NamedQuery; |
30 | |
import javax.persistence.OneToMany; |
31 | |
import javax.persistence.Table; |
32 | |
import javax.persistence.Temporal; |
33 | |
import javax.persistence.TemporalType; |
34 | |
|
35 | |
import org.kuali.student.common.entity.AttributeOwner; |
36 | |
import org.kuali.student.common.entity.KSEntityConstants; |
37 | |
import org.kuali.student.common.entity.MetaEntity; |
38 | |
@Entity |
39 | |
@Table(name="KSOR_ORG") |
40 | |
@NamedQueries({ |
41 | |
@NamedQuery(name="Org.getOrganizationsByIdList", query="SELECT o FROM Org o WHERE o.id IN (:orgIdList)") |
42 | |
}) |
43 | 0 | public class Org extends MetaEntity implements AttributeOwner<OrgAttribute>{ |
44 | |
|
45 | |
@Column(name = "LNG_NAME") |
46 | |
private String longName; |
47 | |
|
48 | |
@Column(name = "SHRT_NAME") |
49 | |
private String shortName; |
50 | |
|
51 | |
@Column(name = "SHRT_DESCR",length=KSEntityConstants.SHORT_TEXT_LENGTH) |
52 | |
private String shortDesc; |
53 | |
|
54 | |
@Column(name = "LNG_DESCR",length=KSEntityConstants.LONG_TEXT_LENGTH) |
55 | |
private String longDesc; |
56 | |
|
57 | |
@Temporal(TemporalType.TIMESTAMP) |
58 | |
@Column(name = "EFF_DT") |
59 | |
private Date effectiveDate; |
60 | |
|
61 | |
@Temporal(TemporalType.TIMESTAMP) |
62 | |
@Column(name = "EXPIR_DT") |
63 | |
private Date expirationDate; |
64 | |
|
65 | |
@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") |
66 | |
private List<OrgAttribute> attributes; |
67 | |
|
68 | |
@ManyToOne |
69 | |
@JoinColumn(name="TYPE") |
70 | |
private OrgType type; |
71 | |
|
72 | |
@ManyToMany |
73 | |
@JoinTable( |
74 | |
name="KSOR_ORG_JN_ORG_PERS_REL_TYPE", |
75 | |
joinColumns= |
76 | |
@JoinColumn(name="ORG_ID", referencedColumnName="ID"), |
77 | |
inverseJoinColumns= |
78 | |
@JoinColumn(name="ORG_PERS_RELTN_TYPE_ID", referencedColumnName="TYPE_KEY") |
79 | |
) |
80 | |
private List<OrgPersonRelationType> orgPersonRelationTypes; |
81 | |
|
82 | |
@Column(name = "ST") |
83 | |
private String state; |
84 | |
|
85 | |
@Override |
86 | |
public List<OrgAttribute> getAttributes() { |
87 | 0 | return attributes; |
88 | |
} |
89 | |
|
90 | |
@Override |
91 | |
public void setAttributes(List<OrgAttribute> attributes) { |
92 | 0 | this.attributes=attributes; |
93 | 0 | } |
94 | |
|
95 | |
public String getLongName() { |
96 | 0 | return longName; |
97 | |
} |
98 | |
|
99 | |
public void setLongName(String longName) { |
100 | 0 | this.longName = longName; |
101 | 0 | } |
102 | |
|
103 | |
public String getShortName() { |
104 | 0 | return shortName; |
105 | |
} |
106 | |
|
107 | |
public void setShortName(String shortName) { |
108 | 0 | this.shortName = shortName; |
109 | 0 | } |
110 | |
|
111 | |
public Date getEffectiveDate() { |
112 | 0 | return effectiveDate; |
113 | |
} |
114 | |
|
115 | |
public void setEffectiveDate(Date effectiveDate) { |
116 | 0 | this.effectiveDate = effectiveDate; |
117 | 0 | } |
118 | |
|
119 | |
public Date getExpirationDate() { |
120 | 0 | return expirationDate; |
121 | |
} |
122 | |
|
123 | |
public void setExpirationDate(Date expirationDate) { |
124 | 0 | this.expirationDate = expirationDate; |
125 | 0 | } |
126 | |
|
127 | |
public OrgType getType() { |
128 | 0 | return type; |
129 | |
} |
130 | |
|
131 | |
public void setType(OrgType type) { |
132 | 0 | this.type = type; |
133 | 0 | } |
134 | |
|
135 | |
public String getState() { |
136 | 0 | return state; |
137 | |
} |
138 | |
|
139 | |
public void setState(String state) { |
140 | 0 | this.state = state; |
141 | 0 | } |
142 | |
|
143 | |
public List<OrgPersonRelationType> getOrgPersonRelationTypes() { |
144 | 0 | return orgPersonRelationTypes; |
145 | |
} |
146 | |
|
147 | |
public void setOrgPersonRelationTypes(List<OrgPersonRelationType> orgPersonRelationTypes) { |
148 | 0 | this.orgPersonRelationTypes = orgPersonRelationTypes; |
149 | 0 | } |
150 | |
|
151 | |
public void setShortDesc(String shortDesc) { |
152 | 0 | this.shortDesc = shortDesc; |
153 | 0 | } |
154 | |
|
155 | |
public String getShortDesc() { |
156 | 0 | return shortDesc; |
157 | |
} |
158 | |
|
159 | |
public void setLongDesc(String longDesc) { |
160 | 0 | this.longDesc = longDesc; |
161 | 0 | } |
162 | |
|
163 | |
public String getLongDesc() { |
164 | 0 | return longDesc; |
165 | |
} |
166 | |
} |