Examples of DriverPropertyInfo


Examples of java.sql.DriverPropertyInfo

        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

Examples of java.sql.DriverPropertyInfo

    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

Examples of java.sql.DriverPropertyInfo

            .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

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

Examples of java.sql.DriverPropertyInfo

      throw new SQLException("jdbc url is incorrect. use " + URL_PREFIX);
    }
    DriverPropertyInfo[] info = new DriverPropertyInfo[7];

    // 1C driver
    info[0] = new DriverPropertyInfo("oce.driver", "V81Driver");
    info[0].description = "OCE driver for concret version of 1C";
    info[0].required = false;
    info[0].choices = new String[] { "V81Driver" };

    info[1] = new DriverPropertyInfo(PropertiesReader.OCE_CFG_HOST,
        "localhost");
    info[1].required = true;

    info[2] = new DriverPropertyInfo(PropertiesReader.OCE_CFG_HOST_USER,
        "username");
    info[2].required = true;

    info[3] = new DriverPropertyInfo(
        PropertiesReader.OCE_CFG_HOST_PASSWORD, "password");
    info[3].required = true;

    info[4] = new DriverPropertyInfo(PropertiesReader.OCE_CFG_1CDB_PATH,
        "C:\\");
    info[4].required = true;

    info[5] = new DriverPropertyInfo(PropertiesReader.OCE_CFG_1CDB_USER,
        "user_1C");
    info[5].required = true;

    info[6] = new DriverPropertyInfo(
        PropertiesReader.OCE_CFG_1CDB_PASSWORD, "userpassword_1C");
    info[6].required = true;

    return info;
  }
View Full Code Here

Examples of java.sql.DriverPropertyInfo

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

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

Examples of java.sql.DriverPropertyInfo

        if ((url != null) && url.startsWith(URL_PREFIX)) {
            info = parseURL(url, info);
        }

        DriverPropertyInfo hostProp = new DriverPropertyInfo(HOST_PROPERTY_KEY,
                info.getProperty(HOST_PROPERTY_KEY));
        hostProp.required = true;
        hostProp.description = "Host name";

        DriverPropertyInfo portProp = new DriverPropertyInfo(PORT_PROPERTY_KEY,
                info.getProperty(PORT_PROPERTY_KEY, "9999"));
        portProp.required = false;
        portProp.description = "port";

        DriverPropertyInfo dbProp = new DriverPropertyInfo(DBNAME_PROPERTY_KEY,
                info.getProperty(DBNAME_PROPERTY_KEY));
        dbProp.required = false;
        dbProp.description = "Database name";

        DriverPropertyInfo readcodeProp = new DriverPropertyInfo(READ_CODE_PROPERTY_KEY,
                info.getProperty(READ_CODE_PROPERTY_KEY));
        readcodeProp.required = false;

        DriverPropertyInfo writeCodeProp = new DriverPropertyInfo(
                WRITE_CODE_PROPERTY_KEY,
                info.getProperty(WRITE_CODE_PROPERTY_KEY));
        writeCodeProp.required = false;
        DriverPropertyInfo[] dpi = new DriverPropertyInfo[5];
View Full Code Here

Examples of java.sql.DriverPropertyInfo

        String[]             choices = new String[] {
            "true", "false"
        };
        DriverPropertyInfo[] pinfo   = new DriverPropertyInfo[6];
        DriverPropertyInfo   p;

        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");
        p.required = false;
        p.choices  = choices;
        pinfo[3]   = p;
        p          = new DriverPropertyInfo("default_schema", null);
        p.value    = info.getProperty("default_schema");
        p.required = false;
        p.choices  = choices;
        pinfo[4]   = p;
        p          = new DriverPropertyInfo("shutdown", null);
        p.value    = info.getProperty("shutdown");
        p.required = false;
        p.choices  = choices;
        pinfo[5]   = p;
View Full Code Here

Examples of java.sql.DriverPropertyInfo

    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";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.