/** * Counts the number of rows that are loaded from the database * * @throws Exception if the number of rows cannot be calculated * @return the entire number of rows */ private int getRowCount() throws Exception { String query = "SELECT COUNT(*) FROM " + endOfQuery(false); if (m_DataBaseConnection.execute(query) == false) { throw new Exception("Cannot count results tuples."); } ResultSet rs = m_DataBaseConnection.getResultSet(); rs.next(); int i = rs.getInt(1); rs.close(); return i; }
/** * Counts the number of rows that are loaded from the database * * @throws Exception if the number of rows cannot be calculated * @return the entire number of rows */ private int getRowCount() throws Exception { String query = "SELECT COUNT(*) FROM " + endOfQuery(false); if (m_DataBaseConnection.execute(query) == false) { throw new Exception("Cannot count results tuples."); } ResultSet rs = m_DataBaseConnection.getResultSet(); rs.next(); int i = rs.getInt(1); rs.close(); return i; }
try { String limitQ = limitQuery(m_query, 0, choice); if (m_DataBaseConnection.execute(limitQ) == false) { throw new IOException("Query didn't produce results"); if (m_DataBaseConnection.execute(query) == true) { rs1 = m_DataBaseConnection.getResultSet(); rs1.next(); || m_DataBaseConnection.execute("SELECT DISTINCT ( " + columnName + " ) FROM " + end + " ORDER BY " + columnName) == false) { attributeTypes[i - 1] = Attribute.STRING; if (m_DataBaseConnection.execute(query) == true) { rs1 = m_DataBaseConnection.getResultSet(); stringToNominal(rs1, i);
try { String limitQ = limitQuery(m_query, 0, choice); if (m_DataBaseConnection.execute(limitQ) == false) { throw new IOException("Query didn't produce results"); if (m_DataBaseConnection.execute(query) == true) { rs1 = m_DataBaseConnection.getResultSet(); rs1.next(); || m_DataBaseConnection.execute("SELECT DISTINCT ( " + columnName + " ) FROM " + end + " ORDER BY " + columnName) == false) { attributeTypes[i - 1] = Attribute.STRING; if (m_DataBaseConnection.execute(query) == true) { rs1 = m_DataBaseConnection.getResultSet(); stringToNominal(rs1, i);
if (m_DataBaseConnection.execute(limitQuery(m_query, m_counter, m_choice)) == false) { throw new Exception("Tuple could not be retrieved.");
if (m_DataBaseConnection.execute(limitQuery(m_query, m_counter, m_choice)) == false) { throw new Exception("Tuple could not be retrieved.");