OpenDaylight Controller functional modules.
[controller.git] / opendaylight / switchmanager / src / main / java / org / opendaylight / controller / switchmanager / SwitchConfig.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.switchmanager;
11
12 import java.io.Serializable;
13
14 import org.apache.commons.lang3.builder.EqualsBuilder;
15 import org.apache.commons.lang3.builder.HashCodeBuilder;
16
17 /**
18  * The class describes a switch configuration including node identifier, node
19  * name, tier number and proactive/reactive mode.
20  */
21 public class SwitchConfig implements Serializable {
22     private static final long serialVersionUID = 1L;
23     String nodeId;
24     String nodeName;
25     String tier;
26     String mode;
27
28     public SwitchConfig(String nodeId, String nodeName, String tier, String mode) {
29         super();
30         this.nodeId = nodeId;
31         this.nodeName = nodeName;
32         this.tier = tier;
33         this.mode = mode;
34     }
35
36     public String getNodeId() {
37         return nodeId;
38     }
39
40     public String getNodeName() {
41         return nodeName;
42     }
43
44     public String getTier() {
45         return tier;
46     }
47
48     public String getMode() {
49         return mode;
50     }
51
52     public static long getSerialversionuid() {
53         return serialVersionUID;
54     }
55
56     @Override
57     public int hashCode() {
58         return HashCodeBuilder.reflectionHashCode(this);
59     }
60
61     @Override
62     public boolean equals(Object obj) {
63         return EqualsBuilder.reflectionEquals(this, obj);
64     }
65 }