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) |
getPriority
public AutoTrackLifecycleListener()
public LocalRepoTransactionImpl getTransaction()
getTransaction
in interface LocalRepoTransactionListener
getTransaction
in class AbstractLocalRepoTransactionListener
protected LocalRepoTransactionImpl getTransactionOrFail()
getTransactionOrFail
in class AbstractLocalRepoTransactionListener
public void setTransaction(LocalRepoTransaction transaction)
setTransaction
in interface LocalRepoTransactionListener
setTransaction
in class AbstractLocalRepoTransactionListener
public void preStore(InstanceLifecycleEvent event)
preStore
in interface StoreLifecycleListener
public void postStore(InstanceLifecycleEvent event)
postStore
in interface StoreLifecycleListener
public void preDelete(InstanceLifecycleEvent event)
preDelete
in interface DeleteLifecycleListener
public void postDelete(InstanceLifecycleEvent event)
postDelete
in interface DeleteLifecycleListener
public void onBegin()
onBegin
in interface LocalRepoTransactionListener
onBegin
in class AbstractLocalRepoTransactionListener
onCommit()
,
onRollback()
public void onCommit()
onCommit
in interface LocalRepoTransactionListener
onCommit
in class AbstractLocalRepoTransactionListener
onBegin()
,
onRollback()
public void onRollback()
onRollback
in interface LocalRepoTransactionListener
onRollback
in class AbstractLocalRepoTransactionListener
onBegin()
,
onCommit()
Copyright © 2013–2019. All rights reserved.