Interface CustomizedCommonCatalogRepository
- All Known Subinterfaces:
CommonCatalogRepository<D>
public interface CustomizedCommonCatalogRepository
Advanced functionality related to catalog maintenance and maintenance of catalog discriminated
entities.
- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescription<D extends Trackable>
DreadApplicationOwnedInheritedCatalog
(String startingCatalogId, String applicationId) Find any application owned catalog that inherits from the starting catalog based on the requested application.readCatalogChildren
(String startingCatalogId) Find one level deep of child catalogs whoseCatalog.getParents()
includes this catalog.readCatalogInheritanceGraph
(List<org.springframework.data.util.Pair<String, String>> catalogRefs) Given a list of catalog ids, find all parent catalog ids up the inheritance graph.Find the calculated sorting level for the given catalogreadTopDownCatalogInheritanceGraph
(List<String> catalogRefs) Given a list of catalog ids, find all child catalog ids down the inheritance graph.<D extends Trackable>
voidupdateAllChildRelatedEntitiesOfType
(String contextId, Map<String, Object> updateValues, Class<D> type) Given a catalogcontextId
, update all entity instances of the domaintype
whose related catalog has its parent catalog set to the givencontextId
.<D extends Trackable>
voidGiven a catalogcontextId
, update all entity instances of the domaintype
belonging to the catalog to have the updated values.
-
Method Details
-
updateAllRelatedEntitiesOfType
@Transactional <D extends Trackable> void updateAllRelatedEntitiesOfType(@NonNull String contextId, @NonNull Map<String, Object> updateValues, @NonNull Class<D> type) Given a catalogcontextId
, update all entity instances of the domaintype
belonging to the catalog to have the updated values.- Type Parameters:
D
- The catalog discriminated domain type- Parameters:
contextId
- The id for theCatalog
updateValues
- a map of fields to update with the new values they should havetype
- The catalog discriminated domain class type.- See Also:
-
updateAllChildRelatedEntitiesOfType
@Transactional <D extends Trackable> void updateAllChildRelatedEntitiesOfType(@NonNull String contextId, @NonNull Map<String, Object> updateValues, @NonNull Class<D> type) Given a catalogcontextId
, update all entity instances of the domaintype
whose related catalog has its parent catalog set to the givencontextId
.- Type Parameters:
D
- The catalog discriminated domain type- Parameters:
contextId
- The id for theCatalog
updateValues
- a map of fields to update with the new values they should havetype
- The catalog discriminated domain class type.- See Also:
-
readTopDownCatalogInheritanceGraph
Given a list of catalog ids, find all child catalog ids down the inheritance graph. This should demonstrate the full tree of catalogs down to leaf nodes.- Parameters:
catalogRefs
- A list of catalog ids.- Returns:
- All parent catalog ids up the inheritance graph
-
readCatalogInheritanceGraph
InheritanceLines readCatalogInheritanceGraph(@NonNull List<org.springframework.data.util.Pair<String, String>> catalogRefs) Given a list of catalog ids, find all parent catalog ids up the inheritance graph. This should demonstrate the full tree of catalogs up to the originating root nodes.- Parameters:
catalogRefs
- A list of catalog ids and immediate assigned mutabilities (seeMutabilityType
).- Returns:
- All parent catalog ids up the inheritance graph
-
readCatalogChildren
Find one level deep of child catalogs whoseCatalog.getParents()
includes this catalog.- Parameters:
startingCatalogId
- The parent catalog whose immediate children will be returned- Returns:
- The immediate children
-
readApplicationOwnedInheritedCatalog
@Nullable <D extends Trackable> D readApplicationOwnedInheritedCatalog(@NonNull String startingCatalogId, @NonNull String applicationId) Find any application owned catalog that inherits from the starting catalog based on the requested application.- Parameters:
startingCatalogId
- The ancestor catalog from which to check inheritanceapplicationId
- The id of the application that should own the inherited catalog- Returns:
- The application owned catalog. Null if not found.
-
readLevel
Find the calculated sorting level for the given catalog- Parameters:
catalogContextId
- The contextId for the catalog- Returns:
- The sorting level
-