* @since 4.0
*/
public static boolean isAnyRole(JDCConnection oConn, String guWorkArea, String sUserId) throws SQLException {
int iIsAnyRole;
CallableStatement oCall;
PreparedStatement oStmt;
ResultSet oRSet;
if (DebugFile.trace) {
DebugFile.writeln("Begin WorkArea.iIsAnyRole([Connection], " + guWorkArea + "," + sUserId + ")");
DebugFile.incIdent();
}
switch (oConn.getDataBaseProduct()) {
case JDCConnection.DBMS_ORACLE:
if (DebugFile.trace)
DebugFile.writeln("Connection.prepareCall({ call k_is_workarea_anyrole ('" + guWorkArea + "','" + sUserId + "',?)})");
oCall = oConn.prepareCall("{ call k_is_workarea_anyrole (?,?,?)}");
oCall.setString(1, guWorkArea);
oCall.setString(2, sUserId);
oCall.registerOutParameter(3, Types.DECIMAL);
oCall.execute();
iIsAnyRole = oCall.getBigDecimal(3).intValue();
oCall.close();
break;
case JDCConnection.DBMS_MSSQL:
case JDCConnection.DBMS_MYSQL:
if (DebugFile.trace)
DebugFile.writeln("Connection.prepareCall({ call k_is_workarea_anyrole ('" + guWorkArea + "','" + sUserId + "',?)})");
oCall = oConn.prepareCall("{ call k_is_workarea_anyrole (?,?,?)}");
oCall.setString(1, guWorkArea);
oCall.setString(2, sUserId);
oCall.registerOutParameter(3, Types.INTEGER);
oCall.execute();
iIsAnyRole = oCall.getInt(3);
oCall.close();
break;
default:
if (DebugFile.trace)