java.sql.ClientInfoStatus Java Examples
The following examples show how to use
java.sql.ClientInfoStatus.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FailedProperties40.java From spliceengine with GNU Affero General Public License v3.0 | 6 votes |
/** * 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); } }
Example #2
Source File: FailedProperties40.java From spliceengine with GNU Affero General Public License v3.0 | 6 votes |
/** * 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); } }
Example #3
Source File: FailedProperties40.java From gemfirexd-oss with Apache License 2.0 | 6 votes |
/** * 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); } }
Example #4
Source File: ClientConnection.java From gemfirexd-oss with Apache License 2.0 | 6 votes |
/** * <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)); } }
Example #5
Source File: FailedProperties40.java From gemfirexd-oss with Apache License 2.0 | 6 votes |
/** * 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); } }
Example #6
Source File: FailedProperties40.java From gemfirexd-oss with Apache License 2.0 | 6 votes |
/** * 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); } }
Example #7
Source File: FailedProperties40.java From gemfirexd-oss with Apache License 2.0 | 6 votes |
/** * 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); } }
Example #8
Source File: ClientConnection.java From gemfirexd-oss with Apache License 2.0 | 6 votes |
/** * <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)); } }
Example #9
Source File: SnowflakeConnectionV1.java From snowflake-jdbc with Apache License 2.0 | 5 votes |
@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); }
Example #10
Source File: SnowflakeConnectionV1.java From snowflake-jdbc with Apache License 2.0 | 5 votes |
@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); }
Example #11
Source File: SnowflakeConnectionV1.java From snowflake-jdbc with Apache License 2.0 | 5 votes |
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); }
Example #12
Source File: ClientConnection.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
/** * <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); } }
Example #13
Source File: ThriftExceptionUtil.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
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); }
Example #14
Source File: ThriftExceptionUtil.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
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); }
Example #15
Source File: ClientConnection.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
/** * <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); } }
Example #16
Source File: SQLClientInfoExceptionTests.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
public SQLClientInfoExceptionTests() { map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); }
Example #17
Source File: SQLClientInfoExceptionTests.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public SQLClientInfoExceptionTests() { map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); }
Example #18
Source File: SQLClientInfoExceptionTests.java From hottub with GNU General Public License v2.0 | 4 votes |
public SQLClientInfoExceptionTests() { map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); }
Example #19
Source File: SQLClientInfoExceptionTests.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public SQLClientInfoExceptionTests() { map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); }
Example #20
Source File: SQLClientInfoExceptionTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public SQLClientInfoExceptionTests() { map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); }
Example #21
Source File: SQLClientInfoExceptionTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public SQLClientInfoExceptionTests() { map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); }
Example #22
Source File: SQLClientInfoExceptionTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public SQLClientInfoExceptionTests() { map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); }
Example #23
Source File: SQLClientInfoExceptionTests.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public SQLClientInfoExceptionTests() { map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); }
Example #24
Source File: SQLClientInfoExceptionTests.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public SQLClientInfoExceptionTests() { map.put("1", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); map.put("21", ClientInfoStatus.REASON_UNKNOWN_PROPERTY); }
Example #25
Source File: FailedProperties40.java From gemfirexd-oss with Apache License 2.0 | 2 votes |
/** * <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_; }
Example #26
Source File: FailedProperties40.java From gemfirexd-oss with Apache License 2.0 | 2 votes |
/** * <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_; }
Example #27
Source File: FailedProperties40.java From gemfirexd-oss with Apache License 2.0 | 2 votes |
/** * <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_; }
Example #28
Source File: FailedProperties40.java From gemfirexd-oss with Apache License 2.0 | 2 votes |
/** * <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_; }
Example #29
Source File: FailedProperties40.java From spliceengine with GNU Affero General Public License v3.0 | 2 votes |
/** * <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_; }
Example #30
Source File: FailedProperties40.java From spliceengine with GNU Affero General Public License v3.0 | 2 votes |
/** * <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_; }