类java.sql.ClientInfoStatus源码实例Demo

下面列出了怎么用java.sql.ClientInfoStatus的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: gemfirexd-oss   文件: FailedProperties40.java
/**
 * Creates a new <code>FailedProperties40</code> instance. Since
 * Derby doesn't support any properties, all the keys from the
 * <code>props</code> parameter are added to the
 * <code>failedProps_</code> member with value
 * REASON_UNKNOWN_PROPERTY.
 *
 * @param props a <code>Properties</code> value. Can be null or empty
 */   
public FailedProperties40(Properties props) {
    if (props == null || props.isEmpty()) {
        firstKey_ = null;
        firstValue_ = null;
        return;
    }
    Enumeration e = props.keys();
    firstKey_ = (String)e.nextElement();
    firstValue_ = props.getProperty(firstKey_);
    failedProps_.put(firstKey_, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    while (e.hasMoreElements()) {
        failedProps_.put((String)e.nextElement(), 
                         ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
}
 
源代码2 项目: gemfirexd-oss   文件: ClientConnection.java
/**
 * <code>setClientInfo</code> will throw a <code>SQLClientInfoException</code>
 * uless the <code>properties</code> paramenter is empty, since GemFireXD does
 * not support any properties.
 */
@Override
public void setClientInfo(Properties properties)
    throws SQLClientInfoException {
  if (properties != null && !properties.isEmpty()) {
    HashMap<String, ClientInfoStatus> failedProperties =
        new HashMap<String, ClientInfoStatus>(properties.size());
    String firstKey = null;
    for (String key : properties.stringPropertyNames()) {
      if (firstKey == null) {
        firstKey = key;
      }
      failedProperties.put(key, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
    throw ThriftExceptionUtil.newSQLClientInfoException(
        SQLState.PROPERTY_UNSUPPORTED_CHANGE, failedProperties, null,
        firstKey, properties.getProperty(firstKey));
  }
}
 
源代码3 项目: gemfirexd-oss   文件: FailedProperties40.java
/**
 * Creates a new <code>FailedProperties40</code> instance. Since
 * Derby doesn't support any properties, all the keys from the
 * <code>props</code> parameter are added to the
 * <code>failedProps_</code> member with value
 * REASON_UNKNOWN_PROPERTY.
 *
 * @param props a <code>Properties</code> value. Can be null or empty
 */
public FailedProperties40(Properties props) {
    if (props == null || props.isEmpty()) {
        firstKey_ = null;
        firstValue_ = null;
        return;
    }
    Enumeration e = props.keys();
    firstKey_ = (String)e.nextElement();
    firstValue_ = props.getProperty(firstKey_);
    failedProps_.put(firstKey_, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    while (e.hasMoreElements()) {
        failedProps_.put((String)e.nextElement(), 
    ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
}
 
源代码4 项目: gemfirexd-oss   文件: FailedProperties40.java
/**
 * Creates a new <code>FailedProperties40</code> instance. Since
 * Derby doesn't support any properties, all the keys from the
 * <code>props</code> parameter are added to the
 * <code>failedProps_</code> member with value
 * REASON_UNKNOWN_PROPERTY.
 *
 * @param props a <code>Properties</code> value. Can be null or empty
 */   
public FailedProperties40(Properties props) {
    if (props == null || props.isEmpty()) {
        firstKey_ = null;
        firstValue_ = null;
        return;
    }
    Enumeration e = props.keys();
    firstKey_ = (String)e.nextElement();
    firstValue_ = props.getProperty(firstKey_);
    failedProps_.put(firstKey_, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    while (e.hasMoreElements()) {
        failedProps_.put((String)e.nextElement(), 
                         ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
}
 
源代码5 项目: gemfirexd-oss   文件: ClientConnection.java
/**
 * <code>setClientInfo</code> will throw a <code>SQLClientInfoException</code>
 * uless the <code>properties</code> paramenter is empty, since GemFireXD does
 * not support any properties.
 */
@Override
public void setClientInfo(Properties properties)
    throws SQLClientInfoException {
  if (properties != null && !properties.isEmpty()) {
    HashMap<String, ClientInfoStatus> failedProperties =
        new HashMap<String, ClientInfoStatus>(properties.size());
    String firstKey = null;
    for (String key : properties.stringPropertyNames()) {
      if (firstKey == null) {
        firstKey = key;
      }
      failedProperties.put(key, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
    throw ThriftExceptionUtil.newSQLClientInfoException(
        SQLState.PROPERTY_UNSUPPORTED_CHANGE, failedProperties, null,
        firstKey, properties.getProperty(firstKey));
  }
}
 
源代码6 项目: gemfirexd-oss   文件: FailedProperties40.java
/**
 * Creates a new <code>FailedProperties40</code> instance. Since
 * Derby doesn't support any properties, all the keys from the
 * <code>props</code> parameter are added to the
 * <code>failedProps_</code> member with value
 * REASON_UNKNOWN_PROPERTY.
 *
 * @param props a <code>Properties</code> value. Can be null or empty
 */
public FailedProperties40(Properties props) {
    if (props == null || props.isEmpty()) {
        firstKey_ = null;
        firstValue_ = null;
        return;
    }
    Enumeration e = props.keys();
    firstKey_ = (String)e.nextElement();
    firstValue_ = props.getProperty(firstKey_);
    failedProps_.put(firstKey_, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    while (e.hasMoreElements()) {
        failedProps_.put((String)e.nextElement(), 
    ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
}
 
源代码7 项目: spliceengine   文件: FailedProperties40.java
/**
 * Creates a new <code>FailedProperties40</code> instance. Since
 * Derby doesn't support any properties, all the keys from the
 * <code>props</code> parameter are added to the
 * <code>failedProps_</code> member with value
 * REASON_UNKNOWN_PROPERTY.
 *
 * @param props a <code>Properties</code> value. Can be null or empty
 */   
public FailedProperties40(Properties props) {
    if (props == null || props.isEmpty()) {
        firstKey_ = null;
        firstValue_ = null;
        return;
    }
    Enumeration e = props.keys();
    firstKey_ = (String)e.nextElement();
    firstValue_ = props.getProperty(firstKey_);
    failedProps_.put(firstKey_, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    while (e.hasMoreElements()) {
        failedProps_.put((String)e.nextElement(), 
                         ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
}
 
源代码8 项目: spliceengine   文件: FailedProperties40.java
/**
 * Creates a new <code>FailedProperties40</code> instance. Since
 * Derby doesn't support any properties, all the keys from the
 * <code>props</code> parameter are added to the
 * <code>failedProps_</code> member with value
 * REASON_UNKNOWN_PROPERTY.
 *
 * @param props a <code>Properties</code> value. Can be null or empty
 */
public FailedProperties40(Properties props) {
    if (props == null || props.isEmpty()) {
        firstKey_ = null;
        firstValue_ = null;
        return;
    }
    Enumeration e = props.keys();
    firstKey_ = (String)e.nextElement();
    firstValue_ = props.getProperty(firstKey_);
    failedProps_.put(firstKey_, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    while (e.hasMoreElements()) {
        failedProps_.put((String)e.nextElement(), 
    ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
}
 
源代码9 项目: gemfirexd-oss   文件: ThriftExceptionUtil.java
public static SQLClientInfoException newSQLClientInfoException(
    String sqlState, Map<String, ClientInfoStatus> failedProperties,
    Throwable t, Object... args) {
  return new SQLClientInfoException(getMessageUtil().getCompleteMessage(
      sqlState, args), getSQLStateFromIdentifier(sqlState),
      getSeverityFromIdentifier(sqlState), failedProperties, t);
}
 
源代码10 项目: gemfirexd-oss   文件: ClientConnection.java
/**
 * <code>setClientInfo</code> will always throw a
 * <code>SQLClientInfoException</code> since GemFireXD does not support any
 * properties.
 */
@Override
public void setClientInfo(String name, String value)
    throws SQLClientInfoException {
  if (name != null || value != null) {
    HashMap<String, ClientInfoStatus> failedProperties =
        new HashMap<String, ClientInfoStatus>(1);
    if (name != null) {
      failedProperties.put(name, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
    throw ThriftExceptionUtil.newSQLClientInfoException(
        SQLState.PROPERTY_UNSUPPORTED_CHANGE, failedProperties, null, name,
        value);
  }
}
 
源代码11 项目: snowflake-jdbc   文件: SnowflakeConnectionV1.java
@Override
public void setClientInfo(Properties properties)
throws SQLClientInfoException
{
  Map<String, ClientInfoStatus> failedProps = new HashMap<>();
  Enumeration<?> propList = properties.propertyNames();
  while (propList.hasMoreElements())
  {
    String name = (String) propList.nextElement();
    failedProps.put(name, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
  }
  raiseSetClientInfoException(failedProps);
}
 
源代码12 项目: snowflake-jdbc   文件: SnowflakeConnectionV1.java
@Override
public void setClientInfo(String name, String value)
throws SQLClientInfoException
{
  Map<String, ClientInfoStatus> failedProps = new HashMap<>();
  failedProps.put(name, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
  raiseSetClientInfoException(failedProps);
}
 
源代码13 项目: snowflake-jdbc   文件: SnowflakeConnectionV1.java
private void raiseSetClientInfoException(Map<String, ClientInfoStatus> failedProps) throws SQLClientInfoException
{
  if (isClosed)
  {
    throw new SQLClientInfoException(
        "The connection is not opened.",
        ErrorCode.CONNECTION_CLOSED.getSqlState(),
        ErrorCode.CONNECTION_CLOSED.getMessageCode(), failedProps);
  }

  throw new SQLClientInfoException(
      "The client property cannot be set by setClientInfo.",
      ErrorCode.INVALID_PARAMETER_VALUE.getSqlState(),
      ErrorCode.INVALID_PARAMETER_VALUE.getMessageCode(), failedProps);
}
 
源代码14 项目: gemfirexd-oss   文件: ThriftExceptionUtil.java
public static SQLClientInfoException newSQLClientInfoException(
    String sqlState, Map<String, ClientInfoStatus> failedProperties,
    Throwable t, Object... args) {
  return new SQLClientInfoException(getMessageUtil().getCompleteMessage(
      sqlState, args), getSQLStateFromIdentifier(sqlState),
      getSeverityFromIdentifier(sqlState), failedProperties, t);
}
 
源代码15 项目: gemfirexd-oss   文件: ClientConnection.java
/**
 * <code>setClientInfo</code> will always throw a
 * <code>SQLClientInfoException</code> since GemFireXD does not support any
 * properties.
 */
@Override
public void setClientInfo(String name, String value)
    throws SQLClientInfoException {
  if (name != null || value != null) {
    HashMap<String, ClientInfoStatus> failedProperties =
        new HashMap<String, ClientInfoStatus>(1);
    if (name != null) {
      failedProperties.put(name, ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    }
    throw ThriftExceptionUtil.newSQLClientInfoException(
        SQLState.PROPERTY_UNSUPPORTED_CHANGE, failedProperties, null, name,
        value);
  }
}
 
public SQLClientInfoExceptionTests() {
    map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
}
 
public SQLClientInfoExceptionTests() {
    map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
}
 
源代码18 项目: jdk8u60   文件: SQLClientInfoExceptionTests.java
public SQLClientInfoExceptionTests() {
    map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
}
 
public SQLClientInfoExceptionTests() {
    map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
}
 
public SQLClientInfoExceptionTests() {
    map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
}
 
源代码21 项目: openjdk-jdk9   文件: SQLClientInfoExceptionTests.java
public SQLClientInfoExceptionTests() {
    map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
}
 
源代码22 项目: jdk8u-jdk   文件: SQLClientInfoExceptionTests.java
public SQLClientInfoExceptionTests() {
    map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
}
 
源代码23 项目: hottub   文件: SQLClientInfoExceptionTests.java
public SQLClientInfoExceptionTests() {
    map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
}
 
源代码24 项目: jdk8u_jdk   文件: SQLClientInfoExceptionTests.java
public SQLClientInfoExceptionTests() {
    map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
    map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY);
}
 
源代码25 项目: gemfirexd-oss   文件: FailedProperties40.java
/**
 * <code>getProperties</code> provides a
 * <code>Map<String,ClientInfoStatus></code> object describing the
 * failed properties (as specified in the javadoc for
 * java.sql.SQLClientInfoException).
 *
 * @return a <code>Map<String,ClientInfoStatus></code> object with
 * the failed property keys and the reason why each failed
 */
public Map<String,ClientInfoStatus> getProperties() { return failedProps_; }
 
源代码26 项目: gemfirexd-oss   文件: FailedProperties40.java
/**
 * <code>getProperties</code> provides a
 * <code>Map<String,ClientInfoStatus></code> object describing the
 * failed properties (as specified in the javadoc for
 * java.sql.SQLClientInfoException).
 *
 * @return a <code>Map<String,ClientInfoStatus></code> object with
 * the failed property keys and the reason why each failed
 */
public Map<String,ClientInfoStatus> getProperties() { return failedProps_; }
 
源代码27 项目: gemfirexd-oss   文件: FailedProperties40.java
/**
 * <code>getProperties</code> provides a
 * <code>Map<String,ClientInfoStatus></code> object describing the
 * failed properties (as specified in the javadoc for
 * java.sql.SQLClientInfoException).
 *
 * @return a <code>Map<String,ClientInfoStatus></code> object with
 * the failed property keys and the reason why each failed
 */
public Map<String,ClientInfoStatus> getProperties() { return failedProps_; }
 
源代码28 项目: gemfirexd-oss   文件: FailedProperties40.java
/**
 * <code>getProperties</code> provides a
 * <code>Map<String,ClientInfoStatus></code> object describing the
 * failed properties (as specified in the javadoc for
 * java.sql.SQLClientInfoException).
 *
 * @return a <code>Map<String,ClientInfoStatus></code> object with
 * the failed property keys and the reason why each failed
 */
public Map<String,ClientInfoStatus> getProperties() { return failedProps_; }
 
源代码29 项目: spliceengine   文件: FailedProperties40.java
/**
 * <code>getProperties</code> provides a
 * <code>Map<String,ClientInfoStatus></code> object describing the
 * failed properties (as specified in the javadoc for
 * java.sql.SQLClientInfoException).
 *
 * @return a <code>Map<String,ClientInfoStatus></code> object with
 * the failed property keys and the reason why each failed
 */
public Map<String,ClientInfoStatus> getProperties() { return failedProps_; }
 
源代码30 项目: spliceengine   文件: FailedProperties40.java
/**
 * <code>getProperties</code> provides a
 * <code>Map<String,ClientInfoStatus></code> object describing the
 * failed properties (as specified in the javadoc for
 * java.sql.SQLClientInfoException).
 *
 * @return a <code>Map<String,ClientInfoStatus></code> object with
 * the failed property keys and the reason why each failed
 */
public Map<String,ClientInfoStatus> getProperties() { return failedProps_; }