Deprecate old MD-SAL APIs for removal
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / impl / BindingDOMReadWriteTransactionAdapter.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.md.sal.binding.impl;
9
10 import com.google.common.base.Optional;
11 import com.google.common.util.concurrent.CheckedFuture;
12 import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
13 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
14 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
15 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction;
16 import org.opendaylight.yangtools.yang.binding.DataObject;
17 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
18
19 @Deprecated(forRemoval = true)
20 class BindingDOMReadWriteTransactionAdapter extends
21         BindingDOMWriteTransactionAdapter<DOMDataReadWriteTransaction> implements ReadWriteTransaction {
22
23     protected BindingDOMReadWriteTransactionAdapter(final DOMDataReadWriteTransaction delegate,
24             final BindingToNormalizedNodeCodec codec) {
25         super(delegate, codec);
26     }
27
28     @Override
29     public <T extends DataObject> CheckedFuture<Optional<T>,ReadFailedException> read(
30             final LogicalDatastoreType store, final InstanceIdentifier<T> path) {
31         return doRead(getDelegate(), store, path);
32     }
33
34     @Override
35     public CheckedFuture<Boolean, ReadFailedException> exists(final LogicalDatastoreType store,
36             final InstanceIdentifier<?> path) {
37         return doExists(getDelegate(), store, path);
38     }
39 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.