com.tapas.evidence.repository.data
Interface ReadOnlyRepository<T,ID extends Serializable>

All Superinterfaces:
org.springframework.data.repository.Repository<T,ID>
All Known Subinterfaces:
StateRepository
All Known Implementing Classes:
ReadOnlyRepositoryImpl

@NoRepositoryBean
public interface ReadOnlyRepository<T,ID extends Serializable>
extends org.springframework.data.repository.Repository<T,ID>

Since:
1.0.0
Author:
Michal Bocek

Method Summary
 List<T> findAll()
          Find all entities.
 T findById(ID id)
          Find entity by id.
 T read(ID id)
          Read entity by id.
 

Method Detail

read

T read(ID id)
Read entity by id. When entity doesn't exists throw EntityNotFoundException.

Parameters:
id - entity id
Returns:
entity

findById

T findById(ID id)
Find entity by id. When entity doesn't exist return null.

Parameters:
id - entity id
Returns:
entity or null

findAll

List<T> findAll()
Find all entities.

Returns:


Copyright © 2013. All Rights Reserved.