Package java.sql

Examples of java.sql.DriverPropertyInfo


                                                                connStringSecretAttributes.length];
     
      int attrIndex = 0;
      for( int i = 0; i < connStringAttributes.length; i++, attrIndex++ )
      {
        optionsNoDB[attrIndex] = new DriverPropertyInfo(connStringAttributes[i][0],
                    finfo.getProperty(connStringAttributes[i][0]));
        optionsNoDB[attrIndex].description = MessageService.getTextMessage(connStringAttributes[i][1]);
      }

      optionsNoDB[0].choices = Monitor.getMonitor().getServiceList(Property.DATABASE_MODULE);
      // since database name is not stored in FormatableProperties, we
      // assign here explicitly
      optionsNoDB[0].value = dbname;

      for( int i = 0; i < connStringSecretAttributes.length; i++, attrIndex++ )
      {
        optionsNoDB[attrIndex] = new DriverPropertyInfo(connStringSecretAttributes[i][0],
                    (finfo.getProperty(connStringSecretAttributes[i][0]) == null? "" : "****"));
        optionsNoDB[attrIndex].description = MessageService.getTextMessage(connStringSecretAttributes[i][1]);
      }

      for( int i = 0; i < connBooleanAttributes.length; i++, attrIndex++ )
      {
        optionsNoDB[attrIndex] = new DriverPropertyInfo(connBooleanAttributes[i][0],
                   Boolean.valueOf(finfo == null? "" : finfo.getProperty(connBooleanAttributes[i][0])).toString());
        optionsNoDB[attrIndex].description = MessageService.getTextMessage(connBooleanAttributes[i][1]);
        optionsNoDB[attrIndex].choices = BOOLEAN_CHOICES;       
      }

View Full Code Here


            .toString()));
      }
    }

    DriverPropertyInfo getAsDriverPropertyInfo() {
      DriverPropertyInfo dpi = new DriverPropertyInfo(this.propertyName, null);
      dpi.choices = getAllowableValues();
      dpi.value = (this.valueAsObject != null) ? this.valueAsObject.toString() : null;
      dpi.required = this.required;
      dpi.description = this.description;
     
View Full Code Here

    if ((url != null) && url.startsWith(URL_PREFIX)) { //$NON-NLS-1$
      info = parseURL(url, info);
    }

    DriverPropertyInfo hostProp = new DriverPropertyInfo(HOST_PROPERTY_KEY, //$NON-NLS-1$
        info.getProperty(HOST_PROPERTY_KEY)); //$NON-NLS-1$
    hostProp.required = true;
    hostProp.description = Messages.getString("NonRegisteringDriver.3"); //$NON-NLS-1$

    DriverPropertyInfo portProp = new DriverPropertyInfo(PORT_PROPERTY_KEY, //$NON-NLS-1$
        info.getProperty(PORT_PROPERTY_KEY, "3306")); //$NON-NLS-1$ //$NON-NLS-2$
    portProp.required = false;
    portProp.description = Messages.getString("NonRegisteringDriver.7"); //$NON-NLS-1$

    DriverPropertyInfo dbProp = new DriverPropertyInfo(DBNAME_PROPERTY_KEY, //$NON-NLS-1$
        info.getProperty(DBNAME_PROPERTY_KEY)); //$NON-NLS-1$
    dbProp.required = false;
    dbProp.description = "Database name"; //$NON-NLS-1$

    DriverPropertyInfo userProp = new DriverPropertyInfo(USER_PROPERTY_KEY, //$NON-NLS-1$
        info.getProperty(USER_PROPERTY_KEY)); //$NON-NLS-1$
    userProp.required = true;
    userProp.description = Messages.getString("NonRegisteringDriver.13"); //$NON-NLS-1$

    DriverPropertyInfo passwordProp = new DriverPropertyInfo(
        PASSWORD_PROPERTY_KEY, //$NON-NLS-1$
        info.getProperty(PASSWORD_PROPERTY_KEY)); //$NON-NLS-1$
    passwordProp.required = true;
    passwordProp.description = Messages
        .getString("NonRegisteringDriver.16"); //$NON-NLS-1$
View Full Code Here

                    } catch (NamingException e) {
                        // do nothing about it ...
                    }
                }
                if (nameRequired || !found) {
                    DriverPropertyInfo info = new DriverPropertyInfo(JdbcLocalI18n.repositoryNamePropertyName.text(), null);
                    info.description = JdbcLocalI18n.repositoryNamePropertyDescription.text();
                    info.required = nameRequired;
                    info.choices = null;
                    results.add(info);
                }
View Full Code Here

        return results.toArray(new DriverPropertyInfo[results.size()]);
    }

    protected void addUrlPropertyInfo( List<DriverPropertyInfo> results ) {
        if (getUrl() == null) {
            DriverPropertyInfo info = new DriverPropertyInfo(JdbcLocalI18n.urlPropertyName.text(), null);
            info.description = JdbcLocalI18n.urlPropertyDescription.text(this.getEffectiveUrl(), getUrlExample());
            info.required = true;
            info.choices = new String[] {getUrlExample()};
            results.add(info);
        }
View Full Code Here

        }
    }

    protected void addUserNamePropertyInfo( List<DriverPropertyInfo> results ) {
        if (getUsername() == null) {
            DriverPropertyInfo info = new DriverPropertyInfo(JdbcLocalI18n.usernamePropertyName.text(), null);
            info.description = JdbcLocalI18n.usernamePropertyDescription.text();
            info.required = false;
            info.choices = null;
            results.add(info);
        }
View Full Code Here

        }
    }

    protected void addPasswordPropertyInfo( List<DriverPropertyInfo> results ) {
        if (getPassword() == null) {
            DriverPropertyInfo info = new DriverPropertyInfo(JdbcLocalI18n.passwordPropertyName.text(), null);
            info.description = JdbcLocalI18n.passwordPropertyDescription.text();
            info.required = false;
            info.choices = null;
            results.add(info);
        }
View Full Code Here

        }
    }

    protected void addWorkspacePropertyInfo( List<DriverPropertyInfo> results ) {
        if (getWorkspaceName() == null) {
            DriverPropertyInfo info = new DriverPropertyInfo(JdbcLocalI18n.workspaceNamePropertyName.text(), null);
            info.description = JdbcLocalI18n.workspaceNamePropertyDescription.text();
            info.required = false;
            info.choices = null;
            results.add(info);
        }
View Full Code Here

        }
    }

    protected void addRepositoryNamePropertyInfo( List<DriverPropertyInfo> results ) {
        if (getRepositoryName() == null) {
            DriverPropertyInfo info = new DriverPropertyInfo(JdbcLocalI18n.repositoryNamePropertyName.text(), null);
            info.description = JdbcLocalI18n.repositoryNamePropertyDescription.text();
            info.required = true;
            info.choices = null;
            results.add(info);
        }
View Full Code Here

        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;
View Full Code Here

TOP

Related Classes of java.sql.DriverPropertyInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.