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 PersistableBusinessObjectBase implements PersistableAttachment {
29
30
31
32
33
34 @Embeddable
35 private static final class WeaveMe extends PersistableAttachmentBase {}
36
37 @Lob
38 @Column(name = "ATT_CNTNT")
39 private byte[] attachmentContent;
40
41 @Column(name = "FILE_NM", length = 150)
42 private String fileName;
43
44 @Column(name = "CNTNT_TYP", length = 255)
45 private String contentType;
46
47 @Override
48 public byte[] getAttachmentContent() {
49 return this.attachmentContent;
50 }
51
52 @Override
53 public void setAttachmentContent(byte[] attachmentContent) {
54 this.attachmentContent = attachmentContent;
55 }
56
57
58 @Override
59 public String getFileName() {
60 return fileName;
61 }
62
63
64 @Override
65 public void setFileName(String fileName) {
66 this.fileName = fileName;
67 }
68
69
70 @Override
71 public String getContentType() {
72 return contentType;
73 }
74
75
76 @Override
77 public void setContentType(String contentType) {
78 this.contentType = contentType;
79 }
80 }