org.jboss.ejb.plugins.cmp.jdbc
Class JDBCTypeComplexProperty

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

public final class JDBCTypeComplexProperty
extends Object

Immutable class which contins the mapping between a single Java Bean (not an EJB) property and a column. This class has a flattened view of the Java Bean property, which may be several properties deep in the base Java Bean. The details of how a property is mapped to a column can be found in JDBCTypeFactory. This class holds a description of the column and, knows how to extract the column value from the Java Bean and how to set a column value info the Java Bean.

Version:
$Revision: 57209 $
Author:
Dain Sundstrom

Constructor Summary
JDBCTypeComplexProperty(JDBCTypeComplexProperty defaultProperty, String columnName, int jdbcType, String sqlType, boolean notNull)
           
JDBCTypeComplexProperty(String propertyName, String columnName, Class javaType, int jdbcType, String sqlType, boolean notNull, Method[] getters, Method[] setters)
           
 
Method Summary
 String getColumnName()
           
 Object getColumnValue(Object value)
           
 Class getJavaType()
           
 int getJDBCType()
           
 JDBCParameterSetter getParameterSetter()
           
 String getPropertyName()
           
 JDBCResultSetReader getResulSetReader()
           
 String getSQLType()
           
 boolean isNotNull()
           
 Object setColumnValue(Object value, Object columnValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCTypeComplexProperty

public JDBCTypeComplexProperty(String propertyName,
                               String columnName,
                               Class javaType,
                               int jdbcType,
                               String sqlType,
                               boolean notNull,
                               Method[] getters,
                               Method[] setters)

JDBCTypeComplexProperty

public JDBCTypeComplexProperty(JDBCTypeComplexProperty defaultProperty,
                               String columnName,
                               int jdbcType,
                               String sqlType,
                               boolean notNull)
Method Detail

getPropertyName

public String getPropertyName()

getColumnName

public String getColumnName()

getJavaType

public Class getJavaType()

getJDBCType

public int getJDBCType()

getSQLType

public String getSQLType()

isNotNull

public boolean isNotNull()

getResulSetReader

public JDBCResultSetReader getResulSetReader()

getParameterSetter

public JDBCParameterSetter getParameterSetter()

getColumnValue

public Object getColumnValue(Object value)
                      throws Exception
Throws:
Exception

setColumnValue

public Object setColumnValue(Object value,
                             Object columnValue)
                      throws Exception
Throws:
Exception


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