01: /*
02: * Copyright 2004 Clinton Begin
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: package com.ibatis.sqlmap.engine.mapping.statement;
17:
18: import com.ibatis.sqlmap.client.event.RowHandler;
19: import com.ibatis.sqlmap.engine.cache.CacheKey;
20: import com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap;
21: import com.ibatis.sqlmap.engine.mapping.result.ResultMap;
22: import com.ibatis.sqlmap.engine.mapping.sql.Sql;
23: import com.ibatis.sqlmap.engine.scope.RequestScope;
24: import com.ibatis.sqlmap.engine.transaction.Transaction;
25:
26: import java.sql.SQLException;
27: import java.util.List;
28:
29: public interface MappedStatement {
30:
31: public String getId();
32:
33: public StatementType getStatementType();
34:
35: public Integer getResultSetType();
36:
37: public int executeUpdate(RequestScope request, Transaction trans,
38: Object parameterObject) throws SQLException;
39:
40: public Object executeQueryForObject(RequestScope request,
41: Transaction trans, Object parameterObject,
42: Object resultObject) throws SQLException;
43:
44: public List executeQueryForList(RequestScope request,
45: Transaction trans, Object parameterObject, int skipResults,
46: int maxResults) throws SQLException;
47:
48: public void executeQueryWithRowHandler(RequestScope request,
49: Transaction trans, Object parameterObject,
50: RowHandler rowHandler) throws SQLException;
51:
52: public CacheKey getCacheKey(RequestScope request,
53: Object parameterObject);
54:
55: public ParameterMap getParameterMap();
56:
57: public ResultMap getResultMap();
58:
59: public void setBaseCacheKey(int base);
60:
61: public void addExecuteListener(ExecuteListener listener);
62:
63: public void notifyListeners();
64:
65: public void initRequest(RequestScope request);
66:
67: public Sql getSql();
68:
69: public Class getParameterClass();
70:
71: public Integer getFetchSize();
72:
73: public Integer getTimeout();
74:
75: public boolean hasMultipleResultMaps();
76:
77: public ResultMap[] getAdditionalResultMaps();
78:
79: }
|