2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.sal.connector.remoterpc.dto;
10 import java.io.Serializable;
12 import org.opendaylight.controller.sal.connector.api.RpcRouter;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
16 public class RouteIdentifierImpl implements RpcRouter.RouteIdentifier<QName, QName, InstanceIdentifier>,Serializable {
17 private static final long serialVersionUID = 1L;
19 private QName context;
21 private InstanceIdentifier route;
24 public QName getContext() {
29 public QName getType() {
34 public InstanceIdentifier getRoute() {
38 public void setContext(QName context) {
39 this.context = context;
42 public void setType(QName type) {
46 public void setRoute(InstanceIdentifier route) {
51 public boolean equals(Object o) {
52 if (this == o) return true;
53 if (o == null || getClass() != o.getClass()) return false;
55 RouteIdentifierImpl that = (RouteIdentifierImpl) o;
58 if (that.getContext() != null) return false;
60 if (!context.equals(that.context)) return false;
63 if (that.getRoute() != null) return false;
65 if (!route.equals(that.route)) return false;
68 if (that.getType() != null) return false;
70 if (!type.equals(that.type)) return false;
76 public int hashCode() {
79 result = prime * result + (context == null ? 0:context.hashCode());
80 result = prime * result + (type == null ? 0:type.hashCode());
81 result = prime * result + (route == null ? 0:route.hashCode());
86 public String toString() {
87 return "RouteIdentifierImpl{" +
88 "context=" + context +