View Javadoc

1   /*
2    *  Copyright (c) 2005, 2006, 2007 Imola Informatica.
3    *  All rights reserved. This program and the accompanying materials
4    *  are made available under the terms of the LGPL License v2.1
5    *  which accompanies this distribution, and is available at
6    *  http://www.gnu.org/licenses/lgpl.html
7    */
8   
9   
10  package it.imolinfo.jbi4cics.jbi.wsdl;
11  
12  import java.io.Serializable;
13  import javax.wsdl.extensions.ExtensibilityElement;
14  import javax.xml.namespace.QName;
15  import org.apache.commons.lang.builder.EqualsBuilder;
16  import org.apache.commons.lang.builder.HashCodeBuilder;
17  import org.apache.commons.lang.builder.ReflectionToStringBuilder;
18  
19  /**
20   * The bean representing the WSDL binding extension.
21   *
22   * @author amedeocannone
23   * @author marcopiraccini
24   * @author <a href="mailto:mcimatti@imolinfo.it">Marco Cimatti</a>
25   */
26  public class Jbi4CicsBinding implements ExtensibilityElement, Serializable {
27  
28      /**
29       * The generated serial version UID.
30       */
31      private static final long serialVersionUID = 538349432116207249L;
32  
33      /**
34       * The element type.
35       */
36      private QName elementType;
37  
38      /**
39       * The required flag.
40       */
41      private Boolean required;
42  
43      /**
44       * The input copy Cobol. May be the same as the output copy Cobol or it may
45       * be a different one.
46       */
47      private String copyCobol;
48  
49      /**
50       * The output copy Cobol. May be the same as the input copy Cobol or it may
51       * be a different one.
52       */
53      private String outputCopyCobol;
54  
55      /**
56       * Flag indicating if the input copy Cobol and the output copy Cobol are the
57       * same. If set to <code>Boolean.FALSE</code>, then also the
58       * {@link #outputCopyCobol} is used.
59       */
60      private Boolean sameCopyCobol;
61  
62      /**
63       * The code page.
64       */
65      private String codePage;
66  
67      /**
68       * The service package name.
69       */
70      private String svcPackageName;
71  
72      /**
73       * Does nothing.
74       */
75      public Jbi4CicsBinding() {
76      }
77  
78      /**
79       * Returns a string representation of this object, showing all internal
80       * values.
81       *
82       * @return  a string representation of this object.
83       */
84      @Override
85      public String toString() {                                  // Overridden
86          return ReflectionToStringBuilder.toString(this);
87      }
88  
89      /**
90       * Indicates whether some other object is "equal to" this one, comparing its
91       * internal values.
92       *
93       * @param   obj   the reference object with which to compare.
94       * @return  <code>true</code> if this object is the same class as the obj
95       *          argument and contains the same internal values;
96       *          <code>false</code> otherwise.
97       */
98      @Override
99      public boolean equals(Object obj) {                         // Overridden
100         return EqualsBuilder.reflectionEquals(this, obj);
101     }
102 
103     /**
104      * Returns a hash code value for this object, based on internal values.
105      *
106      * @return  a hash code value for this object.
107      */
108     @Override
109     public int hashCode() {                                     // Overridden
110         return HashCodeBuilder.reflectionHashCode(this);
111     }
112 
113     /**
114      * Get the type of this extensibility element.
115      *
116      * @return  the type of this extensibility element.
117      */
118     public QName getElementType() {
119         return elementType;
120     }
121 
122     /**
123      * Set the type of this extensibility element.
124      *
125      * @param  elementType  the type.
126      */
127     public void setElementType(QName elementType) {
128         this.elementType = elementType;
129     }
130 
131     /**
132      * Get whether or not the semantics of this extension are required. Relates
133      * to the <i>wsdl:required</i> attribute.
134      *
135      * @return  whether or not the semantics of this extension are required.
136      */
137     public Boolean getRequired() {
138         return required;
139     }
140 
141     /**
142      * Set whether or not the semantics of this extension are required. Relates
143      * to the <i>wsdl:required</i> attribute.
144      *
145      * @param  required  the required flag.
146      */
147     public void setRequired(Boolean required) {
148         this.required = required;
149     }
150 
151     /**
152      * Returns the input copy Cobol. May be the same as the output copy Cobol or
153      * it may be a different one.
154      *
155      * @return  the input copy Cobol.
156      */
157     public String getCopyCobol() {
158         return copyCobol;
159     }
160 
161     /**
162      * Sets the input copy Cobol.
163      *
164      * @param  copyCobol  the new input copy Cobol to set.
165      */
166     public void setCopyCobol(String copyCobol) {
167         this.copyCobol = copyCobol;
168     }
169 
170     /**
171      * Returns the service package name.
172      *
173      * @return  the service package name.
174      */
175     public String getServicePackageName() {
176         return svcPackageName;
177     }
178 
179     /**
180      * Sets the service package name.
181      *
182      * @param  svcPackageName  the new service package name to set.
183      */
184     public void setServicePackageName(String svcPackageName) {
185         this.svcPackageName = svcPackageName;
186     }
187 
188     /**
189      * Gets the code page.
190      *
191      * @return  the code page.
192      */
193     public String getCodePage() {
194         return codePage;
195     }
196 
197     /**
198      * Sets the code page.
199      *
200      * @param  codePage  the new code page to set.
201      */
202     public void setCodePage(String codePage) {
203         this.codePage = codePage;
204     }
205 
206     /**
207      * Gets the output copy Cobol. May be the same as the input copy Cobol or it
208      * may be a different one.
209      *
210      * @return  the output copy Cobol.
211      */
212     public String getOutputCopyCobol() {
213         return outputCopyCobol;
214     }
215 
216     /**
217      * Sets the output copy Cobol. May be the same as the input copy Cobol or it
218      * may be a different one.
219      *
220      * @param  outputCopyCobol  the new output copy Cobol to set.
221      */
222     public void setOutputCopyCobol(String outputCopyCobol) {
223         this.outputCopyCobol = outputCopyCobol;
224     }
225 
226     /**
227      * Gets the flag indicating if the input copy Cobol and the output copy
228      * Cobol are the same.
229      *
230      * @return  <code>true</code> if the copy Cobol used for the input is used
231      *          also for the output; <code>false</code> if the input copy Cobol
232      *          differs from the output copy Cobol.
233      * @see     #getCopyCobol()
234      * @see     #getOutputCopyCobol()
235      */
236     public Boolean getSameCopyCobol() {
237         return sameCopyCobol;
238     }
239 
240     /**
241      * Sets the flag indicating if the input copy Cobol and the output copy
242      * Cobol are the same.
243      *
244      * @param  sameCopyCobol  the new flag value to set.
245      * @see    #setCopyCobol(String)
246      * @see    #setOutputCopyCobol(String)
247      */
248     public void setSameCopyCobol(Boolean sameCopyCobol) {
249         this.sameCopyCobol = sameCopyCobol;
250     }
251 }