org.jboss.ejb.plugins.cmp.jdbc.metadata
Class JDBCCMPFieldPropertyMetaData

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCCMPFieldPropertyMetaData

public final class JDBCCMPFieldPropertyMetaData
extends Object

This immutable class contains information about the an overriden field property.

Version:
$Revision: 1.6.4.1 $
Author:
Dain Sundstrom

Constructor Summary
JDBCCMPFieldPropertyMetaData(JDBCCMPFieldMetaData cmpField, Element element)
          Constructs cmp field property meta data with the data contained in the property xml element from a jbosscmp-jdbc xml file.
JDBCCMPFieldPropertyMetaData(JDBCCMPFieldMetaData cmpField, JDBCCMPFieldPropertyMetaData defaultValues)
          Constructs cmp field property meta data based on the data contained in the defaultValues parameter but defined on the specified cmpField.
 
Method Summary
 boolean equals(Object o)
          Compares this JDBCCMPFieldPropertyMetaData against the specified object.
 String getColumnName()
          Gets the column name the property should use or null if the column name is not overriden.
 int getJDBCType()
          Gets the JDBC type the property should use or Integer.MIN_VALUE if not overriden.
 String getPropertyName()
          Gets the name of the property to be overriden.
 String getSQLType()
          Gets the SQL type the property should use or null if not overriden.
 int hashCode()
          Returns a hashcode for this JDBCCMPFieldPropertyMetaData.
 boolean isNotNull()
          Should this field allow null values?
 String toString()
          Returns a string describing this JDBCCMPFieldPropertyMetaData.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDBCCMPFieldPropertyMetaData

public JDBCCMPFieldPropertyMetaData(JDBCCMPFieldMetaData cmpField,
                                    Element element)
                             throws org.jboss.deployment.DeploymentException
Constructs cmp field property meta data with the data contained in the property xml element from a jbosscmp-jdbc xml file.

Parameters:
cmpField - the JDBCCMPFieldMetaData on which this property is defined
element - the xml Element which contains the metadata about this field
Throws:
org.jboss.deployment.DeploymentException - if the xml element is not semantically correct

JDBCCMPFieldPropertyMetaData

public JDBCCMPFieldPropertyMetaData(JDBCCMPFieldMetaData cmpField,
                                    JDBCCMPFieldPropertyMetaData defaultValues)
Constructs cmp field property meta data based on the data contained in the defaultValues parameter but defined on the specified cmpField. This is effectly a copy constructory, except it can change the cmpField object on which the property is defined.

Parameters:
cmpField - the JDBCCMPFieldMetaData on which this property is defined
defaultValues - the defaultValues of this property
Throws:
org.jboss.deployment.DeploymentException - if the xml element is not semantically correct
Method Detail

getPropertyName

public String getPropertyName()
Gets the name of the property to be overriden.


getColumnName

public String getColumnName()
Gets the column name the property should use or null if the column name is not overriden.


getJDBCType

public int getJDBCType()
Gets the JDBC type the property should use or Integer.MIN_VALUE if not overriden.


getSQLType

public String getSQLType()
Gets the SQL type the property should use or null if not overriden.


isNotNull

public boolean isNotNull()
Should this field allow null values?

Returns:
true if this field will not allow a null value.

equals

public boolean equals(Object o)
Compares this JDBCCMPFieldPropertyMetaData against the specified object. Returns true if the objects are the same. Two JDBCCMPFieldPropertyMetaData are the same if they both have the same name and are defined on the same cmpField.

Parameters:
o - the reference object with which to compare
Returns:
true if this object is the same as the object argument; false otherwise

hashCode

public int hashCode()
Returns a hashcode for this JDBCCMPFieldPropertyMetaData. The hashcode is computed based on the hashCode of the declaring entity and the hashCode of the fieldName

Returns:
a hash code value for this object

toString

public String toString()
Returns a string describing this JDBCCMPFieldPropertyMetaData. The exact details of the representation are unspecified and subject to change, but the following may be regarded as typical: "[JDBCCMPFieldPropertyMetaData: propertyName=line1, [JDBCCMPFieldMetaData: fieldName=address, [JDBCEntityMetaData: entityName=UserEJB]]"

Returns:
a string representation of the object


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.