Code ReOrganization and Re-Architecture changes
[ovsdb.git] / library / src / main / java / org / opendaylight / ovsdb / lib / database / DatabaseSchema.java
1 /*
2  * [[ Authors will Fill in the Copyright header ]]
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  * Authors : Brent Salisbury, Evan Zeller
9  */
10 package org.opendaylight.ovsdb.lib.database;
11
12 import java.util.Map;
13
14 import com.fasterxml.jackson.annotation.JsonProperty;
15
16 public class DatabaseSchema {
17     @JsonProperty("name")
18     private String name;
19
20     @JsonProperty("version")
21     private String version;
22
23     @JsonProperty("cksum")
24     private String cksum;
25
26     @JsonProperty("tables")
27     private Map<String, TableSchema> tables;
28
29     public String getName() {
30         return name;
31     }
32
33     public String getVersion() {
34         return version;
35     }
36
37     public String getCksum() {
38         return cksum;
39     }
40
41     public Map<String, TableSchema> getTables() {
42         return tables;
43     }
44
45     public TableSchema getTable(String tableName) {
46        return tables.get(tableName);
47     }
48
49     @Override
50     public String toString() {
51         return "DatabaseSchema [name=" + name + ", version=" + version
52                 + ", cksum=" + cksum + ", tables=" + tables + "]";
53     }
54 }