org.ektorp.support
Interface GenericRepository<T>
- Type Parameters:
T -
- All Known Implementing Classes:
- CouchDbRepositorySupport
public interface GenericRepository<T>
- Author:
- henrik lundgren
|
Method Summary |
void |
add(T entity)
|
boolean |
contains(java.lang.String docId)
|
T |
get(java.lang.String id)
|
T |
get(java.lang.String id,
java.lang.String rev)
|
java.util.List<T> |
getAll()
|
void |
remove(T entity)
|
void |
update(T entity)
|
add
void add(T entity)
- Parameters:
entity -
- Throws:
UpdateConflictException - if there was an update conflict.
update
void update(T entity)
- Parameters:
entity -
- Throws:
UpdateConflictException - if there was an update conflict.
remove
void remove(T entity)
- Parameters:
entity -
- Throws:
UpdateConflictException - if there was an update conflict.
get
T get(java.lang.String id)
- Parameters:
id -
- Returns:
-
- Throws:
DocumentNotFoundException - if the document was not found.
get
T get(java.lang.String id,
java.lang.String rev)
- Parameters:
id - rev -
- Returns:
-
- Throws:
DocumentNotFoundException - if the document was not found.
getAll
java.util.List<T> getAll()
- Returns:
- empty list if nothing was found.
contains
boolean contains(java.lang.String docId)
- Parameters:
docId -
- Returns:
- true if a document with the specified id exists in the database.
Copyright © 2011. All Rights Reserved.