boolean isRequiredByDatabase = super.isResultRequired(rp, key); super.acceptResult(rp, key, result);
/** * Determines the table name that results will be inserted into. If required: * a connection will be opened, an experiment index table created, and the * results table created. * * @param rp the ResultProducer * @throws Exception if an error occurs */ protected void updateResultsTableName(ResultProducer rp) throws Exception { if (!isConnected()) { connectToDatabase(); } if (!experimentIndexExists()) { createExperimentIndex(); } String tableName = getResultsTableName(rp); if (tableName == null) { tableName = createExperimentIndexEntry(rp); } if (!tableExists(tableName)) { createResultsTable(rp, tableName); } m_ResultsTableName = tableName; }
/** * Perform any postprocessing. When this method is called, it indicates that * no more results will be sent that need to be grouped together in any way. * * @param rp the ResultProducer that generated the results * @throws Exception if an error occurs */ @Override public void postProcess(ResultProducer rp) throws Exception { if (m_ResultProducer != rp) { throw new Error("Unrecognized ResultProducer calling postProcess!!"); } disconnectFromDatabase(); }
/** * Lets user enter username/password/URL. */ private void chooseURLUsername() { String dbaseURL=((DatabaseResultListener)m_Exp.getResultListener()).getDatabaseURL(); String username=((DatabaseResultListener)m_Exp.getResultListener()).getUsername(); DatabaseConnectionDialog dbd= new DatabaseConnectionDialog((Frame)SwingUtilities. getWindowAncestor(SimpleSetupPanel.this),dbaseURL,username); dbd.setLocationRelativeTo(SwingUtilities.getWindowAncestor(SimpleSetupPanel.this)); dbd.setVisible(true); //if (dbaseURL == null) { if (dbd.getReturnValue()==JOptionPane.CLOSED_OPTION) { return; } ((DatabaseResultListener)m_Exp.getResultListener()).setUsername(dbd.getUsername()); ((DatabaseResultListener)m_Exp.getResultListener()).setPassword(dbd.getPassword()); ((DatabaseResultListener)m_Exp.getResultListener()).setDatabaseURL(dbd.getURL()); ((DatabaseResultListener)m_Exp.getResultListener()).setDebug(dbd.getDebug()); m_ResultsDestinationPathTField.setText(dbd.getURL()); } /**
DatabaseResultListener drl = null; try { drl = new DatabaseResultListener(); } catch (Exception e) { e.printStackTrace(); drl.setDatabaseURL(m_destinationDatabaseURL); m_Exp.setResultListener(drl); } else {
m_destinationDatabaseURL = (new DatabaseResultListener()).getDatabaseURL(); } catch (Exception e) {}
m_ResultsDestinationCBox.setSelectedItem(DEST_DATABASE_TEXT); m_ResultsDestinationPathLabel.setText("URL:"); m_destinationDatabaseURL = ((DatabaseResultListener)exp.getResultListener()).getDatabaseURL(); m_ResultsDestinationPathTField.setText(m_destinationDatabaseURL); m_BrowseDestinationButton.setEnabled(true);
/** * Lets user enter username/password/URL. */ private void chooseURLUsername() { String dbaseURL=((DatabaseResultListener)m_Exp.getResultListener()).getDatabaseURL(); String username=((DatabaseResultListener)m_Exp.getResultListener()).getUsername(); DatabaseConnectionDialog dbd= new DatabaseConnectionDialog((Frame)SwingUtilities. getWindowAncestor(SimpleSetupPanel.this),dbaseURL,username); dbd.setLocationRelativeTo(SwingUtilities.getWindowAncestor(SimpleSetupPanel.this)); dbd.setVisible(true); //if (dbaseURL == null) { if (dbd.getReturnValue()==JOptionPane.CLOSED_OPTION) { return; } ((DatabaseResultListener)m_Exp.getResultListener()).setUsername(dbd.getUsername()); ((DatabaseResultListener)m_Exp.getResultListener()).setPassword(dbd.getPassword()); ((DatabaseResultListener)m_Exp.getResultListener()).setDatabaseURL(dbd.getURL()); ((DatabaseResultListener)m_Exp.getResultListener()).setDebug(dbd.getDebug()); m_ResultsDestinationPathTField.setText(dbd.getURL()); } /**
DatabaseResultListener drl = null; try { drl = new DatabaseResultListener(); } catch (Exception e) { e.printStackTrace(); drl.setDatabaseURL(m_destinationDatabaseURL); m_Exp.setResultListener(drl); } else {
m_destinationDatabaseURL = (new DatabaseResultListener()).getDatabaseURL(); } catch (Exception e) {}
m_ResultsDestinationCBox.setSelectedItem(DEST_DATABASE_TEXT); m_ResultsDestinationPathLabel.setText("URL:"); m_destinationDatabaseURL = ((DatabaseResultListener)exp.getResultListener()).getDatabaseURL(); m_ResultsDestinationPathTField.setText(m_destinationDatabaseURL); m_BrowseDestinationButton.setEnabled(true);
/** * Determines the table name that results will be inserted into. If required: * a connection will be opened, an experiment index table created, and the * results table created. * * @param rp the ResultProducer * @throws Exception if an error occurs */ protected void updateResultsTableName(ResultProducer rp) throws Exception { if (!isConnected()) { connectToDatabase(); } if (!experimentIndexExists()) { createExperimentIndex(); } String tableName = getResultsTableName(rp); if (tableName == null) { tableName = createExperimentIndexEntry(rp); } if (!tableExists(tableName)) { createResultsTable(rp, tableName); } m_ResultsTableName = tableName; }
boolean isRequiredByDatabase = super.isResultRequired(rp, key); super.acceptResult(rp, key, result);
((DatabaseResultListener) exp.getResultListener()).getDatabaseURL(); try { if (m_InstanceQuery == null) {
/** * Perform any postprocessing. When this method is called, it indicates that * no more results will be sent that need to be grouped together in any way. * * @param rp the ResultProducer that generated the results * @throws Exception if an error occurs */ @Override public void postProcess(ResultProducer rp) throws Exception { if (m_ResultProducer != rp) { throw new Error("Unrecognized ResultProducer calling postProcess!!"); } disconnectFromDatabase(); }
((DatabaseResultListener) exp.getResultListener()).getDatabaseURL(); try { if (m_InstanceQuery == null) {