import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
private final DataObjectModification<T> rootNode;
LazyDataTreeModification(final LogicalDatastoreType datastoreType, final InstanceIdentifier<T> path,
private final DataObjectModification<T> rootNode;
LazyDataTreeModification(final LogicalDatastoreType datastoreType, final InstanceIdentifier<T> path,
this.path = new DataTreeIdentifier<>(datastoreType, path);
this.rootNode = LazyDataObjectModification.create(codec, domChange.getRootNode());
}
this.path = new DataTreeIdentifier<>(datastoreType, path);
this.rootNode = LazyDataObjectModification.create(codec, domChange.getRootNode());
}
@SuppressWarnings({"unchecked", "rawtypes"})
static <T extends DataObject> DataTreeModification<T> create(final BindingToNormalizedNodeCodec codec,
final DataTreeCandidate domChange, final LogicalDatastoreType datastoreType) {
@SuppressWarnings({"unchecked", "rawtypes"})
static <T extends DataObject> DataTreeModification<T> create(final BindingToNormalizedNodeCodec codec,
final DataTreeCandidate domChange, final LogicalDatastoreType datastoreType) {
codec.getSubtreeCodec(domChange.getRootPath());
return new LazyDataTreeModification(datastoreType, codecCtx.getKey(), codecCtx.getValue(), domChange);
}
codec.getSubtreeCodec(domChange.getRootPath());
return new LazyDataTreeModification(datastoreType, codecCtx.getKey(), codecCtx.getValue(), domChange);
}