1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.bo;
17
18 import javax.persistence.Column;
19 import javax.persistence.Embeddable;
20 import javax.persistence.Lob;
21 import javax.persistence.MappedSuperclass;
22
23
24
25
26
27 @MappedSuperclass
28 public class PersistableAttachmentBase extends PersistableBusinessObjectBaseAdapter implements PersistableAttachment {
29
30 private static final long serialVersionUID = 1L;
31
32
33
34
35
36
37 @Embeddable
38 private static final class WeaveMe extends PersistableAttachmentBase {}
39
40 @Lob
41 @Column(name = "ATT_CNTNT")
42 private byte[] attachmentContent;
43
44 @Column(name = "FILE_NM", length = 150)
45 private String fileName;
46
47 @Column(name = "CNTNT_TYP", length = 255)
48 private String contentType;
49
50 @Override
51 public byte[] getAttachmentContent() {
52 return this.attachmentContent;
53 }
54
55 @Override
56 public void setAttachmentContent(byte[] attachmentContent) {
57 this.attachmentContent = attachmentContent;
58 }
59
60
61 @Override
62 public String getFileName() {
63 return fileName;
64 }
65
66
67 @Override
68 public void setFileName(String fileName) {
69 this.fileName = fileName;
70 }
71
72
73 @Override
74 public String getContentType() {
75 return contentType;
76 }
77
78
79 @Override
80 public void setContentType(String contentType) {
81 this.contentType = contentType;
82 }
83 }