X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Futil%2FTypeSafeDataReader.java;h=49ac59fe95da5071aa7f9b59332ae2aef0b97113;hb=f8225a74b7c11db1ebf77ab9de998c2e953f8ed8;hp=738a14a9bd408ddeed36aa161824ceb2f39e91e4;hpb=4f76ea30ad49331ca38ce63925b3fabf8e769731;p=controller.git 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 738a14a9bd..49ac59fe95 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,38 +1,51 @@ +/* + * 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 Use + * {@link org.opendaylight.controller.md.sal.binding.api.ReadTransaction#read(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, InstanceIdentifier)} + * instead. + */ +@Deprecated public final class TypeSafeDataReader { - - private final DataReader,DataObject> delegate; - - - + private final DataReader, DataObject> delegate; + public DataReader, DataObject> getDelegate() { 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); } }