1 package org.opendaylight.ovsdb.neutron;
3 import org.opendaylight.controller.sal.core.Node;
4 import org.opendaylight.ovsdb.lib.table.internal.Table;
6 public class SouthboundEvent {
7 public enum Type { NODE, ROW };
8 public enum Action { ADD, UPDATE, DELETE };
10 private Action action;
12 private String tableName;
15 public SouthboundEvent(Node node, Action action) {
17 this.type = Type.NODE;
21 public SouthboundEvent(Node node, String tableName, String uuid, Table<?> row, Action action) {
26 this.tableName = tableName;
30 public Type getType() {
33 public Action getAction() {
36 public Node getNode() {
39 public String getTableName() {
42 public String getUuid() {
45 public Table<?> getRow() {
49 public String toString() {
50 return "SouthboundEvent [type=" + type + ", action=" + action + ", node=" + node + ", tableName=" + tableName
51 + ", uuid=" + uuid + ", row=" + row + "]";
54 public int hashCode() {
57 result = prime * result + ((action == null) ? 0 : action.hashCode());
58 result = prime * result + ((node == null) ? 0 : node.hashCode());
59 result = prime * result + ((tableName == null) ? 0 : tableName.hashCode());
60 result = prime * result + ((type == null) ? 0 : type.hashCode());
61 result = prime * result + ((uuid == null) ? 0 : uuid.hashCode());
65 public boolean equals(Object obj) {
70 if (getClass() != obj.getClass())
72 SouthboundEvent other = (SouthboundEvent) obj;
73 if (action != other.action)
76 if (other.node != null)
78 } else if (!node.equals(other.node))
80 if (tableName == null) {
81 if (other.tableName != null)
83 } else if (!tableName.equals(other.tableName))
85 if (type != other.type)
88 if (other.uuid != null)
90 } else if (!uuid.equals(other.uuid))