Class LockEntity

java.lang.Object
org.alfresco.repo.domain.locks.LockEntity

public class LockEntity extends 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
Author:
Derek Hulley
  • Field Details

    • CONST_LONG_ZERO

      public static final Long CONST_LONG_ZERO
  • Constructor Details

    • LockEntity

      public LockEntity()
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class 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 Long getId()
    • setId

      public void setId(Long id)
    • getVersion

      public Long getVersion()
    • setVersion

      public void setVersion(Long version)
    • incrementVersion

      public void incrementVersion()
      Increments the version number or resets it if it reaches a large number
    • getSharedResourceId

      public Long getSharedResourceId()
      Returns:
      Returns the ID of the shared lock resource
    • setSharedResourceId

      public void setSharedResourceId(Long sharedResourceId)
      Parameters:
      sharedResourceId - the ID of the shared lock resource
    • getExclusiveResourceId

      public Long getExclusiveResourceId()
    • setExclusiveResourceId

      public void setExclusiveResourceId(Long exclusiveResourceId)
    • getLockToken

      public String getLockToken()
      Returns:
      Returns the token assigned when the lock was created
    • setLockToken

      public void setLockToken(String lockToken)
      Parameters:
      lockToken - the token assigned when the lock was created
    • getStartTime

      public Long getStartTime()
      Returns:
      Returns the time when the lock was started
    • setStartTime

      public void setStartTime(Long startTime)
    • getExpiryTime

      public Long getExpiryTime()
    • setExpiryTime

      public void setExpiryTime(Long expiryTime)