private Connection getConnection() throws SQLException { Connection connection = ConnectionFactory.getInstance().getConnection( jdbcConnectionConfiguration); return connection; }
public Connection getConnection(JDBCConnectionConfiguration config) throws SQLException { Driver driver = getDriver(config); Properties props = new Properties(); if (stringHasValue(config.getUserId())) { props.setProperty("user", config.getUserId()); //$NON-NLS-1$ } if (stringHasValue(config.getPassword())) { props.setProperty("password", config.getPassword()); //$NON-NLS-1$ } props.putAll(config.getProperties()); Connection conn = driver.connect(config.getConnectionURL(), props); if (conn == null) { throw new SQLException(getString("RuntimeError.7")); //$NON-NLS-1$ } return conn; }
public Connection getConnection(JDBCConnectionConfiguration config) throws SQLException { Driver driver = getDriver(config); Properties props = new Properties(); if (stringHasValue(config.getUserId())) { props.setProperty("user", config.getUserId()); //$NON-NLS-1$ } if (stringHasValue(config.getPassword())) { props.setProperty("password", config.getPassword()); //$NON-NLS-1$ } props.putAll(config.getProperties()); Connection conn = driver.connect(config.getConnectionURL(), props); if (conn == null) { throw new SQLException(getString("RuntimeError.7")); //$NON-NLS-1$ } return conn; }
public Connection getConnection() throws SQLException { Connection connection = ConnectionFactory.getInstance().getConnection(jdbcConnectionConfiguration); return connection; }
public Connection getConnection(JDBCConnectionConfiguration config) throws SQLException { Driver driver = getDriver(config); Properties props = new Properties(); if (stringHasValue(config.getUserId())) { props.setProperty("user", config.getUserId()); //$NON-NLS-1$ } if (stringHasValue(config.getPassword())) { props.setProperty("password", config.getPassword()); //$NON-NLS-1$ } if (stringHasValue(config.getRemarksReporting())) { props.setProperty("remarksReporting", config.getRemarksReporting()); //$NON-NLS-1$ } else { props.setProperty("remarksReporting", "true"); //$NON-NLS-1$ } props.putAll(config.getProperties()); Connection conn = driver.connect(config.getConnectionURL(), props); if (conn == null) { throw new SQLException(getString("RuntimeError.7")); //$NON-NLS-1$ } return conn; }
private Connection getConnection() throws SQLException { Connection connection = ConnectionFactory.getInstance().getConnection(jdbcConnectionConfiguration); return connection; }
@Override public boolean validate(List<String> warnings) { boolean valid = true; srid = properties.getProperty(SRID_NAME); if(StringUtils.isEmpty(srid)){ srid = "3857"; } if(connection == null){ try { connection = ConnectionFactory.getInstance().getConnection(context.getJdbcConnectionConfiguration()); } catch (SQLException e) { e.printStackTrace(); valid = false; } } elementsList = FieldUtils.getField(XmlElement.class, "elements", true); return valid; }
Connection connection = null; try { connection = ConnectionFactory.getInstance().getConnection( jdbcConnectionConfiguration); Statement statement = null;