public class NodeFinder extends Object implements PersistenceWork
| Modifier and Type | Class and Description |
|---|---|
static interface |
NodeFinder.Callback |
| Constructor and Description |
|---|
NodeFinder(int nodeId,
NodeFinder.Callback callback)
Create NodeFinder object
|
| Modifier and Type | Method and Description |
|---|---|
void |
doTask(EntityManagerLite entityManager)
Find node by primary key on background thread
|
void |
onPostExecute(boolean success)
Runs on separate thread after successful completion of
PersistenceTask.doTask(EntityManagerLite entityManager). |
void |
onRollback(Throwable rollbackException)
Handle rollback caused by exception while executing
PersistenceTask.doTask(EntityManagerLite entityManager) |
public NodeFinder(int nodeId,
NodeFinder.Callback callback)
nodeId - Primary key to search onpublic void doTask(EntityManagerLite entityManager)
doTask in interface PersistenceTaskentityManager - Entity manager provided to perform persistence operation(s). Do not call close().PersistenceTask.doTask(au.com.cybersearch2.classyjpa.EntityManagerLite)public void onPostExecute(boolean success)
PersistenceWorkPersistenceTask.doTask(EntityManagerLite entityManager).onPostExecute in interface PersistenceWorksuccess - True if PersistenceWork completed successfully, otherwise falsepublic void onRollback(Throwable rollbackException)
PersistenceWorkPersistenceTask.doTask(EntityManagerLite entityManager)onRollback in interface PersistenceWorkrollbackException - Throwable exception which caused rollbackThis documentation is licensed by Andrew Bowley under the GPLv3 License.