/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/msgcntr/trunk/messageforums-hbm/src/java/org/sakaiproject/component/app/messageforums/dao/hibernate/AttachmentImpl.java $ * $Id: AttachmentImpl.java 9227 2006-05-15 15:02:42Z cwen@iupui.edu $ *********************************************************************************** * * Copyright (c) 2003, 2004, 2005, 2006, 2008 The Sakai Foundation * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.osedu.org/licenses/ECL-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **********************************************************************************/ package org.sakaiproject.component.app.messageforums.dao.hibernate; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.sakaiproject.api.app.messageforums.Rank; import org.sakaiproject.api.app.messageforums.RankImage; public class RankImageImpl extends MutableEntityImpl implements RankImage { private static final Log LOG = LogFactory.getLog(RankImageImpl.class); private Long rankImageId; private String attachmentId; private String attachmentUrl; private String attachmentName; private String attachmentSize; private String attachmentType; private Rank rank; public String getAttachmentId() { return attachmentId; } public void setAttachmentId(String attachmentId) { this.attachmentId = attachmentId; } public String getAttachmentName() { return attachmentName; } public void setAttachmentName(String attachmentName) { this.attachmentName = attachmentName; } public String getAttachmentSize() { return attachmentSize; } public void setAttachmentSize(String attachmentSize) { this.attachmentSize = attachmentSize; } public String getAttachmentType() { return attachmentType; } public void setAttachmentType(String attachmentType) { this.attachmentType = attachmentType; } public String getAttachmentUrl() { return attachmentUrl; } public void setAttachmentUrl(String attachmentUrl) { this.attachmentUrl = attachmentUrl; } public Rank getRank() { return rank; } public void setRank(Rank parent) { this.rank = parent; } public Long getRankImageId() { return rankImageId; } public void setRankImageId(Long imageattachid) { this.rankImageId = imageattachid; } public long getAttachmentSizeInKB() { long sizeInBytes = new Long(this.attachmentSize); return ((sizeInBytes - 1) / 1024) + 1; } }