001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/syllabus/tags/sakai_2-4-1/syllabus-hbm/src/java/org/sakaiproject/component/app/syllabus/SyllabusAttachmentImpl.java $
003: * $Id: SyllabusAttachmentImpl.java 14709 2006-09-15 15:42:44Z lance@indiana.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.component.app.syllabus;
021:
022: import org.sakaiproject.api.app.syllabus.SyllabusAttachment;
023: import org.sakaiproject.api.app.syllabus.SyllabusData;
024:
025: /**
026: * @author <a href="mailto:cwen.iupui.edu">Chen Wen</a>
027: * @version $Id: SyllabusAttachmentImpl.java 14709 2006-09-15 15:42:44Z lance@indiana.edu $
028: *
029: */
030: public class SyllabusAttachmentImpl implements SyllabusAttachment,
031: Comparable {
032: private Integer lockId;
033: private String attachmentId;
034: private Long syllabusAttachId;
035: private SyllabusData syllabusData;
036: private String name;
037: private String size;
038: private String type;
039: private String createdBy;
040: private String lastModifiedBy;
041: private String url;
042:
043: public Integer getLockId() {
044: return lockId;
045: }
046:
047: public void setLockId(Integer lockId) {
048: this .lockId = lockId;
049: }
050:
051: public String getAttachmentId() {
052: return attachmentId;
053: }
054:
055: public void setAttachmentId(String attachId) {
056: this .attachmentId = attachId;
057: }
058:
059: public Long getSyllabusAttachId() {
060: return syllabusAttachId;
061: }
062:
063: public void setSyllabusAttachId(Long syllabusAttachId) {
064: this .syllabusAttachId = syllabusAttachId;
065: }
066:
067: public int hashCode() {
068: return syllabusAttachId.hashCode();
069: }
070:
071: public boolean equals(Object obj) {
072: if (this == obj)
073: return true;
074: if (!(obj instanceof SyllabusAttachmentImpl))
075: return false;
076: SyllabusAttachmentImpl other = (SyllabusAttachmentImpl) obj;
077:
078: if ((syllabusAttachId == null ? other.syllabusAttachId == null
079: : syllabusAttachId.equals(other.syllabusAttachId))) {
080: return true;
081: }
082: return false;
083: }
084:
085: public int compareTo(Object obj) {
086: return this .syllabusAttachId
087: .compareTo(((SyllabusAttachment) obj)
088: .getSyllabusAttachId());
089: }
090:
091: public String toString() {
092: StringBuffer sb = new StringBuffer();
093: sb.append("{syllabusAttachId=");
094: sb.append(syllabusAttachId);
095: sb.append(", attachmentId=");
096: sb.append(attachmentId);
097: sb.append(", lockId=");
098: sb.append(lockId);
099: sb.append("}");
100: return sb.toString();
101: }
102:
103: public SyllabusData getSyllabusData() {
104: return syllabusData;
105: }
106:
107: public void setSyllabusData(SyllabusData syllabusData) {
108: this .syllabusData = syllabusData;
109: }
110:
111: public String getName() {
112: return name;
113: }
114:
115: public void setName(String name) {
116: this .name = name;
117: }
118:
119: public String getSize() {
120: return this .size;
121: }
122:
123: public String getType() {
124: return this .type;
125: }
126:
127: public String getCreatedBy() {
128: return this .createdBy;
129: }
130:
131: public String getLastModifiedBy() {
132: return this .lastModifiedBy;
133: }
134:
135: public void setSize(String size) {
136: this .size = size;
137: }
138:
139: public void setType(String type) {
140: this .type = type;
141: }
142:
143: public void setCreatedBy(String createdBy) {
144: this .createdBy = createdBy;
145: }
146:
147: public void setLastModifiedBy(String lastModifiedBy) {
148: this .lastModifiedBy = lastModifiedBy;
149: }
150:
151: public void setUrl(String url) {
152: this .url = url;
153: }
154:
155: public String getUrl() {
156: return url;
157: }
158: }
|