public class OrderLockingHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
Copyright statement.
|
static int |
LOCKING_API
Use the locking API
|
static int |
LOCKING_DISABLED
Locking is disabled
|
static int |
LOCKING_EDITOR_ID
Use the editor_id as the lock
|
Constructor and Description |
---|
OrderLockingHelper()
Default constructor
|
OrderLockingHelper(ActivityToken token)
Constructor with ActivityToken
|
Modifier and Type | Method and Description |
---|---|
void |
checkAndCSRLock(java.lang.Long orderId)
Check and lock the resource.
|
void |
checkAndCSRLock(java.lang.Long[] orderIds)
Check and lock the resource.
|
void |
checkAndUnlock(java.lang.Long orderId)
Check and unlock the resource.
|
void |
checkAndUnlock(java.lang.Long[] orderIds)
Check and unlock the resource.
|
void |
checkAndUnlock(java.lang.Long[] orderIds,
boolean donotCheckCSR)
Check and unlock the resource.
|
void |
checkAndUnlock(java.lang.Long orderId,
boolean donotCheckCSR)
Check and unlock the resource.
|
void |
checkLock(java.lang.Long orderId)
Check if the order is locked by the current CSR.
|
void |
checkLock(java.lang.Long[] orderIds)
Check if the order is locked by the current CSR.
|
java.lang.String |
getLockedByLogonId(java.lang.Long orderId)
Get the CSR logon id who locks the order.
|
int |
getLockingSystem()
Get the locking System
|
boolean |
isLocked(java.lang.Long orderId)
Check to see if the order is locked by the other user.
|
boolean |
isLocked(java.lang.Long orderId,
boolean checkOtherUser)
Check to see if the order is locked.
|
void |
lock(java.lang.Long orderId)
Lock the order resource.
|
void |
lock(java.lang.Long[] orderIds)
Lock the order resource.
|
boolean |
lock(java.lang.Long[] orderIds,
boolean takeOverLock)
Lock the resource if it is not locked.
|
boolean |
lock(java.lang.Long orderId,
boolean takeOverLock)
Lock the resource if it is not locked.
|
void |
setLockingSystem(int lockingSystem)
Set the locking system
|
void |
unlock(java.lang.Long orderId)
Unlock the order resource.
|
void |
unlock(java.lang.Long[] orderIds)
Unlock the order resource.
|
public static final java.lang.String COPYRIGHT
public static final int LOCKING_DISABLED
public static final int LOCKING_API
public static final int LOCKING_EDITOR_ID
public OrderLockingHelper()
public OrderLockingHelper(ActivityToken token)
token
- activity tokenpublic int getLockingSystem()
public void setLockingSystem(int lockingSystem)
lockingSystem
- public void checkAndCSRLock(java.lang.Long orderId) throws ECException
orderId
- order idECException
public void checkAndUnlock(java.lang.Long orderId) throws ECException
orderId
- order idECException
public void checkAndUnlock(java.lang.Long orderId, boolean donotCheckCSR) throws ECException
orderId
- order iddonotCheckCSR
- a boolean valueECException
public void checkLock(java.lang.Long orderId) throws ECException
orderId
- order idECException
public void checkAndCSRLock(java.lang.Long[] orderIds) throws ECException
orderIds
- an array of order idsECException
public void checkAndUnlock(java.lang.Long[] orderIds) throws ECException
orderIds
- an array of order idsECException
public void checkAndUnlock(java.lang.Long[] orderIds, boolean donotCheckCSR) throws ECException
orderIds
- an array of order idsdonotCheckCSR
- a boolean valueECException
public void checkLock(java.lang.Long[] orderIds) throws ECException
orderIds
- an array of order idsECException
public boolean lock(java.lang.Long orderId, boolean takeOverLock) throws ECException
orderId
- order idtakeOverLock
- a boolean valueECException
public boolean lock(java.lang.Long[] orderIds, boolean takeOverLock) throws ECException
orderIds
- an array of order idstakeOverLock
- a boolean valueECException
public java.lang.String getLockedByLogonId(java.lang.Long orderId) throws ECException
orderId
- order idECException
public boolean isLocked(java.lang.Long orderId) throws ECException
orderId
- order idECException
public boolean isLocked(java.lang.Long orderId, boolean checkOtherUser) throws ECException
orderId
- order idcheckOtherUser
- a boolean valueECException
public void lock(java.lang.Long orderId) throws ECException
orderId
- order idECException
public void lock(java.lang.Long[] orderIds) throws ECException
orderIds
- an array of order idsECException
public void unlock(java.lang.Long orderId) throws ECException
orderId
- an array of order idsECException
public void unlock(java.lang.Long[] orderIds) throws ECException
orderIds
- an array of order idsECException