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 org.opendaylight.controller.sal.connector.api.RpcRouter;
11 import org.opendaylight.yangtools.yang.common.QName;
12 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
14 import java.io.Serializable;
16 public class RouteIdentifierImpl implements RpcRouter.RouteIdentifier<QName, QName, InstanceIdentifier>,Serializable {
18 private QName context;
20 private InstanceIdentifier route;
23 public QName getContext() {
28 public QName getType() {
33 public InstanceIdentifier getRoute() {
37 public void setContext(QName context) {
38 this.context = context;
41 public void setType(QName type) {
45 public void setRoute(InstanceIdentifier route) {
50 public boolean equals(Object o) {
51 if (this == o) return true;
52 if (o == null || getClass() != o.getClass()) return false;
54 RouteIdentifierImpl that = (RouteIdentifierImpl) o;
57 if (that.getContext() != null) return false;
59 if (!context.equals(that.context)) return false;
62 if (that.getRoute() != null) return false;
64 if (!route.equals(that.route)) return false;
67 if (that.getType() != null) return false;
69 if (!type.equals(that.type)) return false;
75 public int hashCode() {
78 result = prime * result + (context == null ? 0:context.hashCode());
79 result = prime * result + (type == null ? 0:type.hashCode());
80 result = prime * result + (route == null ? 0:route.hashCode());
85 public String toString() {
86 return "RouteIdentifierImpl{" +
87 "context=" + context +