org.alfresco.repo.domain.locks
Class LockEntity
java.lang.Object
org.alfresco.repo.domain.locks.LockEntity
public class LockEntity
- extends java.lang.Object
Entity bean for alf_lock table.
These are unique (see equals
and hashCode
) based
on the shared and exclusive resource ID combination.
- Since:
- 3.2
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
CONST_LONG_ZERO
public static final java.lang.Long CONST_LONG_ZERO
LockEntity
public LockEntity()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
isExclusive
public boolean isExclusive()
- Determine if the lock is logically exclusive. A lock is exclusive if the
shared lock resource matches the exclusive lock resource.
- Returns:
- Returns true if the lock is exclusive or false if it is not
hasExpired
public boolean hasExpired()
getId
public java.lang.Long getId()
setId
public void setId(java.lang.Long id)
getVersion
public java.lang.Long getVersion()
setVersion
public void setVersion(java.lang.Long version)
incrementVersion
public void incrementVersion()
- Increments the version number or resets it if it reaches a large number
getSharedResourceId
public java.lang.Long getSharedResourceId()
- Returns:
- Returns the ID of the shared lock resource
setSharedResourceId
public void setSharedResourceId(java.lang.Long sharedResourceId)
- Parameters:
sharedResourceId
- the ID of the shared lock resource
getExclusiveResourceId
public java.lang.Long getExclusiveResourceId()
setExclusiveResourceId
public void setExclusiveResourceId(java.lang.Long exclusiveResourceId)
getLockToken
public java.lang.String getLockToken()
- Returns:
- Returns the token assigned when the lock was created
setLockToken
public void setLockToken(java.lang.String lockToken)
- Parameters:
lockToken
- the token assigned when the lock was created
getStartTime
public java.lang.Long getStartTime()
- Returns:
- Returns the time when the lock was started
setStartTime
public void setStartTime(java.lang.Long startTime)
getExpiryTime
public java.lang.Long getExpiryTime()
setExpiryTime
public void setExpiryTime(java.lang.Long expiryTime)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.