| |||||||||||||||||
Source File | Conditionals | Statements | Methods | TOTAL | |||||||||||||
Configuration\Statements\Generate.cs | - | 100.0 % | 100.0 % | 100.0 % |
|
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 | using System; | |
28 | using System.Data; | |
29 | using System.Xml.Serialization; | |
30 | ||
31 | namespace IBatisNet.DataMapper.Configuration.Statements | |
32 | { | |
33 | /// <summary> | |
34 | /// Represent a generate tag element. | |
35 | /// The generation would happen at the point where the | |
36 | /// SqlMapClient instance is built. | |
37 | /// </summary> | |
38 | [Serializable] | |
39 | [XmlRoot("generate")] | |
40 | public class Generate : Statement | |
41 | { | |
42 | #region Fields | |
43 | ||
44 | [NonSerialized] | |
45 | private string _table = string.Empty; | |
46 | [NonSerialized] | |
47 | private string _by = string.Empty; | |
48 | ||
49 | #endregion | |
50 | ||
51 | /// <summary> | |
52 | /// The table name used to build the SQL query. | |
53 | /// </summary> | |
54 | /// <remarks> | |
55 | /// Will be used to get the metadata to build the SQL if needed. | |
56 | /// </remarks> | |
57 | [XmlAttribute("table")] | |
58 | public string Table | |
59 | { | |
60 | 850 | get { return _table; } |
61 | 850 | set { _table = value; } |
62 | } | |
63 | ||
64 | /// <summary> | |
65 | /// The by attribute is used to generate the where clause. | |
66 | /// </summary> | |
67 | /// <remarks>The by="" attribute can support multiple colums.</remarks> | |
68 | /// <example> | |
69 | /// < delete ...> | |
70 | /// <generate table="EMPLOYEE" by="EMPLOYEE_ID, LAST_MOD_DATE" /> | |
71 | /// </delete> | |
72 | /// </example> | |
73 | [XmlAttribute("by")] | |
74 | public string By | |
75 | { | |
76 | 1530 | get { return _by; } |
77 | 510 | set { _by = value; } |
78 | } | |
79 | ||
80 | /// <summary> | |
81 | /// Do not use direclty, only for serialization. | |
82 | /// </summary> | |
83 | 850 | [Obsolete("This public constructor with no parameter is not really obsolete, but is reserved for serialization.", false)] |
84 | public Generate():base(){} | |
85 | ||
86 | ||
87 | } | |
88 | } | |
89 |
|