public final class EmptyQuery<S extends Storable> extends AbstractQuery<S>
Query.Controller, Query.Timeout| Constructor and Description |
|---|
EmptyQuery(QueryFactory<S> factory,
OrderingList<S> ordering) |
EmptyQuery(QueryFactory<S> factory,
java.lang.String... orderings) |
EmptyQuery(QueryFactory<S> factory,
java.lang.String ordering) |
| Modifier and Type | Method and Description |
|---|---|
<T extends S> |
after(T start)
Returns a query which fetches results for this query after a given
starting point, which is useful for re-opening a cursor.
|
Query<S> |
and(Filter<S> filter)
Always throws an IllegalStateException.
|
void |
appendTo(java.lang.Appendable app)
Append the string representation of this object to the given Appendable.
|
long |
count()
Always returns zero.
|
long |
count(Query.Controller controller)
Always returns zero.
|
void |
deleteAll()
Does nothing.
|
void |
deleteAll(Query.Controller controller)
Does nothing.
|
void |
deleteOne()
Always throws
PersistNoneException. |
void |
deleteOne(Query.Controller controller)
Always throws
PersistNoneException. |
boolean |
equals(java.lang.Object obj) |
boolean |
exists()
Always returns false.
|
boolean |
exists(Query.Controller controller)
Always returns false.
|
Cursor<S> |
fetch()
Always returns an
EmptyCursor. |
Cursor<S> |
fetch(Query.Controller controller)
Always returns an
EmptyCursor. |
Cursor<S> |
fetchSlice(long from,
java.lang.Long to)
Always returns an
EmptyCursor. |
Cursor<S> |
fetchSlice(long from,
java.lang.Long to,
Query.Controller controller)
Always returns an
EmptyCursor. |
int |
getBlankParameterCount()
Always returns zero.
|
Filter<S> |
getFilter()
Always returns a
ClosedFilter. |
FilterValues<S> |
getFilterValues()
Always returns null.
|
java.lang.Class<S> |
getStorableType()
Returns the specific type of Storable managed by this object.
|
int |
hashCode() |
Query<S> |
not()
Returns a query that fetches everything, possibly in a specified order.
|
Query<S> |
or(Filter<S> filter)
Returns a new query which has another
filter logically "or"ed to this, potentially increasing the amount of
results. |
Query<S> |
orderBy(java.lang.String... properties)
Returns a copy of this query ordered by specific property values.
|
Query<S> |
orderBy(java.lang.String property)
Returns a copy of this query ordered by a specific property value.
|
boolean |
printNative(java.lang.Appendable app,
int indentLevel)
Always returns false.
|
boolean |
printPlan(java.lang.Appendable app,
int indentLevel)
Always returns false.
|
boolean |
tryDeleteOne()
Always returns false.
|
boolean |
tryDeleteOne(Query.Controller controller)
Always returns false.
|
Query<S> |
with(boolean value)
Always throws an IllegalStateException.
|
Query<S> |
with(byte value)
Always throws an IllegalStateException.
|
Query<S> |
with(char value)
Always throws an IllegalStateException.
|
Query<S> |
with(double value)
Always throws an IllegalStateException.
|
Query<S> |
with(float value)
Always throws an IllegalStateException.
|
Query<S> |
with(int value)
Always throws an IllegalStateException.
|
Query<S> |
with(long value)
Always throws an IllegalStateException.
|
Query<S> |
with(java.lang.Object value)
Always throws an IllegalStateException.
|
Query<S> |
with(short value)
Always throws an IllegalStateException.
|
Query<S> |
withValues(java.lang.Object... values)
Throws an IllegalStateException unless no values passed in.
|
and, checkSliceArguments, fetchAfter, fetchAfter, loadOne, loadOne, or, printNative, printNative, printPlan, printPlan, toString, tryLoadOne, tryLoadOnepublic EmptyQuery(QueryFactory<S> factory, OrderingList<S> ordering)
factory - required query factory, used by 'or' and 'not' methodsordering - optional order-by propertiespublic EmptyQuery(QueryFactory<S> factory, java.lang.String ordering)
factory - required query factory, used by 'or' and 'not' methodsordering - optional order-by propertypublic EmptyQuery(QueryFactory<S> factory, java.lang.String... orderings)
factory - required query factory, used by 'or' and 'not' methodsorderings - optional order-by propertiespublic java.lang.Class<S> getStorableType()
Querypublic Filter<S> getFilter()
ClosedFilter.public FilterValues<S> getFilterValues()
public int getBlankParameterCount()
public Query<S> with(int value)
value - parameter value to fill inpublic Query<S> with(long value)
value - parameter value to fill inpublic Query<S> with(float value)
value - parameter value to fill inpublic Query<S> with(double value)
value - parameter value to fill inpublic Query<S> with(boolean value)
value - parameter value to fill inpublic Query<S> with(char value)
value - parameter value to fill inpublic Query<S> with(byte value)
value - parameter value to fill inpublic Query<S> with(short value)
value - parameter value to fill inpublic Query<S> with(java.lang.Object value)
value - parameter value to fill inpublic Query<S> withValues(java.lang.Object... values)
values - parameter values to fill in; if null or empty, this
Query instance is returnedpublic Query<S> and(Filter<S> filter)
filter - query filterpublic Query<S> or(Filter<S> filter) throws FetchException
Queryfilter logically "or"ed to this, potentially increasing the amount of
results.filter - query filterFetchException - if storage layer throws an exceptionpublic Query<S> not() throws FetchException
FetchException - if storage layer throws an exceptionpublic Query<S> orderBy(java.lang.String property) throws FetchException
QueryNote: Specification of ordering properties is not cumulative. Calling this method will first remove any previous ordering properties.
property - name of property to order byFetchException - if storage layer throws an exceptionpublic Query<S> orderBy(java.lang.String... properties) throws FetchException
QueryNote: Specification of ordering properties is not cumulative. Calling this method will first remove any previous ordering properties.
properties - names of properties to order byFetchException - if storage layer throws an exceptionpublic <T extends S> Query<S> after(T start)
Queryordering. If not a total ordering, then query may start at an earlier
position.
Note: The returned query can be very expensive to fetch from repeatedly, if the query needs to perform a sort operation. Ideally, the query ordering should match the natural ordering of an index or key.
start - storable to attempt to start after; if null, this query is
returnedpublic Cursor<S> fetch()
EmptyCursor.Repository.enterTransaction(IsolationLevel)public Cursor<S> fetch(Query.Controller controller)
EmptyCursor.controller - optional controller which can abort query operationRepository.enterTransaction(IsolationLevel)public Cursor<S> fetchSlice(long from, java.lang.Long to)
EmptyCursor.from - zero-based from record number, inclusiveto - optional zero-based to record number, exclusivepublic Cursor<S> fetchSlice(long from, java.lang.Long to, Query.Controller controller)
EmptyCursor.from - zero-based from record number, inclusiveto - optional zero-based to record number, exclusivecontroller - optional controller which can abort query operationpublic void deleteOne()
throws PersistNoneException
PersistNoneException.deleteOne in interface Query<S extends Storable>deleteOne in class AbstractQuery<S extends Storable>PersistNoneException - if no matching record foundpublic void deleteOne(Query.Controller controller) throws PersistNoneException
PersistNoneException.deleteOne in interface Query<S extends Storable>deleteOne in class AbstractQuery<S extends Storable>controller - optional controller which can abort query operationPersistNoneException - if no matching record foundpublic boolean tryDeleteOne()
public boolean tryDeleteOne(Query.Controller controller)
controller - optional controller which can abort query operationpublic void deleteAll()
public void deleteAll(Query.Controller controller)
controller - optional controller which can abort query operationpublic long count()
public long count(Query.Controller controller)
controller - optional controller which can abort query operationpublic boolean exists()
public boolean exists(Query.Controller controller)
controller - optional controller which can abort query operationpublic void appendTo(java.lang.Appendable app)
throws java.io.IOException
Appenderapp - Appendable object to receive string representationjava.io.IOException - if thrown from given Appendablepublic boolean printNative(java.lang.Appendable app,
int indentLevel)
app - append results hereindentLevel - amount to indent text, zero for nonepublic boolean printPlan(java.lang.Appendable app,
int indentLevel)
app - append results hereindentLevel - amount to indent text, zero for nonepublic int hashCode()
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.