/** * Gets the names of each of the columns produced for a single run. * * @return an array containing the name of each column * @throws Exception if something goes wrong. */ @Override public String[] getKeyNames() throws Exception { return m_ResultProducer.getKeyNames(); }
/** * Gets the names of each of the columns produced for a single run. * * @return an array containing the name of each column * @throws Exception if something goes wrong. */ @Override public String[] getKeyNames() throws Exception { return m_ResultProducer.getKeyNames(); }
/** * Gets the names of each of the columns produced for a single run. * * @return an array containing the name of each column * @throws Exception if key names cannot be generated */ @Override public String[] getKeyNames() throws Exception { String[] keyNames = m_ResultProducer.getKeyNames(); String[] newKeyNames = new String[keyNames.length + 1]; System.arraycopy(keyNames, 0, newKeyNames, 0, keyNames.length); // Think of a better name for this key field newKeyNames[keyNames.length] = STEP_FIELD_NAME; return newKeyNames; }
/** * Gets the names of each of the columns produced for a single run. * * @return an array containing the name of each column * @throws Exception if key names cannot be generated */ @Override public String[] getKeyNames() throws Exception { String[] keyNames = m_ResultProducer.getKeyNames(); String[] newKeyNames = new String[keyNames.length + 1]; System.arraycopy(keyNames, 0, newKeyNames, 0, keyNames.length); // Think of a better name for this key field newKeyNames[keyNames.length] = STEP_FIELD_NAME; return newKeyNames; }
/** * Scans through the key field names of the result producer to find the index * of the key field to average over. Sets the value of m_KeyIndex to the * index, or -1 if no matching key field was found. * * @return the index of the key field to average over */ protected int findKeyIndex() { m_KeyIndex = -1; try { if (m_ResultProducer != null) { String[] keyNames = m_ResultProducer.getKeyNames(); for (int i = 0; i < keyNames.length; i++) { if (keyNames[i].equals(m_KeyFieldName)) { m_KeyIndex = i; break; } } } } catch (Exception ex) { } return m_KeyIndex; }
/** * Scans through the key field names of the result producer to find the index * of the key field to average over. Sets the value of m_KeyIndex to the * index, or -1 if no matching key field was found. * * @return the index of the key field to average over */ protected int findKeyIndex() { m_KeyIndex = -1; try { if (m_ResultProducer != null) { String[] keyNames = m_ResultProducer.getKeyNames(); for (int i = 0; i < keyNames.length; i++) { if (keyNames[i].equals(m_KeyFieldName)) { m_KeyIndex = i; break; } } } } catch (Exception ex) { } return m_KeyIndex; }
/** * Gets the names of each of the columns produced for a single run. * * @return an array containing the name of each column * @throws Exception if key names cannot be generated */ @Override public String[] getKeyNames() throws Exception { if (m_KeyIndex == -1) { throw new Exception("No key field called " + m_KeyFieldName + " produced by " + m_ResultProducer.getClass().getName()); } String[] keyNames = m_ResultProducer.getKeyNames(); String[] newKeyNames = new String[keyNames.length - 1]; System.arraycopy(keyNames, 0, newKeyNames, 0, m_KeyIndex); System.arraycopy(keyNames, m_KeyIndex + 1, newKeyNames, m_KeyIndex, keyNames.length - m_KeyIndex - 1); return newKeyNames; }
/** * Gets the names of each of the columns produced for a single run. * * @return an array containing the name of each column * @throws Exception if key names cannot be generated */ @Override public String[] getKeyNames() throws Exception { if (m_KeyIndex == -1) { throw new Exception("No key field called " + m_KeyFieldName + " produced by " + m_ResultProducer.getClass().getName()); } String[] keyNames = m_ResultProducer.getKeyNames(); String[] newKeyNames = new String[keyNames.length - 1]; System.arraycopy(keyNames, 0, newKeyNames, 0, m_KeyIndex); System.arraycopy(keyNames, m_KeyIndex + 1, newKeyNames, m_KeyIndex, keyNames.length - m_KeyIndex - 1); return newKeyNames; }
/** * Prints the names of each field out as the first row of the CSV output. * * @param rp the ResultProducer generating our results. * @throws Exception if the field names could not be determined. */ private void printResultNames(ResultProducer rp) throws Exception { String[] key = rp.getKeyNames(); for (int i = 0; i < key.length; i++) { if (i != 0) { m_Out.print(','); } if (key[i] == null) { m_Out.print("?"); } else { m_Out.print("Key_" + key[i].toString()); } } String[] result = rp.getResultNames(); for (String element : result) { m_Out.print(','); if (element == null) { m_Out.print("?"); } else { m_Out.print(element.toString()); } } m_Out.println(""); }
/** * Prints the names of each field out as the first row of the CSV output. * * @param rp the ResultProducer generating our results. * @throws Exception if the field names could not be determined. */ private void printResultNames(ResultProducer rp) throws Exception { String[] key = rp.getKeyNames(); for (int i = 0; i < key.length; i++) { if (i != 0) { m_Out.print(','); } if (key[i] == null) { m_Out.print("?"); } else { m_Out.print("Key_" + key[i].toString()); } } String[] result = rp.getResultNames(); for (String element : result) { m_Out.print(','); if (element == null) { m_Out.print("?"); } else { m_Out.print(element.toString()); } } m_Out.println(""); }
String[] keyNames = rp.getKeyNames(); if (keyNames.length != key.length) { throw new Exception("Key names and key values of different lengths");
String query = "SELECT Key_" + m_CacheKeyName + " FROM " + m_ResultsTableName; String[] keyNames = rp.getKeyNames(); if (keyNames.length != key.length) { throw new Exception("Key names and key values of different lengths");
String[] keyNames = rp.getKeyNames(); if (keyNames.length != key.length) { throw new Exception("Key names and key values of different lengths");
String query = "SELECT Key_" + m_CacheKeyName + " FROM " + m_ResultsTableName; String[] keyNames = rp.getKeyNames(); if (keyNames.length != key.length) { throw new Exception("Key names and key values of different lengths");
String[] keyNames = rp.getKeyNames(); if (keyNames.length != key.length) { throw new Exception("Key names and key values of different lengths");
throw new Error("Unrecognized ResultProducer sending results!!"); String[] keyNames = m_RP.getKeyNames(); String[] resultNames = m_RP.getResultNames(); ArrayList<Attribute> attribInfo = new ArrayList<Attribute>();
String[] keyNames = rp.getKeyNames(); if (keyNames.length != key.length) { throw new Exception("Key names and key values of different lengths");
throw new Error("Unrecognized ResultProducer sending results!!"); String[] keyNames = m_RP.getKeyNames(); String[] resultNames = m_RP.getResultNames(); ArrayList<Attribute> attribInfo = new ArrayList<Attribute>();
String[] names = rp.getKeyNames(); Object[] types = rp.getKeyTypes(); if (names.length != types.length) { query = "CREATE UNIQUE INDEX Key_IDX ON " + tableName + " ("; String[] keyNames = rp.getKeyNames();
String[] names = rp.getKeyNames(); Object[] types = rp.getKeyTypes(); if (names.length != types.length) { query = "CREATE UNIQUE INDEX Key_IDX ON " + tableName + " ("; String[] keyNames = rp.getKeyNames();