Repository: incubator-trafodion Updated Branches: refs/heads/master d02fe4781 -> 927ab50bf
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4ResultSetMetaData.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4ResultSetMetaData.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4ResultSetMetaData.java new file mode 100644 index 0000000..5b4d4cd --- /dev/null +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4ResultSetMetaData.java @@ -0,0 +1,309 @@ +// @@@ START COPYRIGHT @@@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// @@@ END COPYRIGHT @@@ + +package org.trafodion.jdbc.t4; + +import java.sql.SQLException; +import java.util.logging.Level; + +public class TrafT4ResultSetMetaData implements java.sql.ResultSetMetaData { + + // begin required methods + public String getCatalogName(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].catalogName_; + } + + public String getColumnClassName(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].getColumnClassName(); + } + + public int getColumnCount() throws SQLException { + return outputDesc_.length; + } + + public int getColumnDisplaySize(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].displaySize_; + } + + public String getColumnLabel(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + + return (outputDesc_[column - 1].columnLabel_ == null) ? outputDesc_[column - 1].name_ + : outputDesc_[column - 1].columnLabel_; + } + + public String getColumnName(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].name_; + } + + public int getColumnType(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].dataType_; + } + + public String getColumnTypeName(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].getColumnTypeName(connection_.getLocale()); + } + + public int getPrecision(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].precision_; + } + + public int getScale(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].scale_; + } + + public String getSchemaName(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].schemaName_; + } + + public String getTableName(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].tableName_; + } + + public boolean isAutoIncrement(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].isAutoIncrement_; + } + + public boolean isCaseSensitive(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].isCaseSensitive_; + } + + public boolean isCurrency(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].isCurrency_; + } + + public boolean isDefinitelyWritable(int column) throws SQLException { + return true; + } + + public int isNullable(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].isNullable_; + } + + public boolean isReadOnly(int column) throws SQLException { + return false; + } + + public boolean isSearchable(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].isSearchable_; + } + + public boolean isSigned(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].isSigned_; + } + + public boolean isWritable(int column) throws SQLException { + return true; + } + + // //////////////////////// + // begin custom accessors// + // //////////////////////// + + public int getFSDataType(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].fsDataType_; + } + + public int getMaxLength(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].maxLen_; + } + + public int getOdbcCharset(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].odbcCharset_; + } + + public int getRowLength() throws SQLException { + // this is the same for all params + // only if we have no input params will we throw an error + if (outputDesc_.length == 0) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.props_.getLocale(), + "invalid_desc_index", null); + } + + return outputDesc_[0].rowLength_; + } + + public int getSqlCharset(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].sqlCharset_; + } + + public int getSqlPrecision(int column) throws SQLException { + if (column > outputDesc_.length) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].sqlPrecision_; + } + + public int getSqlDatetimeCode(int param) throws SQLException { + return stmt_.ist_.pr_.outputDesc[param - 1].datetimeCode_; + } + + // ///////////////////////////////// + // these are legacy names...do not remove these yet even though they are + // duplicate + // /////////////////////////////// + + /** + * @deprecated + */ + public String cpqGetCharacterSet(int column) throws SQLException { + if ((column > outputDesc_.length) || (column <= 0)) { + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_desc_index", + null); + } + return outputDesc_[column - 1].getCharacterSetName(); + } + + /** + * @deprecated + */ + public int getSqlTypeCode(int param) throws SQLException { + return stmt_.ist_.pr_.outputDesc[param - 1].dataType_; + } // end getSqlTypeCode + + /** + * @deprecated + */ + public int getSqlLength(int param) throws SQLException { + return stmt_.ist_.pr_.outputDesc[param - 1].maxLen_; + } // end getSqlTypeCode + + TrafT4ResultSetMetaData(TrafT4Statement stmt, TrafT4Desc[] outputDesc) { + if (stmt.connection_.props_.t4Logger_.isLoggable(Level.FINE) == true) { + Object p[] = T4LoggingUtilities.makeParams(stmt.connection_.props_, stmt, outputDesc); + stmt.connection_.props_.t4Logger_.logp(Level.FINE, "TrafT4ResultSetMetaData", "", "", p); + } + + connection_ = stmt.connection_; + outputDesc_ = outputDesc; + stmt_ = stmt; + } + + TrafT4ResultSetMetaData(TrafT4ResultSet resultSet, TrafT4Desc[] outputDesc) { + if (resultSet.connection_.props_.t4Logger_.isLoggable(Level.FINE) == true) { + Object p[] = T4LoggingUtilities.makeParams(resultSet.connection_.props_, resultSet, outputDesc); + resultSet.connection_.props_.t4Logger_.logp(Level.FINE, "TrafT4ResultSetMetaData", "", "", p); + } + + resultSet_ = resultSet; + connection_ = resultSet_.connection_; + outputDesc_ = outputDesc; + stmt_ = resultSet.stmt_; + } + + TrafT4ResultSet resultSet_; + TrafT4Connection connection_; + TrafT4Desc[] outputDesc_; + TrafT4Statement stmt_; + public Object unwrap(Class iface) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + public boolean isWrapperFor(Class iface) throws SQLException { + // TODO Auto-generated method stub + return false; + } +} http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4Statement.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4Statement.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4Statement.java index d28746f..9e16f22 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4Statement.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/TrafT4Statement.java @@ -42,7 +42,7 @@ import java.util.logging.LogRecord; * the <code>java.sql.Statement</code> interface. * </p> */ -public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { +public class TrafT4Statement extends TrafT4Handle implements java.sql.Statement { // java.sql.Statement interface Methods public void addBatch(String sql) throws SQLException { @@ -265,7 +265,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { if (autoGeneratedKeys == TrafT4Statement.NO_GENERATED_KEYS) { ret = execute(sql); } else { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "auto_generated_keys_not_supported", null); } return ret; @@ -293,7 +293,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } else if (columnIndexes.length == 0) { ret = execute(sql); } else { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "auto_generated_keys_not_supported", null); } return ret; @@ -321,7 +321,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } else if (columnNames.length == 0) { ret = execute(sql); } else { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "auto_generated_keys_not_supported", null); } return ret; @@ -359,7 +359,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { String sql = (String) batchCommands_.get(i); if (sql == null) { - se = HPT4Messages.createSQLException(connection_.props_, this.ist_.ic_.getLocale(), + se = TrafT4Messages.createSQLException(connection_.props_, this.ist_.ic_.getLocale(), "batch_command_failed", "Invalid SQL String"); throw new BatchUpdateException(se.getMessage(), se.getSQLState(), new int[0]); } @@ -367,15 +367,15 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { sqlStmtType_ = ist_.getSqlStmtType(sql); if (sqlStmtType_ == TRANSPORT.TYPE_SELECT) { - se = HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + se = TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "select_in_batch_not_supported", null); throw new BatchUpdateException(se.getMessage(), se.getSQLState(), new int[0]); } else if (sqlStmtType_ == TRANSPORT.TYPE_STATS) { - se = HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + se = TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "infostats_invalid_error", null); throw new BatchUpdateException(se.getMessage(), se.getSQLState(), new int[0]); } else if (sqlStmtType_ == TRANSPORT.TYPE_CONFIG) { - se = HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + se = TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "config_cmd_invalid_error", null); throw new BatchUpdateException(se.getMessage(), se.getSQLState(), new int[0]); } @@ -415,7 +415,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { BatchUpdateException be; - se = HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + se = TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "batch_command_failed", null); be = new BatchUpdateException(se.getMessage(), se.getSQLState(), batchRowCount_); be.setNextException(e); @@ -460,7 +460,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { validateExecDirectInvocation(sql); if (sqlStmtType_ != TRANSPORT.TYPE_SELECT && sqlStmtType_ != TRANSPORT.TYPE_STATS) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "non_select_invalid", + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "non_select_invalid", null); } try { @@ -508,7 +508,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { validateExecDirectInvocation(sql); // 7708 if (sqlStmtType_ == TRANSPORT.TYPE_SELECT && (ist_.stmtIsLock != true)) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "select_invalid", null); + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "select_invalid", null); } try { ist_.execute(TRANSPORT.SRVR_API_SQLEXECDIRECT, 0, 0, null, queryTimeout_, sql_, this); @@ -548,7 +548,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { if (autoGeneratedKeys == TrafT4Statement.NO_GENERATED_KEYS) { ret = executeUpdate(sql); } else { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "auto_generated_keys_not_supported", null); } return ret; @@ -576,7 +576,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } else if (columnIndexes.length == 0) { ret = executeUpdate(sql); } else { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "auto_generated_keys_not_supported", null); } return ret; @@ -604,7 +604,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } else if (columnNames.length == 0) { ret = executeUpdate(sql); } else { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "auto_generated_keys_not_supported", null); } return ret; @@ -682,7 +682,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { connection_.props_.getLogWriter().println(temp); } - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "auto_generated_keys_not_supported", null); } @@ -905,7 +905,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } if (ist_ == null) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_statement_handle", null); } @@ -1029,7 +1029,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { fetchDirection_ = ResultSet.FETCH_FORWARD; break; default: - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_fetch_direction", null); } } @@ -1051,7 +1051,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } if (rows < 0) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_fetch_size", + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_fetch_size", null); } else if (rows == 0) { fetchSize_ = TrafT4ResultSet.DEFAULT_FETCH_SIZE; @@ -1077,7 +1077,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } if (max < 0) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_maxFieldSize_value", null); } maxFieldSize_ = max; @@ -1100,7 +1100,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } if (max < 0) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_maxRows_value", + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_maxRows_value", null); } maxRows_ = max; @@ -1122,10 +1122,10 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { connection_.props_.getLogWriter().println(temp); } - //HPT4Messages.throwUnsupportedFeatureException(connection_.props_, connection_.getLocale(), "setQueryTimeout()"); + //TrafT4Messages.throwUnsupportedFeatureException(connection_.props_, connection_.getLocale(), "setQueryTimeout()"); if (seconds < 0) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_queryTimeout_value", null); } queryTimeout_ = seconds; @@ -1181,7 +1181,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { ist_.setRowCount(-1); clearWarnings(); if (isClosed_) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_statement", + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_statement", null); } try { @@ -1213,7 +1213,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } } - private void setResultSet(HPT4Desc[] outputDesc) throws SQLException { + private void setResultSet(TrafT4Desc[] outputDesc) throws SQLException { if (connection_.props_.t4Logger_.isLoggable(Level.FINER) == true) { Object p[] = T4LoggingUtilities.makeParams(connection_.props_, outputDesc); connection_.props_.t4Logger_.logp(Level.FINER, "TrafT4Statement", "setResultSet", "", p); @@ -1235,7 +1235,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { this.transactionToJoin = txid; } - void setMultipleResultSets(int num_result_sets, HPT4Desc[][] output_descriptors, String[] stmt_labels, + void setMultipleResultSets(int num_result_sets, TrafT4Desc[][] output_descriptors, String[] stmt_labels, String[] proxySyntax) throws SQLException { if (num_result_sets < 1) return; @@ -1243,7 +1243,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { resultSet_ = new TrafT4ResultSet[num_result_sets]; num_result_sets_ = num_result_sets; for (int i = 0; i < num_result_sets; i++) { - HPT4Desc[] desc = output_descriptors[i]; + TrafT4Desc[] desc = output_descriptors[i]; if (desc == null) { resultSet_[i] = null; } else { @@ -1254,7 +1254,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { } // ---------------------------------------------------------------------------------- - void setExecute2Outputs(byte[] values, short rowsAffected, boolean endOfData, String[] proxySyntax, HPT4Desc[] desc) + void setExecute2Outputs(byte[] values, short rowsAffected, boolean endOfData, String[] proxySyntax, TrafT4Desc[] desc) throws SQLException { num_result_sets_ = 1; result_set_offset = 0; @@ -1406,7 +1406,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { if (resultSetType != ResultSet.TYPE_FORWARD_ONLY && resultSetType != ResultSet.TYPE_SCROLL_INSENSITIVE && resultSetType != ResultSet.TYPE_SCROLL_SENSITIVE) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_resultset_type", null); } @@ -1418,13 +1418,13 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { resultSetType_ = resultSetType; } if (resultSetConcurrency != ResultSet.CONCUR_READ_ONLY && resultSetConcurrency != ResultSet.CONCUR_UPDATABLE) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_resultset_concurrency", null); } if ((resultSetHoldability != 0) && (resultSetHoldability != ResultSet.CLOSE_CURSORS_AT_COMMIT) && (resultSetHoldability != ResultSet.HOLD_CURSORS_OVER_COMMIT)) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_holdability", + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_holdability", null); } @@ -1471,7 +1471,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { if (resultSetType != ResultSet.TYPE_FORWARD_ONLY && resultSetType != ResultSet.TYPE_SCROLL_INSENSITIVE && resultSetType != ResultSet.TYPE_SCROLL_SENSITIVE) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_resultset_type", null); } @@ -1483,13 +1483,13 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { resultSetType_ = resultSetType; } if (resultSetConcurrency != ResultSet.CONCUR_READ_ONLY && resultSetConcurrency != ResultSet.CONCUR_UPDATABLE) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_resultset_concurrency", null); } if ((resultSetHoldability != 0) && (resultSetHoldability != ResultSet.CLOSE_CURSORS_AT_COMMIT) && (resultSetHoldability != ResultSet.HOLD_CURSORS_OVER_COMMIT)) { - throw HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_holdability", + throw TrafT4Messages.createSQLException(connection_.props_, connection_.getLocale(), "invalid_holdability", null); } @@ -1555,7 +1555,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { roundingMode_ = Utility.getRoundingMode(roundingMode); } - void closeErroredConnection(HPT4Exception sme) { + void closeErroredConnection(TrafT4Exception sme) { connection_.closeErroredConnection(sme); } @@ -1625,7 +1625,7 @@ public class TrafT4Statement extends HPT4Handle implements java.sql.Statement { int roundingMode_ = BigDecimal.ROUND_HALF_EVEN; - HPT4Desc[] inputDesc_, outputDesc_; + TrafT4Desc[] inputDesc_, outputDesc_; short operationID_; byte[] operationBuffer_; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/Utility.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/Utility.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/Utility.java index a3224d7..7099fa7 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/Utility.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/Utility.java @@ -105,7 +105,7 @@ class Utility { double indbl = inbd.doubleValue(); // double abdbl = inbd.abs().doubleValue(); Need to do MIN check as well if (indbl > (double) Float.MAX_VALUE) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", inbd.toString()); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", inbd.toString()); } } // end checkFloatBoundary @@ -126,7 +126,7 @@ class Utility { // need to check min as well // BigDecimal minbd = new BigDecimal(Double.MIN_VALUE); if ((inbd.compareTo(maxbd) > 0)) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", inbd.toString()); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", inbd.toString()); } } // end checkDoubleBoundary @@ -146,7 +146,7 @@ class Utility { static void checkIntegerBoundary(Locale locale, BigDecimal inbd) throws SQLException { long inlong = inbd.longValue(); if ((inlong > Integer.MAX_VALUE) || (inlong < Integer.MIN_VALUE)) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); } } // end checkIntegerBoundary @@ -167,7 +167,7 @@ class Utility { BigDecimal maxbd = new BigDecimal(Long.MAX_VALUE); maxbd = maxbd.add(maxbd); if ((inlong < 0) || (inbd.compareTo(maxbd) > 0)) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); } } // end checkIntegerBoundary @@ -187,7 +187,7 @@ class Utility { long inlong = inbd.longValue(); long maxushort = (Short.MAX_VALUE * 2) + 1; if ((inlong < 0) || (inlong > maxushort)) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); } } // end checkIntegerBoundary @@ -207,7 +207,7 @@ class Utility { long inlong = inbd.longValue(); long maxuint = ((long) Integer.MAX_VALUE * 2L) + 1L; if ((inlong < 0) || (inlong > maxuint)) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); } } // end checkIntegerBoundary @@ -226,7 +226,7 @@ class Utility { static void checkTinyintBoundary(Locale locale, BigDecimal inbd) throws SQLException { long inlong = inbd.longValue(); if ((inlong > Byte.MAX_VALUE) || (inlong < Byte.MIN_VALUE)) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); } } // end checkTinyintBoundary @@ -245,7 +245,7 @@ class Utility { static void checkShortBoundary(Locale locale, BigDecimal inbd) throws SQLException { long inlong = inbd.longValue(); if ((inlong > Short.MAX_VALUE) || (inlong < Short.MIN_VALUE)) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", String.valueOf(inlong)); } } // end checkShortBoundary @@ -296,7 +296,7 @@ class Utility { * BigDecimal.valueOf(((DataWrapper)paramValue).longValue); */ } else { - throw HPT4Messages.createSQLException(null, locale, "object_type_not_supported", paramValue); + throw TrafT4Messages.createSQLException(null, locale, "object_type_not_supported", paramValue); } return tmpbd; } // end getBigDecimalValue @@ -319,7 +319,7 @@ class Utility { BigDecimal maxbd = new BigDecimal(Math.pow(10, precision)); BigDecimal minbd = maxbd.negate(); if ((inbd.compareTo(maxbd) >= 0) || (inbd.compareTo(minbd) < 0)) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", inbd.toString()); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", inbd.toString()); } } } // end checkBigDecimalBoundary @@ -350,7 +350,7 @@ class Utility { Object[] messageArguments = new Object[1]; messageArguments[0] = new String("A numeric overflow occurred during an arithmetic computation " + "or data conversion."); - throw HPT4Messages.createSQLWarning(null, "8411", messageArguments); + throw TrafT4Messages.createSQLWarning(null, "8411", messageArguments); } catch (SQLWarning e) { @@ -449,7 +449,7 @@ class Utility { */ static void checkLongBoundary(Locale locale, BigDecimal inbd) throws SQLException { if ((inbd.compareTo(long_maxbd) > 0) || (inbd.compareTo(long_minbd) < 0)) { - throw HPT4Messages.createSQLException(null, locale, "numeric_out_of_range", inbd.toString()); + throw TrafT4Messages.createSQLException(null, locale, "numeric_out_of_range", inbd.toString()); } } // end checkBigDecimalBoundary http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_GetObjRefHdl_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_GetObjRefHdl_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_GetObjRefHdl_exc_.java index 564fe5b..a641e8a 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_GetObjRefHdl_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_GetObjRefHdl_exc_.java @@ -37,7 +37,7 @@ class odbc_Dcs_GetObjRefHdl_exc_ { // error cases, so the following variable will contain // any error text generated by this JDBC driver. // Note, this variable is not part of the message, but it - // represents a value stored in the HPT4Messages_*.properties file. + // represents a value stored in the TrafT4Messages_*.properties file. // String clientErrorText; @@ -67,13 +67,13 @@ class odbc_Dcs_GetObjRefHdl_exc_ { case TRANSPORT.CEE_SUCCESS: break; case odbc_Dcs_GetObjRefHdl_ASParamError_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ErrorText); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ErrorText); case odbc_Dcs_GetObjRefHdl_LogonUserFailure_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_unable_to_logon", ""); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_unable_to_logon", ""); case odbc_Dcs_GetObjRefHdl_ASNotAvailable_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_dcs_srvr_not_available", ErrorText); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_dcs_srvr_not_available", ErrorText); case odbc_Dcs_GetObjRefHdl_DSNotAvailable_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_ds_not_available", new T4Properties() + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_ds_not_available", new T4Properties() .getServerDataSource()); case odbc_Dcs_GetObjRefHdl_PortNotAvailable_exn_: case odbc_Dcs_GetObjRefHdl_ASTryAgain_exn_: @@ -85,11 +85,11 @@ class odbc_Dcs_GetObjRefHdl_exc_ { clientErrorText = "ids_port_not_available"; break; case odbc_Dcs_GetObjRefHdl_InvalidUser_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_28_000", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_28_000", null); case odbc_Dcs_GetObjRefHdl_ASTimeout_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_s1_t00", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_s1_t00", null); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "unknown_connect_error", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "unknown_connect_error", null); } } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_StopSrvr_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_StopSrvr_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_StopSrvr_exc_.java index 44b6796..6c36de4 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_StopSrvr_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_Dcs_StopSrvr_exc_.java @@ -41,7 +41,7 @@ class odbc_Dcs_StopSrvr_exc_ { // error cases, so the following variable will contain // any error text generated by this JDBC driver. // Note, this variable is not part of the message, but it - // represents a value stored in the HPT4Messages_*.properties file. + // represents a value stored in the TrafT4Messages_*.properties file. // String clientErrorText; @@ -74,13 +74,13 @@ class odbc_Dcs_StopSrvr_exc_ { case odbcas_ASSvc_StopSrvr_ProcessStopError_exn_: case odbcas_ASSvc_StopSrvr_SrvrInUseByAnotherClient_exn_: ErrorText = ic.decodeBytes(buffer1.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ErrorText); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ErrorText); case odbcas_ASSvc_StopSrvr_ASNotAvailable_exn_: ErrorText = ic.decodeBytes(buffer1.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_dcs_srvr_not_available", ErrorText); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_dcs_srvr_not_available", ErrorText); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "unknown_error", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "unknown_error", null); } // end switch } // end extractFromByteArray } // end odbc_Dcs_StopSrvr_exc_ http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Close_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Close_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Close_exc_.java index 619bece..ebd7e8c 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Close_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Close_exc_.java @@ -57,13 +57,13 @@ class odbc_SQLSvc_Close_exc_ { case odbc_SQLSvc_Close_ParamError_exn_: ParamError = ic.decodeBytes(buf.extractString(), 1); ; - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); case odbc_SQLSvc_Close_InvalidConnection_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); case odbc_SQLSvc_Close_TransactionError_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp1, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp1, addr); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); } } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_EndTransaction_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_EndTransaction_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_EndTransaction_exc_.java index f46d161..2f1aed4 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_EndTransaction_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_EndTransaction_exc_.java @@ -74,13 +74,13 @@ class odbc_SQLSvc_EndTransaction_exc_ { break; case odbc_SQLSvc_EndTransaction_ParamError_exn_: ParamError = ic.decodeBytes(buffer1.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); case odbc_SQLSvc_EndTransaction_InvalidConnection_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); case odbc_SQLSvc_EndTransaction_SQLInvalidHandle_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp1, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp1, addr); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); } // end switch } // end extractFromByteArray http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Execute_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Execute_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Execute_exc_.java index ebf444e..ea23bd0 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Execute_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Execute_exc_.java @@ -66,7 +66,7 @@ class odbc_SQLSvc_Execute_exc_ { case odbc_SQLSvc_Execute_SQLStillExecuting_exn_: break; case odbc_SQLSvc_Execute_SQLQueryCancelled_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_s1_008", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_s1_008", null); case odbc_SQLSvc_Execute_SQLError_exn_: SQLError = new ERROR_DESC_LIST_def(); SQLError.extractFromByteArray(buf, ic); @@ -77,13 +77,13 @@ class odbc_SQLSvc_Execute_exc_ { break; case odbc_SQLSvc_Execute_ParamError_exn_: ParamError = ic.decodeBytes(buf.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); case odbc_SQLSvc_Execute_InvalidConnection_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); case odbc_SQLSvc_Execute_TransactionError_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp1, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp1, addr); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); } } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Fetch_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Fetch_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Fetch_exc_.java index b125b5d..970aece 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Fetch_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Fetch_exc_.java @@ -67,20 +67,20 @@ class odbc_SQLSvc_Fetch_exc_ { case odbc_SQLSvc_Fetch_SQLNoDataFound_exn_: break; case odbc_SQLSvc_Fetch_SQLQueryCancelled_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_s1_008", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_s1_008", null); case odbc_SQLSvc_Fetch_SQLError_exn_: SQLError = new ERROR_DESC_LIST_def(); SQLError.extractFromByteArray(buffer1, ic); break; case odbc_SQLSvc_Fetch_ParamError_exn_: ParamError = ic.decodeBytes(buffer1.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); case odbc_SQLSvc_Fetch_InvalidConnection_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); case odbc_SQLSvc_Fetch_TransactionError_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp1, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp1, addr); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); } } // end extractFromByteArray http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_GetSQLCatalogs_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_GetSQLCatalogs_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_GetSQLCatalogs_exc_.java index c48c67f..78bf2b8 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_GetSQLCatalogs_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_GetSQLCatalogs_exc_.java @@ -87,13 +87,13 @@ class odbc_SQLSvc_GetSQLCatalogs_exc_ { break; case odbc_SQLSvc_GetSQLCatalogs_ParamError_exn_: ParamError = ic.decodeBytes(buffer1.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); case odbc_SQLSvc_GetSQLCatalogs_SQLInvalidHandle_exn_: break; case odbc_SQLSvc_GetSQLCatalogs_InvalidConnection_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); } } // end extractFromByteArray http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_InitializeDialogue_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_InitializeDialogue_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_InitializeDialogue_exc_.java index 0488eef..1eb43e1 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_InitializeDialogue_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_InitializeDialogue_exc_.java @@ -61,12 +61,12 @@ class odbc_SQLSvc_InitializeDialogue_exc_ { SQLError.extractFromByteArray(buf, ic); break; case odbc_SQLSvc_InitializeDialogue_InvalidUser_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_28_000", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_28_000", null); case odbc_SQLSvc_InitializeDialogue_ParamError_exn_: ParamError = ic.decodeBytes(buf.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); case odbc_SQLSvc_InitializeDialogue_InvalidConnection_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); default: clientErrorText = "unknown_initialize_dialogue_reply_error"; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Prepare_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Prepare_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Prepare_exc_.java index 62d056a..0374978 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Prepare_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_Prepare_exc_.java @@ -51,18 +51,18 @@ class odbc_SQLSvc_Prepare_exc_ { case odbc_SQLSvc_Prepare_SQLStillExecuting_exn_: break; case odbc_SQLSvc_Prepare_SQLQueryCancelled_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_s1_008", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_s1_008", null); case odbc_SQLSvc_Prepare_SQLError_exn_: break; case odbc_SQLSvc_Prepare_ParamError_exn_: sqlError = ic.decodeBytes(buf.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", sqlError, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", sqlError, addr); case odbc_SQLSvc_Prepare_InvalidConnection_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); case odbc_SQLSvc_Prepare_TransactionError_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp0, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_transaction_error", temp0, addr); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0); } } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_SetConnectionOption_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_SetConnectionOption_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_SetConnectionOption_exc_.java index 192e527..5dfde73 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_SetConnectionOption_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_SetConnectionOption_exc_.java @@ -52,19 +52,19 @@ class odbc_SQLSvc_SetConnectionOption_exc_ { case odbc_SQLSvc_SetConnectionOption_SQLError_exn_: SQLError = new ERROR_DESC_LIST_def(); SQLError.extractFromByteArray(buf, ic); - HPT4Messages.throwSQLException(ic.t4props_, SQLError); + TrafT4Messages.throwSQLException(ic.t4props_, SQLError); case odbc_SQLSvc_SetConnectionOption_ParamError_exn_: ParamError = ic.decodeBytes(buf.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); case odbc_SQLSvc_SetConnectionOption_InvalidConnection_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); case odbc_SQLSvc_SetConnectionOption_SQLInvalidHandle_exn_: // SQLInvalidHandle - // throw HPT4Messages.createSQLException(null, locale, "ids_08_s01", + // throw TrafT4Messages.createSQLException(null, locale, "ids_08_s01", // null); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "autocommit_txn_in_progress", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "autocommit_txn_in_progress", null); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); } } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_TerminateDialogue_exc_.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_TerminateDialogue_exc_.java b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_TerminateDialogue_exc_.java index 6242b6e..471ccd1 100644 --- a/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_TerminateDialogue_exc_.java +++ b/core/conn/jdbcT4/src/main/java/org/trafodion/jdbc/t4/odbc_SQLSvc_TerminateDialogue_exc_.java @@ -49,18 +49,18 @@ class odbc_SQLSvc_TerminateDialogue_exc_ { break; case odbc_SQLSvc_TerminateDialogue_SQLError_exn_: if (exception_detail == 25000) { - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_25_000", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_25_000", null); } SQLError = new ERROR_DESC_LIST_def(); SQLError.extractFromByteArray(buffer1, ic); break; case odbc_SQLSvc_TerminateDialogue_ParamError_exn_: ParamError = ic.decodeBytes(buffer1.extractString(), 1); - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_program_error", ParamError, addr); case odbc_SQLSvc_TerminateDialogue_InvalidConnection_exn_: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_08_s01", null); default: - throw HPT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); + throw TrafT4Messages.createSQLException(null, ic.getLocale(), "ids_unknown_reply_error", temp0, temp1); } } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/conn/jdbcT4/src/test/java/org/trafodion/jdbc/t4/RunAllTests.java ---------------------------------------------------------------------- diff --git a/core/conn/jdbcT4/src/test/java/org/trafodion/jdbc/t4/RunAllTests.java b/core/conn/jdbcT4/src/test/java/org/trafodion/jdbc/t4/RunAllTests.java index 0de5f33..b72ef9a 100644 --- a/core/conn/jdbcT4/src/test/java/org/trafodion/jdbc/t4/RunAllTests.java +++ b/core/conn/jdbcT4/src/test/java/org/trafodion/jdbc/t4/RunAllTests.java @@ -1,3 +1,5 @@ +package org.trafodion.jdbc.t4; + /* * @@@ START COPYRIGHT @@@ * http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/38e49cf7/core/rest/src/main/java/org/trafodion/rest/util/JdbcT4Util.java ---------------------------------------------------------------------- diff --git a/core/rest/src/main/java/org/trafodion/rest/util/JdbcT4Util.java b/core/rest/src/main/java/org/trafodion/rest/util/JdbcT4Util.java index 2145d31..497a8c7 100644 --- a/core/rest/src/main/java/org/trafodion/rest/util/JdbcT4Util.java +++ b/core/rest/src/main/java/org/trafodion/rest/util/JdbcT4Util.java @@ -50,14 +50,14 @@ import org.trafodion.rest.util.RestConfiguration; import org.trafodion.rest.Constants; import org.trafodion.jdbc.t4.TrafT4Connection; import org.trafodion.jdbc.t4.TrafT4PreparedStatement; -import org.trafodion.jdbc.t4.HPT4DataSource; +import org.trafodion.jdbc.t4.TrafT4DataSource; public final class JdbcT4Util { private static final Log LOG = LogFactory.getLog(JdbcT4Util.class); private Configuration conf; private NetworkConfiguration netConf; - private HPT4DataSource cpds = null; + private TrafT4DataSource cpds = null; static { try { @@ -72,7 +72,7 @@ public final class JdbcT4Util public void init(Configuration conf,NetworkConfiguration netConf) throws SQLException { this.conf = conf; this.netConf = netConf; - cpds = new HPT4DataSource(); + cpds = new TrafT4DataSource(); String url = Constants.T4_DRIVER_URL + "//" + netConf.getHostName() + ":" + conf.getInt(Constants.DCS_MASTER_PORT,Constants.DEFAULT_DCS_MASTER_PORT) + "/:"; cpds.setURL(url); cpds.setMinPoolSize(conf.getInt(Constants.T4_DRIVER_MIN_POOL_SIZE,Constants.DEFAULT_T4_DRIVER_MIN_POOL_SIZE));
