com.liferay.lock.service.impl
Class LockServiceImpl

java.lang.Object
  extended bycom.liferay.lock.service.impl.LockServiceImpl
All Implemented Interfaces:
com.liferay.lock.service.LockService

public class LockServiceImpl
extends java.lang.Object
implements com.liferay.lock.service.LockService

View Source

Author:
Brian Wing Shun Chan

Constructor Summary
LockServiceImpl()
           
 
Method Summary
 void clear()
           
 com.liferay.lock.model.Lock getLock(java.lang.String className, java.lang.Comparable pk)
           
 java.util.Set getLocksByCompanyId(long companyId)
           
 java.util.Set getLocksByUserId(long userId)
           
 boolean hasLock(java.lang.String className, java.lang.Comparable pk, long userId)
           
 boolean isLocked(java.lang.String className, java.lang.Comparable pk)
           
 void lock(java.lang.String className, java.lang.Comparable pk, long companyId, long userId, long expirationTime)
           
 void unlock(java.lang.String className, java.lang.Comparable pk)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockServiceImpl

public LockServiceImpl()
Method Detail

clear

public void clear()
Specified by:
clear in interface com.liferay.lock.service.LockService

getLock

public com.liferay.lock.model.Lock getLock(java.lang.String className,
                                           java.lang.Comparable pk)
                                    throws com.liferay.portal.PortalException
Specified by:
getLock in interface com.liferay.lock.service.LockService
Throws:
com.liferay.portal.PortalException

getLocksByCompanyId

public java.util.Set getLocksByCompanyId(long companyId)
Specified by:
getLocksByCompanyId in interface com.liferay.lock.service.LockService

getLocksByUserId

public java.util.Set getLocksByUserId(long userId)
Specified by:
getLocksByUserId in interface com.liferay.lock.service.LockService

hasLock

public boolean hasLock(java.lang.String className,
                       java.lang.Comparable pk,
                       long userId)
Specified by:
hasLock in interface com.liferay.lock.service.LockService

isLocked

public boolean isLocked(java.lang.String className,
                        java.lang.Comparable pk)
Specified by:
isLocked in interface com.liferay.lock.service.LockService

lock

public void lock(java.lang.String className,
                 java.lang.Comparable pk,
                 long companyId,
                 long userId,
                 long expirationTime)
          throws com.liferay.portal.PortalException
Specified by:
lock in interface com.liferay.lock.service.LockService
Throws:
com.liferay.portal.PortalException

unlock

public void unlock(java.lang.String className,
                   java.lang.Comparable pk)
Specified by:
unlock in interface com.liferay.lock.service.LockService