本文整理匯總了Java中java.sql.ParameterMetaData.parameterModeUnknown方法的典型用法代碼示例。如果您正苦於以下問題:Java ParameterMetaData.parameterModeUnknown方法的具體用法?Java ParameterMetaData.parameterModeUnknown怎麽用?Java ParameterMetaData.parameterModeUnknown使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.sql.ParameterMetaData
的用法示例。
在下文中一共展示了ParameterMetaData.parameterModeUnknown方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: parameterModeInStringForm
import java.sql.ParameterMetaData; //導入方法依賴的package包/類
/**
* print the parameter mode in human readable form
*
* @param mode identifies parameter's mode (IN, OUT, or IN_OUT)
* @return the parameter mode in readable form
*
*/
static String parameterModeInStringForm(int mode){
if (mode == ParameterMetaData.parameterModeIn)
return("PARAMETER_MODE_IN");
else if (mode == ParameterMetaData.parameterModeInOut )
return("PARAMETER_MODE_IN_OUT");
else if (mode == ParameterMetaData.parameterModeOut)
return("PARAMETER_MODE_OUT");
else if (mode == ParameterMetaData.parameterModeUnknown)
return("PARAMETER_MODE_UNKNOWN");
else
return("ERROR: donot recognize this parameter mode");
}
示例2: addParametersFromDBMD
import java.sql.ParameterMetaData; //導入方法依賴的package包/類
private void addParametersFromDBMD(java.sql.ResultSet paramTypesRs) throws SQLException {
int i = 0;
while (paramTypesRs.next()) {
String paramName = paramTypesRs.getString(4);
int inOutModifier;
switch (paramTypesRs.getInt(5)) {
case DatabaseMetaData.procedureColumnIn:
inOutModifier = ParameterMetaData.parameterModeIn;
break;
case DatabaseMetaData.procedureColumnInOut:
inOutModifier = ParameterMetaData.parameterModeInOut;
break;
case DatabaseMetaData.procedureColumnOut:
case DatabaseMetaData.procedureColumnReturn:
inOutModifier = ParameterMetaData.parameterModeOut;
break;
default:
inOutModifier = ParameterMetaData.parameterModeUnknown;
}
boolean isOutParameter = false;
boolean isInParameter = false;
if (i == 0 && this.isFunctionCall) {
isOutParameter = true;
isInParameter = false;
} else if (inOutModifier == java.sql.DatabaseMetaData.procedureColumnInOut) {
isOutParameter = true;
isInParameter = true;
} else if (inOutModifier == java.sql.DatabaseMetaData.procedureColumnIn) {
isOutParameter = false;
isInParameter = true;
} else if (inOutModifier == java.sql.DatabaseMetaData.procedureColumnOut) {
isOutParameter = true;
isInParameter = false;
}
int jdbcType = paramTypesRs.getInt(6);
String typeName = paramTypesRs.getString(7);
int precision = paramTypesRs.getInt(8);
int scale = paramTypesRs.getInt(10);
short nullability = paramTypesRs.getShort(12);
CallableStatementParam paramInfoToAdd = new CallableStatementParam(paramName, i++, isInParameter, isOutParameter, jdbcType, typeName, precision,
scale, nullability, inOutModifier);
this.parameterList.add(paramInfoToAdd);
this.parameterMap.put(paramName, paramInfoToAdd);
}
}
示例3: getParameterMode
import java.sql.ParameterMetaData; //導入方法依賴的package包/類
@Override
public int getParameterMode(int param) throws SQLException {
return ParameterMetaData.parameterModeUnknown;
}