org.brains2b.sql.meta
Class ParameterModel

java.lang.Object
  extended by org.brains2b.sql.meta.ParameterModel
All Implemented Interfaces:
SQLMetaModel

public class ParameterModel
extends java.lang.Object
implements SQLMetaModel

Wrapper around the parameter definition from DatabaseMetaData

This ParameterModel has a method setValue(Object) to set a value for this parameter to be used in calling the Procedure it belongs to

Version:
1.00 [Mrt 30, 2007]
Author:
dennis@brains2b.nl
See Also:
SQLMetaData, SQLRecord

Constructor Summary
ParameterModel(SQLRecord record)
          Create an ParameterModel on the basis of this SQLRecord
 
Method Summary
 int getDataType()
          get the datatype as defined in java.sql.Type
 java.lang.String getName()
          get the name for this model's instance
 int getParamType()
          get the datatype as defined in java.sql.Type
 SQLRecord getRecord()
          the record which defines all the values for the model
 java.lang.String getType()
          get the type of Object defined by the meta model
 java.lang.Object getValue()
          get the value for this parameter
 void setValue(java.lang.Object value)
          set the value for this parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterModel

public ParameterModel(SQLRecord record)
Create an ParameterModel on the basis of this SQLRecord

Parameters:
record - SQLRecord, the record containing the information on this column
Method Detail

getName

public java.lang.String getName()
get the name for this model's instance

This is equal to the name of the table,column, etc.

Specified by:
getName in interface SQLMetaModel
Returns:
String

getRecord

public SQLRecord getRecord()
the record which defines all the values for the model

Specified by:
getRecord in interface SQLMetaModel
Returns:
SQLRecord

getType

public java.lang.String getType()
get the type of Object defined by the meta model

returned value depends on the model: TABLE,COLUMN,INDEX

Specified by:
getType in interface SQLMetaModel
Returns:
String

getDataType

public int getDataType()
get the datatype as defined in java.sql.Type

Returns:
int, the type of the data in this column

getParamType

public int getParamType()
get the datatype as defined in java.sql.Type

Returns:
int, the type of the data in this column

getValue

public java.lang.Object getValue()
get the value for this parameter

Returns:
Object

setValue

public void setValue(java.lang.Object value)
set the value for this parameter

Parameters:
value - Object