Class JpaCustomizedDataFeedProcessExecutionRepository<D extends JpaDataFeedProcessExecution>
java.lang.Object
com.broadleafcommerce.datafeed.provider.jpa.repository.trackable.JpaCustomizedDataFeedProcessExecutionRepository<D>
- Type Parameters:
- D- the persisted domain type
- All Implemented Interfaces:
- CustomizedDataFeedProcessExecutionRepository<D>,- org.springframework.beans.factory.InitializingBean
public class JpaCustomizedDataFeedProcessExecutionRepository<D extends JpaDataFeedProcessExecution>
extends Object
implements CustomizedDataFeedProcessExecutionRepository<D>, org.springframework.beans.factory.InitializingBean
JPA implementation of 
CustomizedDataFeedProcessExecutionRepository.- 
Constructor SummaryConstructorsConstructorDescriptionJpaCustomizedDataFeedProcessExecutionRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager, JpaDataFeedQueryHelper queryHelper) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidprotected DataFeedProcessExecutionRepository<D>Lazy injection so we can access base repository methods.protected com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtilprotected com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilderprotected jakarta.persistence.EntityManagerprotected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelperprotected com.broadleafcommerce.common.messaging.notification.NotificationStateServiceLazy injection since this is technically a service component.protected JpaDataFeedQueryHelperprotected com.broadleafcommerce.common.jpa.RepositoryEntityTypeManagerprotected com.broadleafcommerce.common.messaging.notification.domain.NotificationStateinitializeAndResetNotificationState(D entity, String notificationStateName, Instant changeTimestamp) initializeNotificationState(String id, String messageType, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically finds theDataFeedProcessExecutionfor the givenid, and initializes itsNotificationStateformessageType.voidsetBaseRepository(DataFeedProcessExecutionRepository<D> baseRepository) Lazy injection so we can access base repository methods.voidsetNotificationStateService(com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService) Lazy injection since this is technically a service component.setQueriedDataFileLocation(String id, String queriedDataFileLocation, String whereCurrentStatus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically setsDataFeedProcessExecution.getQueriedDataFileLocation()on the specified execution.setStatus(String id, String newStatus, String whereCurrentStatus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically sets a newDataFeedProcessExecution.getStatus()on the specified execution.setStatusAndCompletionDetails(String id, String newStatus, Instant endTime, boolean containsErrors, List<String> errorDetails, String whereCurrentStatus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically sets a newDataFeedProcessExecution.getStatus()and completion details on the specified execution.setStatusAndStartTime(String id, String newStatus, Instant startTime, String whereCurrentStatus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Atomically sets a newDataFeedProcessExecution.getStatus()andDataFeedProcessExecution.getStartTime()on the specified execution.
- 
Constructor Details- 
JpaCustomizedDataFeedProcessExecutionRepositorypublic JpaCustomizedDataFeedProcessExecutionRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager, JpaDataFeedQueryHelper queryHelper) 
 
- 
- 
Method Details- 
afterPropertiesSet- Specified by:
- afterPropertiesSetin interface- org.springframework.beans.factory.InitializingBean
- Throws:
- Exception
 
- 
initializeNotificationState@Nullable @Policy(operationTypes=UPDATE) @Transactional("datafeedTransactionManager") public D initializeNotificationState(String id, String messageType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedDataFeedProcessExecutionRepositoryAtomically finds theDataFeedProcessExecutionfor the givenid, and initializes itsNotificationStateformessageType.- Specified by:
- initializeNotificationStatein interface- CustomizedDataFeedProcessExecutionRepository<D extends JpaDataFeedProcessExecution>
- Parameters:
- id- the- DataFeedProcessExecution.getId()for which to initialize the notification state
- messageType- the message type (ex:- NotificationState.getName()
- contextInfo- context information around multitenant state
- Returns:
- the updated DataFeedProcessExecutionif successfully found and updated,nullotherwise
 
- 
initializeAndResetNotificationState
- 
setStatus@Nullable @Policy(operationTypes=UPDATE) @Transactional("datafeedTransactionManager") public D setStatus(String id, String newStatus, @Nullable String whereCurrentStatus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedDataFeedProcessExecutionRepositoryAtomically sets a newDataFeedProcessExecution.getStatus()on the specified execution.- Specified by:
- setStatusin interface- CustomizedDataFeedProcessExecutionRepository<D extends JpaDataFeedProcessExecution>
- Parameters:
- id- the ID of the execution to update
- newStatus- the new value to set for- DataFeedProcessExecution.getStatus()
- whereCurrentStatus- (optional) if provided, the update will only be applied if the execution currently has this value for its- DataFeedProcessExecution.getStatus()
- contextInfo- context information around multitenant state
- Returns:
- the updated execution if successfully updated, else null
 
- 
setStatusAndStartTime@Nullable @Policy(operationTypes=UPDATE) @Transactional("datafeedTransactionManager") public D setStatusAndStartTime(String id, String newStatus, Instant startTime, @Nullable String whereCurrentStatus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedDataFeedProcessExecutionRepositoryAtomically sets a newDataFeedProcessExecution.getStatus()andDataFeedProcessExecution.getStartTime()on the specified execution.- Specified by:
- setStatusAndStartTimein interface- CustomizedDataFeedProcessExecutionRepository<D extends JpaDataFeedProcessExecution>
- Parameters:
- id- the ID of the execution to update
- newStatus- the new value to set for- DataFeedProcessExecution.getStatus()
- startTime- the value to set for- DataFeedProcessExecution.getStartTime()
- whereCurrentStatus- (optional) if provided, the update will only be applied if the execution currently has this value for its- DataFeedProcessExecution.getStatus()
- contextInfo- context information around multitenant state
- Returns:
- the updated execution if successfully updated, else null
 
- 
setStatusAndCompletionDetails@Nullable @Policy(operationTypes=UPDATE) @Transactional("datafeedTransactionManager") public D setStatusAndCompletionDetails(String id, String newStatus, Instant endTime, boolean containsErrors, @Nullable List<String> errorDetails, @Nullable String whereCurrentStatus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedDataFeedProcessExecutionRepositoryAtomically sets a newDataFeedProcessExecution.getStatus()and completion details on the specified execution.- Specified by:
- setStatusAndCompletionDetailsin interface- CustomizedDataFeedProcessExecutionRepository<D extends JpaDataFeedProcessExecution>
- Parameters:
- id- the ID of the execution to update
- newStatus- the new value to set for- DataFeedProcessExecution.getStatus()
- endTime- the value to set for- DataFeedProcessExecution.getEndTime()
- containsErrors- the value to set for- DataFeedProcessExecution.isContainsErrors()
- errorDetails- (optional) the value to set for- DataFeedProcessExecution.getErrorDetails()
- whereCurrentStatus- (optional) if provided, the update will only be applied if the execution currently has this value for its- DataFeedProcessExecution.getStatus()
- contextInfo- context information around multitenant state
- Returns:
- the updated execution if successfully updated, else null
 
- 
setQueriedDataFileLocation@Nullable @Policy(operationTypes=UPDATE) @Transactional("datafeedTransactionManager") public D setQueriedDataFileLocation(String id, String queriedDataFileLocation, @Nullable String whereCurrentStatus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedDataFeedProcessExecutionRepositoryAtomically setsDataFeedProcessExecution.getQueriedDataFileLocation()on the specified execution.- Specified by:
- setQueriedDataFileLocationin interface- CustomizedDataFeedProcessExecutionRepository<D extends JpaDataFeedProcessExecution>
- Parameters:
- id- the ID of the execution to update
- queriedDataFileLocation- the value to set for- DataFeedProcessExecution.getQueriedDataFileLocation()
- whereCurrentStatus- (optional) if provided, the update will only be applied if the execution currently has this value for its- DataFeedProcessExecution.getStatus()
- contextInfo- context information around multitenant state
- Returns:
- the updated execution if successfully updated, else null
 
- 
getBehaviorUtilprotected com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil getBehaviorUtil()
- 
getCriteriaBuilderprotected com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder getCriteriaBuilder()
- 
getRepositoryEntityTypeManagerprotected com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager getRepositoryEntityTypeManager()
- 
getQueryHelper
- 
getEntityManagerprotected jakarta.persistence.EntityManager getEntityManager()
- 
getNarrowingHelperprotected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelper getNarrowingHelper()
- 
getBaseRepositoryLazy injection so we can access base repository methods.
- 
setBaseRepository@Autowired @Lazy public void setBaseRepository(DataFeedProcessExecutionRepository<D> baseRepository) Lazy injection so we can access base repository methods.
- 
getNotificationStateServiceprotected com.broadleafcommerce.common.messaging.notification.NotificationStateService getNotificationStateService()Lazy injection since this is technically a service component.
- 
setNotificationStateService@Autowired @Lazy public void setNotificationStateService(com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService) Lazy injection since this is technically a service component.
 
-