Class QueryPartition (3.7.3)

Stay organized with collections Save and categorize content based on your preferences.
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
NameDescription
queryQuery
startAtObject[]
endBeforeObject[]

Methods

createQuery()

public Query createQuery()

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

Returns
TypeDescription
Query

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

equals(Object o)

public boolean equals(Object o)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

getEndBefore()

public Object[] getEndBefore()

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
int
Overrides