Showing
3 changed files
with
19 additions
and
0 deletions
... | @@ -9,6 +9,11 @@ public class AbstractElement extends AbstractModel implements Element { | ... | @@ -9,6 +9,11 @@ public class AbstractElement extends AbstractModel implements Element { |
9 | 9 | ||
10 | protected final ElementId id; | 10 | protected final ElementId id; |
11 | 11 | ||
12 | + // For serialization | ||
13 | + public AbstractElement() { | ||
14 | + id = null; | ||
15 | + } | ||
16 | + | ||
12 | /** | 17 | /** |
13 | * Creates a network element attributed to the specified provider. | 18 | * Creates a network element attributed to the specified provider. |
14 | * | 19 | * | ... | ... |
... | @@ -9,6 +9,11 @@ public class AbstractModel implements Provided { | ... | @@ -9,6 +9,11 @@ public class AbstractModel implements Provided { |
9 | 9 | ||
10 | private final ProviderId providerId; | 10 | private final ProviderId providerId; |
11 | 11 | ||
12 | + // For serialization | ||
13 | + public AbstractModel() { | ||
14 | + providerId = null; | ||
15 | + } | ||
16 | + | ||
12 | /** | 17 | /** |
13 | * Creates a model entity attributed to the specified provider. | 18 | * Creates a model entity attributed to the specified provider. |
14 | * | 19 | * | ... | ... |
... | @@ -17,6 +17,15 @@ public class DefaultDevice extends AbstractElement implements Device { | ... | @@ -17,6 +17,15 @@ public class DefaultDevice extends AbstractElement implements Device { |
17 | private final String hwVersion; | 17 | private final String hwVersion; |
18 | private final String swVersion; | 18 | private final String swVersion; |
19 | 19 | ||
20 | + // For serialization | ||
21 | + private DefaultDevice() { | ||
22 | + this.type = null; | ||
23 | + this.manufacturer = null; | ||
24 | + this.hwVersion = null; | ||
25 | + this.swVersion = null; | ||
26 | + this.serialNumber = null; | ||
27 | + } | ||
28 | + | ||
20 | /** | 29 | /** |
21 | * Creates a network element attributed to the specified provider. | 30 | * Creates a network element attributed to the specified provider. |
22 | * | 31 | * | ... | ... |
-
Please register or login to post a comment