Java Code Examples for com.microsoft.azure.storage.table.TableQuery#generateFilterCondition()
The following examples show how to use
com.microsoft.azure.storage.table.TableQuery#generateFilterCondition() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FilterExpressionTable.java From components with Apache License 2.0 | 6 votes |
public String generateCombinedFilterConditions() { String filter = ""; if (isValidFilterExpession()) { for (int idx = 0; idx < column.getValue().size(); idx++) { String c = column.getValue().get(idx); String cfn = function.getValue().get(idx); String cop = predicate.getValue().get(idx); String typ = fieldType.getValue().get(idx); String f = Comparison.getQueryComparisons(cfn); String v = operand.getValue().get(idx); String p = Predicate.getOperator(cop); EdmType t = SupportedFieldType.getEdmType(typ); String flt = TableQuery.generateFilterCondition(c, f, v, t); if (!filter.isEmpty()) { filter = TableQuery.combineFilters(filter, p, flt); } else { filter = flt; } } } return filter; }
Example 2
Source File: AzureVreAuthorizationAccess.java From timbuctoo with GNU General Public License v3.0 | 6 votes |
@Override public void deleteVreAuthorizations(String vreId) throws AuthorizationUnavailableException { String condition = TableQuery.generateFilterCondition( "PartitionKey", TableQuery.QueryComparisons.EQUAL, vreId ); TableBatchOperation deletes = new TableBatchOperation(); for (DynamicTableEntity entity : table.execute(TableQuery.from(DynamicTableEntity.class).where(condition))) { deletes.delete(entity); } try { table.execute(deletes); } catch (StorageException e) { LOG.error("deleteVreAuthorizations failed", e); throw new AuthorizationUnavailableException("Could not delete authorizations"); } }
Example 3
Source File: AzureStore.java From breakerbox with Apache License 2.0 | 5 votes |
private static String partitionKeyEquals(ServiceId serviceId) { return TableQuery .generateFilterCondition( PARTITION_KEY, TableQuery.QueryComparisons.EQUAL, serviceId.getId()); }
Example 4
Source File: AzureStore.java From breakerbox with Apache License 2.0 | 5 votes |
private static String timestampEquals(long timestamp) { return TableQuery.generateFilterCondition( ROW_KEY, TableQuery.QueryComparisons.EQUAL, String.valueOf(timestamp) ); }
Example 5
Source File: TableUtils.java From samza with Apache License 2.0 | 4 votes |
/** * Retrieve all rows in a table with the given partition key. * @param partitionKey Job model version of the processors to be retrieved. * @return Iterable list of processor entities. */ public Iterable<ProcessorEntity> getEntitiesWithPartition(String partitionKey) { String partitionFilter = TableQuery.generateFilterCondition(PARTITION_KEY, TableQuery.QueryComparisons.EQUAL, partitionKey); TableQuery<ProcessorEntity> partitionQuery = TableQuery.from(ProcessorEntity.class).where(partitionFilter); return table.execute(partitionQuery); }
Example 6
Source File: AzureStore.java From breakerbox with Apache License 2.0 | 4 votes |
private static String serviceIdEquals(ServiceId serviceId) { return TableQuery.generateFilterCondition( "ServiceName", TableQuery.QueryComparisons.EQUAL, serviceId.getId()); }
Example 7
Source File: AzureStore.java From breakerbox with Apache License 2.0 | 4 votes |
private static String partitionEquals(DependencyId dependencyId) { return TableQuery.generateFilterCondition( PARTITION_KEY, TableQuery.QueryComparisons.EQUAL, dependencyId.getId()); }