|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - the entity class related to this controller.K - the type of the field that represents the entity class' primary key.public interface ReadableController<T,K extends Serializable>
Interface that defines a read-only, generic and generified controller for a given entity class.
| Method Summary | |
|---|---|
int |
countAll()
Returns the total number of objects of this class. |
List<T> |
findAll()
Returns the all instances of the related entity class. |
List<T> |
findAll(int firstResult,
int maxResults,
br.com.arsmachina.dao.SortCriterion... sortConstraints)
Returns the all instances of the related entity class, but in a paginated fashion. |
List<T> |
findByExample(T example)
Executes a query by example. |
T |
findById(K id)
Returns the object with a given primary key value. |
List<T> |
findByIds(K... ids)
Returns the objects with some given primary key values. |
T |
reattach(T object)
Reattaches an object to the persistence context, if there is one. |
| Method Detail |
|---|
int countAll()
int.T findById(K id)
id - a K.
T.List<T> findAll()
List of T.List<T> findByIds(K... ids)
ids - a K array.
List of T.List<T> findByExample(T example)
example - a T.
List of T.
List<T> findAll(int firstResult,
int maxResults,
br.com.arsmachina.dao.SortCriterion... sortConstraints)
firstResult - an int with the index of the first object to be returned.
The first object has index 0.maxResults - an int with the maximum number of objects to be returned.sortConstraints - an SortConstraint array used to define how the returned list
will be sorted.
List of T.T reattach(T object)
object - a T.
T.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||