View Javadoc
1   /*
2    * Copyright 2004-2022 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *    https://www.apache.org/licenses/LICENSE-2.0
9    *
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  package com.ibatis.sqlmap.engine.mapping.sql;
17  
18  import com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap;
19  import com.ibatis.sqlmap.engine.mapping.result.ResultMap;
20  import com.ibatis.sqlmap.engine.scope.StatementScope;
21  
22  /**
23   * The Interface Sql.
24   */
25  public interface Sql {
26  
27    /**
28     * Gets the sql.
29     *
30     * @param statementScope
31     *          the statement scope
32     * @param parameterObject
33     *          the parameter object
34     *
35     * @return the sql
36     */
37    public String getSql(StatementScope statementScope, Object parameterObject);
38  
39    /**
40     * Gets the parameter map.
41     *
42     * @param statementScope
43     *          the statement scope
44     * @param parameterObject
45     *          the parameter object
46     *
47     * @return the parameter map
48     */
49    public ParameterMap getParameterMap(StatementScope statementScope, Object parameterObject);
50  
51    /**
52     * Gets the result map.
53     *
54     * @param statementScope
55     *          the statement scope
56     * @param parameterObject
57     *          the parameter object
58     *
59     * @return the result map
60     */
61    public ResultMap getResultMap(StatementScope statementScope, Object parameterObject);
62  
63    /**
64     * Cleanup.
65     *
66     * @param statementScope
67     *          the statement scope
68     */
69    public void cleanup(StatementScope statementScope);
70  
71  }