/** * Reserved for internal use. Generates a query to list table names with the given prefix. * * @param prefix * A <code>String</code> containing the prefix to match on table names to return. * @return * A {@link TableQuery} instance for listing table names with the specified prefix. */ private TableQuery<TableServiceEntity> generateListTablesQuery(final String prefix) { TableQuery<TableServiceEntity> listQuery = TableQuery.<TableServiceEntity> from(TableServiceEntity.class); listQuery.setSourceTableName(TableConstants.TABLES_SERVICE_TABLES_NAME); if (!Utility.isNullOrEmpty(prefix)) { // Append Max char to end '{' is 1 + 'z' in AsciiTable > uppperBound = prefix + '{' final String prefixFilter = String.format("(%s ge '%s') and (%s lt '%s{')", TableConstants.TABLE_NAME, prefix, TableConstants.TABLE_NAME, prefix); listQuery = listQuery.where(prefixFilter); } return listQuery; }
/** * Reserved for internal use. Generates a query to list table names with the given prefix. * * @param prefix * A <code>String</code> containing the prefix to match on table names to return. * @return * A {@link TableQuery} instance for listing table names with the specified prefix. */ private TableQuery<TableServiceEntity> generateListTablesQuery(final String prefix) { TableQuery<TableServiceEntity> listQuery = TableQuery.<TableServiceEntity> from(TableServiceEntity.class); listQuery.setSourceTableName(TableConstants.TABLES_SERVICE_TABLES_NAME); if (!Utility.isNullOrEmpty(prefix)) { // Append Max char to end '{' is 1 + 'z' in AsciiTable > uppperBound = prefix + '{' final String prefixFilter = String.format("(%s ge '%s') and (%s lt '%s{')", TableConstants.TABLE_NAME, prefix, TableConstants.TABLE_NAME, prefix); listQuery = listQuery.where(prefixFilter); } return listQuery; }
final OperationContext opContext) throws StorageException { Utility.assertNotNull(SR.QUERY_REQUIRES_VALID_CLASSTYPE_OR_RESOLVER, resolver); query.setSourceTableName(this.getName()); return (ResultSegment<R>) this.getServiceClient().executeQuerySegmentedImpl(query, resolver, continuationToken, options, opContext);
final OperationContext opContext) throws StorageException { Utility.assertNotNull(SR.QUERY_REQUIRES_VALID_CLASSTYPE_OR_RESOLVER, resolver); query.setSourceTableName(this.getName()); return (ResultSegment<R>) this.getServiceClient().executeQuerySegmentedImpl(query, resolver, continuationToken, options, opContext);
final OperationContext opContext) throws StorageException { Utility.assertNotNull("query", query); query.setSourceTableName(this.getName()); return (ResultSegment<T>) this.getServiceClient().executeQuerySegmentedImpl(query, null, continuationToken, options, opContext);
final OperationContext opContext) throws StorageException { Utility.assertNotNull("query", query); query.setSourceTableName(this.getName()); return (ResultSegment<T>) this.getServiceClient().executeQuerySegmentedImpl(query, null, continuationToken, options, opContext);
Utility.assertNotNull("query", query); Utility.assertNotNull(SR.QUERY_REQUIRES_VALID_CLASSTYPE_OR_RESOLVER, resolver); query.setSourceTableName(this.getName()); return (Iterable<R>) this.getServiceClient().generateIteratorForQuery(query, resolver, options, opContext);
Utility.assertNotNull("query", query); Utility.assertNotNull(SR.QUERY_REQUIRES_VALID_CLASSTYPE_OR_RESOLVER, query.getClazzType()); query.setSourceTableName(this.getName()); return (Iterable<T>) this.getServiceClient().generateIteratorForQuery(query, null, options, opContext);
Utility.assertNotNull(SR.QUERY_REQUIRES_VALID_CLASSTYPE_OR_RESOLVER, resolver); TableRequestOptions modifiedOptions = TableRequestOptions.populateAndApplyDefaults(options, this.getServiceClient()); query.setSourceTableName(this.getName()); return (Iterable<R>) this.getServiceClient().generateIteratorForQuery(query, resolver, modifiedOptions, opContext);
Utility.assertNotNull(SR.QUERY_REQUIRES_VALID_CLASSTYPE_OR_RESOLVER, query.getClazzType()); TableRequestOptions modifiedOptions = TableRequestOptions.populateAndApplyDefaults(options, this.getServiceClient()); query.setSourceTableName(this.getName()); return (Iterable<T>) this.getServiceClient().generateIteratorForQuery(query, null, modifiedOptions, opContext);