|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iplanet.jato.model.sql.StoredProcParameterDescriptor
Encapsulates the metadata needed to describe a StoredProcModel logical field.
The StoredProcModelBase relies on a collection of StoredProcParameterDescriptors to supply the metadata that is required to dynamically prepare and execute the stored procedure. To this end, the descriptor contains metadata which describes the physical stored procedure parameter, such as the parameter name, whether it is an input/output/in-out or return parameter.
Additionally, StoredProcModelBase relies on the descriptor to provide the
logical model field name and type. It is the logical field, not the parameter name,
that the model interface exposes via the Model.getValue(String)
and setValue(String, Object)
operations, amongst others.
This allows application developers to access the model's logical fields
in an object oriented fashion.
Internally, StoredProcModelBase will map the logical field to the physical
parameter as needed.
Note, the name of the logical model field need not be identical with the physical stored procedure parameter name.
StoredProcSchema
,
StoredProcModel
,
StoredProcModelBase
, Serialized FormField Summary | |
static int |
PARAM_IN
Specifies an input parameter |
static int |
PARAM_INOUT
Specifies an in-out parameter |
static int |
PARAM_OUT
Specifies an out parameter |
static int |
PARAM_RESULT
Specifies a result parameter |
Constructor Summary | |
StoredProcParameterDescriptor()
Default constructor. |
|
StoredProcParameterDescriptor(java.lang.String logicalName,
java.lang.String paramName,
int paramType,
int sqlType,
java.lang.Class fieldClass)
|
Method Summary | |
java.lang.Class |
getFieldClass()
Deprecated. Use getParameterClass() instead |
java.lang.String |
getName()
Returns the name of the logical model field. |
java.lang.Class |
getParameterClass()
Returns the logical field type. |
int |
getParameterType()
Returns the parameter type. |
java.lang.String |
getParamName()
Returns the physical stored procedure parameter name. |
int |
getSQLType()
Return the parameter's SQL type. |
void |
setFieldClass(java.lang.Class value)
Deprecated. Use setParameterClass() instead |
void |
setName(java.lang.String value)
Sets the name of the logical model field. |
void |
setParameterClass(java.lang.Class value)
Specifies the logical field type. |
void |
setParameterType(int value)
Sets the parameter type. |
void |
setParamName(java.lang.String value)
Specifies the physical stored procedure parameter name. |
void |
setSQLType(int value)
Sets the parameter's SQL type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PARAM_RESULT
public static final int PARAM_IN
public static final int PARAM_OUT
public static final int PARAM_INOUT
Constructor Detail |
public StoredProcParameterDescriptor()
public StoredProcParameterDescriptor(java.lang.String logicalName, java.lang.String paramName, int paramType, int sqlType, java.lang.Class fieldClass)
logicalName
- Associates this descriptor with a model field,
not to be confused with the actual stored procedure parameter name.paramName
- The physical stored procedure parameter name.paramType
- The parameter type, one of PARAM_IN
,
PARAM_OUT
, PARAM_INOUT
,
or PARAM_RESULT
sqlType
- The actual parameter type as required for proper construction of
the CallableStatement
.
May be any one of the constants specified in java.sql.Types
.
Such as java.sql.Types.NUMERIC
, java.sql.Types.INTEGER
,
java.sql.Types.VARCHAR
, etc.fieldClass
- The logical model field type. Not to be confused with the sqlType.
The logical model field type may be, but need not be identical with the
sqlType.Method Detail |
public java.lang.String getName()
Model.getValue(String)
and setValue(String, Object)
operations, amongst others.public void setName(java.lang.String value)
Model.getValue(String)
and setValue(String, Object)
operations, amongst others.public java.lang.String getParamName()
getName()
public void setParamName(java.lang.String value)
setName(String)
public int getSQLType()
CallableStatement
.
May be any one of the constants specified in java.sql.Types
.
Such as java.sql.Types.NUMERIC
, java.sql.Types.INTEGER
,
java.sql.Types.VARCHAR
, etc.public void setSQLType(int value)
value
- The actual parameter type as required for proper construction of
the CallableStatement
.
May be any one of the constants specified in java.sql.Types
.
Such as java.sql.Types.NUMERIC
, java.sql.Types.INTEGER
,
java.sql.Types.VARCHAR
, etc.public java.lang.Class getFieldClass()
public void setFieldClass(java.lang.Class value)
public java.lang.Class getParameterClass()
getSQLType()
public void setParameterClass(java.lang.Class value)
value
- The logical model field type. This may be any Java class.
This is not to be confused with the SQL type but is usually
assignable from the SQL type.
setSQLType(int)
public int getParameterType()
PARAM_IN
,
PARAM_OUT
, PARAM_INOUT
,
or PARAM_RESULT
public void setParameterType(int value)
value
- The parameter type, one of PARAM_IN
,
PARAM_OUT
, PARAM_INOUT
,
or PARAM_RESULT
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |