2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
8 package org.opendaylight.yangtools.sal.binding.model.api.type.builder;
\r
10 import org.opendaylight.yangtools.sal.binding.model.api.GeneratedTransferObject;
\r
13 * Generated Transfer Object Builder is interface that contains methods to build
\r
14 * and instantiate Generated Transfer Object definition.
\r
16 * @see GeneratedTransferObject
\r
18 public interface GeneratedTOBuilder extends GeneratedTypeBuilder {
\r
21 * Add Generated Transfer Object from which will be extended current
\r
22 * Generated Transfer Object. <br>
\r
23 * By definition Java does not allow multiple inheritance, hence if there is
\r
24 * already definition of Generated Transfer Object the extending object will
\r
25 * be overwritten by lastly added Generated Transfer Object. <br>
\r
26 * If Generated Transfer Object is <code>null</code> the method SHOULD throw
\r
27 * {@link IllegalArgumentException}
\r
29 * @param genTransObj
\r
30 * Generated Transfer Object
\r
32 public void setExtendsType(final GeneratedTransferObject genTransObj);
\r
35 * Add Property that will be part of <code>equals</code> definition. <br>
\r
36 * If Generated Property Builder is <code>null</code> the method SHOULD
\r
37 * throw {@link IllegalArgumentException}
\r
40 * Generated Property Builder
\r
41 * @return <code>true</code> if addition of Generated Property into list of
\r
42 * <code>equals</code> properties is successful.
\r
44 public boolean addEqualsIdentity(final GeneratedPropertyBuilder property);
\r
47 * Add Property that will be part of <code>hashCode</code> definition. <br>
\r
48 * If Generated Property Builder is <code>null</code> the method SHOULD
\r
49 * throw {@link IllegalArgumentException}
\r
52 * Generated Property Builder
\r
53 * @return <code>true</code> if addition of Generated Property into list of
\r
54 * <code>hashCode</code> properties is successful.
\r
56 public boolean addHashIdentity(final GeneratedPropertyBuilder property);
\r
59 * Add Property that will be part of <code>toString</code> definition. <br>
\r
60 * If Generated Property Builder is <code>null</code> the method SHOULD
\r
61 * throw {@link IllegalArgumentException}
\r
64 * Generated Property Builder
\r
65 * @return <code>true</code> if addition of Generated Property into list of
\r
66 * <code>toString</code> properties is successful.
\r
68 public boolean addToStringProperty(final GeneratedPropertyBuilder property);
\r
71 public GeneratedTransferObject toInstance();
\r
74 * Set original YANG type for GeneratedTOBuilder. It is YANG type from which
\r
75 * is this transport object created.
\r
78 * YangType enum value of original YANG type
\r
80 public void setIsUnion(boolean isUnion);
\r