1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.ibatis.sqlmap.engine.mapping.sql.stat;
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.mapping.sql.Sql;
21 import com.ibatis.sqlmap.engine.scope.StatementScope;
22
23
24
25
26 public class StaticSql implements Sql {
27
28
29 private String sqlStatement;
30
31
32
33
34
35
36
37 public StaticSql(String sqlStatement) {
38 this.sqlStatement = sqlStatement.replace('\r', ' ').replace('\n', ' ');
39 }
40
41 public String getSql(StatementScope statementScope, Object parameterObject) {
42 return sqlStatement;
43 }
44
45 public ParameterMap getParameterMap(StatementScope statementScope, Object parameterObject) {
46 return statementScope.getParameterMap();
47 }
48
49 public ResultMap getResultMap(StatementScope statementScope, Object parameterObject) {
50 return statementScope.getResultMap();
51 }
52
53 public void cleanup(StatementScope statementScope) {
54 }
55
56 }