commit | c649132a6a21206e3362547ef76153204c62baee | [log] [tgz] |
---|---|---|
author | tom <tom@onlab.us> | Fri Sep 19 15:27:40 2014 -0700 |
committer | tom <tom@onlab.us> | Fri Sep 19 15:27:40 2014 -0700 |
tree | 1ca8b943418726871bfa239fca9c68c2c69844db | |
parent | eaf9995d6fbf821ad95909a50393a4b309d6edd7 [diff] |
Added private default constructors for serialization.
diff --git a/core/api/src/main/java/org/onlab/onos/net/AbstractElement.java b/core/api/src/main/java/org/onlab/onos/net/AbstractElement.java index 01341a5..e810930 100644 --- a/core/api/src/main/java/org/onlab/onos/net/AbstractElement.java +++ b/core/api/src/main/java/org/onlab/onos/net/AbstractElement.java
@@ -9,6 +9,11 @@ protected final ElementId id; + // For serialization + public AbstractElement() { + id = null; + } + /** * Creates a network element attributed to the specified provider. *
diff --git a/core/api/src/main/java/org/onlab/onos/net/AbstractModel.java b/core/api/src/main/java/org/onlab/onos/net/AbstractModel.java index e195fde..8c25cda 100644 --- a/core/api/src/main/java/org/onlab/onos/net/AbstractModel.java +++ b/core/api/src/main/java/org/onlab/onos/net/AbstractModel.java
@@ -9,6 +9,11 @@ private final ProviderId providerId; + // For serialization + public AbstractModel() { + providerId = null; + } + /** * Creates a model entity attributed to the specified provider. *
diff --git a/core/api/src/main/java/org/onlab/onos/net/DefaultDevice.java b/core/api/src/main/java/org/onlab/onos/net/DefaultDevice.java index 69c10b7..c6e65f5 100644 --- a/core/api/src/main/java/org/onlab/onos/net/DefaultDevice.java +++ b/core/api/src/main/java/org/onlab/onos/net/DefaultDevice.java
@@ -17,6 +17,15 @@ private final String hwVersion; private final String swVersion; + // For serialization + private DefaultDevice() { + this.type = null; + this.manufacturer = null; + this.hwVersion = null; + this.swVersion = null; + this.serialNumber = null; + } + /** * Creates a network element attributed to the specified provider. *