Class JpaCustomizedSandboxRepository<D extends JpaSandbox>
java.lang.Object
com.broadleafcommerce.sandbox.provider.jpa.repository.trackable.JpaCustomizedSandboxRepository<D>
- All Implemented Interfaces:
 CustomizedSandboxRepository<D>
public class JpaCustomizedSandboxRepository<D extends JpaSandbox>
extends Object
implements CustomizedSandboxRepository<D>
- Author:
 - Jeff Fischer
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptioncleanupBatch(String startingId, Object source) Check a bag of Sandbox entities for completion state.createIfDoesNotExist(D sandbox, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Performs an atomic upsert, only creating the given sandbox if not already present.voidsetEventPublisher(org.springframework.context.ApplicationEventPublisher eventPublisher) voidsetJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate) voidsetProperties(CompletionCleanupProperties properties) voidsetRepository(SandboxRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository) voidsetSandboxService(SandboxService<Sandbox> sandboxService)  
- 
Constructor Details
- 
JpaCustomizedSandboxRepository
public JpaCustomizedSandboxRepository() 
 - 
 - 
Method Details
- 
setRepository
@Autowired @Lazy public void setRepository(SandboxRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository)  - 
createIfDoesNotExist
@Nullable public D createIfDoesNotExist(@NonNull D sandbox, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedSandboxRepositoryPerforms an atomic upsert, only creating the given sandbox if not already present.This differs from the normal save/create in that whether or not a new entity should be created is based on the
Sandbox.getId()contextId} rather than the data-store ID.- Specified by:
 createIfDoesNotExistin interfaceCustomizedSandboxRepository<D extends JpaSandbox>- Parameters:
 sandbox- the sandbox to createcontextInfo- context surrounding multitenant sate- Returns:
 - the sandbox if it was newly created, 
nullotherwise 
 - 
cleanupBatch
Description copied from interface:CustomizedSandboxRepositoryCheck a bag of Sandbox entities for completion state. If complete, archive. Only applies to temporary sandboxes. SeeSandbox.isTemporarySandbox().- Specified by:
 cleanupBatchin interfaceCustomizedSandboxRepository<D extends JpaSandbox>- Parameters:
 startingId- The Sandbox entity id that represents the start of the collection of entities to check. The size of the collection is determined byCompletionCleanupProperties.getCleanupBatchSize().source- The specific cleanup service instance making the call- Returns:
 - The last Sandbox entity id used as part of the executed batch. This value is
         interesting to provide as the 
startingIdfor subsequent calls to this method when performing a paged style execution approach. May be null if no values were found, or if fewer than the configured batch size were found. 
 - 
setJdbcTemplate
@Autowired @Qualifier("summaryCompletionJdbcTemplate") public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)  - 
setProperties
 - 
setSandboxService
 - 
setEventPublisher
@Autowired public void setEventPublisher(@Nullable org.springframework.context.ApplicationEventPublisher eventPublisher)  
 -