Merge "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
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.sal.binding.model.api;
9
10 import java.util.List;
11
12 /**
13  * Generated Transfer Object extends {@link GeneratedType} and is designed to
14  * represent Java Class. The Generated Transfer Object contains declarations
15  * of member fields stored in List of Properties. The Generated Transfer
16  * Object can be extended by exactly ONE Generated Transfer Object as Java
17  * don't allow multiple inheritance. For retrieval of implementing Generated
18  * Types use {@link #getImplements()} method.
19  * <br>
20  * Every transfer object SHOULD contain equals, hashCode and toString definitions.
21  * For this purpose retrieve definitions through {@link #getEqualsIdentifiers
22  * ()}, {@link #getHashCodeIdentifiers()} and {@link #getToStringIdentifiers
23  * ()}.
24  *
25  */
26 public interface GeneratedTransferObject extends GeneratedType {
27
28     /**
29      * Returns the extending Generated Transfer Object or <code>null</code>
30      * if there is no extending Generated Transfer Object.
31      *
32      * @return the extending Generated Transfer Object or <code>null</code>
33      * if there is no extending Generated Transfer Object.
34      */
35     public GeneratedTransferObject getExtends();
36
37     /**
38      * Returns List of Properties that are declared for Generated Transfer
39      * Object.
40      *
41      * @return List of Properties that are declared for Generated Transfer
42      * Object.
43      */
44     public List<GeneratedProperty> getProperties();
45
46     /**
47      * Returns List of Properties that are designated to define equality for
48      * Generated Transfer Object.
49      *
50      * @return List of Properties that are designated to define equality for
51      * Generated Transfer Object.
52      */
53     public List<GeneratedProperty> getEqualsIdentifiers();
54
55     /**
56      * Returns List of Properties that are designated to define identity for
57      * Generated Transfer Object.
58      *
59      * @return List of Properties that are designated to define identity for
60      * Generated Transfer Object.
61      */
62     public List<GeneratedProperty> getHashCodeIdentifiers();
63
64     /**
65      * Returns List of Properties that will be members of toString definition
66      * for Generated Transfer Object.
67      *
68      * @return List of Properties that will be members of toString definition
69      * for Generated Transfer Object.
70      */
71     public List<GeneratedProperty> getToStringIdentifiers();
72 }