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=fd81af353ceb0d137bf9fbd527a349b6430fd20c;hb=2a6aa1775604906755883f810ee9ea6d5f286135;hpb=c46646539ef09dd0997697b83e1892e5328e3407 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 fd81af353c..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,38 +1,50 @@ +/* + * 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; - - - + 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); } }