Class POJORepositoryMapImpl<T>

java.lang.Object
info.ejava.assignments.api.houserenters.svc.POJORepositoryMapImpl<T>
Type Parameters:
T - object type
All Implemented Interfaces:
POJORepository<T>, org.springframework.data.repository.CrudRepository<T,String>, org.springframework.data.repository.ListCrudRepository<T,String>, org.springframework.data.repository.ListPagingAndSortingRepository<T,String>, org.springframework.data.repository.PagingAndSortingRepository<T,String>, org.springframework.data.repository.Repository<T,String>
Direct Known Subclasses:
RentersDTORepositoryMapImpl

public class POJORepositoryMapImpl<T> extends Object implements POJORepository<T>
This class implemenets the full Spring Data CRUD Repository interface for a templated object type using a String primary key.
  • Field Details

  • Constructor Details

    • POJORepositoryMapImpl

      public POJORepositoryMapImpl()
  • Method Details

    • nextId

      protected String nextId()
    • save

      public <S extends T> S save(S obj)
      Specified by:
      save in interface org.springframework.data.repository.CrudRepository<T,String>
    • saveAll

      public <S extends T> List<S> saveAll(Iterable<S> entities)
      Specified by:
      saveAll in interface org.springframework.data.repository.CrudRepository<T,String>
      Specified by:
      saveAll in interface org.springframework.data.repository.ListCrudRepository<T,String>
    • findById

      public Optional<T> findById(String id)
      Specified by:
      findById in interface org.springframework.data.repository.CrudRepository<T,String>
    • existsById

      public boolean existsById(String id)
      Specified by:
      existsById in interface org.springframework.data.repository.CrudRepository<T,String>
    • findAll

      public List<T> findAll()
      Specified by:
      findAll in interface org.springframework.data.repository.CrudRepository<T,String>
      Specified by:
      findAll in interface org.springframework.data.repository.ListCrudRepository<T,String>
    • findAllById

      public List<T> findAllById(Iterable<String> strings)
      Specified by:
      findAllById in interface org.springframework.data.repository.CrudRepository<T,String>
      Specified by:
      findAllById in interface org.springframework.data.repository.ListCrudRepository<T,String>
    • findAll

      public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable)
      Specified by:
      findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T,String>
    • findAll

      protected org.springframework.data.domain.Page<T> findAll(Predicate<T> predicate, org.springframework.data.domain.Pageable pageable)
    • findAll

      protected List<T> findAll(Predicate<T> predicate, long offset, long limit)
    • findFirst

      protected Optional<T> findFirst(Predicate<T> predicate)
    • count

      public long count()
      Specified by:
      count in interface org.springframework.data.repository.CrudRepository<T,String>
    • deleteById

      public void deleteById(String id)
      Specified by:
      deleteById in interface org.springframework.data.repository.CrudRepository<T,String>
    • deleteAll

      public void deleteAll()
      Specified by:
      deleteAll in interface org.springframework.data.repository.CrudRepository<T,String>
    • delete

      public void delete(T obj)
      methods to round out the interface
      Specified by:
      delete in interface org.springframework.data.repository.CrudRepository<T,String>
    • deleteAllById

      public void deleteAllById(Iterable<? extends String> ids)
      Specified by:
      deleteAllById in interface org.springframework.data.repository.CrudRepository<T,String>
    • deleteAll

      public void deleteAll(Iterable<? extends T> objects)
      Specified by:
      deleteAll in interface org.springframework.data.repository.CrudRepository<T,String>
    • findAll

      public List<T> findAll(org.springframework.data.domain.Sort sort)
      Specified by:
      findAll in interface org.springframework.data.repository.ListPagingAndSortingRepository<T,String>
      Specified by:
      findAll in interface org.springframework.data.repository.PagingAndSortingRepository<T,String>