net.aditsu.depeche
public class LocalQuery extends BaseQuery implements DynamicQuery
List of Records (such as another query) rather than a database| Constructor and Description |
|---|
LocalQuery(List<Record> l) |
| Modifier and Type | Method and Description |
|---|---|
LocalQuery |
copy()
Returns a copy of this query, without any cached results
|
int |
count()
Counts the records matched by this query, without necessarily selecting them,
and returns the result as an int (for more than 2 billion records use
DynamicQuery.longCount()) |
LocalQuery |
desc(List<String> fields)
Adds the given fields (descending) to the list of fields to sort by, and returns a new query
|
LocalQuery |
desc(String... fields)
Adds the given fields (descending) to the list of fields to sort by, and returns a new query
|
LocalQuery |
distinct()
Adds the "DISTINCT" clause to the query, and returns a new query
|
LocalQuery |
exclude(Condition cond)
Adds the negation of a condition to this query (using "AND" with an existing condition)
and returns a new query
|
LocalQuery |
exclude(KeyInfo keyInfo,
Key key)
Adds a condition to NOT match a list of columns with a list of values, and returns a new query
|
LocalQuery |
exclude(String field,
Serializable value)
Adds a condition that the column with the given name should NOT have the given value, and returns a new query
|
LocalQuery |
exclude(String field,
String op,
Serializable value)
Adds a negative "name operator value" condition and returns a new query
|
LocalQuery |
excludeIn(String field,
Collection<? extends Serializable> values)
Adds a negative "name IN (values)" condition and returns a new query
|
LocalQuery |
field(String field,
String alias)
Adds "field AS alias" to the list of fields to select in each record, and returns a new query
|
LocalQuery |
fields(List<String> fields)
Adds the given fields to the list of fields to select in each record, and returns a new query
|
LocalQuery |
fields(List<String> fields,
List<String> aliases)
Adds the given fields with the given aliases to the list of fields to select in each record, and returns a new query
|
LocalQuery |
fields(String... fields)
Adds the given fields to the list of fields to select in each record, and returns a new query
|
LocalQuery |
filter(Condition cond)
Adds a condition to this query (using "AND" with an existing condition) and returns a new query
|
LocalQuery |
filter(KeyInfo keyInfo,
Key key)
Adds a condition to match a list of columns with a list of values, and returns a new query
|
LocalQuery |
filter(Record rec,
KeyInfo cols)
Adds a condition to match a list of columns with a list of corresponding values from a Record,
and returns a new query
|
LocalQuery |
filter(Record rec,
String... cols)
Adds a condition to match a list of columns with a list of corresponding values from a Record,
and returns a new query
|
LocalQuery |
filter(String field,
Serializable value)
Adds a condition that the column with the given name should have the given value, and returns a new query
|
LocalQuery |
filter(String field,
String op,
Serializable value)
Adds a "name operator value" condition and returns a new query
|
LocalQuery |
filterIn(String field,
Collection<? extends Serializable> values)
Adds a "name IN (values)" condition and returns a new query
|
LocalQuery |
limit(long x)
Limits the number of records to select and returns a new query
|
long |
longCount()
Counts the records matched by this query, without necessarily selecting them,
and returns the result as a long
|
LocalQuery |
offset(long x)
Sets the offset of the first record to select (i.e.
|
LocalQuery |
order(List<String> fields)
Adds the given fields (ascending) to the list of fields to sort by, and returns a new query
|
LocalQuery |
order(String... fields)
Adds the given fields (ascending) to the list of fields to sort by, and returns a new query
|
LocalQuery |
select()
Runs this query as a SELECT (and caches the results)
|
clearData, get, getColumn, getColumn, getColumn, getColumn, getColumnInfo, getLocalQuery, getOneRecord, getRecord, hasRun, sizeadd, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclearData, getColumn, getColumn, getColumn, getColumn, getColumnInfo, getLocalQuery, getOneRecord, getRecord, hasRunpublic LocalQuery copy()
DynamicQuerycopy in interface DynamicQuerypublic LocalQuery filter(Condition cond)
DynamicQueryfilter in interface DynamicQuerypublic LocalQuery exclude(Condition cond)
DynamicQueryexclude in interface DynamicQuerypublic LocalQuery filter(String field, String op, Serializable value)
DynamicQueryfilter in interface DynamicQuerypublic LocalQuery filter(String field, Serializable value)
DynamicQueryfilter in interface DynamicQuerypublic LocalQuery filterIn(String field, Collection<? extends Serializable> values)
DynamicQueryfilterIn in interface DynamicQuerypublic LocalQuery exclude(String field, String op, Serializable value)
DynamicQueryexclude in interface DynamicQuerypublic LocalQuery exclude(String field, Serializable value)
DynamicQueryexclude in interface DynamicQuerypublic LocalQuery excludeIn(String field, Collection<? extends Serializable> values)
DynamicQueryexcludeIn in interface DynamicQuerypublic LocalQuery filter(KeyInfo keyInfo, Key key)
DynamicQueryfilter in interface DynamicQuerypublic LocalQuery filter(Record rec, KeyInfo cols)
DynamicQueryfilter in interface DynamicQuerypublic LocalQuery filter(Record rec, String... cols)
DynamicQueryfilter in interface DynamicQuerypublic LocalQuery exclude(KeyInfo keyInfo, Key key)
DynamicQueryexclude in interface DynamicQuerypublic LocalQuery select()
IQuerypublic LocalQuery limit(long x)
DynamicQuerylimit in interface DynamicQuerypublic LocalQuery offset(long x)
DynamicQueryoffset in interface DynamicQuerypublic LocalQuery order(String... fields)
DynamicQueryorder in interface DynamicQuerypublic LocalQuery order(List<String> fields)
DynamicQueryorder in interface DynamicQuerypublic LocalQuery desc(String... fields)
DynamicQuerydesc in interface DynamicQuerypublic LocalQuery desc(List<String> fields)
DynamicQuerydesc in interface DynamicQuerypublic LocalQuery fields(String... fields)
DynamicQueryfields in interface DynamicQuerypublic LocalQuery fields(List<String> fields)
DynamicQueryfields in interface DynamicQuerypublic LocalQuery field(String field, String alias)
DynamicQueryfield in interface DynamicQuerypublic LocalQuery fields(List<String> fields, List<String> aliases)
DynamicQueryfields in interface DynamicQuerypublic LocalQuery distinct()
DynamicQuerydistinct in interface DynamicQuerypublic int count()
DynamicQueryDynamicQuery.longCount())count in interface DynamicQuerypublic long longCount()
DynamicQuerylongCount in interface DynamicQuery