/*
 * Copyright (c) 2013 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
 */
package org.opendaylight.yangtools.sal.binding.model.api;

import java.util.List;
import org.opendaylight.yangtools.yang.model.api.TypeDefinition;

/**
 * Generated Transfer Object extends {@link GeneratedType} and is designed to
 * represent Java Class. The Generated Transfer Object contains declarations of
 * member fields stored in List of Properties. The Generated Transfer Object can
 * be extended by exactly ONE Generated Transfer Object as Java don't allow
 * multiple inheritance. For retrieval of implementing Generated Types use
 * {@link #getImplements()} method. <br>
 * Every transfer object SHOULD contain equals, hashCode and toString
 * definitions. For this purpose retrieve definitions through
 * {@link #getEqualsIdentifiers ()}, {@link #getHashCodeIdentifiers()} and
 * {@link #getToStringIdentifiers ()}.
 *
 */
public interface GeneratedTransferObject extends GeneratedType {

    GeneratedProperty getSUID();

    /**
     * Returns the extending Generated Transfer Object or <code>null</code> if
     * there is no extending Generated Transfer Object.
     *
     * @return the extending Generated Transfer Object or <code>null</code> if
     *         there is no extending Generated Transfer Object.
     */
    GeneratedTransferObject getSuperType();

    /**
     * Returns List of Properties that are designated to define equality for
     * Generated Transfer Object.
     *
     * @return List of Properties that are designated to define equality for
     *         Generated Transfer Object.
     */
    List<GeneratedProperty> getEqualsIdentifiers();

    /**
     * Returns List of Properties that are designated to define identity for
     * Generated Transfer Object.
     *
     * @return List of Properties that are designated to define identity for
     *         Generated Transfer Object.
     */
    List<GeneratedProperty> getHashCodeIdentifiers();

    /**
     * Returns List of Properties that will be members of toString definition
     * for Generated Transfer Object.
     *
     * @return List of Properties that will be members of toString definition
     *         for Generated Transfer Object.
     */
    List<GeneratedProperty> getToStringIdentifiers();

    boolean isTypedef();

    /**
     * Returns Base type of Java representation of YANG typedef if set, otherwise it returns null
     *
     * @return Base type of Java representation of YANG typedef if set, otherwise it returns null
     */
    TypeDefinition getBaseType();

    /**
     * Return boolean value which describe whether Generated Transfer Object
     * was/wasn't created from union YANG type.
     *
     * @return true value if Generated Transfer Object was created from union
     *         YANG type.
     */
    boolean isUnionType();

    boolean isUnionTypeBuilder();

    Restrictions getRestrictions();
}

@@ -1260,34 +1260,24 @@
 Returns the 
-extending 
 Generated Tr
@@ -1294,86 +1294,167 @@
 ect 
-or %3Ccode%3Enull%3C/code%3E if%0A     * there is no extending Generated Transfer Object
+from which this GTO is derived, or%0A     * null if this GTO is not derived from a GTO -- e.g. it is either an union%0A     * or it is derived from a concrete type
 .%0A  
@@ -1477,22 +1477,8 @@
 urn 
-the extending 
 Gene
@@ -1522,16 +1522,28 @@
 code%3E if
+ this GTO is
 %0A     * 
@@ -1554,55 +1554,36 @@
     
-there is no extending Generated Transfer Object
+not derived from another GTO
 .%0A  
@@ -2828,16 +2828,19 @@
 finition
+%3C?%3E
  getBase

Clarify GeneratedTransferObject.getSuperType()