public interface Select<T> extends Query
| Modifier and Type | Method and Description | 
|---|---|
| ResultBatchIterator<T> | batchIterator(ObjectContext context,
             int size)Creates a ResultBatchIterator based on the provided context and batch
 size. | 
| void | iterate(ObjectContext context,
       ResultIteratorCallback<T> callback)Creates a ResultIterator based on the provided context and passes it to a
 callback for processing. | 
| ResultIterator<T> | iterator(ObjectContext context)Creates a ResultIterator based on the provided context. | 
| List<T> | select(ObjectContext context)Selects objects using provided context. | 
| T | selectFirst(ObjectContext context)Selects a single object using provided context. | 
| T | selectOne(ObjectContext context)Selects a single object using provided context. | 
createSQLAction, getDataMap, getMetaData, getName, routeList<T> select(ObjectContext context)
Essentially the inversion of "ObjectContext.select(Select)".
T selectOne(ObjectContext context)
CayenneRuntimeException is thrown.
 Essentially the inversion of "ObjectContext.selectOne(Select)".
T selectFirst(ObjectContext context)
 If it matched more than one object, the first object from the list is
 returned. This makes 'selectFirst' different from
 selectOne(ObjectContext), which would throw in this situation.
 'selectFirst' is useful e.g. when the query is ordered and we only want
 to see the first object (e.g. "most recent news article"), etc.
 
Selecting the first object via "Select.selectFirst(ObjectContext)" is more comprehensible than selecting via "ObjectContext.selectFirst(Select)", because implementations of "Select" set fetch size limit to one.
void iterate(ObjectContext context, ResultIteratorCallback<T> callback)
Essentially the inversion of "ObjectContext.iterate(Select, ResultIteratorCallback)".
ResultIterator<T> iterator(ObjectContext context)
iterate(ObjectContext, ResultIteratorCallback) as an
 alternative.
 Essentially the inversion of "ObjectContext.iterator(Select)".
ResultBatchIterator<T> batchIterator(ObjectContext context, int size)
Copyright © 2001–2023 Apache Cayenne. All rights reserved.