com.google.api.services.datastore.model.QueryResultBatch Maven / Gradle / Ivy
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://code.google.com/p/google-apis-client-generator/
* (build: 2016-01-08 17:48:37 UTC)
* on 2016-01-12 at 04:49:09 UTC
* Modify at your own risk.
*/
package com.google.api.services.datastore.model;
/**
* A batch of results produced by a query.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Google Cloud Datastore API. For a detailed
* explanation see:
* http://code.google.com/p/google-http-java-client/wiki/JSON
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class QueryResultBatch extends com.google.api.client.json.GenericJson {
/**
* A cursor that points to the position after the last result in the batch. May be absent.
* TODO(arfuller): Once all plans produce cursors update documentation here.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String endCursor;
/**
* The result type for every entity in entityResults. full for full entities, projection for
* entities with only projected properties, keyOnly for entities with only a key.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String entityResultType;
/**
* The results for this batch.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List entityResults;
/**
* The state of the query after the current batch. One of notFinished, moreResultsAfterLimit,
* noMoreResults.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String moreResults;
/**
* The number of results skipped because of Query.offset.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer skippedResults;
/**
* A cursor that points to the position after the last result in the batch. May be absent.
* TODO(arfuller): Once all plans produce cursors update documentation here.
* @see #decodeEndCursor()
* @return value or {@code null} for none
*/
public java.lang.String getEndCursor() {
return endCursor;
}
/**
* A cursor that points to the position after the last result in the batch. May be absent.
* TODO(arfuller): Once all plans produce cursors update documentation here.
* @see #getEndCursor()
* @return Base64 decoded value or {@code null} for none
*
* @since 1.14
*/
public byte[] decodeEndCursor() {
return com.google.api.client.util.Base64.decodeBase64(endCursor);
}
/**
* A cursor that points to the position after the last result in the batch. May be absent.
* TODO(arfuller): Once all plans produce cursors update documentation here.
* @see #encodeEndCursor()
* @param endCursor endCursor or {@code null} for none
*/
public QueryResultBatch setEndCursor(java.lang.String endCursor) {
this.endCursor = endCursor;
return this;
}
/**
* A cursor that points to the position after the last result in the batch. May be absent.
* TODO(arfuller): Once all plans produce cursors update documentation here.
* @see #setEndCursor()
*
*
* The value is encoded Base64 or {@code null} for none.
*
*
* @since 1.14
*/
public QueryResultBatch encodeEndCursor(byte[] endCursor) {
this.endCursor = com.google.api.client.util.Base64.encodeBase64URLSafeString(endCursor);
return this;
}
/**
* The result type for every entity in entityResults. full for full entities, projection for
* entities with only projected properties, keyOnly for entities with only a key.
* @return value or {@code null} for none
*/
public java.lang.String getEntityResultType() {
return entityResultType;
}
/**
* The result type for every entity in entityResults. full for full entities, projection for
* entities with only projected properties, keyOnly for entities with only a key.
* @param entityResultType entityResultType or {@code null} for none
*/
public QueryResultBatch setEntityResultType(java.lang.String entityResultType) {
this.entityResultType = entityResultType;
return this;
}
/**
* The results for this batch.
* @return value or {@code null} for none
*/
public java.util.List getEntityResults() {
return entityResults;
}
/**
* The results for this batch.
* @param entityResults entityResults or {@code null} for none
*/
public QueryResultBatch setEntityResults(java.util.List entityResults) {
this.entityResults = entityResults;
return this;
}
/**
* The state of the query after the current batch. One of notFinished, moreResultsAfterLimit,
* noMoreResults.
* @return value or {@code null} for none
*/
public java.lang.String getMoreResults() {
return moreResults;
}
/**
* The state of the query after the current batch. One of notFinished, moreResultsAfterLimit,
* noMoreResults.
* @param moreResults moreResults or {@code null} for none
*/
public QueryResultBatch setMoreResults(java.lang.String moreResults) {
this.moreResults = moreResults;
return this;
}
/**
* The number of results skipped because of Query.offset.
* @return value or {@code null} for none
*/
public java.lang.Integer getSkippedResults() {
return skippedResults;
}
/**
* The number of results skipped because of Query.offset.
* @param skippedResults skippedResults or {@code null} for none
*/
public QueryResultBatch setSkippedResults(java.lang.Integer skippedResults) {
this.skippedResults = skippedResults;
return this;
}
@Override
public QueryResultBatch set(String fieldName, Object value) {
return (QueryResultBatch) super.set(fieldName, value);
}
@Override
public QueryResultBatch clone() {
return (QueryResultBatch) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy