Class DefaultItemModelSearchService

    • Constructor Detail

      • DefaultItemModelSearchService

        public DefaultItemModelSearchService​(@NotNull
                                             @NotNull ModelService modelService)
        Instantiates the ItemModelSearchService
        Parameters:
        modelService - Service to look up the item
    • Method Detail

      • nonCachingFindByPk

        public <T extends ItemModel> java.util.Optional<T> nonCachingFindByPk​(PK pk)
        Description copied from interface: ItemModelSearchService
        Finds an ItemModel by the given PK. Warning: this method clears the cache before doing the search. This may impact performance.
        Specified by:
        nonCachingFindByPk in interface ItemModelSearchService
        Type Parameters:
        T - Expected type of the item found
        Parameters:
        pk - PK of the item to find
        Returns:
        the ItemModel wrapped in an Optional if found, otherwise Optional.empty()