net.aditsu.depeche
public abstract class BaseQuery extends AbstractList<Record> implements IQuery
| Constructor and Description |
|---|
BaseQuery() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearData()
Clears the cached results, so the SELECT query will run again when needed
|
Record |
get(int index) |
List<Serializable> |
getColumn(int x)
Returns a lazy list of the values returned by this SELECT query in a given column
|
<T extends Serializable> |
getColumn(int x,
Class<T> cl)
Returns a lazy list of the values returned by this SELECT query in a given column,
using a class to cast the values to the correct type
|
List<Serializable> |
getColumn(String name)
Returns a list of the values returned by this SELECT query in a given column
|
<T extends Serializable> |
getColumn(String name,
Class<T> cl)
Returns a list of the values returned by this SELECT query in a given column,
using a class to cast the values to the correct type
|
ColumnInfo |
getColumnInfo()
Returns the column information for this SELECT query's results
|
LocalQuery |
getLocalQuery()
Returns a LocalQuery that uses the records selected by this query
|
Record |
getOneRecord()
Runs this query as a SELECT (if needed) and returns a single record;
it throws an exception if the number of results is not 1
|
Record |
getRecord()
Runs this query as a SELECT (if needed) and returns a single record, or null if there are no results;
it throws an exception if there are multiple results
|
boolean |
hasRun()
Returns true if this query was already executed as a SELECT (and the results cached)
|
abstract BaseQuery |
select()
Runs this query as a SELECT (and caches the results)
|
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subListpublic abstract BaseQuery select()
IQuerypublic boolean hasRun()
IQuerypublic Record get(int index)
public int size()
size in interface Collection<Record>size in interface List<Record>size in class AbstractCollection<Record>public void clearData()
IQuerypublic ColumnInfo getColumnInfo()
IQuerygetColumnInfo in interface IQuerypublic Record getOneRecord()
IQuerygetOneRecord in interface IQuerypublic Record getRecord()
IQuerypublic List<Serializable> getColumn(int x)
IQuerypublic List<Serializable> getColumn(String name)
IQuerypublic <T extends Serializable> List<T> getColumn(int x, Class<T> cl)
IQuerypublic <T extends Serializable> List<T> getColumn(String name, Class<T> cl)
IQuerypublic LocalQuery getLocalQuery()
IQuerygetLocalQuery in interface IQuery