1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 package org.apache.commons.dbcp2.cpdsadapter; 18 19 import org.apache.commons.dbcp2.PStmtKey; 20 21 /** 22 * A key uniquely identifying a {@link java.sql.PreparedStatement PreparedStatement}. 23 * 24 * @since 2.0 25 * @deprecated Use {@link PStmtKey}. 26 */ 27 @Deprecated 28 public class PStmtKeyCPDS extends PStmtKey { 29 30 /** 31 * Constructs a key to uniquely identify a prepared statement. 32 * 33 * @param sql 34 * The SQL statement. 35 */ 36 public PStmtKeyCPDS(final String sql) { 37 super(sql); 38 } 39 40 /** 41 * Constructs a key to uniquely identify a prepared statement. 42 * 43 * @param sql 44 * The SQL statement. 45 * @param autoGeneratedKeys 46 * A flag indicating whether auto-generated keys should be returned; one of 47 * {@code Statement.RETURN_GENERATED_KEYS} or {@code Statement.NO_GENERATED_KEYS}. 48 */ 49 public PStmtKeyCPDS(final String sql, final int autoGeneratedKeys) { 50 super(sql, null, autoGeneratedKeys); 51 } 52 53 /** 54 * Constructs a key to uniquely identify a prepared statement. 55 * 56 * @param sql 57 * The SQL statement. 58 * @param resultSetType 59 * A result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, 60 * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. 61 * @param resultSetConcurrency 62 * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or 63 * {@code ResultSet.CONCUR_UPDATABLE}. 64 */ 65 public PStmtKeyCPDS(final String sql, final int resultSetType, final int resultSetConcurrency) { 66 super(sql, resultSetType, resultSetConcurrency); 67 } 68 69 /** 70 * Constructs a key to uniquely identify a prepared statement. 71 * 72 * @param sql 73 * The SQL statement. 74 * @param resultSetType 75 * a result set type; one of {@code ResultSet.TYPE_FORWARD_ONLY}, 76 * {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code ResultSet.TYPE_SCROLL_SENSITIVE}. 77 * @param resultSetConcurrency 78 * A concurrency type; one of {@code ResultSet.CONCUR_READ_ONLY} or 79 * {@code ResultSet.CONCUR_UPDATABLE} 80 * @param resultSetHoldability 81 * One of the following {@code ResultSet} constants: {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} 82 * or {@code ResultSet.CLOSE_CURSORS_AT_COMMIT}. 83 */ 84 public PStmtKeyCPDS(final String sql, final int resultSetType, final int resultSetConcurrency, 85 final int resultSetHoldability) { 86 super(sql, null, resultSetType, resultSetConcurrency, resultSetHoldability); 87 } 88 89 /** 90 * Constructs a key to uniquely identify a prepared statement. 91 * 92 * @param sql 93 * The SQL statement. 94 * @param columnIndexes 95 * An array of column indexes indicating the columns that should be returned from the inserted row or 96 * rows. 97 */ 98 public PStmtKeyCPDS(final String sql, final int[] columnIndexes) { 99 super(sql, null, columnIndexes); 100 } 101 102 /** 103 * Constructs a key to uniquely identify a prepared statement. 104 * 105 * @param sql 106 * The SQL statement. 107 * @param columnNames 108 * An array of column names indicating the columns that should be returned from the inserted row or rows. 109 */ 110 public PStmtKeyCPDS(final String sql, final String[] columnNames) { 111 super(sql, null, columnNames); 112 } 113 }