/** * Sets the database url using the DatabaseUtils file * * @throws Exception if something goes wrong */ public void setSource() throws Exception { m_DataBaseConnection = newDatabaseConnection(); m_URL = m_DataBaseConnection.getDatabaseURL(); m_User = m_DataBaseConnection.getUsername(); m_Password = m_DataBaseConnection.getPassword(); }
/** * Sets the database url using the DatabaseUtils file * * @throws Exception if something goes wrong */ public void setSource() throws Exception { m_DataBaseConnection = newDatabaseConnection(); m_URL = m_DataBaseConnection.getDatabaseURL(); m_User = m_DataBaseConnection.getUsername(); m_Password = m_DataBaseConnection.getPassword(); }
/** * Set the environment variables to use. * * @param env the environment variables to use */ @Override public void setEnvironment(Environment env) { m_env = env; try { // force a new connection and setting of all parameters // with environment variables resolved m_DataBaseConnection = newDatabaseConnection(); setUrl(m_URL); setUser(m_User); setPassword(m_Password); } catch (Exception ex) { // we won't complain about it here... } }
/** * Set the environment variables to use. * * @param env the environment variables to use */ @Override public void setEnvironment(Environment env) { m_env = env; try { // force a new connection and setting of all parameters // with environment variables resolved m_DataBaseConnection = newDatabaseConnection(); setUrl(m_URL); setUser(m_User); setPassword(m_Password); } catch (Exception ex) { // we won't complain about it here... } }
/** * Sets the database url * * @param url the database url */ public void setSource(String url) { try { m_DataBaseConnection = newDatabaseConnection(); setUrl(url); m_User = m_DataBaseConnection.getUsername(); m_Password = m_DataBaseConnection.getPassword(); } catch (Exception ex) { printException(ex); } }
/** * Sets the database url, user and pw * * @param url the database url * @param userName the user name * @param password the password */ public void setSource(String url, String userName, String password) { try { m_DataBaseConnection = newDatabaseConnection(); setUrl(url); setUser(userName); setPassword(password); } catch (Exception ex) { printException(ex); } }
/** * Sets the database url * * @param url the database url */ public void setSource(String url) { try { m_DataBaseConnection = newDatabaseConnection(); setUrl(url); m_User = m_DataBaseConnection.getUsername(); m_Password = m_DataBaseConnection.getPassword(); } catch (Exception ex) { printException(ex); } }
/** * Sets the database url, user and pw * * @param url the database url * @param userName the user name * @param password the password */ public void setSource(String url, String userName, String password) { try { m_DataBaseConnection = newDatabaseConnection(); setUrl(url); setUser(userName); setPassword(password); } catch (Exception ex) { printException(ex); } }
/** * Resets the Loader to the settings in either the default DatabaseUtils.props * or any property file that the user has specified via setCustomPropsFile(). */ public void resetOptions() { resetStructure(); try { if (m_DataBaseConnection != null && m_DataBaseConnection.isConnected()) { m_DataBaseConnection.disconnectFromDatabase(); } m_DataBaseConnection = newDatabaseConnection(); } catch (Exception ex) { printException(ex); } m_URL = m_DataBaseConnection.getDatabaseURL(); if (m_URL == null) { m_URL = "none set!"; } m_User = m_DataBaseConnection.getUsername(); if (m_User == null) { m_User = ""; } m_Password = m_DataBaseConnection.getPassword(); if (m_Password == null) { m_Password = ""; } m_orderBy = new ArrayList<String>(); }
/** * Resets the Loader to the settings in either the default DatabaseUtils.props * or any property file that the user has specified via setCustomPropsFile(). */ public void resetOptions() { resetStructure(); try { if (m_DataBaseConnection != null && m_DataBaseConnection.isConnected()) { m_DataBaseConnection.disconnectFromDatabase(); } m_DataBaseConnection = newDatabaseConnection(); } catch (Exception ex) { printException(ex); } m_URL = m_DataBaseConnection.getDatabaseURL(); if (m_URL == null) { m_URL = "none set!"; } m_User = m_DataBaseConnection.getUsername(); if (m_User == null) { m_User = ""; } m_Password = m_DataBaseConnection.getPassword(); if (m_Password == null) { m_Password = ""; } m_orderBy = new ArrayList<String>(); }
m_DataBaseConnection.disconnectFromDatabase(); m_DataBaseConnection = newDatabaseConnection(); } catch (Exception ex) { printException(ex);
m_DataBaseConnection.disconnectFromDatabase(); m_DataBaseConnection = newDatabaseConnection(); } catch (Exception ex) { printException(ex);