org.broadleafcommerce.common.sandbox
Class DefaultSandBoxHelper

java.lang.Object
  extended by org.broadleafcommerce.common.sandbox.DefaultSandBoxHelper
All Implemented Interfaces:
SandBoxHelper

@Component(value="blSandBoxHelper")
public class DefaultSandBoxHelper
extends Object
implements SandBoxHelper

Author:
Jeff Fischer

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.broadleafcommerce.common.sandbox.SandBoxHelper
SandBoxHelper.QueryHints
 
Constructor Summary
DefaultSandBoxHelper()
           
 
Method Summary
 void archiveObject(Object start, javax.persistence.EntityManager em)
           
 Long getOriginalId(javax.persistence.EntityManager em, Class<?> type, Long id)
           
 String[] getSandBoxDiscriminatorFieldList()
           
 Long getSandBoxVersionId(javax.persistence.EntityManager entityManager, Class<?> linkedObjectType, Long requestedParent)
           
 boolean isPromote()
           
 boolean isReject()
           
 boolean isSandBoxable(String className)
           
 List<Long> mergeCloneIds(javax.persistence.EntityManager em, Class<?> type, Long... originalIds)
           
 void optionallyIncludeDeletedItemsInQueriesAndCollections(Runnable runnable, boolean includeDeleted)
           
 void setupSandBoxState(Object clone, javax.persistence.EntityManager em)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSandBoxHelper

public DefaultSandBoxHelper()
Method Detail

getSandBoxVersionId

public Long getSandBoxVersionId(javax.persistence.EntityManager entityManager,
                                Class<?> linkedObjectType,
                                Long requestedParent)
Specified by:
getSandBoxVersionId in interface SandBoxHelper

mergeCloneIds

public List<Long> mergeCloneIds(javax.persistence.EntityManager em,
                                Class<?> type,
                                Long... originalIds)
Specified by:
mergeCloneIds in interface SandBoxHelper

getOriginalId

public Long getOriginalId(javax.persistence.EntityManager em,
                          Class<?> type,
                          Long id)
Specified by:
getOriginalId in interface SandBoxHelper

setupSandBoxState

public void setupSandBoxState(Object clone,
                              javax.persistence.EntityManager em)
Specified by:
setupSandBoxState in interface SandBoxHelper

archiveObject

public void archiveObject(Object start,
                          javax.persistence.EntityManager em)
Specified by:
archiveObject in interface SandBoxHelper

getSandBoxDiscriminatorFieldList

public String[] getSandBoxDiscriminatorFieldList()
Specified by:
getSandBoxDiscriminatorFieldList in interface SandBoxHelper

isSandBoxable

public boolean isSandBoxable(String className)
Specified by:
isSandBoxable in interface SandBoxHelper

isPromote

public boolean isPromote()
Specified by:
isPromote in interface SandBoxHelper

isReject

public boolean isReject()
Specified by:
isReject in interface SandBoxHelper

optionallyIncludeDeletedItemsInQueriesAndCollections

public void optionallyIncludeDeletedItemsInQueriesAndCollections(Runnable runnable,
                                                                 boolean includeDeleted)
Specified by:
optionallyIncludeDeletedItemsInQueriesAndCollections in interface SandBoxHelper


Copyright © 2013. All Rights Reserved.