/** make SQL query for certain operation and return the result. */ public Map executeSQLOperation(String operation, boolean reflectCustomFilter) throws KExceptionClass { dbTransactionClientClass dbTransaction = new dbTransactionClientClass(configuration, log); String sql; if (reflectCustomFilter) { // do bind custom parameters sql = " SELECT " + operation + " FROM " + tableName + finalWhere; bindDBtransaction(dbTransaction, sql); } else { // do NOT bind custom parameters sql = " SELECT " + operation + " FROM " + tableName + defaultWhere; bindDefaultDBtransaction(dbTransaction, sql); } ; // Query to DB dbTransaction.executeQuery(0, 10); if (!dbTransaction.fetch()) throw new KExceptionClass( "*** SQL total error **** \n" + "No row was returned." + "SQL: [" + sql + "]\n ", null); return (dbTransaction); }
/** check whether therer is any loaded value */ public boolean nextRowValue() throws KExceptionClass { return dbTransactionClient.fetch(); }