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   package it.imolinfo.jbi4ejb.jbi.wsdl;
9   
10  import java.io.Serializable;
11  
12  import javax.wsdl.extensions.ExtensibilityElement;
13  import javax.xml.namespace.QName;
14  
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 Class Jbi4EjbAddress, according with JWSDL specs (see JSR 110).
21   * 
22   * @author <a href="mailto:mpiraccini@imolinfo.it">Marco Piraccini</a>
23   */
24  public class Jbi4EjbAddress implements ExtensibilityElement, Serializable {
25  
26  	/** The Constant serialVersionUID. */
27      private static final long serialVersionUID = -1553032069918902750L;
28  
29      /** The element type. */
30  	private QName elementType;
31  
32  	/** The required. */
33  	private Boolean required;
34  
35  	/** The name. */
36  	private String name;
37      
38      /** The localization type. */
39      private String localizationType;
40  
41      
42      /**
43       * Instantiates a new jbi4 ejb address.
44       */
45      public Jbi4EjbAddress() {}
46  
47      /**
48       * Gets the ElementType.
49       * @see javax.wsdl.extensions.ExtensibilityElement#getElementType()
50       * @return the extensibility element
51       */
52      public QName getElementType() {
53          return elementType;
54      }
55      
56      /**
57       * Sets the element type.
58       * 
59       * @param elementType the element type
60       * 
61       * @see javax.wsdl.extensions.ExtensibilityElement#setElementType(javax.xml.namespace.QName)
62       */
63      public void setElementType(QName elementType) {
64          this.elementType = elementType;
65      }
66  
67      /**
68       * Gets the name.
69       * 
70       * @return the name
71       */
72      public String getName() {
73          return name;
74      }
75  
76      /**
77       * Sets the name.
78       * 
79       * @param name
80       *            the new name
81       */
82      public void setName(String name) {
83          this.name = name;
84      }
85  
86      /* (non-Javadoc)
87       * @see javax.wsdl.extensions.ExtensibilityElement#getRequired()
88       */
89      
90      /**
91       * Required property getter.
92       * @see javax.wsdl.extensions.ExtensibilityElement#getRequired()
93       * @return true if required
94       */
95      public Boolean getRequired() {
96          return required;
97      }
98      
99      /**
100      * Required property setter.
101      * 
102      * @param required the required property
103      * 
104      * @see javax.wsdl.extensions.ExtensibilityElement#setRequired(java.lang.Boolean)
105      */
106     public void setRequired(Boolean required) {
107         this.required = required;
108     }
109 
110     /**
111      * Gets the localization type.
112      * 
113      * @return the localization type
114      */
115     public String getLocalizationType() {
116         return localizationType;
117     }
118 
119     /**
120      * Sets the localization type.
121      * 
122      * @param localizationType
123      *            the new localization type
124      */
125     public void setLocalizationType(String localizationType) {
126         this.localizationType = localizationType;
127     }        
128     
129 
130     /**
131      * toString redefinition.
132      * @see java.lang.Object#toString()
133      * @return the object strig rapresentation
134      */
135     public String toString() {
136         return ReflectionToStringBuilder.toString(this);
137     }
138     
139     /**
140      * equals redefinition.
141      * 
142      * @param obj the parameter to test
143      * 
144      * @return true if the two object are equals
145      * 
146      * @see java.lang.Object#equals(java.lang.Object)
147      */
148     public boolean equals(Object obj) {
149         return EqualsBuilder.reflectionEquals(this, obj);
150     }
151     
152     
153     /**
154      * hashCode redefinition.
155      * @see java.lang.Object#hashCode()
156      * @return the hashcode for the object instance
157      */
158     public int hashCode() {
159         return HashCodeBuilder.reflectionHashCode(17, 37, this);
160     }
161 	
162 }