Merge "Avoid logging stacktraces for schema version mismatches"
[ovsdb.git] / library / impl / src / main / java / org / opendaylight / ovsdb / lib / message / TableUpdates.java
1 /*
2  * Copyright (c) 2014, 2015 EBay Software Foundation and others. All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.ovsdb.lib.message;
10
11 import java.util.Map;
12
13 import org.opendaylight.ovsdb.lib.schema.TableSchema;
14
15 import com.google.common.collect.Maps;
16
17
18 public class TableUpdates extends Response {
19
20     Map<String, TableUpdate> map = Maps.newHashMap();
21
22     public TableUpdates() {
23         this(Maps.<String, TableUpdate>newHashMap());
24     }
25
26     public TableUpdates(Map<String, TableUpdate> map) {
27         this.map = map;
28     }
29
30     public <E extends TableSchema<E>> TableUpdate<E> getUpdate(TableSchema<E> table) {
31         return this.map.get(table.getName());
32     }
33
34     public Map<String, TableUpdate> getUpdates() {
35         return map;
36     }
37
38     @Override
39     public String toString() {
40         return "TableUpdates [map=" + map + ", error=" + error + ", details="
41                 + details + ", getError()=" + getError() + ", getDetails()="
42                 + getDetails() + ", getClass()=" + getClass() + ", hashCode()="
43                 + hashCode() + ", toString()=" + super.toString() + "]";
44     }
45 }