2 * Copyright (C) 2013 EBay Software Foundation
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 * Authors : Ashwin Raveendran, Madhu Venugopal
10 package org.opendaylight.ovsdb.lib.message;
12 import com.fasterxml.jackson.annotation.JsonAnyGetter;
13 import com.fasterxml.jackson.annotation.JsonAnySetter;
14 import com.fasterxml.jackson.annotation.JsonIgnore;
15 import com.fasterxml.jackson.annotation.JsonProperty;
16 import com.google.common.collect.Maps;
18 import java.util.Collection;
21 import org.opendaylight.ovsdb.lib.table.Table;
24 public class TableUpdate<T extends Table> {
25 /*This could have been done as a map, but doing so would expose the inner wrapper class in type signature*/
27 Map<String, Row<T>> map = Maps.newHashMap();
30 public Row<T> get(String rowId) {
31 return map.get(rowId);
35 public void set(String rowId, Row<T> value) {
36 map.put(rowId, value);
40 public Collection<Row<T>> getRows() {
45 public String toString() {
46 return "TableUpdate [map=" + map + "]";
49 public static class Row<T> {
58 public String getId() {
66 public void setNew(T neww) {
74 public void setOld(T old) {
78 void setId(String id) {
83 public String toString() {
86 ", _new=" + _new.toString() +