Adjust to yangtools-2.0.0 changes
[mdsal.git] / binding2 / mdsal-binding2-generator-impl / src / main / twirl / org / opendaylight / mdsal / binding / javav2 / generator / impl / yangTemplateWriteDeviation.scala.txt
index 9750d74f5b249f08d59fc0b3b5dcdebe8b67fcfd..4b2b5f39ca0c307d2f2caa0b593eb8dbb7a3699d 100644 (file)
 
 @import org.opendaylight.yangtools.yang.model.api.Deviation
 @import org.opendaylight.yangtools.yang.model.api.Status
-@import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.DeviationEffectiveStatementImpl
+@import org.opendaylight.yangtools.yang.model.api.stmt.DeviationEffectiveStatement
 
 @(deviation: Deviation)
-deviation @{deviation.asInstanceOf[DeviationEffectiveStatementImpl].getDeclared().rawArgument()} {
-    @if(deviation.getReference() != null && !deviation.getReference().isEmpty()) {
-        reference "@{deviation.getReference()}";
+deviation @{deviation.asInstanceOf[DeviationEffectiveStatement].getDeclared().rawArgument()} {
+    @if(deviation.getReference().isPresent()) {
+        reference "@{deviation.getReference().get()}";
     }
-    @if(deviation.getDescription() != null && !deviation.getDescription().isEmpty()) {
-        description "@{deviation.getDescription()}";
+    @if(deviation.getDescription().isPresent()) {
+        description "@{deviation.getDescription().get()}";
     }
     @for(deviate <- deviation.getDeviates()) {
         @if(deviate != null && deviate.getDeviateType() != null ) {
@@ -47,4 +47,4 @@ deviation @{deviation.asInstanceOf[DeviationEffectiveStatementImpl].getDeclared(
             }
         }
     }
-}
\ No newline at end of file
+}