001: package app.data;
002:
003: import java.sql.Timestamp;
004: import java.util.List;
005: import javax.persistence.Entity;
006: import javax.persistence.Id;
007: import javax.persistence.JoinColumn;
008: import javax.persistence.Lob;
009: import javax.persistence.ManyToOne;
010: import javax.persistence.OneToMany;
011: import javax.persistence.Table;
012: import javax.persistence.Version;
013:
014: import com.avaje.ebean.annotation.Sql;
015: import com.avaje.ebean.annotation.SqlSelect;
016:
017: /**
018: * Bug entity bean.
019: */
020: @Sql(select={@SqlSelect(name="simple",query="select id, title, status_code as status from b_bug")})
021: @Entity
022: @Table(name="b_bug")
023: public class Bug {
024:
025: @Id
026: Integer id;
027:
028: String title;
029:
030: @Lob
031: String body;
032:
033: String fixedVersion;
034:
035: String duplicateOf;
036:
037: Timestamp cretime;
038:
039: @Version
040: Timestamp updtime;
041:
042: @ManyToOne
043: User userAssigned;
044:
045: @ManyToOne
046: User userLogged;
047:
048: @ManyToOne
049: @JoinColumn(name="priority_code")
050: BugPriority priority;
051:
052: @ManyToOne
053: BugProduct product;
054:
055: @ManyToOne
056: BugType type;
057:
058: @ManyToOne
059: BugStatus status;
060:
061: @OneToMany
062: List<BugAttachment> attachments;
063:
064: @OneToMany
065: List<BugDetail> details;
066:
067: /**
068: * Return id.
069: */
070: public Integer getId() {
071: return id;
072: }
073:
074: /**
075: * Set id.
076: */
077: public void setId(Integer id) {
078: this .id = id;
079: }
080:
081: /**
082: * Return title.
083: */
084: public String getTitle() {
085: return title;
086: }
087:
088: /**
089: * Set title.
090: */
091: public void setTitle(String title) {
092: this .title = title;
093: }
094:
095: /**
096: * Return body.
097: */
098: public String getBody() {
099: return body;
100: }
101:
102: /**
103: * Set body.
104: */
105: public void setBody(String body) {
106: this .body = body;
107: }
108:
109: /**
110: * Return fixed version.
111: */
112: public String getFixedVersion() {
113: return fixedVersion;
114: }
115:
116: /**
117: * Set fixed version.
118: */
119: public void setFixedVersion(String fixedVersion) {
120: this .fixedVersion = fixedVersion;
121: }
122:
123: /**
124: * Return duplicate of.
125: */
126: public String getDuplicateOf() {
127: return duplicateOf;
128: }
129:
130: /**
131: * Set duplicate of.
132: */
133: public void setDuplicateOf(String duplicateOf) {
134: this .duplicateOf = duplicateOf;
135: }
136:
137: /**
138: * Return cretime.
139: */
140: public Timestamp getCretime() {
141: return cretime;
142: }
143:
144: /**
145: * Set cretime.
146: */
147: public void setCretime(Timestamp cretime) {
148: this .cretime = cretime;
149: }
150:
151: /**
152: * Return updtime.
153: */
154: public Timestamp getUpdtime() {
155: return updtime;
156: }
157:
158: /**
159: * Set updtime.
160: */
161: public void setUpdtime(Timestamp updtime) {
162: this .updtime = updtime;
163: }
164:
165: /**
166: * Return user assigned.
167: */
168: public User getUserAssigned() {
169: return userAssigned;
170: }
171:
172: /**
173: * Set user assigned.
174: */
175: public void setUserAssigned(User userAssigned) {
176: this .userAssigned = userAssigned;
177: }
178:
179: /**
180: * Return user logged.
181: */
182: public User getUserLogged() {
183: return userLogged;
184: }
185:
186: /**
187: * Set user logged.
188: */
189: public void setUserLogged(User userLogged) {
190: this .userLogged = userLogged;
191: }
192:
193: /**
194: * Return priority.
195: */
196: public BugPriority getPriority() {
197: return priority;
198: }
199:
200: /**
201: * Set priority.
202: */
203: public void setPriority(BugPriority priority) {
204: this .priority = priority;
205: }
206:
207: /**
208: * Return type.
209: */
210: public BugType getType() {
211: return type;
212: }
213:
214: /**
215: * Set type.
216: */
217: public void setType(BugType type) {
218: this .type = type;
219: }
220:
221: public BugProduct getProduct() {
222: return product;
223: }
224:
225: public void setProduct(BugProduct product) {
226: this .product = product;
227: }
228:
229: /**
230: * Return status.
231: */
232: public BugStatus getStatus() {
233: return status;
234: }
235:
236: /**
237: * Set status.
238: */
239: public void setStatus(BugStatus status) {
240: this .status = status;
241: }
242:
243: /**
244: * Return attachments.
245: */
246: public List<BugAttachment> getAttachments() {
247: return attachments;
248: }
249:
250: /**
251: * Set attachments.
252: */
253: public void setAttachments(List<BugAttachment> attachments) {
254: this .attachments = attachments;
255: }
256:
257: /**
258: * Return details.
259: */
260: public List<BugDetail> getDetails() {
261: return details;
262: }
263:
264: /**
265: * Set details.
266: */
267: public void setDetails(List<BugDetail> details) {
268: this.details = details;
269: }
270:
271: }
|