[jboss-cvs] JBossAS SVN: r74373 - trunk/connector/src/main/org/jboss/resource/metadata/mcf.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jun 11 03:58:18 EDT 2008
Author: jesper.pedersen
Date: 2008-06-11 03:58:18 -0400 (Wed, 11 Jun 2008)
New Revision: 74373
Modified:
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java
Log:
Implement hashCode()
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java 2008-06-11 06:41:57 UTC (rev 74372)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java 2008-06-11 07:58:18 UTC (rev 74373)
@@ -19,118 +19,126 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.resource.metadata.mcf;
-
-import java.io.Serializable;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlValue;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-
-/**
- * A ManagedConnectionFactoryProperty.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at ManagementObject
-public class ManagedConnectionFactoryPropertyMetaData implements Serializable
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = 4978655092571661074L;
-
- /** The name */
- @XmlAttribute(name="name")
- private String name;
-
- /** The type */
- @XmlAttribute(name="type")
- private String type = "java.lang.String";
-
- @XmlValue
- private String value;
-
- /**
- * Get the name.
- *
- * @return the name.
- */
- public String getName()
- {
- return name;
- }
- /**
- * Set the name.
- *
- * @param name The name to set.
- */
- public void setName(String name)
- {
- this.name = name;
- }
- /**
- * Get the type.
- *
- * @return the type.
- */
- public String getType()
- {
- return type;
- }
- /**
- * Set the type.
- *
- * @param type The type to set.
- */
- public void setType(String type)
- {
- this.type = type;
- }
- /**
- * Get the value.
- *
- * @return the value.
- */
- public String getValue()
- {
- return value;
- }
- /**
- * Set the value.
- *
- * @param value The value to set.
- */
- public void setValue(String value)
- {
- this.value = value;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if(this == obj)
- return true;
-
- if(!(obj instanceof ManagedConnectionFactoryPropertyMetaData))
- {
- return false;
- }
-
- ManagedConnectionFactoryPropertyMetaData other = (ManagedConnectionFactoryPropertyMetaData)obj;
-
- if(getName() == null)
- return false;
-
- else
- {
- return getName().equals(other.getName());
-
- }
-
- }
-
-}
+package org.jboss.resource.metadata.mcf;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.managed.api.annotation.ManagementObject;
+
+/**
+ * A ManagedConnectionFactoryProperty.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at ManagementObject
+public class ManagedConnectionFactoryPropertyMetaData implements Serializable
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 4978655092571661074L;
+
+ /** The name */
+ @XmlAttribute(name="name")
+ private String name;
+
+ /** The type */
+ @XmlAttribute(name="type")
+ private String type = "java.lang.String";
+
+ @XmlValue
+ private String value;
+
+ /**
+ * Get the name.
+ *
+ * @return the name.
+ */
+ public String getName()
+ {
+ return name;
+ }
+ /**
+ * Set the name.
+ *
+ * @param name The name to set.
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ /**
+ * Get the type.
+ *
+ * @return the type.
+ */
+ public String getType()
+ {
+ return type;
+ }
+ /**
+ * Set the type.
+ *
+ * @param type The type to set.
+ */
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+ /**
+ * Get the value.
+ *
+ * @return the value.
+ */
+ public String getValue()
+ {
+ return value;
+ }
+ /**
+ * Set the value.
+ *
+ * @param value The value to set.
+ */
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if(this == obj)
+ return true;
+
+ if(!(obj instanceof ManagedConnectionFactoryPropertyMetaData))
+ {
+ return false;
+ }
+
+ ManagedConnectionFactoryPropertyMetaData other = (ManagedConnectionFactoryPropertyMetaData)obj;
+
+ if(getName() == null)
+ return false;
+
+ else
+ {
+ return getName().equals(other.getName());
+ }
+ }
+
+ @Override
+ public int hashCode()
+ {
+ if (getName() == null)
+ {
+ return 42;
+ }
+
+ return getName().hashCode();
+ }
+}
More information about the jboss-cvs-commits
mailing list