Interface ListCrudRepository<T,ID>

All Superinterfaces:
CrudRepository<T,ID>, Repository<T,ID>

@NoRepositoryBean public interface ListCrudRepository<T,ID> extends CrudRepository<T,ID>
Interface for generic CRUD operations on a repository for a specific type. This an extension to CrudRepository returning List instead of Iterable where applicable.
Jens Schauder
See Also:
  • Method Details

    • saveAll

      <S extends T> List<S> saveAll(Iterable<S> entities)
      Saves all given entities.
      Specified by:
      saveAll in interface CrudRepository<T,ID>
      entities - must not be null nor must it contain null.
      the saved entities; will never be null. The returned Iterable will have the same size as the Iterable passed as an argument.
      IllegalArgumentException - in case the given entities or one of its entities is null.
      OptimisticLockingFailureException - when at least one entity uses optimistic locking and has a version attribute with a different value from that found in the persistence store. Also thrown if at least one entity is assumed to be present but does not exist in the database.
    • findAll

      List<T> findAll()
      Returns all instances of the type.
      Specified by:
      findAll in interface CrudRepository<T,ID>
      all entities
    • findAllById

      List<T> findAllById(Iterable<ID> ids)
      Returns all instances of the type T with the given IDs.

      If some or all ids are not found, no entities are returned for these IDs.

      Note that the order of elements in the result is not guaranteed.

      Specified by:
      findAllById in interface CrudRepository<T,ID>
      ids - must not be null nor contain any null values.
      guaranteed to be not null. The size can be equal or less than the number of given ids.
      IllegalArgumentException - in case the given ids or one of its items is null.