Class QueryPartition (3.26.5)

public class QueryPartition

A split point that can be used in a query as a starting and/or end point for the query results. The cursors returned by #getStartAt() and #getEndBefore() can only be used in a query that matches the constraint of query that produced this partition.

Inheritance

Object > QueryPartition

Constructors

QueryPartition(Query query, Object[] startAt, Object[] endBefore)

public QueryPartition(Query query, Object[] startAt, Object[] endBefore)
Parameters
Name Description
query Query
startAt Object[]
endBefore Object[]

Methods

createQuery()

public Query createQuery()

Returns a query that only returns the documents for this partition.

Returns
Type Description
Query

a query partitioned by a Query#startAt(Object...) and Query#endBefore(Object...) cursor.

equals(Object o)

public boolean equals(Object o)
Parameter
Name Description
o Object
Returns
Type Description
boolean
Overrides

getEndBefore()

public Object[] getEndBefore()

The cursor that defines the first result after this partition. null if this is the last partition.

Returns
Type Description
Object[]

a cursor value that can be used with Query#endBefore(Object...) or null if this is the last partition.

getStartAt()

public Object[] getStartAt()

The cursor that defines the first result for this partition. null if this is the first partition.

Returns
Type Description
Object[]

a cursor value that can be used with Query#startAt(Object...) or null if this is the first partition.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides