Class DefaultScheduledJobExecutionDetailService<T extends ScheduledJobExecutionDetail>
java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<T>
com.broadleafcommerce.scheduledjob.service.DefaultScheduledJobExecutionDetailService<T>
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<T>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<T>
,ScheduledJobExecutionDetailService<T>
public class DefaultScheduledJobExecutionDetailService<T extends ScheduledJobExecutionDetail>
extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<T>
implements ScheduledJobExecutionDetailService<T>
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultScheduledJobExecutionDetailService
(ScheduledJobExecutionDetailRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionprotected @NonNull ScheduledJobExecutionDetailRepository<com.broadleafcommerce.data.tracking.core.Trackable>
org.springframework.data.domain.Page<T>
readAllByScheduledJobId
(@NonNull String scheduledJobId, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads a paged list ofScheduledJobExecutionDetail
by its scheduledJobIdreadLastExecutedScheduledJobExecutionDetailByJobIdAndStatus
(@NonNull String jobId, @NonNull String executionStatus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the most recentScheduledJobExecutionDetail
with the given scheduledJobId and executionStatusupdateScheduledJobExecutionDetailStatusAndTime
(@NonNull String contextId, @NonNull ScheduledJobExecutionStatus status, @NonNull ScheduledJobExecutionDetailTimingType scheduledJobExecutionDetailTimingType, @NonNull Instant time, ScheduledJobExecutionDetailMessageType messageType, String message, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Updates theScheduledJobExecutionDetail
with the supplied values of status, time and messageMethods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAll
Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService
convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Constructor Details
-
DefaultScheduledJobExecutionDetailService
public DefaultScheduledJobExecutionDetailService(ScheduledJobExecutionDetailRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper)
-
-
Method Details
-
readAllByScheduledJobId
public org.springframework.data.domain.Page<T> readAllByScheduledJobId(@NonNull @NonNull String scheduledJobId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:ScheduledJobExecutionDetailService
Reads a paged list ofScheduledJobExecutionDetail
by its scheduledJobId- Specified by:
readAllByScheduledJobId
in interfaceScheduledJobExecutionDetailService<T extends ScheduledJobExecutionDetail>
- Parameters:
scheduledJobId
- the scheduledJobId by which the executionDetails are to be fetchedpage
- the requested page of results from the databasecontextInfo
- the context info- Returns:
- a paged list of
ScheduledJobExecutionDetail
by its scheduledJobId
-
readLastExecutedScheduledJobExecutionDetailByJobIdAndStatus
public T readLastExecutedScheduledJobExecutionDetailByJobIdAndStatus(@NonNull @NonNull String jobId, @NonNull @NonNull String executionStatus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:ScheduledJobExecutionDetailService
Finds the most recentScheduledJobExecutionDetail
with the given scheduledJobId and executionStatus- Specified by:
readLastExecutedScheduledJobExecutionDetailByJobIdAndStatus
in interfaceScheduledJobExecutionDetailService<T extends ScheduledJobExecutionDetail>
- Parameters:
jobId
- the ID of the scheduledJob by which the executionDetail is to be fetchedexecutionStatus
- the status of the scheduledJob by which the executionDetail is to be fetchedcontextInfo
- the context info- Returns:
- the
ScheduledJobExecutionDetail
-
updateScheduledJobExecutionDetailStatusAndTime
@Transactional(transactionManager="scheduledJobTransactionManager") public T updateScheduledJobExecutionDetailStatusAndTime(@NonNull @NonNull String contextId, @NonNull @NonNull ScheduledJobExecutionStatus status, @NonNull @NonNull ScheduledJobExecutionDetailTimingType scheduledJobExecutionDetailTimingType, @NonNull @NonNull Instant time, @Nullable ScheduledJobExecutionDetailMessageType messageType, @Nullable String message, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:ScheduledJobExecutionDetailService
Updates theScheduledJobExecutionDetail
with the supplied values of status, time and message- Specified by:
updateScheduledJobExecutionDetailStatusAndTime
in interfaceScheduledJobExecutionDetailService<T extends ScheduledJobExecutionDetail>
- Parameters:
contextId
- the ID of theScheduledJobExecutionDetail
to updatestatus
- the status to update the detail toscheduledJobExecutionDetailTimingType
- the time field to updatetime
- the value of time to update tomessageType
- the message field to updatemessage
- the value of the message to update tocontextInfo
- the context info- Returns:
- the updated
JpaScheduledJobExecutionDetail
-
getRepository
@NonNull protected @NonNull ScheduledJobExecutionDetailRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()- Overrides:
getRepository
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<T extends ScheduledJobExecutionDetail>
-