org.jboss.jca.common.metadata.ra.common
Class RaConfigPropertyImpl<T>

java.lang.Object
  extended by org.jboss.jca.common.metadata.ra.common.RaConfigPropertyImpl<T>
Type Parameters:
T - generic type of this property. See #buildRaConfigProperty(String, String, String, OverrideElementAttribute)) for build right implementation
All Implemented Interfaces:
Serializable, org.jboss.jca.common.api.metadata.JCAMetadata, org.jboss.jca.common.api.metadata.ra.RaConfigProperty<T>

public class RaConfigPropertyImpl<T>
extends Object
implements org.jboss.jca.common.api.metadata.JCAMetadata, org.jboss.jca.common.api.metadata.ra.RaConfigProperty<T>

Author:
Stefano Maestri
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.jca.common.api.metadata.ra.RaConfigProperty
org.jboss.jca.common.api.metadata.ra.RaConfigProperty.Tag
 
Method Summary
static org.jboss.jca.common.api.metadata.ra.RaConfigProperty<?> buildRaConfigProperty(String name, String value, String type, org.jboss.jca.common.api.metadata.ra.OverrideElementAttribute overrideElementAttribute)
          Static method to build actualised implementation of this generic class.
 boolean equals(Object obj)
          
 String getName()
           
 org.jboss.jca.common.api.metadata.ra.OverrideElementAttribute getOverrideElementAttribute()
          override-element-attribute metadata getter
 String getTypeName()
          typeName getter
 T getValue()
           
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

buildRaConfigProperty

public static org.jboss.jca.common.api.metadata.ra.RaConfigProperty<?> buildRaConfigProperty(String name,
                                                                                             String value,
                                                                                             String type,
                                                                                             org.jboss.jca.common.api.metadata.ra.OverrideElementAttribute overrideElementAttribute)
                                                                                      throws NumberFormatException
Static method to build actualised implementation of this generic class. According to jboss-ra_2_0.xsd value values are: java.lang.Boolean java.lang.String java.lang.Integer java.lang.Double java.lang.Byte java.lang.Short java.lang.Long java.lang.Float java.lang.Character In case passed type is one of above ones a correct actualised RaConfigPropertyImpl is returned. TypeName field will be set accordly In case the passed type isn't one of above ones (possible for jboss-ra_1_0.xsd) an RaConfigProperty is returned and typeName will be set as passed parameter type.

Parameters:
name - name of the property
value - value of the property.
type - the full qualified name of the class to be actualised
overrideElementAttribute - the override-element attribute. Possible value are defined in the enumeration; if it is null the default RESOURCEADAPTER is used
Returns:
the actualised instance
Throws:
NumberFormatException - in case passed value isn't assignable to type class

getName

public String getName()
Specified by:
getName in interface org.jboss.jca.common.api.metadata.ra.RaConfigProperty<T>
Returns:
name

getValue

public T getValue()
Specified by:
getValue in interface org.jboss.jca.common.api.metadata.ra.RaConfigProperty<T>
Returns:
value

hashCode

public int hashCode()

Specified by:
hashCode in interface org.jboss.jca.common.api.metadata.ra.RaConfigProperty<T>
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Specified by:
equals in interface org.jboss.jca.common.api.metadata.ra.RaConfigProperty<T>
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Specified by:
toString in interface org.jboss.jca.common.api.metadata.ra.RaConfigProperty<T>
Overrides:
toString in class Object
See Also:
Object.toString()

getTypeName

public String getTypeName()
typeName getter

Specified by:
getTypeName in interface org.jboss.jca.common.api.metadata.ra.RaConfigProperty<T>
Returns:
the typeName

getOverrideElementAttribute

public org.jboss.jca.common.api.metadata.ra.OverrideElementAttribute getOverrideElementAttribute()
override-element-attribute metadata getter

Specified by:
getOverrideElementAttribute in interface org.jboss.jca.common.api.metadata.ra.RaConfigProperty<T>
Returns:
the enum instance OverrideElementAttribute


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)