@* * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html *@ @import org.opendaylight.mdsal.binding.javav2.java.api.generator.util.TextTemplateUtil.fieldName @import org.opendaylight.mdsal.binding.javav2.java.api.generator.util.TextTemplateUtil.getterMethodName @import org.opendaylight.mdsal.binding.javav2.model.api.GeneratedProperty @(allProps: List[GeneratedProperty], keyProps: List[GeneratedProperty], importedNames: Map[String, String], keyPropsList: String) @if(keyProps != null) { if (base.getKey() == null) { this._key = new @{importedNames.get("keyTypeConstructor")}( @{keyPropsList} ); @for(field <- keyProps) { this.@{fieldName(field)} = base. @{getterMethodName(field)}(); } } @{"else"} { this._key = base.getKey(); @for(field <- keyProps) { this.@{fieldName(field)} = _key.@{getterMethodName(field)}(); } } } @for(field <- allProps) { this.@{fieldName(field)} = base.@{getterMethodName(field)}(); }