Skip to content

Commit 1a845cc

Browse files
author
clinton.begin
committed
Initial Import
1 parent ce98133 commit 1a845cc

File tree

1,367 files changed

+79243
-174849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,367 files changed

+79243
-174849
lines changed

Documentation/dataAccessGuide/src/en/configuration.xml

Lines changed: 710 additions & 0 deletions
Large diffs are not rendered by default.

docs/dataAccessGuide/src/en/dao.xml renamed to Documentation/dataAccessGuide/src/en/dao.xml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,12 @@
5050
</thead>
5151

5252
<tbody>
53-
54-
<row>
55-
56-
<entry>DomDaoManagerBuilder</entry>
53+
<row>
54+
<entry>DaoManager (Facade)</entry>
5755

5856
<entry>Responsible for configuration of the DAO framework (via
59-
dao.config), instantiating DAO implementations and IDaoManager instances.</entry>
60-
</row>
61-
62-
<row>
63-
<entry>IDaoManager (Facade)</entry>
64-
65-
<entry>Acting as a façade to the rest of the API.</entry>
57+
dao.config), instantiating DAO implementations, and acting as a
58+
façade to the rest of the API.</entry>
6659
</row>
6760

6861
<row>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<chapter id="example">
3+
<title>Examples</title>
4+
<sect1>
5+
<title>NPetshop Application</title>
6+
<para>For a complete example of using the DAO Framework, please visit
7+
<ulink url="http://incubator.apache.org/ibatis/">http://incubator.apache.org/ibatis/</ulink>
8+
and download the NPetshop demo application. Have fun!</para>
9+
</sect1>
10+
</chapter>

docs/dataAccessGuide/src/en/handler.xml renamed to Documentation/dataAccessGuide/src/en/handler.xml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717
<para>This implementation uses ADO.NET to provide a connection and
1818
transaction via the ADO.NET API.</para>
1919

20-
<example>
21-
<title>Example Simple DAO Session Handler configuration</title>
22-
23-
<programlisting>&lt;context id="<emphasis role="blue">SimpleDao</emphasis>" default="<emphasis
24-
role="blue">true</emphasis>"&gt;
20+
<example><title>Example Simple DAO Session Handler configuration</title>
21+
<programlisting>&lt;context id="<emphasis role="blue">SimpleDao</emphasis>" default="<emphasis
22+
role="blue">true</emphasis>"&gt;
2523
&lt;properties resource="<emphasis role="blue">database.config</emphasis>"/&gt;
2624

2725
&lt;database&gt;
@@ -38,8 +36,7 @@
3836
&lt;dao interface="<emphasis role="blue">IBatisNet.Test.Dao.Interfaces.IAccountDao, IBatisNet.Test</emphasis>"
3937
implementation="<emphasis role="blue">IBatisNet.Test.Dao.Implementations.Ado.AccountDao, IBatisNet.Test</emphasis>"/&gt;
4038
&lt;/daoFactory&gt;
41-
&lt;/context&gt;</programlisting>
42-
</example>
39+
&lt;/context&gt;</programlisting></example>
4340

4441
<para></para>
4542
</sect1>
@@ -49,13 +46,10 @@
4946

5047
<para>The SqlMap session handler implementation wraps iBATIS Data Mapper
5148
SqlMapper session management services for simple use via the DAO
52-
framework. All you need to specify is the SqlMap configuration
53-
file.</para>
54-
55-
<example>
56-
<title>Example SqlMap DAO Session Handler configuration</title>
49+
framework. All you need to specify is the SqlMap configuration file.</para>
5750

58-
<programlisting>&lt;context id="<emphasis role="blue">SqlMapDao</emphasis>"&gt;
51+
<example><title>Example SqlMap DAO Session Handler configuration</title>
52+
<programlisting>&lt;context id="<emphasis role="blue">SqlMapDao</emphasis>"&gt;
5953
&lt;properties resource="<emphasis role="blue">database.config</emphasis>"/&gt;
6054

6155
&lt;database&gt;
@@ -66,15 +60,14 @@
6660
&lt;/database&gt;
6761

6862
&lt;daoSessionHandler id="SqlMap"&gt;
69-
&lt;property name="resource" value="<emphasis role="blue">SqlMap.config</emphasis>"/&gt;
63+
&lt;property name="sqlMapConfigFile" value="<emphasis role="blue">SqlMap.config</emphasis>"/&gt;
7064
&lt;/daoSessionHandler&gt;
7165

7266
&lt;daoFactory&gt;
7367
&lt;dao interface="<emphasis role="blue">IBatisNet.Test.Dao.Interfaces.IAccountDao, IBatisNet.Test</emphasis>"
7468
implementation="<emphasis role="blue">IBatisNet.Test.Dao.Implementations.DataMapper.AccountDao, IBatisNet.Test"</emphasis>/&gt;
7569
&lt;/daoFactory&gt;
76-
&lt;/context&gt;</programlisting>
77-
</example>
70+
&lt;/context&gt;</programlisting></example>
7871

7972
<para></para>
8073
</sect1>
@@ -88,10 +81,8 @@
8881
configuration are the same as those that would normally be specified in an
8982
NHibernate configuration section. Here is an example configuration:</para>
9083

91-
<example>
92-
<title>Example NHibernate DAO Session Handler configuration</title>
93-
94-
<programlisting>&lt;context id="<emphasis role="blue">NHibernateDao</emphasis>"&gt;
84+
<example><title>Example NHibernate DAO Session Handler configuration</title>
85+
<programlisting>&lt;context id="<emphasis role="blue">NHibernateDao</emphasis>"&gt;
9586
&lt;properties resource="<emphasis role="blue">database.config</emphasis>"/&gt;
9687

9788
&lt;database&gt;
@@ -117,7 +108,6 @@
117108
&lt;dao interface="<emphasis role="blue">IBatisNet.Test.Dao.Interfaces.IAccountDao, IBatisNet.Test</emphasis>"
118109
implementation="<emphasis role="blue">IBatisNet.Test.Dao.Implementations.DataMapper.AccountDao, IBatisNet.Test</emphasis>"/&gt;
119110
&lt;/daoFactory&gt;
120-
&lt;/context&gt;</programlisting>
121-
</example>
111+
&lt;/context&gt;</programlisting></example>
122112
</sect1>
123113
</chapter>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "../../../docbook/docbook-dtd/docbookx.dtd" [
3+
<!ENTITY introduction SYSTEM "introduction.xml">
4+
<!ENTITY dao SYSTEM "dao.xml">
5+
<!ENTITY configuration SYSTEM "configuration.xml">
6+
<!ENTITY handler SYSTEM "handler.xml">
7+
<!ENTITY programming SYSTEM "programming.xml">
8+
<!ENTITY interface SYSTEM "interface.xml">
9+
<!ENTITY example SYSTEM "example.xml">
10+
<!ENTITY xsd SYSTEM "xsd.xml">
11+
]>
12+
<book>
13+
<bookinfo>
14+
<title>iBATIS.NET - .NET Application Framework</title>
15+
<subtitle>Data Access Objects Developer Guide</subtitle>
16+
<releaseinfo>Version 1.5</releaseinfo>
17+
<pubdate>01-01-2004</pubdate>
18+
<authorgroup>
19+
<author>
20+
<firstname>Gilles</firstname>
21+
<surname>Bayon</surname>
22+
</author>
23+
<author>
24+
<firstname>Clinton</firstname>
25+
<surname>Begin</surname>
26+
</author>
27+
<author>
28+
<firstname>Roberto</firstname>
29+
<surname>Rabe</surname>
30+
</author>
31+
</authorgroup>
32+
33+
<legalnotice>
34+
<para>Copies of this document may be made for your own use and for
35+
distribution to others, provided that you do not charge any fee for such
36+
copies and further provided that each copy contains this Copyright
37+
Notice, whether distributed in print or electronically.</para>
38+
</legalnotice>
39+
</bookinfo>
40+
41+
<toc></toc>
42+
43+
&introduction;
44+
&dao;
45+
&configuration;
46+
&handler;
47+
&programming;
48+
&interface;
49+
&example;
50+
&xsd;
51+
52+
</book>

docs/dataAccessGuide/src/en/interface.xml renamed to Documentation/dataAccessGuide/src/en/interface.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public interface IAccountDao : IDao {
4646
<imagedata align="center" fileref="images/DAODesign.gif" format="GIF" />
4747
</imageobject>
4848

49-
<caption><para>DAO Implementation Diagram</para></caption>
49+
<caption>
50+
<para>DAO Implementation Diagram</para>
51+
</caption>
5052
</mediaobject>
5153

5254
<para>Notice that the <classname>BaseDao</classname> implements the
@@ -88,7 +90,7 @@ using IBatisNet.DataAccess.Interfaces; //IDao</emphasis>
8890
namespace IBatisNet.Test.Implementations {
8991
public class <emphasis role="blue">BaseDao: IDao</emphasis> {
9092
<emphasis role="blue">protected DaoSession GetContext()</emphasis> {
91-
IDaoManager daoManager = DaoManager.GetInstance(this);
93+
DaoManager daoManager = DaoManager.GetInstance(this);
9294
return (daoManager.LocalDaoSession as DaoSession);
9395
}
9496
}
@@ -225,7 +227,7 @@ using IBatisNet.Test.Domain; // Account</programlisting>
225227
<para>Now, let's let's see how this DAO's <methodname>Delete(Account
226228
account)</methodname> method uses the framework.</para>
227229

228-
<programlisting> public void Delete(Account account) {
230+
<programlisting> public void Delete(Account account) {, DaoManager
229231

230232
IDbCommand command = null;
231233
DaoSession daoSession = null;
@@ -252,7 +254,7 @@ using IBatisNet.Test.Domain; // Account</programlisting>
252254
}
253255
}</programlisting>
254256

255-
<para>The DAO obtains an instance of <classname>DaoSession</classname>
257+
<para>The DAO obtain's an instance of <classname>DaoSession</classname>
256258
by calling the <methodname>GetContext</methodname> method inherited from
257259
<classname>BaseDao</classname>. Next, it uses the simple
258260
<classname>DaoSession</classname> to get a <varname>command</varname>
@@ -325,8 +327,8 @@ using IBatisNet.Test.Domain; // Account</programlisting>
325327

326328
<para>After configuring the framework's
327329
<classname>DaoManager</classname> for either the ADO.NET or Data Mapper
328-
<classname>AccountDao</classname> that we just created (see the
329-
Configuration section), we can now look at how to use them.</para>
330+
<classname>AccountDao</classname> we just created (see the Configuration
331+
section), we can now look at how to use them.</para>
330332

331333
<programlisting>using System;
332334

@@ -335,13 +337,13 @@ using IBatisNet.DataAccess;
335337
using IBatisNet.Test.Dao.Interfaces;
336338
using IBatisNet.Test.Domain;
337339

338-
namespace Examples.Services {
340+
namespace Examples.DaoUsage {
339341

340-
public class AccountService {
342+
public class AccountDaoUsage {
341343

342-
protected static IDaoManager daoManager = null;
344+
protected static DaoManager daoManager = null;
343345

344-
static AccountService() {
346+
static AccountDaoUsage() {
345347
daoManager = DaoManager.GetInstance();
346348
}
347349

@@ -380,7 +382,7 @@ namespace Examples.Services {
380382
<classname>UserDao</classname> class.</para>
381383

382384
<para>Like the <classname>SqlMapDaoSession</classname> handler, the
383-
<classname>NHibernateDaoSession</classname> handler is found in the
385+
<classname>NHibernateDaoSession</classname> handler is found in
384386
<classname>IBatisNet.DataAccess.Extensions.DaoSessionHandlers</classname>
385387
namespace.</para>
386388

0 commit comments

Comments
 (0)