Extended binding-model-api to support of Enclosed Generated Types and TOs.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-model-api / src / main / java / org / opendaylight / controller / sal / binding / model / api / GeneratedTransferObject.java
index 4bed98a26b804c5e0b928f1bddd0a161b31becff..e92dc77eee2a4f669679ab36e484ec7fefd9b3f2 100644 (file)
@@ -8,22 +8,65 @@
 package org.opendaylight.controller.sal.binding.model.api;
 
 import java.util.List;
-import java.util.Set;
 
-public interface GeneratedTransferObject extends Type {
-    
+/**
+ * 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 {
+
+    /**
+     * 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.
+     */
+    public GeneratedTransferObject getExtends();
+
     /**
-     * Returns Set of all Enumerator definitions associated with interface.
-     * 
-     * @return Set of all Enumerator definitions associated with interface.
+     * Returns List of Properties that are declared for Generated Transfer
+     * Object.
+     *
+     * @return List of Properties that are declared for Generated Transfer
+     * Object.
      */
-    public List<Enumeration> getEnumDefintions();
-    
     public List<GeneratedProperty> getProperties();
-    
+
+    /**
+     * 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.
+     */
     public 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.
+     */
     public 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.
+     */
     public List<GeneratedProperty> getToStringIdentifiers();
 }