@Test public void testApply() throws Exception { DOMStoreReadWriteTransaction writeTransaction = store.newReadWriteTransaction(); WriteModification writeModification = new WriteModification(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)); writeModification.apply(writeTransaction); commitTransaction(writeTransaction); Optional<NormalizedNode<?, ?>> data = readData(TestModel.TEST_PATH); Assert.assertTrue(data.isPresent()); DOMStoreWriteTransaction deleteTransaction = store.newWriteOnlyTransaction(); DeleteModification deleteModification = new DeleteModification(TestModel.TEST_PATH); deleteModification.apply(deleteTransaction); commitTransaction(deleteTransaction); data = readData(TestModel.TEST_PATH); Assert.assertFalse(data.isPresent()); }
@Override public void apply(final DOMStoreWriteTransaction transaction) { transaction.delete(getPath()); }
DeleteModification extends AbstractModification { @Override public void apply(final DOMStoreWriteTransaction transaction) { transaction.delete(getPath()); } }
DeleteModification extends AbstractModification { @Override public void apply(final DOMStoreWriteTransaction transaction) { transaction.delete(getPath()); } DeleteModification();  DeleteModification(final short version);  DeleteModification(final YangInstanceIdentifier path);   DeleteModification(final short version, final YangInstanceIdentifier path); }
DeleteModification extends AbstractModification { @Override public void apply(final DOMStoreWriteTransaction transaction) { transaction.delete(getPath()); } DeleteModification();  DeleteModification(final short version);  DeleteModification(final YangInstanceIdentifier path);   DeleteModification(final short version, final YangInstanceIdentifier path); @Override void apply(final DOMStoreWriteTransaction transaction); @Override void apply(final DataTreeModification transaction); @Override byte getType(); @Override void readExternal(final ObjectInput in); @Override void writeExternal(final ObjectOutput out); @Override void writeTo(final NormalizedNodeDataOutput out); static DeleteModification fromStream(final NormalizedNodeDataInput in, final short version); }
DeleteModification extends AbstractModification { @Override public void apply(final DOMStoreWriteTransaction transaction) { transaction.delete(getPath()); } DeleteModification();  DeleteModification(final short version);  DeleteModification(final YangInstanceIdentifier path);   DeleteModification(final short version, final YangInstanceIdentifier path); @Override void apply(final DOMStoreWriteTransaction transaction); @Override void apply(final DataTreeModification transaction); @Override byte getType(); @Override void readExternal(final ObjectInput in); @Override void writeExternal(final ObjectOutput out); @Override void writeTo(final NormalizedNodeDataOutput out); static DeleteModification fromStream(final NormalizedNodeDataInput in, final short version);  }