com.google.cloud.backend.mobilebackend.model.QueryDto

Here are the examples of the java api class com.google.cloud.backend.mobilebackend.model.QueryDto taken from open source projects.

1. CloudQuery#copyQueryDto()

Project: io2014-codelabs
File: CloudQuery.java
private QueryDto copyQueryDto(QueryDto cq) {
    QueryDto ncq = new QueryDto();
    ncq.setFilterDto(cq.getFilterDto());
    ncq.setKindName(cq.getKindName());
    ncq.setLimit(cq.getLimit());
    ncq.setQueryId(cq.getQueryId());
    ncq.setRegId(cq.getRegId());
    ncq.setScope(cq.getScope());
    ncq.setSortAscending(cq.getSortAscending());
    ncq.setSortedPropertyName(cq.getSortedPropertyName());
    ncq.setSubscriptionDurationSec(cq.getSubscriptionDurationSec());
    return ncq;
}

2. CloudBackend#list()

Project: io2014-codelabs
File: CloudBackend.java
/**
     * Executes a query synchronously with specified {@link CloudQuery}.
     *
     * @param query {@link CloudQuery} to execute.
     * @return {@link java.util.List} of {@link CloudEntity} of the result.
     * @throws java.io.IOException When the call had failed for any reason.
     */
public List<CloudEntity> list(com.google.cloud.backend.core.CloudQuery query) throws IOException {
    // execute the query
    EntityListDto cbList;
    QueryDto cq = query.convertToQueryDto();
    Log.i(Consts.TAG, "list: executing query: " + cq);
    cbList = getMBSEndpoint().endpointV1().list(cq).execute();
    Log.i(Consts.TAG, "list: result: " + cbList.getEntries());
    // convert the result to List
    List<CloudEntity> coList = new LinkedList<CloudEntity>();
    if (cbList.getEntries() != null) {
        for (EntityDto cd : cbList.getEntries()) {
            coList.add(CloudEntity.createCloudEntityFromEntityDto(cd));
        }
    }
    return coList;
}