|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - This is a parameterized interface.public interface Repository<T extends Identifiable>
Interface that all repositories must adhere to. It provides basic repository functionality.
| Method Summary | |
|---|---|
void |
add(T item)
Adds an Identifiable to the repository. |
void |
addAll(Collection<T> items)
Adds a collection of Identifiables to the repository. |
List<T> |
findByField(String fieldName,
Collection<? extends Object> values)
|
T |
get(Long id)
Retrieves an Identifiable from the repository according to an id or null in case no Identifiable
with the given id is not found |
List<T> |
getAll()
Obtains a list containing all the Identifiables in the repository |
List<T> |
getAll(List<Long> ids)
|
Long |
getSize()
|
T |
getUniqueInstance()
|
Boolean |
isEmpty()
|
void |
remove(Long id)
Removes the Identifiable with the id |
void |
remove(T item)
Removes an Identifiable from the repository. |
void |
removeAll()
Removes all the Identifiables that the repository has. |
void |
removeAll(Collection<T> items)
|
void |
replaceAll(Collection<T> items)
Replaces all the Identifiables in the repository by new ones. |
void |
update(T item)
Update an Identifiable on the repository. |
| Method Detail |
|---|
T get(Long id)
Identifiable from the repository according to an id or null in case no Identifiable
with the given id is not found
id - the id for the Identifiable to retrieve
Identifiable retrieved.void add(T item)
Identifiable to the repository.
item - The Identifiable to add.void addAll(Collection<T> items)
Identifiables to the repository.
items - The Identifiables to add.void update(T item)
Identifiable on the repository.
item - The Identifiable to update.void remove(T item)
Identifiable from the repository.
item - The Identifiable to removevoid removeAll()
Identifiables that the repository has.
void removeAll(Collection<T> items)
List<T> findByField(String fieldName,
Collection<? extends Object> values)
fieldName - values -
List<T> getAll()
Identifiables in the repository
IdentifiablesList<T> getAll(List<Long> ids)
ids -
void remove(Long id)
Identifiable with the id
id - The Identifiable id to be removedBoolean isEmpty()
Long getSize()
void replaceAll(Collection<T> items)
Identifiables in the repository by new ones.
items - The new Identifiables to replace the old ones.T getUniqueInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||