Adjust to yangtools-2.0.0 changes
[mdsal.git] / binding2 / mdsal-binding2-generator-impl / src / main / twirl / org / opendaylight / mdsal / binding / javav2 / generator / impl / yangTemplateWriteAction.scala.txt
index db798a6838cbfc31562d9eae5e58736246063484..16bed731430a618e7a638e45f1ab1df46a4640eb 100644 (file)
@@ -19,8 +19,8 @@
 
 @(action: ActionDefinition, module: Module)
 action @{action.getQName().getLocalName()} {
-    @if(action.getDescription() != null && !action.getDescription().isEmpty()) {
-        "@{action.getDescription()}";
+    @if(action.getDescription().isPresent()) {
+        "@{action.getDescription().get()}";
     }
     @if(action.getGroupings() != null && !action.getGroupings().isEmpty()) {
         @yangTemplateWriteGroupingDefs(action.getGroupings(), module)
@@ -35,10 +35,10 @@ action @{action.getQName().getLocalName()} {
             @yangTemplateWriteDataSchemaNodes(action.getOutput().getChildNodes, module)
         }
     }
-    @if(action.getReference() != null && !action.getReference().isEmpty()) {
-        reference "@{action.getReference()}";
+    @if(action.getReference().isPresent()) {
+        reference "@{action.getReference().get()}";
     }
     @if(action.getStatus() != Status.CURRENT) {
         status @{action.getStatus()};
     }
-}
\ No newline at end of file
+}