public class PostsByUserEntityTask extends Object implements PersistenceWork
| Constructor and Description |
|---|
PostsByUserEntityTask(int user1_id,
int user2_id,
int post1_id,
int post2_id)
Create PostsByUserEntityTask object
|
| Modifier and Type | Method and Description |
|---|---|
void |
doTask(EntityManagerLite entityManager)
Perform a persistence operation.
|
List<Post> |
getPosts()
Returns result of "posts_by_user" query
|
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 PostsByUserEntityTask(int user1_id,
int user2_id,
int post1_id,
int post2_id)
user1_id - User 1 primary keyuser2_id - User 2 primary keypost1_id - Post 1 primary keypost2_id - Post 2 primary keypublic void doTask(EntityManagerLite entityManager)
PersistenceTaskdoTask 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 falsePersistenceWork.onPostExecute(boolean)public void onRollback(Throwable rollbackException)
PersistenceWorkPersistenceTask.doTask(EntityManagerLite entityManager)onRollback in interface PersistenceWorkrollbackException - Throwable exception which caused rollbackPersistenceWork.onRollback(java.lang.Throwable)This documentation is licensed by Andrew Bowley under the GPLv3 License.