Do not allow DatabaseSchema name/version to be mutated
[ovsdb.git] / library / impl / src / main / java / org / opendaylight / ovsdb / lib / schema / DatabaseSchema.java
index 1868da63625fbeb2fb74e8f0cd7161514d79bfae..ccf43d13a1ff7dc8f47e7e6541350531d0d43a1d 100644 (file)
@@ -25,18 +25,12 @@ import org.slf4j.LoggerFactory;
  * Represents an ovsdb database schema, which is comprised of a set of tables.
  */
 public class DatabaseSchema {
-
     private static final Logger LOG = LoggerFactory.getLogger(DatabaseSchema.class);
 
-    private String name;
-
-    private Version version;
+    private final String name;
+    private final Version version;
     private final Map<String, TableSchema> tables;
 
-    public DatabaseSchema(final Map<String, TableSchema> tables) {
-        this.tables = tables;
-    }
-
     public DatabaseSchema(final String name, final Version version, final Map<String, TableSchema> tables) {
         this.name = name;
         this.version = version;
@@ -107,18 +101,10 @@ public class DatabaseSchema {
         return name;
     }
 
-    public void setName(final String name) {
-        this.name = name;
-    }
-
     public Version getVersion() {
         return version;
     }
 
-    public void setVersion(final Version version) {
-        this.version = version;
-    }
-
     public void populateInternallyGeneratedColumns() {
         for (TableSchema tableSchema : tables.values()) {
             tableSchema.populateInternallyGeneratedColumns();