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;
22 import org.opendaylight.ovsdb.lib.table.internal.Table;
25 public class TableUpdate<T extends Table> {
26 /*This could have been done as a map, but doing so would expose the inner wrapper class in type signature*/
28 Map<String, Row<T>> map = Maps.newHashMap();
31 public Row<T> get(String rowId) {
32 return map.get(rowId);
36 public void set(String rowId, Row<T> value) {
37 map.put(rowId, value);
41 public Collection<Row<T>> getRows() {
46 public String toString() {
47 return "TableUpdate [map=" + map + "]";
50 public static class Row<T> {
59 public String getId() {
67 public void setNew(T neww) {
75 public void setOld(T old) {
79 void setId(String id) {
84 public String toString() {
87 ", _new=" + _new.toString() +