726N/A/*
726N/A * CDDL HEADER START
726N/A *
726N/A * The contents of this file are subject to the terms of the
726N/A * Common Development and Distribution License (the "License").
726N/A * You may not use this file except in compliance with the License.
726N/A *
726N/A * See LICENSE.txt included in this distribution for the specific
726N/A * language governing permissions and limitations under the License.
726N/A *
726N/A * When distributing Covered Code, include this CDDL HEADER in each
726N/A * file and include the License file at LICENSE.txt.
726N/A * If applicable, add the following below this CDDL HEADER, with the
726N/A * fields enclosed by brackets "[]" replaced with your own identifying
726N/A * information: Portions Copyright [yyyy] [name of copyright owner]
726N/A *
726N/A * CDDL HEADER END
726N/A */
726N/A
726N/A/*
726N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
726N/A * Use is subject to license terms.
726N/A */
726N/A
726N/Apackage org.opensolaris.opengrok.jdbc;
726N/A
726N/Aimport java.sql.Connection;
726N/Aimport java.sql.PreparedStatement;
726N/Aimport java.sql.SQLException;
726N/A
726N/A/**
726N/A * Class used to specify how to create a {@code PreparedStatement} to be
726N/A * returned from a {@code ConnectionResource}'s statement cache.
726N/A * @see ConnectionResource#getStatement(StatementCreator)
726N/A */
726N/Apublic abstract class StatementCreator {
726N/A /**
726N/A * Method that creates the statement represented by this statement creator.
726N/A * @param conn the connection on which the statement is prepared
726N/A * @return a {@code PreparedStatement} object
726N/A * @throws SQLException if a database error occurs
726N/A */
726N/A abstract PreparedStatement create(Connection conn) throws SQLException;
726N/A}