public class AutoTrackLifecycleListener extends AbstractLocalRepoTransactionListener implements StoreLifecycleListener, DeleteLifecycleListener
changed and the
localRevision properties of persistence-capable
objects.
Whenever an object is written to the datastore, said properties are updated, if the appropriate interfaces are implemented by the persistence-capable object.
| Constructor and Description |
|---|
AutoTrackLifecycleListener() |
| Modifier and Type | Method and Description |
|---|---|
LocalRepoTransactionImpl |
getTransaction() |
protected LocalRepoTransactionImpl |
getTransactionOrFail() |
void |
onBegin()
Notifies this instance about the transaction being begun.
|
void |
onCommit()
Notifies this instance about the transaction being committed.
|
void |
onRollback()
Notifies this instance about the transaction being rolled back.
|
void |
postDelete(InstanceLifecycleEvent event) |
void |
postStore(InstanceLifecycleEvent event) |
void |
preDelete(InstanceLifecycleEvent event) |
void |
preStore(InstanceLifecycleEvent event) |
void |
setTransaction(LocalRepoTransaction transaction) |
getPrioritypublic AutoTrackLifecycleListener()
public LocalRepoTransactionImpl getTransaction()
getTransaction in interface LocalRepoTransactionListenergetTransaction in class AbstractLocalRepoTransactionListenerprotected LocalRepoTransactionImpl getTransactionOrFail()
getTransactionOrFail in class AbstractLocalRepoTransactionListenerpublic void setTransaction(LocalRepoTransaction transaction)
setTransaction in interface LocalRepoTransactionListenersetTransaction in class AbstractLocalRepoTransactionListenerpublic void preStore(InstanceLifecycleEvent event)
preStore in interface StoreLifecycleListenerpublic void postStore(InstanceLifecycleEvent event)
postStore in interface StoreLifecycleListenerpublic void preDelete(InstanceLifecycleEvent event)
preDelete in interface DeleteLifecycleListenerpublic void postDelete(InstanceLifecycleEvent event)
postDelete in interface DeleteLifecycleListenerpublic void onBegin()
onBegin in interface LocalRepoTransactionListeneronBegin in class AbstractLocalRepoTransactionListeneronCommit(),
onRollback()public void onCommit()
onCommit in interface LocalRepoTransactionListeneronCommit in class AbstractLocalRepoTransactionListeneronBegin(),
onRollback()public void onRollback()
onRollback in interface LocalRepoTransactionListeneronRollback in class AbstractLocalRepoTransactionListeneronBegin(),
onCommit()Copyright © 2013–2017. All rights reserved.