@Override public int getSkippedResults() { return runQueryResponsePb.getBatch().getSkippedResults(); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.QueryResultBatch)) { return super.equals(obj); } com.google.datastore.v1.QueryResultBatch other = (com.google.datastore.v1.QueryResultBatch) obj; boolean result = true; result = result && (getSkippedResults() == other.getSkippedResults()); result = result && getSkippedCursor().equals(other.getSkippedCursor()); result = result && entityResultType_ == other.entityResultType_; result = result && getEntityResultsList().equals(other.getEntityResultsList()); result = result && getEndCursor().equals(other.getEndCursor()); result = result && moreResults_ == other.moreResults_; result = result && (getSnapshotVersion() == other.getSnapshotVersion()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SKIPPED_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getSkippedResults(); hash = (37 * hash) + SKIPPED_CURSOR_FIELD_NUMBER; hash = (53 * hash) + getSkippedCursor().hashCode(); hash = (37 * hash) + ENTITY_RESULT_TYPE_FIELD_NUMBER; hash = (53 * hash) + entityResultType_; if (getEntityResultsCount() > 0) { hash = (37 * hash) + ENTITY_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getEntityResultsList().hashCode(); } hash = (37 * hash) + END_CURSOR_FIELD_NUMBER; hash = (53 * hash) + getEndCursor().hashCode(); hash = (37 * hash) + MORE_RESULTS_FIELD_NUMBER; hash = (53 * hash) + moreResults_; hash = (37 * hash) + SNAPSHOT_VERSION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSnapshotVersion()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@Override StructuredQuery<V> nextQuery(com.google.datastore.v1.RunQueryResponse responsePb) { Builder<V> builder = toBuilder(); builder.setStartCursor(new Cursor(responsePb.getBatch().getEndCursor())); if (offset > 0 && responsePb.getBatch().getSkippedResults() < offset) { builder.setOffset(offset - responsePb.getBatch().getSkippedResults()); } else { builder.setOffset(0); if (limit != null) { builder.setLimit(limit - responsePb.getBatch().getEntityResultsCount()); } } return builder.build(); }
public Builder mergeFrom(com.google.datastore.v1.QueryResultBatch other) { if (other == com.google.datastore.v1.QueryResultBatch.getDefaultInstance()) return this; if (other.getSkippedResults() != 0) { setSkippedResults(other.getSkippedResults());
QueryResultsImpl( DatastoreImpl datastore, com.google.datastore.v1.ReadOptions readOptionsPb, Query<T> query) { this.datastore = datastore; this.readOptionsPb = readOptionsPb; this.query = query; queryResultType = query.getType(); com.google.datastore.v1.PartitionId.Builder pbBuilder = com.google.datastore.v1.PartitionId.newBuilder(); pbBuilder.setProjectId(datastore.getOptions().getProjectId()); if (query.getNamespace() != null) { pbBuilder.setNamespaceId(query.getNamespace()); } else if (datastore.getOptions().getNamespace() != null) { pbBuilder.setNamespaceId(datastore.getOptions().getNamespace()); } partitionIdPb = pbBuilder.build(); sendRequest(); if (runQueryResponsePb.getBatch().getSkippedResults() > 0) { cursor = runQueryResponsePb.getBatch().getSkippedCursor(); } else { cursor = mostRecentQueryPb.getStartCursor(); } }
@Override public int getSkippedResults() { return runQueryResponsePb.getBatch().getSkippedResults(); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.QueryResultBatch)) { return super.equals(obj); } com.google.datastore.v1.QueryResultBatch other = (com.google.datastore.v1.QueryResultBatch) obj; boolean result = true; result = result && (getSkippedResults() == other.getSkippedResults()); result = result && getSkippedCursor().equals(other.getSkippedCursor()); result = result && entityResultType_ == other.entityResultType_; result = result && getEntityResultsList().equals(other.getEntityResultsList()); result = result && getEndCursor().equals(other.getEndCursor()); result = result && moreResults_ == other.moreResults_; result = result && (getSnapshotVersion() == other.getSnapshotVersion()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SKIPPED_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getSkippedResults(); hash = (37 * hash) + SKIPPED_CURSOR_FIELD_NUMBER; hash = (53 * hash) + getSkippedCursor().hashCode(); hash = (37 * hash) + ENTITY_RESULT_TYPE_FIELD_NUMBER; hash = (53 * hash) + entityResultType_; if (getEntityResultsCount() > 0) { hash = (37 * hash) + ENTITY_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getEntityResultsList().hashCode(); } hash = (37 * hash) + END_CURSOR_FIELD_NUMBER; hash = (53 * hash) + getEndCursor().hashCode(); hash = (37 * hash) + MORE_RESULTS_FIELD_NUMBER; hash = (53 * hash) + moreResults_; hash = (37 * hash) + SNAPSHOT_VERSION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSnapshotVersion()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + SKIPPED_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getSkippedResults(); hash = (37 * hash) + SKIPPED_CURSOR_FIELD_NUMBER; hash = (53 * hash) + getSkippedCursor().hashCode(); hash = (37 * hash) + ENTITY_RESULT_TYPE_FIELD_NUMBER; hash = (53 * hash) + entityResultType_; if (getEntityResultsCount() > 0) { hash = (37 * hash) + ENTITY_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getEntityResultsList().hashCode(); } hash = (37 * hash) + END_CURSOR_FIELD_NUMBER; hash = (53 * hash) + getEndCursor().hashCode(); hash = (37 * hash) + MORE_RESULTS_FIELD_NUMBER; hash = (53 * hash) + moreResults_; hash = (37 * hash) + SNAPSHOT_VERSION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSnapshotVersion()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.QueryResultBatch)) { return super.equals(obj); } com.google.datastore.v1.QueryResultBatch other = (com.google.datastore.v1.QueryResultBatch) obj; boolean result = true; result = result && (getSkippedResults() == other.getSkippedResults()); result = result && getSkippedCursor() .equals(other.getSkippedCursor()); result = result && entityResultType_ == other.entityResultType_; result = result && getEntityResultsList() .equals(other.getEntityResultsList()); result = result && getEndCursor() .equals(other.getEndCursor()); result = result && moreResults_ == other.moreResults_; result = result && (getSnapshotVersion() == other.getSnapshotVersion()); return result; }
@Override StructuredQuery<V> nextQuery(com.google.datastore.v1.RunQueryResponse responsePb) { Builder<V> builder = toBuilder(); builder.setStartCursor(new Cursor(responsePb.getBatch().getEndCursor())); if (offset > 0 && responsePb.getBatch().getSkippedResults() < offset) { builder.setOffset(offset - responsePb.getBatch().getSkippedResults()); } else { builder.setOffset(0); if (limit != null) { builder.setLimit(limit - responsePb.getBatch().getEntityResultsCount()); } } return builder.build(); }
public Builder mergeFrom(com.google.datastore.v1.QueryResultBatch other) { if (other == com.google.datastore.v1.QueryResultBatch.getDefaultInstance()) return this; if (other.getSkippedResults() != 0) { setSkippedResults(other.getSkippedResults());
public Builder mergeFrom(com.google.datastore.v1.QueryResultBatch other) { if (other == com.google.datastore.v1.QueryResultBatch.getDefaultInstance()) return this; if (other.getSkippedResults() != 0) { setSkippedResults(other.getSkippedResults());
QueryResultsImpl( DatastoreImpl datastore, com.google.datastore.v1.ReadOptions readOptionsPb, Query<T> query) { this.datastore = datastore; this.readOptionsPb = readOptionsPb; this.query = query; queryResultType = query.getType(); com.google.datastore.v1.PartitionId.Builder pbBuilder = com.google.datastore.v1.PartitionId.newBuilder(); pbBuilder.setProjectId(datastore.getOptions().getProjectId()); if (query.getNamespace() != null) { pbBuilder.setNamespaceId(query.getNamespace()); } else if (datastore.getOptions().getNamespace() != null) { pbBuilder.setNamespaceId(datastore.getOptions().getNamespace()); } partitionIdPb = pbBuilder.build(); sendRequest(); if (runQueryResponsePb.getBatch().getSkippedResults() > 0) { cursor = runQueryResponsePb.getBatch().getSkippedCursor(); } else { cursor = mostRecentQueryPb.getStartCursor(); } }