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

java.lang.Object
  extended by org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCMappingMetaData

public final class JDBCMappingMetaData
extends Object

Imutable class which holds a mapping between a Java Class and a JDBC type and a SQL type.

Version:
$Revision: 57209 $
Author:
Dain Sundstrom, Sebastien Alborini

Constructor Summary
JDBCMappingMetaData(Element element)
          Constructs a mapping with the data contained in the mapping xml element from a jbosscmp-jdbc xml file.
 
Method Summary
 String getJavaType()
          Gets the java type of this mapping.
 int getJdbcType()
          Gets the jdbc type of this mapping.
static int getJdbcTypeFromName(String name)
          Gets the JDBC type constant int for the name.
 String getParamSetter()
           
 String getResultReader()
           
 String getSqlType()
          Gets the sql type of this mapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCMappingMetaData

public JDBCMappingMetaData(Element element)
                    throws org.jboss.deployment.DeploymentException
Constructs a mapping with the data contained in the mapping xml element from a jbosscmp-jdbc xml file.

Parameters:
element - the xml Element which contains the metadata about this mapping
Throws:
org.jboss.deployment.DeploymentException - if the xml element is not semantically correct
Method Detail

getJdbcTypeFromName

public static int getJdbcTypeFromName(String name)
                               throws org.jboss.deployment.DeploymentException
Gets the JDBC type constant int for the name. The mapping from name to jdbc type is contained in java.sql.Types.

Parameters:
name - the name for the jdbc type
Returns:
the int type constant from java.sql.Types
Throws:
org.jboss.deployment.DeploymentException
See Also:
Types

getJavaType

public String getJavaType()
Gets the java type of this mapping. The java type is used to differentiate this mapping from other mappings.

Returns:
the java type of this mapping

getJdbcType

public int getJdbcType()
Gets the jdbc type of this mapping. The jdbc type is used to retrieve data from a result set and to set parameters in a prepared statement.

Returns:
the jdbc type of this mapping

getSqlType

public String getSqlType()
Gets the sql type of this mapping. The sql type is the sql column data type, and is used in CREATE TABLE statements.

Returns:
the sql type String of this mapping

getParamSetter

public String getParamSetter()

getResultReader

public String getResultReader()


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