You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by ro...@apache.org on 2005/06/04 07:09:05 UTC

svn commit: r179950 - in /incubator/ibatis/trunk/cs: docs/dataAccessGuide/src/en/ docs/dataMapperGuide/src/en/ mapper/IBatisNet.Common/ mapper/IBatisNet.DataAccess/Configuration/ mapper/IBatisNet.DataMapper/Exceptions/

Author: roberto
Date: Fri Jun  3 22:09:04 2005
New Revision: 179950

URL: http://svn.apache.org/viewcvs?rev=179950&view=rev
Log:
~Updated C# docs for JIRA-76 and some files for typos

Modified:
    incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml
    incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/interface.xml
    incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/programming.xml
    incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml
    incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/IDalSession.cs
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs
    incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Exceptions/DataMapperException.cs

Modified: incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml?rev=179950&r1=179949&r2=179950&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/configuration.xml Fri Jun  3 22:09:04 2005
@@ -364,7 +364,7 @@
     environments (DEVT, Q/A, PROD), you can also make use of the optional
     <literal>&lt;properties&gt;</literal> element as shown above. This allows
     you to use placeholders in the place of literal value elements. If you
-    have a properties file with the following values:</para>
+    have a "properties" file with the following values:</para>
 
     <example>
       <title>Example properties file</title>

Modified: incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/interface.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/interface.xml?rev=179950&r1=179949&r2=179950&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/interface.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/interface.xml Fri Jun  3 22:09:04 2005
@@ -46,9 +46,7 @@
         <imagedata align="center" fileref="images/DAODesign.gif" format="GIF" />
       </imageobject>
 
-      <caption>
-        <para>DAO Implementation Diagram</para>
-      </caption>
+      <caption><para>DAO Implementation Diagram</para></caption>
     </mediaobject>
 
     <para>Notice that the <classname>BaseDao</classname> implements the
@@ -227,7 +225,7 @@
       <para>Now, let's let's see how this DAO's <methodname>Delete(Account
       account)</methodname> method uses the framework.</para>
 
-      <programlisting>  public void Delete(Account account) {, DaoManager
+      <programlisting>  public void Delete(Account account) {
 
    IDbCommand command = null;
    DaoSession daoSession = null;
@@ -337,13 +335,13 @@
 using IBatisNet.Test.Dao.Interfaces;
 using IBatisNet.Test.Domain;
 
-namespace Examples.DaoUsage {
+namespace Examples.Services {
 
- public class AccountDaoUsage {
+ public class AccountService {
 
   protected static DaoManager daoManager = null;
 
-  static AccountDaoUsage() {
+  static AccountService() {
    daoManager = DaoManager.GetInstance();
   }
 

Modified: incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/programming.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/programming.xml?rev=179950&r1=179949&r2=179950&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/programming.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataAccessGuide/src/en/programming.xml Fri Jun  3 22:09:04 2005
@@ -86,7 +86,7 @@
 
       <programlisting><emphasis role="comment">/* Configure from a file path.
    Uses a relative resource path from your application root 
-   or an absolute file path such as "file:\\c:\dir\a.config" */
+   or an absolute file path such as "file://c:\dir\a.config" */
 </emphasis>DomDaoManagerBuilder builder = new DomDaoManagerBuilder();
 builder.Configure(strPath);
 DaoManager daoManager = DaoManager.GetInstance("AnotherContext");</programlisting>
@@ -157,7 +157,7 @@
     <classname>ConfigureHandler</classname> (callback delegate) to the
     <classname>DomDaoManagerBuilder</classname> so that it knows the method
     for resetting your application's <classname>DaoManager</classname>
-    instances. </para>
+    instances.</para>
 
     <para>Since the configuration files need to be watched for changes, your
     <filename>dao.config</filename> file must be accessible through the file
@@ -240,9 +240,9 @@
 DaoManager daoManager = DaoManager.GetInstance("PetStore"); 
 ICategoryDao categoryDao = daoManager[typeof(ICategoryDao)] as ICategoryDao;
 IProductDao productDao = daoManager[typeof(IProductDao)] as IProductDao;
-daoManager.BeginTransaction();
 
 try {
+      daoManager.BeginTransaction();
       productDao.Insert(p1);
       productDao.Insert(p2);
       categoryDao.Insert(c1);
@@ -261,7 +261,11 @@
     <literal>catch</literal> block. The call to
     <methodname>RollBackTransaction()</methodname> will rollback any changes
     you’ve made in case an exception is thrown before the call to
-    <methodname>CommitTransaction()</methodname>.</para>
+    <methodname>CommitTransaction()</methodname>. Be aware that if an
+    exception occurs before <methodname>BeginTransaction()</methodname>
+    completes and is caught in the <literal>catch</literal> block,
+    RollBackTransaction() will also throw another exception since a
+    transaction was not started.</para>
 
     <para>When you deal with a connection and transaction, you can also use
     the <methodname>using</methodname> syntax as in the examples below.</para>
@@ -302,12 +306,12 @@
       <title>Example AutoConnection</title>
 
       <programlisting>[C#]
-<emphasis role="comment">// Open/close Connection 1</emphasis>
+<emphasis role="comment">// Open/close first Connection</emphasis>
 Product product = productDao.GetProduct (5); 
 product.Description = "New description.";
-<emphasis role="comment">// Open/close Connection 2</emphasis>
+<emphasis role="comment">// Open/close second Connection</emphasis>
 productDao.UpdateProduct(product);
-<emphasis role="comment">// Open/close Connection 3</emphasis>
+<emphasis role="comment">// Open/close third Connection</emphasis>
 product = productDao.GetProduct (5);</programlisting>
     </example>
 

Modified: incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml?rev=179950&r1=179949&r2=179950&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml (original)
+++ incubator/ibatis/trunk/cs/docs/dataMapperGuide/src/en/dotnet.xml Fri Jun  3 22:09:04 2005
@@ -349,7 +349,7 @@
         value in the properties file becomes a <emphasis>shell</emphasis>
         variable that can be used in the DataMapper configuration file and
         your Data Map definition files (see Section 3). For example, if the
-        properties file contains</para>
+        "properties" file contains</para>
 
         <informalexample>
           <programlisting>&lt;?xml version="1.0" encoding="utf-8" ?&gt; 
@@ -1655,7 +1655,7 @@
             the database provider and the smaller set extracted by the
             framework. The higher the page, the larger set that will be
             returned and thrown away. For very large sets, you may want to use
-            a stored procedure or your own query that used
+            a stored procedure or your own query that uses
             <parameter>skipResults</parameter> and
             <parameter>maxResults</parameter> as parameters. Unfortunately,
             the semantics for the returning partial data sets is not

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/IDalSession.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/IDalSession.cs?rev=179950&r1=179949&r2=179950&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/IDalSession.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.Common/IDalSession.cs Fri Jun  3 22:09:04 2005
@@ -34,7 +34,7 @@
 {
 	/// <summary>
 	/// A template for a session in the iBATIS.NET framwork.
-	/// Holds teh connection, the transaction ...
+	/// Holds the connection, the transaction ...
 	/// </summary>
 	public interface IDalSession : IDisposable 
 	{

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs?rev=179950&r1=179949&r2=179950&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataAccess/Configuration/DomDaoManagerBuilder.cs Fri Jun  3 22:09:04 2005
@@ -178,7 +178,7 @@
 		/// </summary>
 		/// <param name="resource">
 		/// A relative ressource path from your Application root 
-		/// or an absolue file path file:\\c:\dir\a.config
+		/// or an absolue file path file://c:\dir\a.config
 		/// </param>
 		///<param name="configureDelegate">
 		/// Delegate called when the file has changed, to rebuild the dal.

Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Exceptions/DataMapperException.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Exceptions/DataMapperException.cs?rev=179950&r1=179949&r2=179950&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Exceptions/DataMapperException.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Exceptions/DataMapperException.cs Fri Jun  3 22:09:04 2005
@@ -44,7 +44,7 @@
 		/// This constructor initializes the <para>Message</para> property of the new instance 
 		/// to a system-supplied message that describes the error.
 		/// </remarks>
-		public DataMapperException(): base("iBatis.NET DataMappper component caused an exception.") { }
+		public DataMapperException(): base("iBATIS.NET DataMapper component caused an exception.") { }
 		
 		/// <summary>
 		/// Initializes a new instance of the <see cref="IBatisNet.DataMapper.Exceptions.DataMapperException"/> 
@@ -59,7 +59,7 @@
 		/// If the innerException parameter is not a null reference (Nothing in Visual Basic), 
 		/// the current exception is raised in a catch block that handles the inner exception.
 		/// </param>
-		public DataMapperException(Exception ex) : base("iBatis.NET DataMappper component caused an exception.", ex) {  }
+		public DataMapperException(Exception ex) : base("iBATIS.NET DataMapper component caused an exception.", ex) {  }
 
 
 		/// <summary>