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 import java.util.Properties; 12 13 import javax.wsdl.extensions.ExtensibilityElement; 14 import javax.xml.namespace.QName; 15 16 import org.apache.commons.lang.builder.EqualsBuilder; 17 import org.apache.commons.lang.builder.HashCodeBuilder; 18 import org.apache.commons.lang.builder.ReflectionToStringBuilder; 19 20 21 /** 22 * The Class Jbi4CorbaAddress, according with JWSDL specs (see JSR 110). 23 * 24 * @author <a href="mailto:mpiraccini@imolinfo.it">Marco Piraccini</a> 25 */ 26 public class Jbi4EjbTypes implements ExtensibilityElement, Serializable { 27 28 /** The Constant serialVersionUID. */ 29 private static final long serialVersionUID = -1305853606392182431L; 30 31 /** The element type. */ 32 private QName elementType; 33 34 /** The required. */ 35 private Boolean required; 36 37 /** The serial version UID. */ 38 private Properties typesSerialVersionUIDs = new Properties(); 39 40 /** 41 * Instantiates a new jbi4 ejb types. 42 */ 43 public Jbi4EjbTypes() {} 44 45 /** 46 * Gets the ElementType. 47 * @see javax.wsdl.extensions.ExtensibilityElement#getElementType() 48 * @return the extensibility element 49 */ 50 public QName getElementType() { 51 return elementType; 52 } 53 54 /** 55 * Sets the element type. 56 * 57 * @param elementType the element type 58 * 59 * @see javax.wsdl.extensions.ExtensibilityElement#setElementType(javax.xml.namespace.QName) 60 */ 61 public void setElementType(QName elementType) { 62 this.elementType = elementType; 63 } 64 65 /** 66 * Required property getter. 67 * @see javax.wsdl.extensions.ExtensibilityElement#getRequired() 68 * @return true if required 69 */ 70 public Boolean getRequired() { 71 return required; 72 } 73 74 /** 75 * Required property setter. 76 * 77 * @param required the required property 78 * 79 * @see javax.wsdl.extensions.ExtensibilityElement#setRequired(java.lang.Boolean) 80 */ 81 public void setRequired(Boolean required) { 82 this.required = required; 83 } 84 85 /** 86 * Gets the serial version UID. 87 * 88 * @return the serial version UID 89 */ 90 public Properties getTypesSerialVersionUIDs() { 91 return typesSerialVersionUIDs; 92 } 93 94 /** 95 * Sets the serial version UID. 96 * 97 * @param serialVersionUIDPar 98 * The serival versione UIDs 99 */ 100 public void setTypesSerialVersionUIDs(Properties serialVersionUIDPar) { 101 this.typesSerialVersionUIDs = serialVersionUIDPar; 102 } 103 104 /** 105 * toString redefinition. 106 * @see java.lang.Object#toString() 107 * @return the object strig rapresentation 108 */ 109 public String toString() { 110 return ReflectionToStringBuilder.toString(this); 111 } 112 113 /** 114 * equals redefinition. 115 * 116 * @param obj the parameter to test 117 * 118 * @return true if the two object are equals 119 * 120 * @see java.lang.Object#equals(java.lang.Object) 121 */ 122 public boolean equals(Object obj) { 123 return EqualsBuilder.reflectionEquals(this, obj); 124 } 125 126 127 /** 128 * hashCode redefinition. 129 * @see java.lang.Object#hashCode() 130 * @return the hashcode for the object instance 131 */ 132 public int hashCode() { 133 return HashCodeBuilder.reflectionHashCode(17, 37, this); 134 } 135 }