1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.ibatis.sqlmap.engine.mapping.statement;
17
18 import com.ibatis.sqlmap.client.event.RowHandler;
19 import com.ibatis.sqlmap.engine.scope.StatementScope;
20 import com.ibatis.sqlmap.engine.transaction.Transaction;
21
22 import java.sql.SQLException;
23 import java.util.List;
24
25
26
27
28 public class SelectKeyStatement extends SelectStatement {
29
30
31 private String keyProperty;
32
33
34 private boolean runAfterSQL;
35
36
37
38
39
40
41 public String getKeyProperty() {
42 return keyProperty;
43 }
44
45
46
47
48
49
50
51 public void setKeyProperty(String keyProperty) {
52 this.keyProperty = keyProperty;
53 }
54
55
56
57
58
59
60 public boolean isRunAfterSQL() {
61 return runAfterSQL;
62 }
63
64
65
66
67
68
69
70 public void setRunAfterSQL(boolean runAfterSQL) {
71 this.runAfterSQL = runAfterSQL;
72 }
73
74 @Override
75 public List executeQueryForList(StatementScope statementScope, Transaction trans, Object parameterObject,
76 int skipResults, int maxResults) throws SQLException {
77 throw new SQLException("Select Key statements cannot be executed for a list.");
78 }
79
80 @Override
81 public void executeQueryWithRowHandler(StatementScope statementScope, Transaction trans, Object parameterObject,
82 RowHandler rowHandler) throws SQLException {
83 throw new SQLException("Select Key statements cannot be executed with a row handler.");
84 }
85
86 }