/** * 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); }
/** * 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 collection of table operations to the batch operation <code>ArrayList</code>. * * @param c * A <code>java.util.Collection</code> of {@link TableOperation} objects to add to the batch operation. * @return * <code>true</code> if the operations were added successfully. */ @Override public boolean addAll(final java.util.Collection<? extends TableOperation> c) { int size = this.size(); for (final TableOperation operation : c) { Utility.assertNotNull("operation", operation); this.checkSingleQueryPerBatch(operation, size); if (operation.getEntity() == null) { // Query operation this.lockToPartitionKey(((QueryTableOperation) operation).getPartitionKey()); } else { this.lockToPartitionKey(operation.getEntity().getPartitionKey()); } size++; } return super.addAll(c); }
/** * 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 collection of table operations to the batch operation <code>ArrayList</code>. * * @param c * A <code>java.util.Collection</code> of {@link TableOperation} objects to add to the batch operation. * @return * <code>true</code> if the operations were added successfully. */ @Override public boolean addAll(final java.util.Collection<? extends TableOperation> c) { int size = this.size(); for (final TableOperation operation : c) { Utility.assertNotNull("operation", operation); this.checkSingleQueryPerBatch(operation, size); if (operation.getEntity() == null) { // Query operation this.lockToPartitionKey(((QueryTableOperation) operation).getPartitionKey()); } else { this.lockToPartitionKey(operation.getEntity().getPartitionKey()); } size++; } return super.addAll(c); }
/** * Adds the collection of table operations to the batch operation <code>ArrayList</code> starting at the specified * index. * * @param index * An <code>int</code> which represents the index in the batch operation <code>ArrayList</code> to add * the table operation at. * @param c * A <code>java.util.Collection</code> of {@link TableOperation} objects to add to the batch operation. * @return * <code>true</code> if the operations were added successfully. */ @Override public boolean addAll(final int index, final java.util.Collection<? extends TableOperation> c) { int size = this.size(); for (final TableOperation operation : c) { Utility.assertNotNull("operation", operation); this.checkSingleQueryPerBatch(operation, size); if (operation.getEntity() == null) { // Query operation this.lockToPartitionKey(((QueryTableOperation) operation).getPartitionKey()); } else { this.lockToPartitionKey(operation.getEntity().getPartitionKey()); } size++; } return super.addAll(index, c); }
/** * Adds the collection of table operations to the batch operation <code>ArrayList</code> starting at the specified * index. * * @param index * An <code>int</code> which represents the index in the batch operation <code>ArrayList</code> to add * the table operation at. * @param c * A <code>java.util.Collection</code> of {@link TableOperation} objects to add to the batch operation. * @return * <code>true</code> if the operations were added successfully. */ @Override public boolean addAll(final int index, final java.util.Collection<? extends TableOperation> c) { int size = this.size(); for (final TableOperation operation : c) { Utility.assertNotNull("operation", operation); this.checkSingleQueryPerBatch(operation, size); if (operation.getEntity() == null) { // Query operation this.lockToPartitionKey(((QueryTableOperation) operation).getPartitionKey()); } else { this.lockToPartitionKey(operation.getEntity().getPartitionKey()); } size++; } return super.addAll(index, c); }