![JAR search and dependency download from the Maven repository](/logo.png)
org.jivesoftware.database.CachedPreparedStatement Maven / Gradle / Ivy
The newest version!
/*
* Copyright (C) 2004-2008 Jive Software. All rights reserved.
*
* Licensed 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.
*/
package org.jivesoftware.database;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Allows PreparedStatement information to be cached. A prepared statement consists of
* a SQL statement containing bind variables as well as variable values. For example,
* the SQL statement "SELECT * FROM person WHERE age > ?" would have the integer
* variable 18 (which replaces the "?" chracter) to find all adults. This class
* encapsulates both the SQL string and bind variable values so that actual
* PreparedStatement can be created from that information later.
*
* @author Matt Tucker
*/
public class CachedPreparedStatement {
private static final Logger Log = LoggerFactory.getLogger(CachedPreparedStatement.class);
private String sql;
private List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy