public interface SiteService
Most of the methods below return a Site
which is not attached to a Hibernate session (which is what is referred
to as 'non-persistent'). While this prevents LazyInitializationExceptions that might occur if there is not continually a
Hibernate session, this also means that while the results of these will return you an instance, you might need to
look the entity back up from the database to refresh it.
Note also that when resolving sites (via the BroadleafSiteResolver
) the usual case is to return a non-persistent
version not attached to a Hibernate session.
Modifier and Type | Method and Description |
---|---|
Catalog |
createCatalog()
Creates an instance of
Catalog . |
Site |
createSite()
Creates an instance of Site.
|
SiteCatalogXref |
createSiteCatalog()
Creates an instance of
SiteCatalogXref . |
List<Site> |
findAllActiveSites()
Deprecated.
use
findAllNonPersistentActiveSites() instead |
List<Catalog> |
findAllCatalogs()
Finds all catalogs
|
List<Site> |
findAllNonPersistentActiveSites()
Returns all of the active sites in the system and does not attach them to a Hibernate session
|
List<Site> |
findAllPersistentActiveSites()
Returns all of the active sites in the system that are still attached to a Hibernate session
|
Catalog |
findCatalogById(Long id)
Finds a catalog by its id.
|
Catalog |
findCatalogByName(String name) |
Site |
retrieveDefaultSite()
Deprecated.
use
retrieveNonPersistentDefaultSite() instead |
Site |
retrieveNonPersistentDefaultSite()
Retrieves the non-persistent version of the default site
|
Site |
retrieveNonPersistentSiteByDomainName(String domain)
Finds a site by the given domain name and returns a non-persistent version
|
Site |
retrieveNonPersistentSiteById(Long id)
Retrieves a site by its primary key disconnected from a Hibernate session
|
Site |
retrieveNonPersistentSiteByIdentifer(String identifier)
Finds a site by its
Site.getSiteIdentifierValue() and return an entity that is not attached to the
Hibernate session |
Site |
retrievePersistentDefaultSite()
Retrieves the default site attached to a Hibernate session
|
Site |
retrievePersistentSiteByDomainName(String domain)
Finds a site by the domain name which is still attached to a Hibernate session
|
Site |
retrievePersistentSiteById(Long id)
Retrieves a site by its primary key whose return value is still attached to a Hibernate session
|
Site |
retrievePersistentSiteByIdentifier(String identifier)
Finds a site by its
Site.getSiteIdentifierValue() |
Site |
retrieveSiteByDomainName(String domain)
Deprecated.
use
retrieveNonPersistentSiteByDomainName(String) instead |
Site |
retrieveSiteById(Long id)
Deprecated.
use
retrieveNonPersistentSiteById(Long) instead |
Catalog |
save(Catalog catalog)
Saves the given catalog and returns the merged instance
|
Site |
save(Site site)
Deprecated.
use
saveAndReturnNonPersisted(Site) instead |
Site |
saveAndReturnNonPersisted(Site site)
Save updates to a site and returns a non-persistent instance
|
Site |
saveAndReturnPersisted(Site site)
Save updates to a site and return the persistent instance attached to a Hibernate session
|
Site createSite()
SiteDao.create()
.@Deprecated Site retrieveSiteById(Long id)
retrieveNonPersistentSiteById(Long)
insteadid
- Site retrieveNonPersistentSiteById(Long id)
Site retrievePersistentSiteById(Long id)
@Deprecated Site retrieveSiteByDomainName(String domain)
retrieveNonPersistentSiteByDomainName(String)
insteadid
- Site retrieveNonPersistentSiteByDomainName(String domain)
Site retrievePersistentSiteByDomainName(String domain)
domain
- Site retrieveNonPersistentSiteByIdentifer(String identifier)
Site.getSiteIdentifierValue()
and return an entity that is not attached to the
Hibernate sessionidentifier
- the Site.getSiteIdentifierValue()
to look forSite retrievePersistentSiteByIdentifier(String identifier)
Site.getSiteIdentifierValue()
identifier
- the Site.getSiteIdentifierValue()
to look for@Deprecated Site save(Site site)
saveAndReturnNonPersisted(Site)
insteadid
- Site saveAndReturnNonPersisted(Site site)
site
- Site saveAndReturnPersisted(Site site)
site
- @Deprecated Site retrieveDefaultSite()
retrieveNonPersistentDefaultSite()
insteadid
- SiteDaoImpl}
Site retrieveNonPersistentDefaultSite()
Site retrievePersistentDefaultSite()
@Deprecated List<Site> findAllActiveSites()
findAllNonPersistentActiveSites()
insteadList<Site> findAllNonPersistentActiveSites()
List<Site> findAllPersistentActiveSites()
Catalog findCatalogById(Long id)
id
- Catalog createCatalog()
Catalog
. Default implementation delegates to SiteDao.createCatalog()
.SiteCatalogXref createSiteCatalog()
SiteCatalogXref
. Default implementation delegates to SiteDao.createSiteCatalog()
Catalog save(Catalog catalog)
catalog
- Copyright © 2022. All rights reserved.