public class QueryResultList<T>
extends java.util.AbstractList<T>
implements Sortable, java.io.Serializable
A repository may (but is not required to) return a QueryResultList when the
find method is called. Only the size of the list is calculated when a
QueryResultList is calculated. Every element read with a get(index) is loaded
from the backend.
If you know you will use many elements of the List use the subList method to
load a complete range of elements in a unmodifiable List. This is how such
lists are used by the Frontend
A QueryResultList is unmodifiable. Every call of a add or remove method will
result in a UnsupportedOperationException.
If the database has changed before you call a get or subList method you may
get null as element or a unexpected reduced sub list. You don't
get an exception in that cases.
QueryResultList is Sortable. The order of the elements can be changed at any
time. The size of the List is not recalculated and the sub List created
before a sort are not updated. Of course this is mainly used by a Frontend.
Business methods should execute a new find on the Repository / Backend.