org.apache.oozie.executor.jpa
Interface JPAExecutor<T>

All Known Implementing Classes:
BulkDeleteForPurgeJPAExecutor, BulkJPAExecutor, BulkUpdateDeleteJPAExecutor, BulkUpdateInsertForCoordActionStartJPAExecutor, BulkUpdateInsertForCoordActionStatusJPAExecutor, BulkUpdateInsertJPAExecutor, BundleActionGetJPAExecutor, BundleActionInsertJPAExecutor, BundleActionsCountForJobGetJPAExecutor, BundleActionsGetByLastModifiedTimeJPAExecutor, BundleActionsGetJPAExecutor, BundleActionsGetStatusPendingJPAExecutor, BundleActionsGetWaitingOlderJPAExecutor, BundleActionUpdateJPAExecutor, BundleJobGetCoordinatorsJPAExecutor, BundleJobGetJPAExecutor, BundleJobInfoGetJPAExecutor, BundleJobInsertJPAExecutor, BundleJobsGetForPurgeJPAExecutor, BundleJobsGetNeedStartJPAExecutor, BundleJobsGetPausedJPAExecutor, BundleJobsGetRunningOrPendingJPAExecutor, BundleJobsGetUnpausedJPAExecutor, BundleJobUpdateJPAExecutor, CoordActionGetForCheckJPAExecutor, CoordActionGetForExternalIdJPAExecutor, CoordActionGetForInfoJPAExecutor, CoordActionGetForInputCheckJPAExecutor, CoordActionGetForStartJPAExecutor, CoordActionGetForTimeoutJPAExecutor, CoordActionGetJPAExecutor, CoordActionInsertJPAExecutor, CoordActionRemoveJPAExecutor, CoordActionsActiveCountJPAExecutor, CoordActionsGetByLastModifiedTimeJPAExecutor, CoordActionsGetForRecoveryJPAExecutor, CoordActionsGetReadyGroupbyJobIDJPAExecutor, CoordActionsPendingFalseCountGetJPAExecutor, CoordActionsPendingFalseStatusCountGetJPAExecutor, CoordActionsRunningGetJPAExecutor, CoordActionUpdateForInputCheckJPAExecutor, CoordActionUpdateJPAExecutor, CoordActionUpdateStatusJPAExecutor, CoordJobDeleteJPAExecutor, CoordJobGetActionByActionNumberJPAExecutor, CoordJobGetActionForNominalTimeJPAExecutor, CoordJobGetActionIdsForDateRangeJPAExecutor, CoordJobGetActionsForDatesJPAExecutor, CoordJobGetActionsJPAExecutor, CoordJobGetActionsNotCompletedJPAExecutor, CoordJobGetActionsRunningJPAExecutor, CoordJobGetActionsStatusJPAExecutor, CoordJobGetActionsSubsetJPAExecutor, CoordJobGetActionsSuspendedJPAExecutor, CoordJobGetJPAExecutor, CoordJobGetPendingActionsCountJPAExecutor, CoordJobGetReadyActionsJPAExecutor, CoordJobGetRunningActionsCountJPAExecutor, CoordJobInfoGetJPAExecutor, CoordJobInsertJPAExecutor, CoordJobsGetForPurgeJPAExecutor, CoordJobsGetPausedJPAExecutor, CoordJobsGetPendingJPAExecutor, CoordJobsGetUnpausedJPAExecutor, CoordJobsToBeMaterializedJPAExecutor, CoordJobUpdateJPAExecutor, SLAEventInsertJPAExecutor, SLAEventsGetForSeqIdJPAExecutor, SLAEventsGetJPAExecutor, WorkflowActionDeleteJPAExecutor, WorkflowActionGetJPAExecutor, WorkflowActionInsertJPAExecutor, WorkflowActionRetryManualGetJPAExecutor, WorkflowActionsGetForJobJPAExecutor, WorkflowActionsGetPendingJPAExecutor, WorkflowActionsRunningGetJPAExecutor, WorkflowActionSubsetGetJPAExecutor, WorkflowActionUpdateJPAExecutor, WorkflowIdGetForExternalIdJPAExecutor, WorkflowInfoWithActionsSubsetGetJPAExecutor, WorkflowJobDeleteJPAExecutor, WorkflowJobGetActionsJPAExecutor, WorkflowJobGetJPAExecutor, WorkflowJobInsertJPAExecutor, WorkflowJobsGetForPurgeJPAExecutor, WorkflowJobUpdateJPAExecutor, WorkflowsJobGetJPAExecutor

public interface JPAExecutor<T>

Executor pattern interface that gives access to an EntityManager.

Implementations are executed by the JPAService.


Method Summary
 T execute(javax.persistence.EntityManager em)
          Method that encapsulates JPA access operations.
 String getName()
          Return the name of the JPA executor.
 

Method Detail

getName

String getName()
Return the name of the JPA executor. Used for logging and instrumentation.

Returns:
the name of the JPA executor.

execute

T execute(javax.persistence.EntityManager em)
          throws JPAExecutorException
Method that encapsulates JPA access operations.

Implementations should not close the received EntityManager.

Implementations should commit any transaction before ending, else the transaction will be rolled back.

Parameters:
em - an active EntityManager
Returns:
a return value if any.
Throws:
JPAExecutorException - thrown if a jpa executor failed


Copyright © 2013 Apache Software Foundation. All Rights Reserved.