01: /*
02: * Copyright 2002-2005 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.springframework.jdbc.core;
18:
19: /**
20: * Interface to be implemented by objects that can provide SQL strings.
21: *
22: * <p>Typically implemented by PreparedStatementCreators, CallableStatementCreators
23: * and StatementCallbacks that want to expose the SQL they use to create their
24: * statements, to allow for better contextual information in case of exceptions.
25: *
26: * @author Juergen Hoeller
27: * @since 16.03.2004
28: * @see PreparedStatementCreator
29: * @see CallableStatementCreator
30: * @see StatementCallback
31: */
32: public interface SqlProvider {
33:
34: /**
35: * Return the SQL string for this object, i.e.
36: * typically the SQL used for creating statements.
37: * @return the SQL string, or <code>null</code>
38: */
39: String getSql();
40:
41: }
|