public interface MultiTenantDao
| Modifier and Type | Method and Description |
|---|---|
void |
completeParameterizedAssociatedCatalogSubQuery(javax.persistence.Query query,
org.broadleafcommerce.common.site.domain.Site currentSite)
Set the currentSite parameter on the catalog sub query.
|
Long |
countAllManagedSites(Long parentSiteId) |
List<org.broadleafcommerce.common.site.domain.Catalog> |
findAllCatalogs() |
List<org.broadleafcommerce.common.site.domain.Catalog> |
findAllCatalogs(boolean excludeArchived) |
List<org.broadleafcommerce.common.site.domain.Site> |
findAllManagedProfiles(Long profileId)
Find all standard sites whose base profile matches the passed in id
|
List<org.broadleafcommerce.common.site.domain.Site> |
findAllManagedSites(Long parentSiteId)
Find any standard sites whose parent matches the passed in id
|
List<org.broadleafcommerce.common.site.domain.Site> |
findAllManagedSites(Long parentSiteId,
Integer limit,
Integer offset)
Paged version of
findAllManagedSites(Long) |
List<org.broadleafcommerce.common.site.domain.Catalog> |
findAllStandardSiteCatalogs() |
List<MultiTenantSite> |
findAllStandardSites()
Finds all standard sites
|
List<org.broadleafcommerce.common.site.domain.SiteCatalogXref> |
findCatalogAssociationsById(Long siteId,
Long catalogId)
Find the association with the specific catalog id
|
List<org.broadleafcommerce.common.site.domain.SiteCatalogXref> |
findCatalogAssociationsByName(Long siteId,
String catalogName)
Find the association with the specific catalog name
|
org.broadleafcommerce.common.site.domain.Catalog |
findCatalogById(Long id)
Find
Catalog by Id |
List<CatalogDerivedCatalogXref> |
findCatalogXrefsForCatalog(org.broadleafcommerce.common.site.domain.Catalog catalog)
Find
CatalogDerivedCatalogXref for the passed in catalog. |
List<org.broadleafcommerce.common.site.domain.SiteCatalogXref> |
findCatalogXrefsForSite(org.broadleafcommerce.common.site.domain.Site site)
Find
SiteCatalogXref for the passed in site. |
List<Long> |
findDefaultCatalogIdsByAssignedCatalogId(Long assignedCatalogId)
Find the default catalogs for sites that are assigned the given catalog.
|
List<org.broadleafcommerce.common.site.domain.Site> |
findDerivedSitesFromCatalogs(List<Long> parentCatalogs)
Find
Site instances whose catalogs have this catalog
as a parent. |
List<org.broadleafcommerce.common.site.domain.Site> |
findDerivedSitesFromProfiles(List<Long> parentProfiles)
Find
Site instances whose profile have this profile
as a parent. |
List<MultiTenantSite> |
findManagedProfileSites(Long parentSiteId)
Find any profile sites whose parent matches the passed in id
|
org.broadleafcommerce.common.site.domain.Catalog |
findOwnedCatalog(Long siteId,
Long catalogId)
If the candidate catalog is owned by the current site, return it.
|
List<Long> |
findSiteCatalogIdsByAssignedCatalogId(Long assignedCatalogId)
Find the catalogs that hold site overrides or synced copies for this assigned catalog's id.
|
org.broadleafcommerce.common.site.domain.SiteCatalogXref |
findSiteCatalogXref(Long id)
Find the xref, if exists, for the given site and catalog
|
List<MultiTenantSite> |
findStandardSitesForAssignedCatalog(Long assignedCatalogId)
Find any standard sites who have the designated catalog assigned
|
javax.persistence.criteria.Subquery<Long> |
getAssociatedCatalogSubQuery(org.broadleafcommerce.common.site.domain.Site currentSite,
javax.persistence.criteria.CriteriaBuilder builder,
javax.persistence.criteria.CriteriaQuery criteria)
Provide a criteria builder subquery (useful for placing in an IN clause) that will retrieve the distinct list of
catalogs assigned to a site.
|
javax.persistence.criteria.Subquery<Long> |
getAssociatedSiteSubQuery(org.broadleafcommerce.common.site.domain.Site currentSite,
javax.persistence.criteria.CriteriaBuilder builder,
javax.persistence.criteria.CriteriaQuery criteria,
boolean alwaysAllowAdminStatus)
Provide a criteria builder subquery (useful for placing in an IN clause) that will retrieve the distinct list of
owning sites for all catalogs assigned to a site.
|
javax.persistence.criteria.Subquery<Long> |
getOwnedCatalogsSubQuery(org.broadleafcommerce.common.site.domain.Site currentSite,
javax.persistence.criteria.CriteriaBuilder builder,
javax.persistence.criteria.CriteriaQuery criteria)
Similar to
getAssociatedCatalogSubQuery(Site, CriteriaBuilder, CriteriaQuery) except that this places a further restriction on
only retrieving the associated catalogs that are also owned by the currentSite |
javax.persistence.criteria.Subquery<Long> |
getParameterizedAssociatedCatalogSubQuery(org.broadleafcommerce.common.site.domain.Site currentSite,
javax.persistence.criteria.CriteriaBuilder builder,
javax.persistence.criteria.CriteriaQuery criteria)
Same as
getAssociatedCatalogSubQuery(Site, CriteriaBuilder, CriteriaQuery), except that the subquery
returns uses a parameter for the currentSite. |
org.broadleafcommerce.common.site.domain.Catalog |
getTargetCatalogBasedOnMutability(Long candidateCatalogId,
Long siteId)
Get the current catalog context based on a candidate catalog.
|
Boolean |
isCatalogUsedByChildSites(Long parentSiteId,
Long catalogId)
Whether the catalog of the passed in id is assigned to children of the passed in parent site id
|
Boolean |
isMultipleManagedCatalogs(Long siteId)
Determine, in a performant way, whether or not the current site is managing more than one active catalog
|
Boolean |
isMultipleManagedCatalogsEligibleForAdd(Long siteId)
Determine, in a performant way, whether or not the current site is managing more than one active and eligible for
add catalog.
|
CatalogDerivedCatalogXref |
readDerivedCatalogXrefById(Long id)
Finds a given
CatalogDerivedCatalogXref entity by its id |
List<org.broadleafcommerce.common.site.domain.Site> |
retrieveChildrenSitesByParentSiteId(Long id)
Retrieves a list of children sites for the site id passed in
|
CatalogDerivedCatalogXref |
saveDerivedCatalogXref(CatalogDerivedCatalogXref xref)
Persists the given
CatalogDerivedCatalogXref entity to the database. |
List<org.broadleafcommerce.common.site.domain.Site> findDerivedSitesFromCatalogs(List<Long> parentCatalogs)
Site instances whose catalogs have this catalog
as a parent.parentCatalogs - the catalog on which a derived site's catalog is basedList<org.broadleafcommerce.common.site.domain.Site> findDerivedSitesFromProfiles(List<Long> parentProfiles)
Site instances whose profile have this profile
as a parent.parentProfiles - the profile on which a derived site's profile is basedList<MultiTenantSite> findStandardSitesForAssignedCatalog(Long assignedCatalogId)
assignedCatalogId - List<MultiTenantSite> findManagedProfileSites(Long parentSiteId)
parentSiteId - List<org.broadleafcommerce.common.site.domain.Site> findAllManagedSites(Long parentSiteId)
parentSiteId - #findAllManagedSites(Long, Integer, Integer)}List<org.broadleafcommerce.common.site.domain.Site> findAllManagedSites(Long parentSiteId, Integer limit, Integer offset)
findAllManagedSites(Long)parentSiteId - limit - how many results to limitoffset - where to start the result set#findAllManagedSites(Long, Integer, Integer)}List<org.broadleafcommerce.common.site.domain.Site> findAllManagedProfiles(Long profileId)
profileId - Boolean isCatalogUsedByChildSites(Long parentSiteId, Long catalogId)
parentSiteId - catalogId - Boolean isMultipleManagedCatalogs(Long siteId)
siteId - Boolean isMultipleManagedCatalogsEligibleForAdd(Long siteId)
siteId - org.broadleafcommerce.common.site.domain.Catalog findOwnedCatalog(Long siteId, Long catalogId)
siteId - catalogId - org.broadleafcommerce.common.site.domain.Catalog findCatalogById(Long id)
Catalog by Idid - of the catalog to find.List<org.broadleafcommerce.common.site.domain.SiteCatalogXref> findCatalogXrefsForSite(org.broadleafcommerce.common.site.domain.Site site)
SiteCatalogXref for the passed in site.site - List<Long> findSiteCatalogIdsByAssignedCatalogId(Long assignedCatalogId)
assignedCatalogId - usually the id of a TEMPLATE Site-level Catalog.List<Long> findDefaultCatalogIdsByAssignedCatalogId(Long assignedCatalogId)
assignedCatalogId - usually the id of a TEMPLATE Site-level Catalog.List<CatalogDerivedCatalogXref> findCatalogXrefsForCatalog(org.broadleafcommerce.common.site.domain.Catalog catalog)
CatalogDerivedCatalogXref for the passed in catalog.catalog - List<org.broadleafcommerce.common.site.domain.Catalog> findAllStandardSiteCatalogs()
List<org.broadleafcommerce.common.site.domain.Catalog> findAllCatalogs()
List<org.broadleafcommerce.common.site.domain.Catalog> findAllCatalogs(boolean excludeArchived)
CatalogDerivedCatalogXref readDerivedCatalogXrefById(Long id)
CatalogDerivedCatalogXref entity by its idid - CatalogDerivedCatalogXreforg.broadleafcommerce.common.site.domain.SiteCatalogXref findSiteCatalogXref(Long id)
id - CatalogDerivedCatalogXref saveDerivedCatalogXref(CatalogDerivedCatalogXref xref)
CatalogDerivedCatalogXref entity to the database.xref - CatalogDerivedCatalogXrefList<MultiTenantSite> findAllStandardSites()
List<org.broadleafcommerce.common.site.domain.Site> retrieveChildrenSitesByParentSiteId(Long id)
id - javax.persistence.criteria.Subquery<Long> getAssociatedSiteSubQuery(org.broadleafcommerce.common.site.domain.Site currentSite, javax.persistence.criteria.CriteriaBuilder builder, javax.persistence.criteria.CriteriaQuery criteria, boolean alwaysAllowAdminStatus)
currentSite - the site whose assigned catalogs are reviewedbuilder - the CriteriaBuilder from the containing criteria creationcriteria - the CriteriaQuery from the containing criteria creationalwaysAllowAdminStatus - whether or not calls should allow both PENDING and ONLINE catalog associations, regardless of the request context statejavax.persistence.criteria.Subquery<Long> getAssociatedCatalogSubQuery(org.broadleafcommerce.common.site.domain.Site currentSite, javax.persistence.criteria.CriteriaBuilder builder, javax.persistence.criteria.CriteriaQuery criteria)
currentSite - the site whose assigned catalogs are reviewedbuilder - the CriteriaBuilder from the containing criteria creationcriteria - the CriteriaQuery from the containing criteria creationjavax.persistence.criteria.Subquery<Long> getParameterizedAssociatedCatalogSubQuery(org.broadleafcommerce.common.site.domain.Site currentSite, javax.persistence.criteria.CriteriaBuilder builder, javax.persistence.criteria.CriteriaQuery criteria)
getAssociatedCatalogSubQuery(Site, CriteriaBuilder, CriteriaQuery), except that the subquery
returns uses a parameter for the currentSite. The final Query instance should be passed to completeParameterizedAssociatedCatalogSubQuery(Query, Site).currentSite - builder - criteria - void completeParameterizedAssociatedCatalogSubQuery(javax.persistence.Query query,
org.broadleafcommerce.common.site.domain.Site currentSite)
query - currentSite - javax.persistence.criteria.Subquery<Long> getOwnedCatalogsSubQuery(org.broadleafcommerce.common.site.domain.Site currentSite, javax.persistence.criteria.CriteriaBuilder builder, javax.persistence.criteria.CriteriaQuery criteria)
getAssociatedCatalogSubQuery(Site, CriteriaBuilder, CriteriaQuery) except that this places a further restriction on
only retrieving the associated catalogs that are also owned by the currentSitecurrentSite - the site whose assigned catalogs are reviewedbuilder - the CriteriaBuilder from the containing criteria creationcriteria - the CriteriaQuery from the containing criteria creationorg.broadleafcommerce.common.site.domain.Catalog getTargetCatalogBasedOnMutability(Long candidateCatalogId, Long siteId)
candidateCatalogId - the candidate catalog (presumably taken from a catalog discriminated entity)siteId - the current siteList<org.broadleafcommerce.common.site.domain.SiteCatalogXref> findCatalogAssociationsByName(Long siteId, String catalogName)
siteId - catalogName - Copyright © 2020. All rights reserved.