Java Code Examples for java.sql.ParameterMetaData#parameterModeUnknown()
The following examples show how to use
java.sql.ParameterMetaData#parameterModeUnknown() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Utility.java From birt with Eclipse Public License 1.0 | 6 votes |
/** * give the stored procedure's column type name from the type. * @param type * @return */ public static String toModeType( int type ) { switch ( type ) { case ParameterMetaData.parameterModeUnknown: return "Unknown"; case ParameterMetaData.parameterModeIn: return "Input"; case ParameterMetaData.parameterModeInOut: return "Input/Output"; case ParameterMetaData.parameterModeOut: return "Output"; case 5: return "Return Value"; default: return "Unknown"; } }
Example 2
Source File: ParameterMetaDataJdbc30Test.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
/** * 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"); }
Example 3
Source File: ParameterMetaDataJdbc30Test.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
/** * 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"); }
Example 4
Source File: SQLTools.java From jsqsh with Apache License 2.0 | 5 votes |
/** * Decodes a parameter mode number into a readable string * @param mode The mode * @return The string */ public static String getParameterMode(int mode) { switch (mode) { case ParameterMetaData.parameterModeIn: return "IN"; case ParameterMetaData.parameterModeInOut: return "INOUT"; case ParameterMetaData.parameterModeOut: return "OUT"; case ParameterMetaData.parameterModeUnknown: return "UNKNOWN"; default: return "UNRECOGNIZED"; } }
Example 5
Source File: ParameterMetaDataJdbc30Test.java From spliceengine with GNU Affero General Public License v3.0 | 5 votes |
/** * 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"); }
Example 6
Source File: CallableStatement.java From lams with GNU General Public License v2.0 | 4 votes |
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); } }
Example 7
Source File: CallableStatement.java From r-course with MIT License | 4 votes |
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); } }
Example 8
Source File: CallableStatement.java From Komondor with GNU General Public License v3.0 | 4 votes |
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); } }
Example 9
Source File: ESParameterMetaData.java From sql4es with Apache License 2.0 | 4 votes |
@Override public int getParameterMode(int param) throws SQLException { return ParameterMetaData.parameterModeUnknown; }
Example 10
Source File: CallableStatement.java From FoxTelem with GNU General Public License v3.0 | 4 votes |
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); } }