/** * A static factory method returning a {@link TableOperation} instance to delete the specified * entity from Windows Azure storage. To execute this {@link TableOperation} on a given table, * call the {@link CloudTableClient#execute(String, TableOperation)} method on a {@link * CloudTableClient} instance with the table name and the {@link TableOperation} as arguments. * * @param entity The object instance implementing {@link TableEntity} to associate with the * operation. * @return A new {@link TableOperation} instance to insert the table entity. */ public static TableOperation delete(final TableEntity entity) { Utility.assertNotNull("Entity", entity); Utility.assertNotNullOrEmpty("Entity Etag", entity.getEtag()); return new TableOperation(entity, TableOperationType.DELETE); }
/** * A static factory method returning a {@link TableOperation} instance to replace the specified * table entity. To execute this {@link TableOperation} on a given table, call the {@link * CloudTableClient#execute(String, TableOperation)} method on a {@link CloudTableClient} instance * with the table name and the {@link TableOperation} as arguments. * * @param entity The object instance implementing {@link TableEntity} to associate with the * operation. * @return A new {@link TableOperation} instance for replacing the table entity. */ public static TableOperation replace(final TableEntity entity) { Utility.assertNotNullOrEmpty("Entity Etag", entity.getEtag()); return new TableOperation(entity, TableOperationType.REPLACE); }