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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <D extends Trackable>
DreadApplicationOwnedInheritedCatalog(String startingCatalogId, String applicationId)
Find any application owned catalog that inherits from the starting catalog based on the requested application.List<String>
readCatalogChildren(String startingCatalogId)
Find one level deep of child catalogs whoseCatalog.getParents()
includes this catalog.InheritanceLines
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.Long
readLevel(String catalogContextId)
Find the calculated sorting level for the given catalogInheritanceLines
readTopDownCatalogInheritanceGraph(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>
voidupdateAllRelatedEntitiesOfType(String contextId, Map<String,Object> updateValues, Class<D> type)
Given a catalogcontextId
, update all entity instances of the domaintype
belonging to the catalog to have the updated values.
-
-
-
Method Detail
-
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:
CatalogChangeHelper.sync(Trackable, Class, boolean)
-
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:
CatalogChangeHelper.sync(Trackable, Class, boolean)
-
readTopDownCatalogInheritanceGraph
InheritanceLines readTopDownCatalogInheritanceGraph(@NonNull List<String> catalogRefs)
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
List<String> readCatalogChildren(@NonNull String startingCatalogId)
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.
-
-