Adjust to yangtools-2.0.0 changes
[mdsal.git] / binding2 / mdsal-binding2-generator-impl / src / main / twirl / org / opendaylight / mdsal / binding / javav2 / generator / impl / yangTemplateWriteNotification.scala.txt
index c9ca4a10a50b23c1f6bf65fe48b6e0dae8e6f199..7d3acf4cca6e42f4aed9a7ce05f257e4cd4b7605 100644 (file)
@@ -19,8 +19,8 @@
 
 @(notification: NotificationDefinition, module: Module)
 notification @{notification.getQName().getLocalName()} {
-    @if(notification.getDescription() != null && !notification.getDescription().isEmpty()) {
-        description "@{notification.getDescription()}";
+    @if(notification.getDescription().isPresent()) {
+        description "@{notification.getDescription().get()}";
     }
     @if(notification.getChildNodes() != null && !notification.getChildNodes().isEmpty()) {
         @yangTemplateWriteDataSchemaNodes(notification.getChildNodes(), module)
@@ -34,10 +34,10 @@ notification @{notification.getQName().getLocalName()} {
     @if(notification.getUses() != null && !notification.getUses().isEmpty()) {
         @yangTemplateWriteUsesNodes(notification.getUses(), module)
     }
-    @if(notification.getReference() != null && !notification.getReference().isEmpty()) {
-        reference "@{notification.getReference()}";
+    @if(notification.getReference().isPresent()) {
+        reference "@{notification.getReference().get()}";
     }
     @if(notification.getStatus() != Status.CURRENT) {
         status @{notification.getStatus()};
     }
-}
\ No newline at end of file
+}