|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbr.com.arsmachina.controller.impl.ReadableControllerImpl<T,K>
T - the entity class related to this controller.K - the type of the field that represents the entity class' primary key.public abstract class ReadableControllerImpl<T,K extends Serializable>
Abstract class that implements the ReadableController interface by delegating all method
calls to a ReadableDAO passed through its constructor.
| Constructor Summary | |
|---|---|
ReadableControllerImpl(br.com.arsmachina.dao.ReadableDAO<T,K> dao)
Single constructor of this class. |
|
| Method Summary | |
|---|---|
int |
countAll()
Invokes dao.countAll() |
List<T> |
findAll()
Invokes dao.findAll() |
List<T> |
findAll(int firstResult,
int maxResults,
br.com.arsmachina.dao.SortCriterion... sortCriteria)
Invokes dao.findAll() |
List<T> |
findByExample(T example)
Invokes dao.findByExample() |
T |
findById(K id)
Invokes dao.findById() |
List<T> |
findByIds(K... ids)
Invokes dao.findById() |
T |
reattach(T object)
Invokes dao.reattach() |
void |
refresh(T object)
Invokes dao.refresh() |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadableControllerImpl(br.com.arsmachina.dao.ReadableDAO<T,K> dao)
dao - a DAO. It cannot be null.| Method Detail |
|---|
public int countAll()
dao.countAll().
- Specified by:
countAll in interface ReadableController<T,K extends Serializable>
- Returns:
- See Also:
ReadableDAO.countAll()
public List<T> findAll()
dao.findAll().
- Specified by:
findAll in interface ReadableController<T,K extends Serializable>
- Returns:
- See Also:
ReadableDAO.findAll()
public List<T> findAll(int firstResult,
int maxResults,
br.com.arsmachina.dao.SortCriterion... sortCriteria)
dao.findAll().
- Specified by:
findAll in interface ReadableController<T,K extends Serializable>
- Parameters:
firstResult - maxResults - sortCriteria -
- Returns:
- See Also:
br.com.arsmachina.dao.ReadableDAO#findAll(int, int, br.com.arsmachina.dao.SortConstraint[])
public List<T> findByIds(K... ids)
dao.findById().
- Specified by:
findByIds in interface ReadableController<T,K extends Serializable>
- Parameters:
ids -
- Returns:
- See Also:
br.com.arsmachina.dao.ReadableDAO#findById(K[])
public List<T> findByExample(T example)
dao.findByExample().
- Specified by:
findByExample in interface ReadableController<T,K extends Serializable>
- Parameters:
example -
- Returns:
- See Also:
ReadableDAO.findByExample(java.lang.Object)
public T findById(K id)
dao.findById().
- Specified by:
findById in interface ReadableController<T,K extends Serializable>
- Parameters:
id -
- Returns:
- See Also:
ReadableDAO.findById(java.io.Serializable)
public void refresh(T object)
dao.refresh().
- Parameters:
object - - See Also:
ReadableDAO.refresh(java.lang.Object)
public T reattach(T object)
dao.reattach().
- Specified by:
reattach in interface ReadableController<T,K extends Serializable>
- Parameters:
object -
- Returns:
- See Also:
ReadableDAO.reattach(java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||