X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Futil%2FTypeSafeDataReader.java;h=d263102a2603a8f1f459cb369c2beceb4051fde9;hp=17de595a8b79752400ee5ba36c442d3412f8f5d6;hb=2a6aa1775604906755883f810ee9ea6d5f286135;hpb=edb3b76df1fa27594d5f9ee368d737576b0b38f8 diff --git a/opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/TypeSafeDataReader.java b/opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/TypeSafeDataReader.java index 17de595a8b..d263102a26 100644 --- a/opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/TypeSafeDataReader.java +++ b/opendaylight/md-sal/sal-binding-util/src/main/java/org/opendaylight/controller/md/sal/binding/util/TypeSafeDataReader.java @@ -1,9 +1,23 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.md.sal.binding.util; import org.opendaylight.controller.md.sal.common.api.data.DataReader; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +/** + * Deprecated. + * + * @deprecated Use {@link org.opendaylight.controller.md.sal.binding.api.ReadTransaction#read( + * org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, InstanceIdentifier)} instead. + */ +@Deprecated(forRemoval = true) public final class TypeSafeDataReader { private final DataReader, DataObject> delegate; @@ -12,21 +26,25 @@ public final class TypeSafeDataReader { return delegate; } - public TypeSafeDataReader(DataReader, DataObject> delegate) { + public TypeSafeDataReader( + final DataReader, DataObject> delegate) { this.delegate = delegate; } @SuppressWarnings("unchecked") - public D readConfigurationData(InstanceIdentifier path) { + public D readConfigurationData( + final InstanceIdentifier path) { return (D) delegate.readConfigurationData(path); } @SuppressWarnings("unchecked") - public D readOperationalData(InstanceIdentifier path) { + public D readOperationalData( + final InstanceIdentifier path) { return (D) delegate.readOperationalData(path); } - public static TypeSafeDataReader forReader(DataReader, DataObject> delegate) { + public static TypeSafeDataReader forReader( + final DataReader, DataObject> delegate) { return new TypeSafeDataReader(delegate); } }