@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.Query)) { return super.equals(obj); } com.google.datastore.v1.Query other = (com.google.datastore.v1.Query) obj; boolean result = true; result = result && getProjectionList().equals(other.getProjectionList()); result = result && getKindList().equals(other.getKindList()); result = result && (hasFilter() == other.hasFilter()); if (hasFilter()) { result = result && getFilter().equals(other.getFilter()); } result = result && getOrderList().equals(other.getOrderList()); result = result && getDistinctOnList().equals(other.getDistinctOnList()); result = result && getStartCursor().equals(other.getStartCursor()); result = result && getEndCursor().equals(other.getEndCursor()); result = result && (getOffset() == other.getOffset()); result = result && (hasLimit() == other.hasLimit()); if (hasLimit()) { result = result && getLimit().equals(other.getLimit()); } result = result && unknownFields.equals(other.unknownFields); return result; }
hash = (53 * hash) + getEndCursor().hashCode(); hash = (37 * hash) + OFFSET_FIELD_NUMBER; hash = (53 * hash) + getOffset(); if (hasLimit()) { hash = (37 * hash) + LIMIT_FIELD_NUMBER;
setEndCursor(new Cursor(queryPb.getEndCursor())); setOffset(queryPb.getOffset()); if (queryPb.hasLimit()) { setLimit(queryPb.getLimit().getValue());
hash = (53 * hash) + getEndCursor().hashCode(); hash = (37 * hash) + OFFSET_FIELD_NUMBER; hash = (53 * hash) + getOffset(); if (hasLimit()) { hash = (37 * hash) + LIMIT_FIELD_NUMBER;
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.Query)) { return super.equals(obj); } com.google.datastore.v1.Query other = (com.google.datastore.v1.Query) obj; boolean result = true; result = result && getProjectionList().equals(other.getProjectionList()); result = result && getKindList().equals(other.getKindList()); result = result && (hasFilter() == other.hasFilter()); if (hasFilter()) { result = result && getFilter().equals(other.getFilter()); } result = result && getOrderList().equals(other.getOrderList()); result = result && getDistinctOnList().equals(other.getDistinctOnList()); result = result && getStartCursor().equals(other.getStartCursor()); result = result && getEndCursor().equals(other.getEndCursor()); result = result && (getOffset() == other.getOffset()); result = result && (hasLimit() == other.hasLimit()); if (hasLimit()) { result = result && getLimit().equals(other.getLimit()); } result = result && unknownFields.equals(other.unknownFields); return result; }
hash = (53 * hash) + getEndCursor().hashCode(); hash = (37 * hash) + OFFSET_FIELD_NUMBER; hash = (53 * hash) + getOffset(); if (hasLimit()) { hash = (37 * hash) + LIMIT_FIELD_NUMBER;
/** Generate dummy query splits. */ private List<Query> splitQuery(Query query, int numSplits) { List<Query> queries = new ArrayList<>(); int offsetOfOriginal = query.getOffset(); for (int i = 0; i < numSplits; i++) { Query.Builder q = Query.newBuilder(); q.addKindBuilder().setName(KIND); // Making sub-queries unique (and not equal to the original query) by setting different // offsets. q.setOffset(++offsetOfOriginal); queries.add(q.build()); } return queries; }
setEndCursor(new Cursor(queryPb.getEndCursor())); setOffset(queryPb.getOffset()); if (queryPb.hasLimit()) { setLimit(queryPb.getLimit().getValue());