|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.dominate.hibernate.AbstractHibernateRepository<I,T>
it.amattioli.dominate.hibernate.CollectionHibernateRepository<I,T>
public class CollectionHibernateRepository<I extends Serializable,T extends Entity<I>>
| Constructor Summary | |
|---|---|
CollectionHibernateRepository(Collection<T> content)
|
|
| Method Summary | ||
|---|---|---|
void |
fillCollection(Collection<? super T>... toBeFilled)
|
|
void |
fillCollection(Filter criteria,
Collection<? super T>... toBeFilled)
|
|
T |
get(I id)
Retrieve an entity from this repository using its id. |
|
|
getDetailRepository(Collection<E> details)
|
|
boolean |
isRemoveAllowed()
Check if this repository supports object removal. |
|
List<T> |
list()
Retrieves all the objects contained in this repository. |
|
List<T> |
list(Filter criteria)
Retrieves the objects contained in this repository that match the specified filter. |
|
List<T> |
list(Specification<T> spec)
Retrieves the objects contained in this repository that satisfied the given specification. |
|
void |
put(T object)
Add a new entity to this repository. |
|
void |
refresh(I objectId)
If this repository is associated to an external data source (i.e a relational database) this method delete an object from the repository local cache so that a Repository.get(Serializable) will retrieve a fresh
one from the data source. |
|
void |
refresh(T object)
If this repository is associated to an external data source (i.e a relational database) this method delete an object from the repository local cache so that a Repository.get(Serializable) will retrieve a fresh
one from the data source. |
|
void |
remove(I objectId)
Removes an object from this repository. |
|
void |
remove(T object)
Removes an object from this repository. |
|
| Methods inherited from class it.amattioli.dominate.hibernate.AbstractHibernateRepository |
|---|
addOrder, clone, getByPropertyValue, getFirst, getHibernateSession, getHqlOrder, getLast, getOrderProperty, getOrders, getSessionManager, isReverseOrder, removeLastOrder, setFirst, setLast, setOrder, setSessionManager |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionHibernateRepository(Collection<T> content)
| Method Detail |
|---|
public T get(I id)
Repository
id - the id of the entity you want to retrieve.
public void put(T object)
Repository
object - the entity you want to addpublic void refresh(I objectId)
RepositoryRepository.get(Serializable) will retrieve a fresh
one from the data source.
If the repository is not associated to an external data source or it
has no local cache this method will have no effect.
objectId - the id of the object to be refreshedpublic void refresh(T object)
RepositoryRepository.get(Serializable) will retrieve a fresh
one from the data source.
If the repository is not associated to an external data source or it
has no local cache this method will have no effect.
object - the object to be refreshedpublic boolean isRemoveAllowed()
Repository
public void remove(I objectId)
RepositoryRepository.isRemoveAllowed()
objectId - the id of the object to removepublic void remove(T object)
RepositoryRepository.isRemoveAllowed()
object - the object to removepublic List<T> list()
Repository
#setFirst(int)}, {@link #setLast(int)}, {@link #setOrder(String, boolean)}public List<T> list(Filter criteria)
Repository
criteria - the filter to be used
#setFirst(int)}, {@link #setLast(int)}, {@link #setOrder(String, boolean)}public List<T> list(Specification<T> spec)
Repository
spec - the specification that must be satisfied
public <J extends Serializable,E extends Entity<J>> Repository<J,E> getDetailRepository(Collection<E> details)
public void fillCollection(Filter criteria,
Collection<? super T>... toBeFilled)
public void fillCollection(Collection<? super T>... toBeFilled)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||