Fixed SchemaPath resolution for base YANG types.
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-model-util / src / main / java / org / opendaylight / controller / yang / model / util / Uint64.java
index c247c2a4da3c9044eaf54a626b0c4ed5310c48e6..f9c2aa3c90a15f41acb9700bae152aa953a237a9 100644 (file)
@@ -8,6 +8,8 @@
 package org.opendaylight.controller.yang.model.util;
 
 import java.math.BigInteger;
+import java.net.URI;
+import java.util.Date;
 import java.util.List;
 
 import org.opendaylight.controller.yang.common.QName;
@@ -28,19 +30,31 @@ public class Uint64 extends AbstractUnsignedInteger {
     private BigInteger defaultValue = null;
     private static final String description =
             "uint64 represents integer values between 0 and 18446744073709551615, inclusively.";
+    private final UnsignedIntegerTypeDefinition baseType;
 
-    public Uint64() {
+    private Uint64() {
         super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, "");
+        this.baseType = this;
     }
 
-    public Uint64(final BigInteger defaultValue) {
-        super(name, description, Short.MIN_VALUE, Short.MAX_VALUE, "");
+    public Uint64(final List<String> actualPath,
+            final URI namespace, final Date revision) {
+        super(actualPath, namespace, revision, name, description, Short.MIN_VALUE, Short.MAX_VALUE, "");
+        this.baseType = new Uint64();
+    }
+
+    public Uint64(final List<String> actualPath,
+            final URI namespace, final Date revision, final BigInteger defaultValue) {
+        super(actualPath, namespace, revision, name, description, Short.MIN_VALUE, Short.MAX_VALUE, "");
+        this.baseType = new Uint64();
         this.defaultValue = defaultValue;
     }
 
-    public Uint64(final List<RangeConstraint> rangeStatements,
+    public Uint64(final List<String> actualPath,
+            final URI namespace, final Date revision, final List<RangeConstraint> rangeStatements,
             final String units, final BigInteger defaultValue) {
-        super(name, description, rangeStatements, units);
+        super(actualPath, namespace, revision, name, description, rangeStatements, units);
+        this.baseType = new Uint64();
         this.defaultValue = defaultValue;
     }
 
@@ -52,7 +66,7 @@ public class Uint64 extends AbstractUnsignedInteger {
      */
     @Override
     public UnsignedIntegerTypeDefinition getBaseType() {
-        return this;
+        return baseType;
     }
 
     /*