public class Lock extends PersistentObject
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MAILBOX_LOCKNAME |
filled, oid
emptyKeys
Modifier | Constructor and Description |
---|---|
|
Lock() |
protected |
Lock(long obj,
java.lang.String lockname) |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getLockdate() |
java.lang.String |
getLockname() |
java.lang.String |
getNodeid() |
long |
getObj() |
java.lang.String |
getTableName()
This method must return the table name of the database table in which
this persistent object is stored.
|
static boolean |
isLocked(long obj,
java.lang.String lockname)
Returns true if the specified lock exists for the passed object, false otherwise.
|
static void |
lock(long obj,
java.lang.String lockname)
Try to make a database lock.
|
static void |
unlock(long obj,
java.lang.String lockname)
Remove the lock.
|
afterDelete, afterInsert, afterRead, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, clone, dbFields, equals, getKey, getKeys, getLocalClassName, getLocalObjectName, getOid, getStore, getValue, hashCode, isFilled, isValid, onDelete, onInsert, onRead, onUpdate, setFilled, setOid, setOid, setStore, toListString
public static final java.lang.String MAILBOX_LOCKNAME
public java.util.Date getLockdate()
public java.lang.String getLockname()
public java.lang.String getNodeid()
public long getObj()
public java.lang.String getTableName()
Persistent
public static void lock(long obj, java.lang.String lockname)
obj
- the oid of an object to locklockname
- public static void unlock(long obj, java.lang.String lockname)
obj
- the locked objectlockname
- the name of the lockpublic static boolean isLocked(long obj, java.lang.String lockname)
lock(long, String)
before you call this method but did not commit already, this method
will return false allthough a subsequent call of lock(long, String)
would cause an Exception.
If you want to lock an object, do not call this method before calling lock(long, String)
but call lock(long, String)
directly which is guaranteed to be not successfull if a lock
already exists.obj
- the locked objectlockname
- the name of the locktrue
if the specified lock exists for the given object; else
instead@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.