public class MultiTenantBasicPersistenceModuleExtensionHandler
extends com.broadleafcommerce.enterprise.workflow.admin.service.module.extension.WorkflowBasicPersistenceModuleExtensionHandler
WorkflowBasicPersistenceModuleExtensionHandler. Generally, this means taking into account catalog and/or
site discriminators into queries related to sort column rebalancing. Also, different behavior is indicated when
the sorting is taking place in a standard site, as opposed to a template site.com.broadleafcommerce.enterprise.workflow.admin.service.module.extension.WorkflowBasicPersistenceModuleExtensionHandler.SequenceValue| Modifier and Type | Field and Description |
|---|---|
protected org.broadleafcommerce.common.util.DeployBehaviorUtil |
deployBehaviorUtil |
protected javax.persistence.EntityManager |
em |
static int |
MT_PRIORITY |
decimalIncrement, extensionManager, sandBoxHelper, sortRebalance, WORKFLOW_PRIORITY, workflowLogger| Constructor and Description |
|---|
MultiTenantBasicPersistenceModuleExtensionHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendMultiTenantInfo(org.broadleafcommerce.openadmin.dto.Entity entity,
org.broadleafcommerce.common.web.BroadleafRequestContext context,
StringBuilder sb)
Add additional WHERE clause values related to catalog, profile or site.
|
protected StringBuilder |
buildRebalanceWhereClause(org.broadleafcommerce.openadmin.dto.Entity entity,
String foreignKeyColumnName,
String foreignKeyColumnValue)
Refine the rebalance WHERE clause to include multitenant related restrictions for catalog, profile and site.
|
protected StringBuilder |
buildShouldRebalanceWhereClause(org.broadleafcommerce.openadmin.dto.Entity entity,
String foreignKeyColumnName,
String foreignKeyColumnValue,
List<Long> up)
Refine the should rebalance WHERE clause to include multitenant related restrictions for catalog, profile and site.
|
protected Class<?> |
getForeignKeyClass(org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey) |
protected Long |
getObjectId(org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey,
org.broadleafcommerce.openadmin.dto.Entity entity) |
protected Object |
getVal(org.broadleafcommerce.openadmin.dto.Entity entity,
org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey,
Class<?> foreignKeyClass) |
void |
init() |
protected boolean |
isCurrentCatalog(Object val,
org.broadleafcommerce.common.web.BroadleafRequestContext context) |
protected boolean |
isCurrentProfile(Object val,
org.broadleafcommerce.common.web.BroadleafRequestContext context) |
protected boolean |
isCurrentSite(Object val,
MultiTenantSite mtSite) |
protected boolean |
useDecimalRebalance(org.broadleafcommerce.openadmin.dto.Entity entity,
org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey)
Determination of whether or not a sort column should use decimal or integer rebalancing is further complicated by
hierarchical data in a multitenant context.
|
protected boolean |
useIntegerRebalance(org.broadleafcommerce.openadmin.dto.Entity entity,
org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey,
org.broadleafcommerce.common.web.BroadleafRequestContext context,
MultiTenantSite mtSite) |
calculateNewSequence, getSequenceValue, nextSequenceVal, rebalanceCollection, rebalanceForAdd, rebalanceForUpdate, shouldRebalancegetPriority, isEnabled, setEnabled, setPrioritypublic static final int MT_PRIORITY
protected javax.persistence.EntityManager em
protected org.broadleafcommerce.common.util.DeployBehaviorUtil deployBehaviorUtil
public MultiTenantBasicPersistenceModuleExtensionHandler()
@PostConstruct public void init()
init in class com.broadleafcommerce.enterprise.workflow.admin.service.module.extension.WorkflowBasicPersistenceModuleExtensionHandlerprotected StringBuilder buildRebalanceWhereClause(org.broadleafcommerce.openadmin.dto.Entity entity, String foreignKeyColumnName, String foreignKeyColumnValue)
buildRebalanceWhereClause in class com.broadleafcommerce.enterprise.workflow.admin.service.module.extension.WorkflowBasicPersistenceModuleExtensionHandlerentity - foreignKeyColumnName - foreignKeyColumnValue - protected StringBuilder buildShouldRebalanceWhereClause(org.broadleafcommerce.openadmin.dto.Entity entity, String foreignKeyColumnName, String foreignKeyColumnValue, List<Long> up)
buildShouldRebalanceWhereClause in class com.broadleafcommerce.enterprise.workflow.admin.service.module.extension.WorkflowBasicPersistenceModuleExtensionHandlerentity - foreignKeyColumnName - foreignKeyColumnValue - up - protected boolean useDecimalRebalance(org.broadleafcommerce.openadmin.dto.Entity entity,
org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey)
useDecimalRebalance in class com.broadleafcommerce.enterprise.workflow.admin.service.module.extension.WorkflowBasicPersistenceModuleExtensionHandlerentity - foreignKey - WorkflowBasicPersistenceModuleExtensionHandler.useDecimalRebalance(Entity, ForeignKey)protected boolean useIntegerRebalance(org.broadleafcommerce.openadmin.dto.Entity entity,
org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey,
org.broadleafcommerce.common.web.BroadleafRequestContext context,
MultiTenantSite mtSite)
protected Class<?> getForeignKeyClass(org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey)
protected Object getVal(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey, Class<?> foreignKeyClass)
protected Long getObjectId(org.broadleafcommerce.openadmin.dto.ForeignKey foreignKey, org.broadleafcommerce.openadmin.dto.Entity entity)
protected boolean isCurrentCatalog(Object val, org.broadleafcommerce.common.web.BroadleafRequestContext context)
protected boolean isCurrentProfile(Object val, org.broadleafcommerce.common.web.BroadleafRequestContext context)
protected boolean isCurrentSite(Object val, MultiTenantSite mtSite)
protected void appendMultiTenantInfo(org.broadleafcommerce.openadmin.dto.Entity entity,
org.broadleafcommerce.common.web.BroadleafRequestContext context,
StringBuilder sb)
entity - context - sb - Copyright © 2020. All rights reserved.