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 Details

    • updateAllRelatedEntitiesOfType

      @Transactional <D extends Trackable> void updateAllRelatedEntitiesOfType(@NonNull String contextId, @NonNull Map<String,Object> updateValues, @NonNull Class<D> type)
      Given a catalog contextId, update all entity instances of the domain type belonging to the catalog to have the updated values.
      Type Parameters:
      D - The catalog discriminated domain type
      Parameters:
      contextId - The id for the Catalog
      updateValues - a map of fields to update with the new values they should have
      type - 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 catalog contextId, update all entity instances of the domain type whose related catalog has its parent catalog set to the given contextId.
      Type Parameters:
      D - The catalog discriminated domain type
      Parameters:
      contextId - The id for the Catalog
      updateValues - a map of fields to update with the new values they should have
      type - The catalog discriminated domain class type.
      See Also:
    • 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 (see MutabilityType).
      Returns:
      All parent catalog ids up the inheritance graph
    • readCatalogChildren

      List<String> readCatalogChildren(@NonNull String startingCatalogId)
      Find one level deep of child catalogs whose Catalog.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 inheritance
      applicationId - The id of the application that should own the inherited catalog
      Returns:
      The application owned catalog. Null if not found.
    • readLevel

      Long readLevel(@NonNull String catalogContextId)
      Find the calculated sorting level for the given catalog
      Parameters:
      catalogContextId - The contextId for the catalog
      Returns:
      The sorting level