org.mule.module.db.internal.domain.type
Interface DbType

All Known Implementing Classes:
AbstractDbType, DynamicDbType, ResolvedDbType, StructuredDbType, UnknownDbType

public interface DbType

Database data type


Method Summary
 int getId()
           
 String getName()
           
 Object getParameterValue(CallableStatement statement, int index)
          Gets the value of an output parameter
 void registerOutParameter(CallableStatement statement, int index)
          Registers an output parameter
 void setParameterValue(PreparedStatement statement, int index, Object value)
          Sets the value of an input parameter
 

Method Detail

getId

int getId()
Returns:
data type ID

getName

String getName()
Returns:
data type name

setParameterValue

void setParameterValue(PreparedStatement statement,
                       int index,
                       Object value)
                       throws SQLException
Sets the value of an input parameter

Parameters:
statement - statement that contains the parameter
index - index of the parameter in the statement (first parameter is 1, the second is 2, etc)
value - value to assign
Throws:
SQLException - if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs; this method is called on a closed PreparedStatement or the type of the given object is ambiguous

getParameterValue

Object getParameterValue(CallableStatement statement,
                         int index)
                         throws SQLException
Gets the value of an output parameter

Parameters:
statement - statement that contains the parameter
index - index of the parameter in the statement (first parameter is 1, the second is 2, etc)
Throws:
SQLException - if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs; this method is called on a closed statement

registerOutParameter

void registerOutParameter(CallableStatement statement,
                          int index)
                          throws SQLException
Registers an output parameter

Parameters:
statement - statement that contains the parameter
index - index of the parameter in the statement (first parameter is 1, the second is 2, etc)
Throws:
SQLException - if the parameterIndex is not valid; if a database access error occurs or this method is called on a closed CallableStatement


Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.