X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=inline;f=opendaylight%2Fsal%2Fyang-prototype%2Fcode-generator%2Fbinding-model-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fmodel%2Fapi%2Ftype%2Fbuilder%2FGeneratedTOBuilder.java;h=d6cc2f55d6344fbb643d34cd799c612f310df431;hb=97d2f10bea5bdd773453bc7202b9dd04f4b70c3b;hp=2fc4ccf02f61ff65739a36b378f7ea50bde955d0;hpb=4221068644c7e8d08880b4d54e2a099a646796b9;p=controller.git
diff --git a/opendaylight/sal/yang-prototype/code-generator/binding-model-api/src/main/java/org/opendaylight/controller/sal/binding/model/api/type/builder/GeneratedTOBuilder.java b/opendaylight/sal/yang-prototype/code-generator/binding-model-api/src/main/java/org/opendaylight/controller/sal/binding/model/api/type/builder/GeneratedTOBuilder.java
index 2fc4ccf02f..d6cc2f55d6 100644
--- a/opendaylight/sal/yang-prototype/code-generator/binding-model-api/src/main/java/org/opendaylight/controller/sal/binding/model/api/type/builder/GeneratedTOBuilder.java
+++ b/opendaylight/sal/yang-prototype/code-generator/binding-model-api/src/main/java/org/opendaylight/controller/sal/binding/model/api/type/builder/GeneratedTOBuilder.java
@@ -10,18 +10,94 @@ package org.opendaylight.controller.sal.binding.model.api.type.builder;
import org.opendaylight.controller.sal.binding.model.api.GeneratedTransferObject;
/**
-
+ * Generated Transfer Object Builder is interface that contains methods to build
+ * and instantiate Generated Transfer Object definition.
+ *
+ * @see GeneratedTransferObject
*/
public interface GeneratedTOBuilder extends GeneratedTypeBuilder {
+ /**
+ * Add Generated Transfer Object from which will be extended current
+ * Generated Transfer Object.
+ * By definition Java does not allow multiple inheritance, hence if there is
+ * already definition of Generated Transfer Object the extending object will
+ * be overwritten by lastly added Generated Transfer Object.
+ * If Generated Transfer Object is null
the method SHOULD throw
+ * {@link IllegalArgumentException}
+ *
+ * @param genTransObj
+ * Generated Transfer Object
+ */
+ public void setExtendsType(final GeneratedTransferObject genTransObj);
+
+ /**
+ * Add new Generated Property definition for Generated Transfer Object
+ * Builder and returns Generated Property Builder for specifying Property.
+ * Name of Property cannot be null
, if it is null
+ * the method SHOULD throw {@link IllegalArgumentException}
+ *
+ * @param name
+ * Name of Property
+ * @return new
instance of Generated Property Builder.
+ */
public GeneratedPropertyBuilder addProperty(final String name);
+ /**
+ * Check whether GeneratedTOBuilder contains property with name
+ * name
+ *
+ * @param name
+ * of property which existance is checked
+ * @return true if property name
exists in list of properties.
+ */
+ public boolean containsProperty(final String name);
+
+ /**
+ * Add Property that will be part of equals
definition.
+ * If Generated Property Builder is null
the method SHOULD
+ * throw {@link IllegalArgumentException}
+ *
+ * @param property
+ * Generated Property Builder
+ * @return true
if addition of Generated Property into list of
+ * equals
properties is successful.
+ */
public boolean addEqualsIdentity(final GeneratedPropertyBuilder property);
+ /**
+ * Add Property that will be part of hashCode
definition.
+ * If Generated Property Builder is null
the method SHOULD
+ * throw {@link IllegalArgumentException}
+ *
+ * @param property
+ * Generated Property Builder
+ * @return true
if addition of Generated Property into list of
+ * hashCode
properties is successful.
+ */
public boolean addHashIdentity(final GeneratedPropertyBuilder property);
+ /**
+ * Add Property that will be part of toString
definition.
+ * If Generated Property Builder is null
the method SHOULD
+ * throw {@link IllegalArgumentException}
+ *
+ * @param property
+ * Generated Property Builder
+ * @return true
if addition of Generated Property into list of
+ * toString
properties is successful.
+ */
public boolean addToStringProperty(final GeneratedPropertyBuilder property);
@Override
public GeneratedTransferObject toInstance();
+
+ /**
+ * Set original YANG type for GeneratedTOBuilder. It is YANG type from which
+ * is this transport object created.
+ *
+ * @param yangType
+ * YangType enum value of original YANG type
+ */
+ public void setIsUnion(boolean isUnion);
}