| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttribble.sql.FieldTypeMap
abstract class FieldTypeMap
Maps an SQL field (table column) to a class member variable or setter method.
This class acts as both a factory and a field mapper. As a factory, it creates a mapping object which assigns a single column from an SQL query result set row to a single member of the result object, either by calling a setter member method of the result class or by directly assigning the value to a member value of the result class.
 Method getInstance() is used to find a factory object for
 a specific field type.
 
 The create() methods are called from a factory object
 to create a mapping object for a specific query result field.
 
 
        Copyright ©2008 by David R. Tribble, all rights reserved.
        Permission is granted to any person or entity except those designated by
        by the United States Department of State as a terrorist, or terrorist
        government or agency, to use and distribute this source code provided
        that the original copyright notice remains present and unaltered.
| Field Summary | |
|---|---|
| (package private)  java.lang.reflect.Method | m_setterResult type member setter method. | 
| (package private)  java.lang.reflect.Field | m_varResult type member variable. | 
| (package private) static java.lang.String | REV | 
| Constructor Summary | |
|---|---|
| FieldTypeMap()Default constructor. | |
| FieldTypeMap(java.lang.reflect.Field var)Constructor. | |
| FieldTypeMap(java.lang.reflect.Method meth)Constructor. | |
| Method Summary | |
|---|---|
| (package private) abstract  FieldTypeMap | create(java.lang.reflect.Field var)Create a FieldTypeMapobject for converting a specific column
 value from the current row of the result set and assigning it to the
 appropriate result class member variable. | 
| (package private) abstract  FieldTypeMap | create(java.lang.reflect.Method meth)Create a FieldTypeMapobject for converting a specific column
 value from the current row of the result set and assigning it to the
 appropriate result class member setter method. | 
| (package private) static FieldTypeMap | getInstance(java.lang.Class type)Constructor. | 
| (package private) abstract  boolean | mapResultField(java.lang.Object result,
               int colNo,
               java.sql.ResultSet rset)Retrieve the column value from the current row of the result set and assign it to the appropriate result class member variable or setter method. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
static final java.lang.String REV
java.lang.reflect.Field m_var
java.lang.reflect.Method m_setter
| Constructor Detail | 
|---|
FieldTypeMap()
FieldTypeMap(java.lang.reflect.Method meth)
meth - Class member setter method of the result object type.FieldTypeMap(java.lang.reflect.Field var)
var - Class member variable of the result object type.| Method Detail | 
|---|
static FieldTypeMap getInstance(java.lang.Class type)
type - A class type for a class member variable or setter method parameter.
abstract FieldTypeMap create(java.lang.reflect.Method meth)
FieldTypeMap object for converting a specific column
 value from the current row of the result set and assigning it to the
 appropriate result class member setter method.
meth - Class member setter method of the result object type.
FieldTypeMap.abstract FieldTypeMap create(java.lang.reflect.Field var)
FieldTypeMap object for converting a specific column
 value from the current row of the result set and assigning it to the
 appropriate result class member variable.
var - Class member variable of the result object type.
FieldTypeMap.
abstract boolean mapResultField(java.lang.Object result,
                                int colNo,
                                java.sql.ResultSet rset)
                         throws java.sql.SQLException,
                                java.lang.IllegalAccessException,
                                java.lang.reflect.InvocationTargetException
result - The result object whose members are to be populated with the column values
 from the current result set row.colNo - Column index to retrieve within the current result set row.rset - Result set row, containing the column value to retrieve.
java.sql.SQLException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||