Package java.sql

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


    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

        return dpi;
    }

    private DriverPropertyInfo buildDriverPropertyInfo(String propertyName, String value) {
        DriverPropertyInfo dpi = new DriverPropertyInfo(propertyName,
                ATTRIBUTE_DESCRIPTIONS_RESOURCE.getString (propertyName));
        if (value != null) {
            dpi.value = value;
        }
        return dpi;
View Full Code Here

                                                                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

        ref.add(new StringRefAddr(getPropertyName(), getValueAsObject().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

  public DriverPropertyInfo[] getPropertyInfo(String paramString, Properties paramProperties)
  {
    String[] arrayOfString = { "true", "false" };
    DriverPropertyInfo[] arrayOfDriverPropertyInfo = new DriverPropertyInfo[6];
    DriverPropertyInfo localDriverPropertyInfo = new DriverPropertyInfo("user", null);
    localDriverPropertyInfo.value = paramProperties.getProperty("user");
    localDriverPropertyInfo.required = true;
    arrayOfDriverPropertyInfo[0] = localDriverPropertyInfo;
    localDriverPropertyInfo = new DriverPropertyInfo("password", null);
    localDriverPropertyInfo.value = paramProperties.getProperty("password");
    localDriverPropertyInfo.required = true;
    arrayOfDriverPropertyInfo[1] = localDriverPropertyInfo;
    localDriverPropertyInfo = new DriverPropertyInfo("get_column_name", null);
    localDriverPropertyInfo.value = paramProperties.getProperty("get_column_name", "true");
    localDriverPropertyInfo.required = false;
    localDriverPropertyInfo.choices = arrayOfString;
    arrayOfDriverPropertyInfo[2] = localDriverPropertyInfo;
    localDriverPropertyInfo = new DriverPropertyInfo("ifexists", null);
    localDriverPropertyInfo.value = paramProperties.getProperty("ifexists");
    localDriverPropertyInfo.required = false;
    localDriverPropertyInfo.choices = arrayOfString;
    arrayOfDriverPropertyInfo[3] = localDriverPropertyInfo;
    localDriverPropertyInfo = new DriverPropertyInfo("default_schema", null);
    localDriverPropertyInfo.value = paramProperties.getProperty("default_schema");
    localDriverPropertyInfo.required = false;
    localDriverPropertyInfo.choices = arrayOfString;
    arrayOfDriverPropertyInfo[4] = localDriverPropertyInfo;
    localDriverPropertyInfo = new DriverPropertyInfo("shutdown", null);
    localDriverPropertyInfo.value = paramProperties.getProperty("shutdown");
    localDriverPropertyInfo.required = false;
    localDriverPropertyInfo.choices = arrayOfString;
    arrayOfDriverPropertyInfo[5] = localDriverPropertyInfo;
    return arrayOfDriverPropertyInfo;
View Full Code Here

    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 = false;
    hostProp.description = "Hostname of Hive Server";

    DriverPropertyInfo portProp = new DriverPropertyInfo(PORT_PROPERTY_KEY,
        info.getProperty(PORT_PROPERTY_KEY, ""));
    portProp.required = false;
    portProp.description = "Port number of Hive Server";

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

    DriverPropertyInfo[] dpi = new DriverPropertyInfo[3];
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)) {
      info = parseURL(url, info);
    }

    DriverPropertyInfo hostProp = new DriverPropertyInfo(HOST_PROPERTY_KEY,
        info.getProperty(HOST_PROPERTY_KEY, ""));
    hostProp.required = false;
    hostProp.description = "Hostname of Hive Server2";

    DriverPropertyInfo portProp = new DriverPropertyInfo(PORT_PROPERTY_KEY,
        info.getProperty(PORT_PROPERTY_KEY, ""));
    portProp.required = false;
    portProp.description = "Port number of Hive Server2";

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

    DriverPropertyInfo[] dpi = new DriverPropertyInfo[3];
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.