Here are the examples of the java api class java.sql.DriverPropertyInfo taken from open source projects.
1. JDBCDriver#getPropertyInfo()
Project: h-store
File: JDBCDriver.java
File: JDBCDriver.java
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException { DriverPropertyInfo p[] = new DriverPropertyInfo[4]; DriverPropertyInfo pp = new DriverPropertyInfo("encoding", ""); p[0] = pp; pp = new DriverPropertyInfo("password", ""); p[1] = pp; pp = new DriverPropertyInfo("daterepr", "normal"); p[2] = pp; pp = new DriverPropertyInfo("vfs", vfs); p[3] = pp; return p; }
2. PGPropertyTest#testDriverGetPropertyInfo()
Project: pgjdbc
File: PGPropertyTest.java
File: PGPropertyTest.java
public void testDriverGetPropertyInfo() { Driver driver = new Driver(); DriverPropertyInfo[] infos = driver.getPropertyInfo("jdbc:postgresql://localhost/test?user=fred&password=secret&ssl=true", // this is the example we give in docs new Properties()); for (DriverPropertyInfo info : infos) { if ("user".equals(info.name)) { Assert.assertEquals("fred", info.value); } else if ("password".equals(info.name)) { Assert.assertEquals("secret", info.value); } else if ("ssl".equals(info.name)) { Assert.assertEquals("true", info.value); } } }
3. JdbcTest#testConnectionProperties()
Project: calcite
File: JdbcTest.java
File: JdbcTest.java
/** Test for {@link Driver#getPropertyInfo(String, Properties)}. */ @Test public void testConnectionProperties() throws ClassNotFoundException, SQLException { java.sql.Driver driver = DriverManager.getDriver("jdbc:calcite:"); final DriverPropertyInfo[] propertyInfo = driver.getPropertyInfo("jdbc:calcite:", new Properties()); final Set<String> names = new HashSet<>(); for (DriverPropertyInfo info : propertyInfo) { names.add(info.name); } assertTrue(names.contains("SCHEMA")); assertTrue(names.contains("TIME_ZONE")); assertTrue(names.contains("MATERIALIZATIONS_ENABLED")); }
4. SQLiteConfig#getDriverPropertyInfo()
Project: sqlite-jdbc
File: SQLiteConfig.java
File: SQLiteConfig.java
/** * @return Array of DriverPropertyInfo objects. */ static DriverPropertyInfo[] getDriverPropertyInfo() { Pragma[] pragma = Pragma.values(); DriverPropertyInfo[] result = new DriverPropertyInfo[pragma.length]; int index = 0; for (Pragma p : Pragma.values()) { DriverPropertyInfo di = new DriverPropertyInfo(p.pragmaName, null); di.choices = p.choices; di.description = p.description; di.required = false; result[index++] = di; } return result; }
5. Driver#getPropertyInfo()
Project: pgjdbc
File: Driver.java
File: Driver.java
/** * The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties * it should prompt a human for in order to get enough information to connect to a database. * * <p> * Note that depending on the values the human has supplied so far, additional values may become * necessary, so it may be necessary to iterate through several calls to getPropertyInfo * * @param url the Url of the database to connect to * @param info a proposed list of tag/value pairs that will be sent on connect open. * @return An array of DriverPropertyInfo objects describing possible properties. This array may * be an empty array if no properties are required * @see java.sql.Driver#getPropertyInfo */ public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) { Properties copy = new Properties(info); Properties parse = parseURL(url, copy); if (parse != null) { copy = parse; } PGProperty[] knownProperties = PGProperty.values(); DriverPropertyInfo[] props = new DriverPropertyInfo[knownProperties.length]; for (int i = 0; i < props.length; ++i) { props[i] = knownProperties[i].toDriverPropertyInfo(copy); } return props; }
6. JcrDriverTest#shouldReturnRepositoryPropertyInfoWhenMissingPassword()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingPassword() throws SQLException { validUrl = LocalJcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; validProperties.put(LocalJcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(LocalJcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); // validProperties.put(JdbcDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(LocalJcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.passwordPropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.passwordPropertyDescription.text())); assertThat(infos[0].required, is(false)); }
7. JcrDriverTest#shouldReturnRepositoryPropertyInfoWhenMissingUsername()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingUsername() throws SQLException { validUrl = LocalJcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; validProperties.put(LocalJcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); // validProperties.put(JdbcDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(LocalJcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(LocalJcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.usernamePropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.usernamePropertyDescription.text())); assertThat(infos[0].required, is(false)); }
8. JcrDriverTest#shouldReturnRepositoryPropertyInfoWhenMissingWorkspaceName()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingWorkspaceName() throws SQLException { validUrl = LocalJcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; // validProperties.put(JdbcDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(LocalJcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(LocalJcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(LocalJcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.workspaceNamePropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.workspaceNamePropertyDescription.text())); assertThat(infos[0].required, is(false)); }
9. JcrDriverTest#shouldReturnRepositoryPropertyInfoWhenMissingRequiredRepositoryName()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingRequiredRepositoryName() throws SQLException { validUrl = LocalJcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; validProperties.put(LocalJcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(LocalJcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(LocalJcrDriver.PASSWORD_PROPERTY_NAME, "secret"); // validProperties.put(JdbcDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.repositoryNamePropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.repositoryNamePropertyDescription.text())); assertThat(infos[0].required, is(true)); }
10. LocalRepositoryDelegateTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoriesInJndi()
Project: modeshape
File: LocalRepositoryDelegateTest.java
File: LocalRepositoryDelegateTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoriesInJndi() throws SQLException { Properties validProperties = new Properties(); validProperties.put(LocalJcrDriver.WORKSPACE_PROPERTY_NAME, WORKSPACE); validProperties.put(LocalJcrDriver.USERNAME_PROPERTY_NAME, USER_NAME); validProperties.put(LocalJcrDriver.PASSWORD_PROPERTY_NAME, PASSWORD); validProperties.put(LocalJcrDriver.REPOSITORY_PROPERTY_NAME, REPOSITORY_NAME); delegate = factory().createRepositoryDelegate(VALID_JNDI_URL, validProperties, null); DriverPropertyInfo[] infos = delegate.getConnectionInfo().getPropertyInfos(); assertThat(infos.length, is(0)); }
11. LocalRepositoryDelegateTest#connectionInfoShouldBeValid()
Project: modeshape
File: LocalRepositoryDelegateTest.java
File: LocalRepositoryDelegateTest.java
@Test public void connectionInfoShouldBeValid() throws SQLException { delegate = factory().createRepositoryDelegate(VALID_JNDI_URL_WITH_PARMS, new Properties(), null); assertNotNull(delegate.getConnectionInfo()); assertThat(delegate.getConnectionInfo().getUsername(), is(USER_NAME)); assertThat(delegate.getConnectionInfo().getPassword(), is(new String(PASSWORD).toCharArray())); assertThat(delegate.getConnectionInfo().getWorkspaceName(), is(WORKSPACE)); assertThat(delegate.getConnectionInfo().getRepositoryName(), is(REPOSITORY_NAME)); assertThat(delegate.getConnectionInfo().getEffectiveUrl(), is(LocalJcrDriver.JNDI_URL_PREFIX + "jcr/local?user=jsmith&workspace=MyWorkspace&password=******&repositoryName=repositoryName")); DriverPropertyInfo[] infos = delegate.getConnectionInfo().getPropertyInfos(); assertThat(infos.length, is(0)); assertThat(((LocalRepositoryDelegate.JNDIConnectionInfo) delegate.getConnectionInfo()).getRepositoryPath(), is(JNDINAME)); // System.out.println("URL: " delegate.getConnectionInfo().getUrl()); }
12. JcrDriverTest#shouldReturnRepositoryPropertyInfoWhenMissingPassword()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingPassword() throws SQLException { validUrl = JcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); // validProperties.put(JdbcDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.passwordPropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.passwordPropertyDescription.text())); assertThat(infos[0].required, is(false)); }
13. JcrDriverTest#shouldReturnRepositoryPropertyInfoWhenMissingUsername()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingUsername() throws SQLException { validUrl = JcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); // validProperties.put(JdbcDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.usernamePropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.usernamePropertyDescription.text())); assertThat(infos[0].required, is(false)); }
14. JcrDriverTest#shouldReturnRepositoryPropertyInfoWhenMissingWorkspaceName()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingWorkspaceName() throws SQLException { validUrl = JcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; // validProperties.put(JdbcDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.workspaceNamePropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.workspaceNamePropertyDescription.text())); assertThat(infos[0].required, is(false)); }
15. JcrDriverTest#shouldReturnRepositoryPropertyInfoWhenMissingRequiredRepositoryName()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingRequiredRepositoryName() throws SQLException { validUrl = JcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, "secret"); // validProperties.put(JdbcDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.repositoryNamePropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.repositoryNamePropertyDescription.text())); assertThat(infos[0].required, is(true)); }
16. JcrDriverHttpTest#shouldReturnRepositoryPropertyInfoWhenMissingPassword()
Project: modeshape
File: JcrDriverHttpTest.java
File: JcrDriverHttpTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingPassword() throws SQLException { validUrl = JcrDriver.HTTP_URL_PREFIX + validServerName + "/modeshape-rest"; validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.passwordPropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.passwordPropertyDescription.text())); assertThat(infos[0].required, is(false)); }
17. JcrDriverHttpTest#shouldReturnRepositoryPropertyInfoWhenMissingUsername()
Project: modeshape
File: JcrDriverHttpTest.java
File: JcrDriverHttpTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingUsername() throws SQLException { validUrl = JcrDriver.HTTP_URL_PREFIX + validServerName + "/modeshape-rest"; validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.usernamePropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.usernamePropertyDescription.text())); assertThat(infos[0].required, is(false)); }
18. JcrDriverHttpTest#shouldReturnRepositoryPropertyInfoWhenMissingWorkspaceName()
Project: modeshape
File: JcrDriverHttpTest.java
File: JcrDriverHttpTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingWorkspaceName() throws SQLException { validUrl = JcrDriver.HTTP_URL_PREFIX + validServerName + "/modeshape-rest"; validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.workspaceNamePropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.workspaceNamePropertyDescription.text())); assertThat(infos[0].required, is(false)); }
19. JcrDriverHttpTest#shouldReturnRepositoryPropertyInfoWhenMissingRequiredRepositoryName()
Project: modeshape
File: JcrDriverHttpTest.java
File: JcrDriverHttpTest.java
@Test public void shouldReturnRepositoryPropertyInfoWhenMissingRequiredRepositoryName() throws SQLException { validUrl = JcrDriver.HTTP_URL_PREFIX + validServerName + "/modeshape-rest"; validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, "secret"); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(1)); assertThat(infos[0].name, is(JdbcLocalI18n.repositoryNamePropertyName.text())); assertThat(infos[0].description, is(JdbcLocalI18n.repositoryNamePropertyDescription.text())); assertThat(infos[0].required, is(true)); }
20. HttpRepositoryDelegateTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoriesInHTTP()
Project: modeshape
File: HttpRepositoryDelegateTest.java
File: HttpRepositoryDelegateTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoriesInHTTP() throws SQLException { Properties validProperties = new Properties(); validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, WORKSPACE); validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, USER_NAME); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, PASSWORD); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, REPOSITORY_NAME); delegate = factory().createRepositoryDelegate(VALID_HTTP_URL, validProperties, null); DriverPropertyInfo[] infos = delegate.getConnectionInfo().getPropertyInfos(); assertThat(infos.length, is(0)); }
21. HttpRepositoryDelegateTest#connectionInfoShouldBeValid()
Project: modeshape
File: HttpRepositoryDelegateTest.java
File: HttpRepositoryDelegateTest.java
@Test public void connectionInfoShouldBeValid() throws SQLException { delegate = factory().createRepositoryDelegate(VALID_HTTP_URL_WITH_PARMS, new Properties(), null); assertNotNull(delegate.getConnectionInfo()); assertThat(delegate.getConnectionInfo().getUsername(), is(USER_NAME)); assertThat(delegate.getConnectionInfo().getPassword(), is(new String(PASSWORD).toCharArray())); assertThat(delegate.getConnectionInfo().getEffectiveUrl(), is(VALID_HTTP_URL + "?teiidsupport=true&user=jsmith&workspace=MyWorkspace&password=******&repositoryName=repositoryName")); assertThat(delegate.getConnectionInfo().isTeiidSupport(), is(Boolean.TRUE.booleanValue())); DriverPropertyInfo[] infos = delegate.getConnectionInfo().getPropertyInfos(); assertThat(infos.length, is(0)); assertThat((delegate.getConnectionInfo()).getRepositoryPath(), is(SERVER + "/modeshape-rest")); // System.out.println("URL: " + delegate.getConnectionInfo().getUrl()); }
22. TDBDriver#getPropertyInfo()
Project: jena
File: TDBDriver.java
File: TDBDriver.java
@Override protected DriverPropertyInfo[] getPropertyInfo(Properties connProps, List<DriverPropertyInfo> baseDriverProps) { DriverPropertyInfo[] driverProps = new DriverPropertyInfo[2 + baseDriverProps.size()]; this.copyBaseProperties(driverProps, baseDriverProps, 2); // Location parameter driverProps[0] = new DriverPropertyInfo(PARAM_LOCATION, connProps.getProperty(PARAM_LOCATION)); driverProps[0].required = true; driverProps[0].description = "Sets the location of a TDB dataset, should be a file system path. The value " + LOCATION_MEM + " may be used for a non-persistent in-memory dataset but this should only be used for testing"; // Must Exist parameter driverProps[1] = new DriverPropertyInfo(PARAM_MUST_EXIST, connProps.getProperty(PARAM_MUST_EXIST)); driverProps[1].required = false; driverProps[1].choices = new String[] { "true", "false" }; driverProps[1].description = "If set to true requests that the driver check whether the " + PARAM_LOCATION + " parameter refers to an existing location before establishing a connection"; return driverProps; }
23. JDBCDriver#getPropertyInfo()
Project: voltdb
File: JDBCDriver.java
File: JDBCDriver.java
/** * Gets information about the possible properties for this driver. <p> * * The getPropertyInfo method is intended to allow a generic GUI tool * to discover what properties it should prompt a human for in order to * get enough information to connect to a database. Note that depending * on the values the human has supplied so far, additional values may * become necessary, so it may be necessary to iterate though several * calls to getPropertyInfo.<p> * * <!-- start release-specific documentation --> * <div class="ReleaseSpecificDocumentation"> * <h3>HSQLDB-Specific Information:</h3> <p> * * HSQLDB uses the values submitted in info to set the value for * each DriverPropertyInfo object returned. It does not use the default * value that it would use for the property if the value is null. <p> * * </div> <!-- end release-specific documentation --> * * @param url the URL of the database to which to connect * @param info a proposed list of tag/value pairs that will be sent on * connect open * @return an array of DriverPropertyInfo objects describing possible * properties. This array may be an empty array if no properties * are required. */ public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) { if (!acceptsURL(url)) { return new DriverPropertyInfo[0]; } String[] choices = new String[] { "true", "false" }; DriverPropertyInfo[] pinfo = new DriverPropertyInfo[6]; DriverPropertyInfo p; if (info == null) { info = new Properties(); } p = new DriverPropertyInfo("user", null); p.value = info.getProperty("user"); p.required = true; pinfo[0] = p; p = new DriverPropertyInfo("password", null); p.value = info.getProperty("password"); p.required = true; pinfo[1] = p; p = new DriverPropertyInfo("get_column_name", null); p.value = info.getProperty("get_column_name", "true"); p.required = false; p.choices = choices; pinfo[2] = p; p = new DriverPropertyInfo("ifexists", null); p.value = info.getProperty("ifexists", "false"); p.required = false; p.choices = choices; pinfo[3] = p; p = new DriverPropertyInfo("default_schema", null); p.value = info.getProperty("default_schema", "false"); p.required = false; p.choices = choices; pinfo[4] = p; p = new DriverPropertyInfo("shutdown", null); p.value = info.getProperty("shutdown", "false"); p.required = false; p.choices = choices; pinfo[5] = p; return pinfo; }
24. JDBCDriver#getPropertyInfo()
Project: h-store
File: JDBCDriver.java
File: JDBCDriver.java
/** * Gets information about the possible properties for this driver. <p> * * The getPropertyInfo method is intended to allow a generic GUI tool * to discover what properties it should prompt a human for in order to * get enough information to connect to a database. Note that depending * on the values the human has supplied so far, additional values may * become necessary, so it may be necessary to iterate though several * calls to getPropertyInfo.<p> * * <!-- start release-specific documentation --> * <div class="ReleaseSpecificDocumentation"> * <h3>HSQLDB-Specific Information:</h3> <p> * * HSQLDB uses the values submitted in info to set the value for * each DriverPropertyInfo object returned. It does not use the default * value that it would use for the property if the value is null. <p> * * </div> <!-- end release-specific documentation --> * * @param url the URL of the database to which to connect * @param info a proposed list of tag/value pairs that will be sent on * connect open * @return an array of DriverPropertyInfo objects describing possible * properties. This array may be an empty array if no properties * are required. */ public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) { if (!acceptsURL(url)) { return new DriverPropertyInfo[0]; } String[] choices = new String[] { "true", "false" }; DriverPropertyInfo[] pinfo = new DriverPropertyInfo[6]; DriverPropertyInfo p; if (info == null) { info = new Properties(); } p = new DriverPropertyInfo("user", null); p.value = info.getProperty("user"); p.required = true; pinfo[0] = p; p = new DriverPropertyInfo("password", null); p.value = info.getProperty("password"); p.required = true; pinfo[1] = p; p = new DriverPropertyInfo("get_column_name", null); p.value = info.getProperty("get_column_name", "true"); p.required = false; p.choices = choices; pinfo[2] = p; p = new DriverPropertyInfo("ifexists", null); p.value = info.getProperty("ifexists", "false"); p.required = false; p.choices = choices; pinfo[3] = p; p = new DriverPropertyInfo("default_schema", null); p.value = info.getProperty("default_schema", "false"); p.required = false; p.choices = choices; pinfo[4] = p; p = new DriverPropertyInfo("shutdown", null); p.value = info.getProperty("shutdown", "false"); p.required = false; p.choices = choices; pinfo[5] = p; return pinfo; }
25. JenaDriver#getPropertyInfo()
Project: jena
File: JenaDriver.java
File: JenaDriver.java
public final DriverPropertyInfo[] getPropertyInfo(String url, Properties props) throws SQLException { Properties ps = this.getEffectiveProperties(url, props); // Create base driver properties List<DriverPropertyInfo> baseProps = new ArrayList<DriverPropertyInfo>(); // JDBC compatibility level DriverPropertyInfo jdbcCompatLevel = new DriverPropertyInfo(PARAM_JDBC_COMPATIBILITY, ps.getProperty(PARAM_JDBC_COMPATIBILITY, Integer.toString(JdbcCompatibility.DEFAULT))); jdbcCompatLevel.description = "Configures how compatible the driver will attempt to be with JDBC, primarily affects reported column types for result sets"; jdbcCompatLevel.required = false; String[] choices = new String[9]; for (int i = 0; i < choices.length; i++) { choices[i] = Integer.toString(i + 1); } jdbcCompatLevel.choices = choices; baseProps.add(jdbcCompatLevel); // Pre-processors DriverPropertyInfo preProcessor = new DriverPropertyInfo(PARAM_PRE_PROCESSOR, StrUtils.strjoin(",", this.getValues(ps, PARAM_PRE_PROCESSOR))); preProcessor.description = "Configures pre-processors which are used to amend SPARQL text, queries or updates before these are passed to the underlying SPARQL engine, multiple fully qualified class names may be specified"; preProcessor.required = false; baseProps.add(preProcessor); // Logging config DriverPropertyInfo logging = new DriverPropertyInfo(PARAM_LOGGING, ps.getProperty(PARAM_LOGGING)); logging.description = "Sets the path to a log4j properties file for configuring logging, the file system is considered first and then the classpath. If not set defaults to log4j.properties"; logging.required = false; baseProps.add(logging); // Have the derived implementation create the final property information return this.getPropertyInfo(ps, baseProps); }
26. BaseDatabaseConnectionOptions#createConnectionProperties()
Project: SchemaCrawler
File: BaseDatabaseConnectionOptions.java
File: BaseDatabaseConnectionOptions.java
private Properties createConnectionProperties(final String user, final String password) throws SQLException { final List<String> skipProperties = Arrays.asList("server", "host", "port", "database", "urlx", "user", "password", "url"); final Driver jdbcDriver = getJdbcDriver(); final DriverPropertyInfo[] propertyInfo = jdbcDriver.getPropertyInfo(getConnectionUrl(), new Properties()); final Map<String, Boolean> jdbcDriverProperties = new HashMap<>(); for (final DriverPropertyInfo driverPropertyInfo : propertyInfo) { final String jdbcPropertyName = driverPropertyInfo.name.toLowerCase(); if (skipProperties.contains(jdbcPropertyName)) { continue; } jdbcDriverProperties.put(jdbcPropertyName, driverPropertyInfo.required); } final Properties jdbcConnectionProperties = new Properties(); if (user != null) { jdbcConnectionProperties.put("user", user); } if (password != null) { jdbcConnectionProperties.put("password", password); } if (connectionProperties != null) { for (final String connectionProperty : connectionProperties.keySet()) { final String value = connectionProperties.get(connectionProperty); if (jdbcDriverProperties.containsKey(connectionProperty.toLowerCase()) && value != null) { jdbcConnectionProperties.put(connectionProperty, value); } } final Properties urlxConnectionProperties = parseConnectionProperties(connectionProperties.get("urlx")); jdbcConnectionProperties.putAll(urlxConnectionProperties); } return jdbcConnectionProperties; }
27. JDBCDataSourceProvider#readDriverProperties()
Project: dbeaver
File: JDBCDataSourceProvider.java
File: JDBCDataSourceProvider.java
private Collection<DBPPropertyDescriptor> readDriverProperties(DBPConnectionConfiguration connectionInfo, Driver driver) throws DBException { Properties driverProps = new Properties(); //driverProps.putAll(connectionInfo.getProperties()); DriverPropertyInfo[] propDescs; try { propDescs = driver.getPropertyInfo(connectionInfo.getUrl(), driverProps); } catch (Throwable e) { log.debug("Cannot obtain driver's properties", e); return null; } if (propDescs == null) { return null; } List<DBPPropertyDescriptor> properties = new ArrayList<>(); for (DriverPropertyInfo desc : propDescs) { if (DBConstants.DATA_SOURCE_PROPERTY_USER.equals(desc.name) || DBConstants.DATA_SOURCE_PROPERTY_PASSWORD.equals(desc.name)) { // Skip user/password properties continue; } desc.value = getConnectionPropertyDefaultValue(desc.name, desc.value); properties.add(new PropertyDescriptor(ModelMessages.model_jdbc_driver_properties, desc.name, desc.name, desc.description, String.class, desc.required, desc.value, desc.choices, true)); } return properties; }
28. DriverPropertyInfoHelper#addPropInfo()
Project: Mycat-Server
File: DriverPropertyInfoHelper.java
File: DriverPropertyInfoHelper.java
private void addPropInfo(final ArrayList<DriverPropertyInfo> propInfos, final String propName, final String defaultVal, final String description, final String[] choices) { DriverPropertyInfo newProp = new DriverPropertyInfo(propName, defaultVal); newProp.description = description; if (choices != null) { newProp.choices = choices; } propInfos.add(newProp); }
29. DriverPropertyInfoHelper#addPropInfo()
Project: Mycat-Server
File: DriverPropertyInfoHelper.java
File: DriverPropertyInfoHelper.java
private void addPropInfo(final ArrayList<DriverPropertyInfo> propInfos, final String propName, final String defaultVal, final String description, final String[] choices) { DriverPropertyInfo newProp = new DriverPropertyInfo(propName, defaultVal); newProp.description = description; if (choices != null) { newProp.choices = choices; } propInfos.add(newProp); }
30. JcrDriverTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoriesInJndi()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoriesInJndi() throws SQLException { validUrl = LocalJcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; validProperties.put(LocalJcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(LocalJcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(LocalJcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(LocalJcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(0)); }
31. JcrDriverTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoryInJndi()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoryInJndi() throws SQLException { validUrl = LocalJcrDriver.JNDI_URL_PREFIX + jndiNameForRepository; validProperties.put(LocalJcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(LocalJcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(LocalJcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(LocalJcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(0)); }
32. JcrDriverTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidAndCompleteUrlAndNoProperties()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidAndCompleteUrlAndNoProperties() throws SQLException { DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(0)); }
33. LocalRepositoryDelegateTest#connectionPropertyInfoShouldIndicateMissingData()
Project: modeshape
File: LocalRepositoryDelegateTest.java
File: LocalRepositoryDelegateTest.java
@Test public void connectionPropertyInfoShouldIndicateMissingData() throws SQLException { delegate = factory().createRepositoryDelegate(INSUFFICIENT_JNDI_URL, new Properties(), null); assertNotNull(delegate.getConnectionInfo()); DriverPropertyInfo[] infos = delegate.getConnectionInfo().getPropertyInfos(); assertThat(infos.length, is(4)); }
34. JcrDriverTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoriesInJndi()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoriesInJndi() throws SQLException { validUrl = JcrDriver.JNDI_URL_PREFIX + jndiNameForRepositories; validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(0)); }
35. JcrDriverTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoryInJndi()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoryInJndi() throws SQLException { validUrl = JcrDriver.JNDI_URL_PREFIX + jndiNameForRepository; validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(0)); }
36. JcrDriverTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidAndCompleteUrlAndNoProperties()
Project: modeshape
File: JcrDriverTest.java
File: JcrDriverTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidAndCompleteUrlAndNoProperties() throws SQLException { DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(0)); }
37. JcrDriverHttpTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoryInHttp()
Project: modeshape
File: JcrDriverHttpTest.java
File: JcrDriverHttpTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidUrlAndAllPropertiesWithRepositoryInHttp() throws SQLException { validUrl = JcrDriver.HTTP_URL_PREFIX + validServerName + "/modeshape-rest"; validProperties.put(JcrDriver.WORKSPACE_PROPERTY_NAME, "MyWorkspace"); validProperties.put(JcrDriver.USERNAME_PROPERTY_NAME, "jsmith"); validProperties.put(JcrDriver.PASSWORD_PROPERTY_NAME, "secret"); validProperties.put(JcrDriver.REPOSITORY_PROPERTY_NAME, validRepositoryName); DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(0)); }
38. JcrDriverHttpTest#shouldReturnEmptyPropertyInfosWhenSuppliedValidAndCompleteUrlAndNoProperties()
Project: modeshape
File: JcrDriverHttpTest.java
File: JcrDriverHttpTest.java
@Test public void shouldReturnEmptyPropertyInfosWhenSuppliedValidAndCompleteUrlAndNoProperties() throws SQLException { DriverPropertyInfo[] infos = driver.getPropertyInfo(validUrl, validProperties); assertThat(infos.length, is(0)); }
39. HttpRepositoryDelegateTest#connectionPropertyInfoShouldIndicateMissingData()
Project: modeshape
File: HttpRepositoryDelegateTest.java
File: HttpRepositoryDelegateTest.java
@Test public void connectionPropertyInfoShouldIndicateMissingData() throws SQLException { delegate = factory().createRepositoryDelegate(INVALID_URL, new Properties(), null); assertNotNull(delegate.getConnectionInfo()); DriverPropertyInfo[] infos = delegate.getConnectionInfo().getPropertyInfos(); assertThat(infos.length, is(5)); }
40. RemoteEndpointDriver#getPropertyInfo()
Project: jena
File: RemoteEndpointDriver.java
File: RemoteEndpointDriver.java
@Override protected DriverPropertyInfo[] getPropertyInfo(Properties connProps, List<DriverPropertyInfo> baseDriverProps) { DriverPropertyInfo[] driverProps = new DriverPropertyInfo[10 + baseDriverProps.size()]; this.copyBaseProperties(driverProps, baseDriverProps, 10); // Query Endpoint parameter driverProps[0] = new DriverPropertyInfo(PARAM_QUERY_ENDPOINT, connProps.getProperty(PARAM_QUERY_ENDPOINT)); driverProps[0].required = !connProps.containsKey(PARAM_UPDATE_ENDPOINT); driverProps[0].description = "Sets the SPARQL Query endpoint to use for query operations, if this is specified and " + PARAM_UPDATE_ENDPOINT + " is not then a read-only connection will be created"; // Update Endpoint parameter driverProps[1] = new DriverPropertyInfo(PARAM_UPDATE_ENDPOINT, connProps.getProperty(PARAM_UPDATE_ENDPOINT)); driverProps[1].required = !connProps.containsKey(PARAM_UPDATE_ENDPOINT); driverProps[1].description = "Sets the SPARQL Update endpoint to use for update operations, if this is specified and " + PARAM_QUERY_ENDPOINT + " is not then a write-only connection will be created"; // Default Graph parameter driverProps[2] = new DriverPropertyInfo(PARAM_DEFAULT_GRAPH_URI, null); driverProps[2].required = false; driverProps[2].description = "Sets the URI for a default graph for queries, may be specified multiple times to specify multiple graphs which should form the default graph"; // Named Graph parameter driverProps[3] = new DriverPropertyInfo(PARAM_NAMED_GRAPH_URI, null); driverProps[3].required = false; driverProps[3].description = "Sets the URI for a named graph for queries, may be specified multiple times to specify multiple named graphs which should be accessible"; // Using Graph parameter driverProps[4] = new DriverPropertyInfo(PARAM_USING_GRAPH_URI, null); driverProps[4].required = false; driverProps[4].description = "Sets the URI for a default graph for updates, may be specified multiple times to specify multiple graphs which should form the default graph"; // Using Named Graph parameter driverProps[5] = new DriverPropertyInfo(PARAM_USING_NAMED_GRAPH_URI, null); driverProps[5].required = false; driverProps[5].description = "Sets the URI for a named graph for updates, may be specified multiple times to specify multiple named graph which should be accessible"; // Results Types driverProps[6] = new DriverPropertyInfo(PARAM_SELECT_RESULTS_TYPE, connProps.getProperty(PARAM_SELECT_RESULTS_TYPE)); driverProps[6].required = false; driverProps[6].description = "Sets the results type for SELECT queries that will be requested from the remote endpoint"; driverProps[7] = new DriverPropertyInfo(PARAM_MODEL_RESULTS_TYPE, connProps.getProperty(PARAM_MODEL_RESULTS_TYPE)); driverProps[7].required = false; driverProps[7].description = "Sets the results type for CONSTRUCT and DESCRIBE queries that will be requested from the remote endpoint"; // User Name parameter driverProps[8] = new DriverPropertyInfo(PARAM_USERNAME, connProps.getProperty(PARAM_USERNAME)); // Password parameter driverProps[9] = new DriverPropertyInfo(PARAM_PASSWORD, connProps.getProperty(PARAM_PASSWORD)); return driverProps; }
41. MemDriver#getPropertyInfo()
Project: jena
File: MemDriver.java
File: MemDriver.java
@Override protected DriverPropertyInfo[] getPropertyInfo(Properties connProps, List<DriverPropertyInfo> baseDriverProps) { DriverPropertyInfo[] driverProps; if (connProps.containsKey(PARAM_DATASET) || !this.isTrue(connProps, PARAM_EMPTY)) { driverProps = new DriverPropertyInfo[1 + baseDriverProps.size()]; // Dataset parameter driverProps[0] = new DriverPropertyInfo(PARAM_DATASET, connProps.getProperty(PARAM_DATASET)); driverProps[0].required = true; driverProps[0].description = "Sets a path to a file that should be read in to form an in-memory dataset"; this.copyBaseProperties(driverProps, baseDriverProps, 1); } else if (connProps.containsKey(PARAM_EMPTY)) { driverProps = new DriverPropertyInfo[1 + baseDriverProps.size()]; // Empty parameter driverProps[0] = new DriverPropertyInfo(PARAM_EMPTY, connProps.getProperty(PARAM_EMPTY)); driverProps[0].required = true; driverProps[0].choices = new String[] { "true", "false" }; driverProps[0].description = "Sets that the driver will use an empty in-memory dataset as the initial dataset, when set to true the " + PARAM_DATASET + " parameter is not required"; this.copyBaseProperties(driverProps, baseDriverProps, 1); } else { driverProps = new DriverPropertyInfo[2 + baseDriverProps.size()]; // Dataset parameter driverProps[0] = new DriverPropertyInfo(PARAM_DATASET, connProps.getProperty(PARAM_DATASET)); driverProps[0].required = true; driverProps[0].description = "Sets a path to a file that should be read in to form an in-memory dataset"; // Empty parameter driverProps[1] = new DriverPropertyInfo(PARAM_EMPTY, connProps.getProperty(PARAM_EMPTY)); driverProps[1].required = false; driverProps[1].choices = new String[] { "true", "false" }; driverProps[1].description = "Sets that the driver will use an empty in-memory dataset as the initial dataset, when set to true the " + PARAM_DATASET + " parameter is not required"; copyBaseProperties(driverProps, baseDriverProps, 2); } return driverProps; }
42. BootAllTest#testSettingBootAllPropertyWithHomePropertySet()
Project: derby
File: BootAllTest.java
File: BootAllTest.java
/** * DERBY-1296 - Setting property derby.system.bootAll causes an Exception * * Check that setting the system property "derby.system.bootAll" will not * cause an exception when used in combination with the system property * "derby.system.home". * * The property "derby.system.home" is set by default for all tests and does * not need to be explicitly set in this test. */ public void testSettingBootAllPropertyWithHomePropertySet() throws Exception { JDBCClient embedded = getTestConfiguration().getJDBCClient(); String driverName = embedded.getJDBCDriverName(); String url = embedded.getUrlBase(); // Ensure the engine is not booted. try { DriverManager.getDriver(url); fail("Derby is booted!"); } catch (SQLException e) { } Class<?> clazz = Class.forName(driverName); clazz.getConstructor().newInstance(); Driver driver = DriverManager.getDriver(url); DriverPropertyInfo[] attributes = driver.getPropertyInfo(url, null); String returnedDatabases[] = null; for (int i = 0; i < attributes.length; i++) { if (attributes[i].name.equalsIgnoreCase("databaseName")) { returnedDatabases = attributes[i].choices; } } // We expect at least four databases to be booted, // but it could be more if other tests have left databases // around. // DERBY-2069 the single use databases are not // booted automatically, once DERBY-2069 is fixed // the length can be compared to four. assertNotNull(returnedDatabases); assertTrue("Fewer databases booted than expected", returnedDatabases.length >= 1); }
43. ClientDriver#getPropertyInfo()
Project: derby
File: ClientDriver.java
File: ClientDriver.java
public DriverPropertyInfo[] getPropertyInfo(String url, Properties properties) throws SQLException { DriverPropertyInfo driverPropertyInfo[] = new DriverPropertyInfo[2]; // then create a dummy properties just to make the calls go thru. if (properties == null) { properties = new Properties(); } driverPropertyInfo[0] = new DriverPropertyInfo(Attribute.USERNAME_ATTR, properties.getProperty(Attribute.USERNAME_ATTR, BasicClientDataSource40.propertyDefault_user)); driverPropertyInfo[1] = new DriverPropertyInfo(Attribute.PASSWORD_ATTR, properties.getProperty(Attribute.PASSWORD_ATTR)); driverPropertyInfo[0].description = SqlException.getMessageUtil().getTextMessage(MessageId.CONN_USERNAME_DESCRIPTION); driverPropertyInfo[1].description = SqlException.getMessageUtil().getTextMessage(MessageId.CONN_PASSWORD_DESCRIPTION); driverPropertyInfo[0].required = true; // depending on the security mechanism driverPropertyInfo[1].required = false; return driverPropertyInfo; }
44. JDBCDriver#getPropertyInfo()
Project: controller
File: JDBCDriver.java
File: JDBCDriver.java
@Override public DriverPropertyInfo[] getPropertyInfo(String arg0, Properties arg1) throws SQLException { DriverPropertyInfo i = new DriverPropertyInfo("OpenDayLight", "OpenDayLight"); return new DriverPropertyInfo[] { i }; }