Java tutorial
/*----------------------------------------------------------------------------- * Copyright (c) 2009 Civic Computing Ltd. * All rights reserved. * * This file is part of Content Control. * * Content Control is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Content Control is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Content Control. If not, see http://www.gnu.org/licenses/. * * Revision $Rev$ * Modified by $Author$ * Modified on $Date$ * * Changes: see subversion log. *----------------------------------------------------------------------------- */ package ccc.migration.ccc6.handlers; import java.sql.ResultSet; import java.sql.SQLException; import org.apache.commons.dbutils.ResultSetHandler; /** * API for a SQL query. * * @param <T> The type of result this query will return. * * @author Civic Computing Ltd. */ public interface SqlQuery<T> extends ResultSetHandler { /** {@inheritDoc} */ T handle(final ResultSet rs) throws SQLException; /** * Accessor. * * @return The SQL for this query, as a string. */ String getSql(); }