| |||||||||||||||||
Source File | Conditionals | Statements | Methods | TOTAL | |||||||||||||
MappedStatements\IMappedStatement.cs | - | - | - | - |
|
1 | ||
2 | #region Apache Notice | |
3 | /***************************************************************************** | |
4 | * $Header: $ | |
5 | * $Revision: $ | |
6 | * $Date: $ | |
7 | * | |
8 | * iBATIS.NET Data Mapper | |
9 | * Copyright (C) 2004 - Gilles Bayon | |
10 | * | |
11 | * | |
12 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
13 | * you may not use this file except in compliance with the License. | |
14 | * You may obtain a copy of the License at | |
15 | * | |
16 | * http://www.apache.org/licenses/LICENSE-2.0 | |
17 | * | |
18 | * Unless required by applicable law or agreed to in writing, software | |
19 | * distributed under the License is distributed on an "AS IS" BASIS, | |
20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
21 | * See the License for the specific language governing permissions and | |
22 | * limitations under the License. | |
23 | * | |
24 | ********************************************************************************/ | |
25 | #endregion | |
26 | ||
27 | #region Imports | |
28 | using System; | |
29 | using System.Collections; | |
30 | ||
31 | using IBatisNet.Common; | |
32 | using IBatisNet.DataMapper.Commands; | |
33 | using IBatisNet.DataMapper.Configuration.Statements; | |
34 | #endregion | |
35 | ||
36 | namespace IBatisNet.DataMapper.MappedStatements | |
37 | { | |
38 | /// <summary> | |
39 | /// | |
40 | /// </summary> | |
41 | public delegate void ExecuteEventHandler(object sender, ExecuteEventArgs e); | |
42 | ||
43 | /// <summary> | |
44 | /// Summary description for IMappedStatement. | |
45 | /// </summary> | |
46 | public interface IMappedStatement | |
47 | { | |
48 | #region Properties | |
49 | ||
50 | /// <summary> | |
51 | /// The IPreparedCommand to use | |
52 | /// </summary> | |
53 | IPreparedCommand PreparedCommand | |
54 | { | |
55 | get; | |
56 | } | |
57 | ||
58 | /// <summary> | |
59 | /// Name used to identify the MappedStatement amongst the others. | |
60 | /// This the name of the SQL statment by default. | |
61 | /// </summary> | |
62 | string Name | |
63 | { | |
64 | get; | |
65 | } | |
66 | ||
67 | /// <summary> | |
68 | /// The SQL statment used by this MappedStatement | |
69 | /// </summary> | |
70 | IStatement Statement | |
71 | { | |
72 | get; | |
73 | } | |
74 | ||
75 | ||
76 | /// <summary> | |
77 | /// The SqlMap used by this MappedStatement | |
78 | /// </summary> | |
79 | SqlMapper SqlMap | |
80 | { | |
81 | get; | |
82 | } | |
83 | #endregion | |
84 | ||
85 | #region Methods | |
86 | #region ExecuteQueryForMap | |
87 | ||
88 | /// <summary> | |
89 | /// | |
90 | /// </summary> | |
91 | /// <param name="session"></param> | |
92 | /// <param name="parameterObject"></param> | |
93 | /// <param name="keyProperty"></param> | |
94 | /// <param name="valueProperty"></param> | |
95 | /// <returns></returns> | |
96 | IDictionary ExecuteQueryForMap( IDalSession session, object parameterObject, string keyProperty, string valueProperty ); | |
97 | ||
98 | #endregion | |
99 | ||
100 | #region ExecuteUpdate | |
101 | ||
102 | /// <summary> | |
103 | /// | |
104 | /// </summary> | |
105 | /// <param name="session"></param> | |
106 | /// <param name="parameterObject"></param> | |
107 | /// <returns></returns> | |
108 | int ExecuteUpdate(IDalSession session, object parameterObject ); | |
109 | ||
110 | #endregion | |
111 | ||
112 | #region ExecuteInsert | |
113 | ||
114 | /// <summary> | |
115 | /// | |
116 | /// </summary> | |
117 | /// <param name="session"></param> | |
118 | /// <param name="parameterObject"></param> | |
119 | /// <returns></returns> | |
120 | object ExecuteInsert(IDalSession session, object parameterObject ); | |
121 | ||
122 | #endregion | |
123 | ||
124 | #region ExecuteQueryForList | |
125 | ||
126 | /// <summary> | |
127 | /// | |
128 | /// </summary> | |
129 | /// <param name="session"></param> | |
130 | /// <param name="parameterObject"></param> | |
131 | /// <param name="resultObject"></param> | |
132 | void ExecuteQueryForList(IDalSession session, object parameterObject, IList resultObject ); | |
133 | ||
134 | /// <summary> | |
135 | /// | |
136 | /// </summary> | |
137 | /// <param name="session"></param> | |
138 | /// <param name="parameterObject"></param> | |
139 | /// <param name="skipResults"></param> | |
140 | /// <param name="maxResults"></param> | |
141 | /// <returns></returns> | |
142 | IList ExecuteQueryForList( IDalSession session, object parameterObject, int skipResults, int maxResults ); | |
143 | ||
144 | /// <summary> | |
145 | /// | |
146 | /// </summary> | |
147 | /// <param name="session"></param> | |
148 | /// <param name="parameterObject"></param> | |
149 | /// <returns></returns> | |
150 | IList ExecuteQueryForList( IDalSession session, object parameterObject ); | |
151 | ||
152 | #endregion | |
153 | ||
154 | /// <summary> | |
155 | /// | |
156 | /// </summary> | |
157 | /// <param name="session"></param> | |
158 | /// <param name="parameterObject"></param> | |
159 | /// <param name="rowDelegate"></param> | |
160 | /// <returns></returns> | |
161 | IList ExecuteQueryForRowDelegate( IDalSession session, object parameterObject, SqlMapper.RowDelegate rowDelegate ); | |
162 | ||
163 | #region ExecuteForObject | |
164 | ||
165 | /// <summary> | |
166 | /// | |
167 | /// </summary> | |
168 | /// <param name="session"></param> | |
169 | /// <param name="parameterObject"></param> | |
170 | /// <returns></returns> | |
171 | object ExecuteQueryForObject( IDalSession session, object parameterObject ); | |
172 | ||
173 | /// <summary> | |
174 | /// | |
175 | /// </summary> | |
176 | /// <param name="session"></param> | |
177 | /// <param name="parameterObject"></param> | |
178 | /// <param name="resultObject"></param> | |
179 | /// <returns></returns> | |
180 | object ExecuteQueryForObject( IDalSession session, object parameterObject, object resultObject ); | |
181 | ||
182 | #endregion | |
183 | #endregion | |
184 | ||
185 | } | |
186 | } | |
187 |
|