001/**
002 * Copyright 2005-2015 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package edu.sampleu.travel.bo;
017
018import org.apache.struts.upload.FormFile;
019import org.kuali.rice.krad.bo.PersistableAttachment;
020import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
021
022import java.util.LinkedHashMap;
023
024public class MultiAttachmentSample extends PersistableBusinessObjectBase implements PersistableAttachment {
025    
026    private Long genId;
027    private String id;
028    private String description;
029    
030    private String fileName;
031    private String contentType;
032    private byte[] attachmentContent;
033    private transient FormFile attachmentFile;
034    
035    public Long getGenId() {
036        return this.genId;
037    }
038
039    public void setGenId(Long genId) {
040        this.genId = genId;
041    }
042
043    public String getId() {
044        return this.id;
045    }
046
047    public void setId(String id) {
048        this.id = id;
049    }
050
051    public String getDescription() {
052        return this.description;
053    }
054
055    public void setDescription(String description) {
056        this.description = description;
057    }
058
059    public String getFileName() {
060        return this.fileName;
061    }
062
063    public void setFileName(String fileName) {
064        this.fileName = fileName;
065    }
066
067    public String getContentType() {
068        return this.contentType;
069    }
070
071    public void setContentType(String contentType) {
072        this.contentType = contentType;
073    }
074
075    public byte[] getAttachmentContent() {
076        return this.attachmentContent;
077    }
078
079    public void setAttachmentContent(byte[] attachmentContent) {
080        this.attachmentContent = attachmentContent;
081    }
082
083    public FormFile getAttachmentFile() {
084        return this.attachmentFile;
085    }
086
087    public void setAttachmentFile(FormFile attachmentFile) {
088        this.attachmentFile = attachmentFile;
089    }
090
091    protected LinkedHashMap toStringMapper() {
092        LinkedHashMap<String, Object> toStringMap = new LinkedHashMap<String, Object>();
093        toStringMap.put("description", description);
094        return toStringMap;
095    }
096}