View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package edu.sampleu.travel.bo;
17  
18  import org.apache.struts.upload.FormFile;
19  import org.kuali.rice.krad.bo.PersistableAttachment;
20  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
21  
22  import java.util.LinkedHashMap;
23  
24  public class MultiAttachmentSample extends PersistableBusinessObjectBase implements PersistableAttachment {
25      
26      private Long genId;
27      private String id;
28      private String description;
29      
30      private String fileName;
31      private String contentType;
32      private byte[] attachmentContent;
33      private transient FormFile attachmentFile;
34      
35      public Long getGenId() {
36          return this.genId;
37      }
38  
39      public void setGenId(Long genId) {
40          this.genId = genId;
41      }
42  
43      public String getId() {
44          return this.id;
45      }
46  
47      public void setId(String id) {
48          this.id = id;
49      }
50  
51      public String getDescription() {
52          return this.description;
53      }
54  
55      public void setDescription(String description) {
56          this.description = description;
57      }
58  
59      public String getFileName() {
60          return this.fileName;
61      }
62  
63      public void setFileName(String fileName) {
64          this.fileName = fileName;
65      }
66  
67      public String getContentType() {
68          return this.contentType;
69      }
70  
71      public void setContentType(String contentType) {
72          this.contentType = contentType;
73      }
74  
75      public byte[] getAttachmentContent() {
76          return this.attachmentContent;
77      }
78  
79      public void setAttachmentContent(byte[] attachmentContent) {
80          this.attachmentContent = attachmentContent;
81      }
82  
83      public FormFile getAttachmentFile() {
84          return this.attachmentFile;
85      }
86  
87      public void setAttachmentFile(FormFile attachmentFile) {
88          this.attachmentFile = attachmentFile;
89      }
90  
91      protected LinkedHashMap toStringMapper() {
92          LinkedHashMap<String, Object> toStringMap = new LinkedHashMap<String, Object>();
93          toStringMap.put("description", description);
94          return toStringMap;
95      }
96  }