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