001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/content/tags/sakai_2-4-1/content-impl/hbm/src/java/org/sakaiproject/content/hbm/Lock.java $
003: * $Id: Lock.java 8533 2006-04-30 22:22:37Z ggolden@umich.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 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.content.hbm;
021:
022: import java.util.Date;
023:
024: public class Lock implements org.sakaiproject.content.api.Lock {
025: private String id;
026:
027: private String asset;
028:
029: private String qualifier;
030:
031: private boolean active;
032:
033: private boolean system;
034:
035: private String reason;
036:
037: private Date dateAdded;
038:
039: private Date dateRemoved;
040:
041: public boolean equals(Object in) {
042: if (in == null && this == null)
043: return true;
044: if (in == null && this != null)
045: return false;
046: if (this == null && in != null)
047: return false;
048: if (!this .getClass().isAssignableFrom(in.getClass()))
049: return false;
050: if (this .getId() == null && ((Lock) in).getId() == null)
051: return true;
052: if (this .getId() == null || ((Lock) in).getId() == null)
053: return false;
054: return this .getId().equals(((Lock) in).getId());
055: }
056:
057: public int hashCode() {
058: return (id != null ? id.hashCode() : 0);
059: }
060:
061: public String getId() {
062: return id;
063: }
064:
065: public void setId(String id) {
066: this .id = id;
067: }
068:
069: public boolean isActive() {
070: return active;
071: }
072:
073: public void setActive(boolean active) {
074: this .active = active;
075: }
076:
077: public Date getDateAdded() {
078: return dateAdded;
079: }
080:
081: public void setDateAdded(Date dateAdded) {
082: this .dateAdded = dateAdded;
083: }
084:
085: public Date getDateRemoved() {
086: return dateRemoved;
087: }
088:
089: public void setDateRemoved(Date dateRemoved) {
090: this .dateRemoved = dateRemoved;
091: }
092:
093: public String getQualifier() {
094: return qualifier;
095: }
096:
097: public void setQualifier(String qualifier) {
098: this .qualifier = qualifier;
099: }
100:
101: public String getReason() {
102: return reason;
103: }
104:
105: public void setReason(String reason) {
106: this .reason = reason;
107: }
108:
109: public String getAsset() {
110: return asset;
111: }
112:
113: public void setAsset(String asset) {
114: this .asset = asset;
115: }
116:
117: public boolean isSystem() {
118: return system;
119: }
120:
121: public void setSystem(boolean system) {
122: this.system = system;
123: }
124: }
|