/** * Adds a table operation to retrieve an entity of the specified class type with the specified PartitionKey and * RowKey to the batch operation. * * @param partitionKey * A <code>String</code> containing the PartitionKey of the entity to retrieve. * @param rowKey * A <code>String</code> containing the RowKey of the entity to retrieve. * @param clazzType * The class of the {@link TableEntity} type for the entity to retrieve. */ public void retrieve(final String partitionKey, final String rowKey, final Class<? extends TableEntity> clazzType) { this.lockToPartitionKey(partitionKey); this.add(TableOperation.retrieve(partitionKey, rowKey, clazzType)); }
/** * Adds a table operation to retrieve an entity of the specified class type with the specified PartitionKey and * RowKey to the batch operation. * * @param partitionKey * A <code>String</code> containing the PartitionKey of the entity to retrieve. * @param rowKey * A <code>String</code> containing the RowKey of the entity to retrieve. * @param clazzType * The class of the {@link TableEntity} type for the entity to retrieve. */ public void retrieve(final String partitionKey, final String rowKey, final Class<? extends TableEntity> clazzType) { this.lockToPartitionKey(partitionKey); this.add(TableOperation.retrieve(partitionKey, rowKey, clazzType)); }
/** * Adds a table operation to retrieve an entity of the specified class type with the specified PartitionKey and * RowKey to the batch operation. * * @param partitionKey * A <code>String</code> containing the PartitionKey of the entity to retrieve. * @param rowKey * A <code>String</code> containing the RowKey of the entity to retrieve. * @param resolver * The {@link EntityResolver} implementation to project the entity to retrieve as a particular type in * the result. */ public void retrieve(final String partitionKey, final String rowKey, final EntityResolver<?> resolver) { this.lockToPartitionKey(partitionKey); this.add(TableOperation.retrieve(partitionKey, rowKey, resolver)); }
/** * Adds a table operation to retrieve an entity of the specified class type with the specified PartitionKey and * RowKey to the batch operation. * * @param partitionKey * A <code>String</code> containing the PartitionKey of the entity to retrieve. * @param rowKey * A <code>String</code> containing the RowKey of the entity to retrieve. * @param resolver * The {@link EntityResolver} implementation to project the entity to retrieve as a particular type in * the result. */ public void retrieve(final String partitionKey, final String rowKey, final EntityResolver<?> resolver) { this.lockToPartitionKey(partitionKey); this.add(TableOperation.retrieve(partitionKey, rowKey, resolver)); }
/** * Adds a table operation to replace the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to replace. */ public void replace(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.replace(entity)); }
/** * Adds a table operation to insert or merge the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to insert if not found or to merge if it exists. */ public void insertOrMerge(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.insertOrMerge(entity)); }
/** * Adds a table operation to insert the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to insert. * @param echoContent * The boolean representing whether the message payload should be returned in the response. */ public void insert(final TableEntity entity, boolean echoContent) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.insert(entity, echoContent)); }
/** * Adds a table operation to insert or replace the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to insert if not found or to replace if it exists. */ public void insertOrReplace(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.insertOrReplace(entity)); }
/** * Adds a table operation to merge the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to merge. */ public void merge(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.merge(entity)); }
/** * Adds a table operation to insert or merge the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to insert if not found or to merge if it exists. */ public void insertOrMerge(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.insertOrMerge(entity)); }
/** * Adds a table operation to insert or replace the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to insert if not found or to replace if it exists. */ public void insertOrReplace(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.insertOrReplace(entity)); }
/** * Adds a table operation to replace the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to replace. */ public void replace(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.replace(entity)); }
/** * Adds a table operation to delete the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to delete. */ public void delete(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.delete(entity)); }
/** * Adds a table operation to merge the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to merge. */ public void merge(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.merge(entity)); }
/** * Adds a table operation to delete the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to delete. */ public void delete(final TableEntity entity) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.delete(entity)); }
/** * Adds a table operation to insert the specified entity to the batch operation. * * @param entity * The {@link TableEntity} to insert. * @param echoContent * The boolean representing whether the message payload should be returned in the response. */ public void insert(final TableEntity entity, boolean echoContent) { this.lockToPartitionKey(entity.getPartitionKey()); this.add(TableOperation.insert(entity, echoContent)); }
/** * Adds the table operation at the specified index in the batch operation <code>ArrayList</code>. * * @param index * An <code>int</code> which represents the index in the batch operation <code>ArrayList</code> to add * the table operation at. * @param element * The {@link TableOperation} to add to the batch operation. */ @Override public void add(final int index, final TableOperation element) { Utility.assertNotNull("element", element); this.checkSingleQueryPerBatch(element, this.size()); if (element.getOperationType() == TableOperationType.RETRIEVE) { this.lockToPartitionKey(((QueryTableOperation) element).getPartitionKey()); } else { this.lockToPartitionKey(element.getEntity().getPartitionKey()); } super.add(index, element); }
/** * Adds the table operation to the batch operation <code>ArrayList</code>. * * @param element * The {@link TableOperation} to add to the batch operation. * @return * <code>true</code> if the operation was added successfully. */ @Override public boolean add(final TableOperation element) { Utility.assertNotNull("element", element); this.checkSingleQueryPerBatch(element, this.size()); if (element.getOperationType() == TableOperationType.RETRIEVE) { // Query operation this.lockToPartitionKey(((QueryTableOperation) element).getPartitionKey()); } else { this.lockToPartitionKey(element.getEntity().getPartitionKey()); } return super.add(element); }
/** * Adds the table operation to the batch operation <code>ArrayList</code>. * * @param element * The {@link TableOperation} to add to the batch operation. * @return * <code>true</code> if the operation was added successfully. */ @Override public boolean add(final TableOperation element) { Utility.assertNotNull("element", element); this.checkSingleQueryPerBatch(element, this.size()); if (element.getOperationType() == TableOperationType.RETRIEVE) { // Query operation this.lockToPartitionKey(((QueryTableOperation) element).getPartitionKey()); } else { this.lockToPartitionKey(element.getEntity().getPartitionKey()); } return super.add(element); }
/** * Adds the table operation at the specified index in the batch operation <code>ArrayList</code>. * * @param index * An <code>int</code> which represents the index in the batch operation <code>ArrayList</code> to add * the table operation at. * @param element * The {@link TableOperation} to add to the batch operation. */ @Override public void add(final int index, final TableOperation element) { Utility.assertNotNull("element", element); this.checkSingleQueryPerBatch(element, this.size()); if (element.getOperationType() == TableOperationType.RETRIEVE) { this.lockToPartitionKey(((QueryTableOperation) element).getPartitionKey()); } else { this.lockToPartitionKey(element.getEntity().getPartitionKey()); } super.add(index, element); }