1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.travel.bo;
17
18 import java.util.LinkedHashMap;
19
20 import javax.persistence.Column;
21 import javax.persistence.Entity;
22 import javax.persistence.Id;
23 import javax.persistence.Table;
24
25 import org.apache.struts.upload.FormFile;
26 import org.kuali.rice.kns.bo.PersistableAttachment;
27 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
28
29 @Entity
30 @Table(name="TRV_MULTI_ATTACH_SAMPLE_T")
31 public class MultiAttachmentSample extends PersistableBusinessObjectBase implements PersistableAttachment {
32
33 @Id
34 @Column(name="gen_id")
35 private Long genId;
36 @Column(name="description")
37 private String description;
38 @Column(name="attachment_filename")
39 private String fileName;
40 @Column(name="attachment_file_content_type")
41 private String contentType;
42 @Column(name="attachment_file")
43 private byte[] attachmentContent;
44
45 private transient FormFile attachmentFile;
46
47 public Long getGenId() {
48 return this.genId;
49 }
50
51 public void setGenId(Long genId) {
52 this.genId = genId;
53 }
54
55 public String getDescription() {
56 return this.description;
57 }
58
59 public void setDescription(String description) {
60 this.description = description;
61 }
62
63 public String getFileName() {
64 return this.fileName;
65 }
66
67 public void setFileName(String fileName) {
68 this.fileName = fileName;
69 }
70
71 public String getContentType() {
72 return this.contentType;
73 }
74
75 public void setContentType(String contentType) {
76 this.contentType = contentType;
77 }
78
79 public byte[] getAttachmentContent() {
80 return this.attachmentContent;
81 }
82
83 public void setAttachmentContent(byte[] attachmentContent) {
84 this.attachmentContent = attachmentContent;
85 }
86
87 public FormFile getAttachmentFile() {
88 return getAttachmentFile();
89 }
90
91 public void setAttachmentFile(FormFile attachmentFile) {
92 this.attachmentFile = attachmentFile;
93 }
94
95 @Override
96 protected LinkedHashMap toStringMapper() {
97 LinkedHashMap<String, Object> toStringMap = new LinkedHashMap<String, Object>();
98 toStringMap.put("description", description);
99 return toStringMap;
100 }
101 }