microsoft-azure-storage/src/com/microsoft/azure/storage/table/TableBatchOperation.java
private void checkSingleQueryPerBatch(final TableOperation op, final int size) {
        // if this has a query then no other operations can be added.
        if (this.hasQuery) {
            throw new IllegalArgumentException(SR.RETRIEVE_MUST_BE_ONLY_OPERATION_IN_BATCH);
        }

        if (op.getOperationType() == TableOperationType.RETRIEVE) {
            if (size > 0) {
                throw new IllegalArgumentException(SR.RETRIEVE_MUST_BE_ONLY_OPERATION_IN_BATCH);
            }
            else {
                this.hasQuery = true;
            }
        }

        this.containsWrites = op.getOperationType() != TableOperationType.RETRIEVE;
    }
private void checkSingleQueryPerBatch(final TableOperation op, final int size) {
        // if this has a query then no other operations can be added.
        if (this.hasQuery) {
            throw new IllegalArgumentException(SR.RETRIEVE_MUST_BE_ONLY_OPERATION_IN_BATCH);
        }

        if (op.getOperationType() == TableOperationType.RETRIEVE) {
            if (size > 0) {
                throw new IllegalArgumentException(SR.RETRIEVE_MUST_BE_ONLY_OPERATION_IN_BATCH);
            }
            else {
                this.hasQuery = true;
            }
        }

        this.containsWrites = op.getOperationType() != TableOperationType.RETRIEVE;
    }
Reserved for internal use. Verifies that the batch operation either contains no retrieve operations, or contains
only a single retrieve operation.

@param op
The {@link TableOperation} to be added if the verification succeeds.