Interface BaseReadOnlyService<O extends Identifiable>

    • Method Detail

      • getElementClass

        Class<? extends O> getElementClass()
      • find

        @Nullable
        @CheckReturnValue
        O find​(O entity)
        Does a search for the entity in the persistent storage
        Parameters:
        entity - the entity to be searched for
        Returns:
        the version of entity retrieved from the persistent storage, if found, otherwise null.
      • load

        Collection<O> load​(Collection<Long> ids)
        Loads objects with given ids.
        Parameters:
        ids - the ids of objects to be loaded.
        Returns:
        collection containing object with given IDs.
      • load

        @Nullable
        O load​(Long id)
        Loads object with given ID.
        Parameters:
        id - the ID of entity to be loaded.
        Returns:
        the entity with matching ID, or null if the entity does not exist or if the passed ID was null
      • loadAll

        Collection<O> loadAll()
        Loads all the entities of specific type.
        Returns:
        collection of all entities currently available in the persistent storage.
      • countAll

        long countAll()