public class ServerLocalTransaction extends java.lang.Object implements ServerLocalTransactionI
Modifier and Type | Method and Description |
---|---|
void |
close()
cleans up this server-side-only transaction and the attached PersistenceHandler
|
void |
close(boolean $throw) |
void |
closeNT()
Closes this ServerLocalTransactionI, relinquishing any underlying resources,
logging errors only instead of throwing them.
|
Transaction |
getTransaction()
Returns the underlying Transaction that is used for recording server local changes.
|
boolean |
isClosed()
Returns true if this ServerLocalTransaction is closed and thus not usable anymore.
|
static ServerLocalTransaction |
of(DBManLocalI _dbman,
Benutzer _user,
BackendSessionI _session,
java.lang.String _desc,
int _lockTimeout)
Returns a container with the PersistenceHandlerI and an instance of Transaction
with a BOLoaderI which is prepared for saving on server-side, as the
PersistenceHandler and the loader are set to shared lockmode.
|
TransactionAnswer |
saveBO(Benutzer saveAs)
Persists the changes recorded in this ServerLocalTransactionI to the database.
|
void |
saveBOWithoutLogs(Benutzer saveAs)
Persists the changes recorded in this ServerLocalTransactionI to the database,
but does not record the changes via BT/BP logs.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
saveBO, saveBOWithoutLogs
public static ServerLocalTransaction of(DBManLocalI _dbman, Benutzer _user, BackendSessionI _session, java.lang.String _desc, int _lockTimeout)
_dbman
- the underlying DBManLocalI to use_user
- the Benutzer to save on behalf of_session
- the relevant BackendSessionI of the passed Benutzer_desc
- the description to use in the contained Transaction within the ServerLocalTransactionI_lockTimeout
- time to wait in seconds until a locking error is reported in case some
object is already locked by another thread; defaults to -1.
Zero or less for no waiting, i.e. immediate timeout (or rather the defined lock-timeout
of JDO, which defaults to 30s), an infinite value for no timeout.public Transaction getTransaction()
ServerLocalTransactionI
getTransaction
in interface ServerLocalTransactionI
public TransactionAnswer saveBO(Benutzer saveAs)
ServerLocalTransactionI
saveBO
in interface ServerLocalTransactionI
saveAs
- the Benutzer to save on behalf ofpublic void saveBOWithoutLogs(Benutzer saveAs)
ServerLocalTransactionI
saveBOWithoutLogs
in interface ServerLocalTransactionI
saveAs
- the Benutzer to save on behalf ofpublic boolean isClosed()
ServerLocalTransactionI
isClosed
in interface ServerLocalTransactionI
public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception
public void close(boolean $throw) throws java.lang.Exception
java.lang.Exception
public void closeNT()
ServerLocalTransactionI
closeNT
in interface ServerLocalTransactionI
Copyright © 2000-2024 OAshi S.à r.l. All Rights Reserved.