Author: gbayon
Date: Tue Aug 15 11:36:48 2006
New Revision: 431664
URL: http://svn.apache.org/viewvc?rev=431664&view=rev
Log:
- Fix for IBATISNET-180
Added:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Delegates.cs
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/StatementTest.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/AssemblyInfo.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ISqlMapper.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/DeleteMappedStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/InsertMappedStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/SelectMappedStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/UpdateMappedStatement.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyList.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyListGeneric.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyLoadInterceptor.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/StatementTest.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/StatementTest.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/StatementTest.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/Generics/StatementTest.cs
Tue Aug 15 11:36:48 2006
@@ -491,7 +491,7 @@
public void TestQueryWithRowDelegate()
{
_index = 0;
- SqlMapper.RowDelegate<Account> handler = new
SqlMapper.RowDelegate<Account>(this.RowHandler);
+ RowDelegate<Account> handler = new
RowDelegate<Account>(this.RowHandler);
IList<Account> list =
sqlMap.QueryWithRowDelegate<Account>("GetAllAccountsViaResultMap", null,
handler);
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper.Test/NUnit/SqlMapTests/StatementTest.cs
Tue Aug 15 11:36:48 2006
@@ -614,7 +614,7 @@
[Test]
public void TestQueryWithRowDelegate()
{
- SqlMapper.RowDelegate handler = new
SqlMapper.RowDelegate(this.RowHandler);
+ RowDelegate handler = new RowDelegate(this.RowHandler);
IList list =
sqlMap.QueryWithRowDelegate("GetAllAccountsViaResultMap", null, handler);
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/AssemblyInfo.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/AssemblyInfo.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/AssemblyInfo.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/AssemblyInfo.cs Tue Aug 15
11:36:48 2006
@@ -33,4 +33,4 @@
[assembly: AssemblyTitle("IBatisNet.DataMapper")]
[assembly: AssemblyDescription("Map objects to your SQL statements or stored
procedures.")]
-[assembly: AssemblyVersion("1.5.1")]
\ No newline at end of file
+[assembly: AssemblyVersion("1.6.0")]
\ No newline at end of file
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ChangeLog.txt Tue Aug 15
11:36:48 2006
@@ -1,7 +1,16 @@
IBatisNet Change Log
------------------------------
-1.5.1 - 27/07/2006 BETA
+1.6.0 - BETA
+------------------------------
+Issues
+
+
+Improvements/Changes
+- IBATISNET-180 : Extends use of ISqlMapper in DataMapper + allow use of a
custom ISqlMapper
+
+------------------------------
+1.5.1 - 10/08/2006 GA
------------------------------
Issues
- IBATISNET-176 : Issue with resultMapping & constructor injection
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
Tue Aug 15 11:36:48 2006
@@ -293,6 +293,7 @@
private IObjectFactory _objectFactory = null;
private ISetAccessorFactory _setAccessorFactory = null;
private IGetAccessorFactory _getAccessorFactory = null;
+ private ISqlMapper _sqlMapper = null;
private bool _validateSqlMapConfig = true;
private NameValueCollection _properties = new NameValueCollection();
@@ -336,6 +337,15 @@
}
/// <summary>
+ /// Allow to set a custom object ISqlMapper, see <see
cref="ISqlMapper"/>
+ /// before configuration
+ /// </summary>
+ public ISqlMapper SqlMapper
+ {
+ set { _sqlMapper = value; }
+ }
+
+ /// <summary>
/// Enable whether or not the validation of configuration document
/// before configuration
/// </summary>
@@ -762,10 +772,17 @@
{
_getAccessorFactory = new
GetAccessorFactory(_configScope.UseReflectionOptimizer);
}
- AccessorFactory accessorFactory = new
AccessorFactory(_setAccessorFactory, _getAccessorFactory);
-
- _configScope.SqlMapper = new SqlMapper(_objectFactory,
accessorFactory);
- _configScope.SqlMapper.CacheModelsEnabled
=_configScope.IsCacheModelsEnabled;
+ if (_sqlMapper == null)
+ {
+ AccessorFactory accessorFactory = new
AccessorFactory(_setAccessorFactory, _getAccessorFactory);
+ _configScope.SqlMapper = new SqlMapper(_objectFactory,
accessorFactory);
+ }
+ else
+ {
+ _configScope.SqlMapper = _sqlMapper;
+ }
+
+ _configScope.SqlMapper.IsCacheModelsEnabled =
_configScope.IsCacheModelsEnabled;
#region Cache Alias
Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Delegates.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Delegates.cs?rev=431664&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Delegates.cs (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Delegates.cs Tue Aug 15
11:36:48 2006
@@ -0,0 +1,66 @@
+
+#region Apache Notice
+/*****************************************************************************
+ * $Revision: 430536 $
+ * $LastChangedDate: 2006-08-10 23:24:45 +0200 (jeu., 10 août 2006) $
+ * $LastChangedBy: rgrabowski $
+ *
+ * iBATIS.NET Data Mapper
+ * Copyright (C) 2006/2005 - The Apache Software Foundation
+ *
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+
********************************************************************************/
+#endregion
+
+using System.Collections;
+#if dotnet2
+using System.Collections.Generic;
+#endif
+
+
+namespace IBatisNet.DataMapper
+{
+ //public class Delegates
+ //{
+ //}
+
+ /// <summary>
+ /// A delegate called once per row in the QueryWithRowDelegate method
+ /// </summary>
+ /// <param name="obj">The object currently being processed.</param>
+ /// <param name="parameterObject">The optional parameter object passed
into the QueryWithRowDelegate method.</param>
+ /// <param name="list">The IList that will be returned to the
caller.</param>
+ public delegate void RowDelegate(object obj, object parameterObject, IList
list);
+
+#if dotnet2
+ /// <summary>
+ /// A delegate called once per row in the QueryWithRowDelegate method
+ /// </summary>
+ /// <param name="obj">The object currently being processed.</param>
+ /// <param name="parameterObject">The optional parameter object passed
into the QueryWithRowDelegate method.</param>
+ /// <param name="list">The IList that will be returned to the
caller.</param>
+ public delegate void RowDelegate<T>(object obj, object parameterObject,
IList<T> list);
+#endif
+
+ /// <summary>
+ /// A delegate called once per row in the QueryForMapWithRowDelegate method
+ /// </summary>
+ /// <param name="key"></param>
+ /// <param name="value"></param>
+ /// <param name="parameterObject">The optional parameter object passed
into the QueryForMapWithRowDelegate method.</param>
+ /// <param name="dictionary">The IDictionary that will be returned to the
caller.</param>
+ public delegate void DictionaryRowDelegate(object key, object value,
object parameterObject, IDictionary dictionary);
+
+}
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj
Tue Aug 15 11:36:48 2006
@@ -453,6 +453,7 @@
<Compile Include="DataExchange\IDataExchange.cs" />
<Compile Include="DataExchange\ListDataExchange.cs" />
<Compile Include="DataExchange\PrimitiveDataExchange.cs" />
+ <Compile Include="Delegates.cs" />
<Compile Include="Enumeration.cs">
<SubType>Code</SubType>
</Compile>
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj
(original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.csproj Tue
Aug 15 11:36:48 2006
@@ -114,6 +114,11 @@
BuildAction = "Compile"
/>
<File
+ RelPath = "Delegates.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "Enumeration.cs"
SubType = "Code"
BuildAction = "Compile"
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ISqlMapper.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ISqlMapper.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ISqlMapper.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/ISqlMapper.cs Tue Aug 15
11:36:48 2006
@@ -23,16 +23,23 @@
********************************************************************************/
#endregion
-using System;
using System.Collections;
#if dotnet2
using System.Collections.Generic;
#endif
+using System.Collections.Specialized;
using System.Data;
using IBatisNet.Common;
+using IBatisNet.Common.Utilities.Objects;
+using IBatisNet.Common.Utilities.Objects.Members;
+using IBatisNet.DataMapper.Configuration.Cache;
+using IBatisNet.DataMapper.Configuration.ParameterMapping;
+using IBatisNet.DataMapper.Configuration.ResultMapping;
+using IBatisNet.DataMapper.DataExchange;
using IBatisNet.DataMapper.Exceptions;
using IBatisNet.DataMapper.MappedStatements;
+using IBatisNet.DataMapper.TypeHandlers;
namespace IBatisNet.DataMapper
{
@@ -49,6 +56,106 @@
/// <c>true</c> if this instance is session started; otherwise,
<c>false</c>.
/// </value>
bool IsSessionStarted { get; }
+
+ /// <summary>
+ /// Returns the DalSession instance
+ /// currently being used by the SqlMap.
+ /// </summary>
+ IDalSession LocalSession { get; }
+
+ /// <summary>
+ /// Creates a new IDalSession that will be used to query the data
source.
+ /// </summary>
+ /// <returns>A new session</returns>
+ IDalSession CreateSqlMapSession();
+
+ /// <summary>
+ /// A flag that determines whether cache models were enabled
+ /// when this SqlMap was built.
+ /// </summary>
+ bool IsCacheModelsEnabled { get;set; }
+
+ /// <summary>
+ /// Factory for DataExchange objects
+ /// </summary>
+ DataExchangeFactory DataExchangeFactory { get; }
+
+ /// <summary>
+ /// The TypeHandlerFactory
+ /// </summary>
+ TypeHandlerFactory TypeHandlerFactory { get; }
+
+ /// <summary>
+ /// The meta factory for object factory
+ /// </summary>
+ IObjectFactory ObjectFactory { get; }
+
+ /// <summary>
+ /// The factory which build <see cref="IAccessor"/>
+ /// </summary>
+ AccessorFactory AccessorFactory { get; }
+
+ /// <summary>
+ /// Get a ParameterMap by name
+ /// </summary>
+ /// <param name="name">The name of the ParameterMap</param>
+ /// <returns>The ParameterMap</returns>
+ ParameterMap GetParameterMap(string name);
+
+ /// <summary>
+ /// Adds a (named) ParameterMap.
+ /// </summary>
+ /// <param name="parameterMap">the ParameterMap to add</param>
+ void AddParameterMap(ParameterMap parameterMap);
+
+ /// <summary>
+ /// Gets a ResultMap by name
+ /// </summary>
+ /// <param name="name">The name of the result map</param>
+ /// <returns>The ResultMap</returns>
+ ResultMap GetResultMap(string name);
+
+ /// <summary>
+ /// Adds a (named) ResultMap
+ /// </summary>
+ /// <param name="resultMap">The ResultMap to add</param>
+ void AddResultMap(ResultMap resultMap);
+
+ /// <summary>
+ /// The ParameterMap collection
+ /// </summary>
+ HybridDictionary ParameterMaps { get; }
+
+ /// <summary>
+ /// The ResultMap collection
+ /// </summary>
+ HybridDictionary ResultMaps { get; }
+
+ /// <summary>
+ /// The MappedStatements collection
+ /// </summary>
+ HybridDictionary MappedStatements { get; }
+
+ /// <summary>
+ /// Gets a cache by name
+ /// </summary>
+ /// <param name="name">The name of the cache to get</param>
+ /// <returns>The cache object</returns>
+ CacheModel GetCache(string name);
+
+ /// <summary>
+ /// Adds a (named) cache.
+ /// </summary>
+ /// <param name="cache">The cache to add</param>
+ void AddCache(CacheModel cache);
+
+ /// <summary>
+ /// Adds a (named) MappedStatement.
+ /// </summary>
+ /// <param name="key"> The key name</param>
+ /// <param name="mappedStatement">The statement to add</param>
+ void AddMappedStatement(string key, IMappedStatement mappedStatement);
+
/// <summary>
/// Begins the transaction.
/// </summary>
@@ -169,12 +276,6 @@
object Insert(string statementName, object parameterObject);
/// <summary>
- /// Returns the DalSession instance
- /// currently being used by the SqlMap.
- /// </summary>
- IDalSession LocalSession { get; }
-
- /// <summary>
/// Opens the connection.
/// </summary>
/// <returns></returns>
@@ -284,7 +385,7 @@
/// <param name="rowDelegate"></param>
/// <returns>A IDictionary (Hashtable) of object containing the rows
keyed by keyProperty.</returns>
///<exception cref="DataMapperException">If a transaction is not in
progress, or the database throws an exception.</exception>
- IDictionary QueryForMapWithRowDelegate(string statementName, object
parameterObject, string keyProperty, string valueProperty,
SqlMapper.DictionaryRowDelegate rowDelegate);
+ IDictionary QueryForMapWithRowDelegate(string statementName, object
parameterObject, string keyProperty, string valueProperty,
DictionaryRowDelegate rowDelegate);
/// <summary>
/// Executes a Sql SELECT statement that returns a single object of
the type of the
@@ -329,7 +430,7 @@
/// <param name="parameterObject">The object used to set the
parameters in the SQL.</param>
/// <param name="rowDelegate"></param>
/// <returns>A List of result objects.</returns>
- IList QueryWithRowDelegate(string statementName, object
parameterObject, SqlMapper.RowDelegate rowDelegate);
+ IList QueryWithRowDelegate(string statementName, object
parameterObject, RowDelegate rowDelegate);
/// <summary>
/// Rolls the back transaction.
@@ -428,7 +529,7 @@
/// <param name="parameterObject">The object used to set the
parameters in the SQL.</param>
/// <param name="rowDelegate"></param>
/// <returns>A List of result objects.</returns>
- IList<T> QueryWithRowDelegate<T>(string statementName, object
parameterObject, SqlMapper.RowDelegate<T> rowDelegate);
+ IList<T> QueryWithRowDelegate<T>(string statementName, object
parameterObject, RowDelegate<T> rowDelegate);
#endif
}
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs
Tue Aug 15 11:36:48 2006
@@ -101,7 +101,7 @@
/// <summary>
/// The SqlMap used by this MappedStatement
/// </summary>
- public SqlMapper SqlMap
+ public ISqlMapper SqlMap
{
get {return _mappedStatement.SqlMap; }
}
@@ -387,7 +387,7 @@
/// <param name="session">The session used to execute the
statement.</param>
/// <param name="parameterObject">The object used to set the
parameters in the SQL.</param>
/// <param name="rowDelegate"></param>
- public IList ExecuteQueryForRowDelegate(IDalSession session,
object parameterObject, SqlMapper.RowDelegate rowDelegate)
+ public IList ExecuteQueryForRowDelegate(IDalSession session,
object parameterObject, RowDelegate rowDelegate)
{
return
_mappedStatement.ExecuteQueryForRowDelegate(session, parameterObject,
rowDelegate);
}
@@ -400,7 +400,7 @@
/// <param name="session">The session used to execute the
statement.</param>
/// <param name="parameterObject">The object used to set the
parameters in the SQL.</param>
/// <param name="rowDelegate"></param>
- public IList<T> ExecuteQueryForRowDelegate<T>(IDalSession session,
object parameterObject, SqlMapper.RowDelegate<T> rowDelegate)
+ public IList<T> ExecuteQueryForRowDelegate<T>(IDalSession session,
object parameterObject, RowDelegate<T> rowDelegate)
{
return _mappedStatement.ExecuteQueryForRowDelegate<T>(session,
parameterObject, rowDelegate);
}
@@ -417,7 +417,7 @@
/// <param name="rowDelegate"></param>
/// <returns>A hashtable of object containing the rows keyed by
keyProperty.</returns>
/// <exception
cref="IBatisNet.DataMapper.Exceptions.DataMapperException">If a transaction is
not in progress, or the database throws an exception.</exception>
- public IDictionary
ExecuteQueryForMapWithRowDelegate(IDalSession session, object parameterObject,
string keyProperty, string valueProperty, SqlMapper.DictionaryRowDelegate
rowDelegate)
+ public IDictionary
ExecuteQueryForMapWithRowDelegate(IDalSession session, object parameterObject,
string keyProperty, string valueProperty, DictionaryRowDelegate rowDelegate)
{
return
_mappedStatement.ExecuteQueryForMapWithRowDelegate(session, parameterObject,
keyProperty, valueProperty, rowDelegate);
}
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/DeleteMappedStatement.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/DeleteMappedStatement.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/DeleteMappedStatement.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/DeleteMappedStatement.cs
Tue Aug 15 11:36:48 2006
@@ -43,7 +43,8 @@
/// </summary>
/// <param name="sqlMap">An SqlMap</param>
/// <param name="statement">An SQL statement</param>
- internal DeleteMappedStatement( SqlMapper sqlMap, IStatement
statement ): base(sqlMap, statement)
+ internal DeleteMappedStatement(ISqlMapper sqlMap, IStatement statement)
+ : base(sqlMap, statement)
{ }
#region ExecuteQueryForMap
@@ -124,7 +125,7 @@
/// <param name="parameterObject"></param>
/// <param name="rowDelegate"></param>
/// <returns></returns>
- public override IList ExecuteQueryForRowDelegate( IDalSession
session, object parameterObject, SqlMapper.RowDelegate rowDelegate )
+ public override IList ExecuteQueryForRowDelegate( IDalSession
session, object parameterObject, RowDelegate rowDelegate )
{
throw new DataMapperException("Delete statements cannot
be executed as a query for row delegate.");
}
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs
Tue Aug 15 11:36:48 2006
@@ -97,7 +97,7 @@
/// <summary>
/// The SqlMap used by this MappedStatement
/// </summary>
- SqlMapper SqlMap
+ ISqlMapper SqlMap
{
get;
}
@@ -263,7 +263,7 @@
/// <param name="parameterObject">The object used to set the
parameters in the SQL.</param>
/// <param name="rowDelegate"></param>param>
/// <returns></returns>
- IList ExecuteQueryForRowDelegate( IDalSession session, object
parameterObject, SqlMapper.RowDelegate rowDelegate );
+ IList ExecuteQueryForRowDelegate( IDalSession session, object
parameterObject, RowDelegate rowDelegate );
/// <summary>
@@ -277,7 +277,7 @@
/// <param name="rowDelegate"></param>
/// <returns>A hashtable of object containing the rows keyed by
keyProperty.</returns>
/// <exception
cref="IBatisNet.DataMapper.Exceptions.DataMapperException">If a transaction is
not in progress, or the database throws an exception.</exception>
- IDictionary ExecuteQueryForMapWithRowDelegate( IDalSession
session, object parameterObject, string keyProperty, string valueProperty,
SqlMapper.DictionaryRowDelegate rowDelegate );
+ IDictionary ExecuteQueryForMapWithRowDelegate( IDalSession
session, object parameterObject, string keyProperty, string valueProperty,
DictionaryRowDelegate rowDelegate );
#endregion
@@ -291,7 +291,7 @@
/// <param name="parameterObject">The object used to set the
parameters in the SQL.</param>
/// <param name="rowDelegate"></param>param>
/// <returns></returns>
- IList<T> ExecuteQueryForRowDelegate<T>(IDalSession session, object
parameterObject, SqlMapper.RowDelegate<T> rowDelegate);
+ IList<T> ExecuteQueryForRowDelegate<T>(IDalSession session, object
parameterObject, RowDelegate<T> rowDelegate);
#endif
#endregion
}
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/InsertMappedStatement.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/InsertMappedStatement.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/InsertMappedStatement.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/InsertMappedStatement.cs
Tue Aug 15 11:36:48 2006
@@ -43,7 +43,7 @@
/// </summary>
/// <param name="sqlMap">An SqlMap</param>
/// <param name="statement">An SQL statement</param>
- internal InsertMappedStatement( SqlMapper sqlMap, IStatement
statement ): base(sqlMap, statement)
+ internal InsertMappedStatement( ISqlMapper sqlMap, IStatement
statement ): base(sqlMap, statement)
{
}
@@ -127,7 +127,7 @@
/// <param name="parameterObject"></param>
/// <param name="rowDelegate"></param>
/// <returns></returns>
- public override IList ExecuteQueryForRowDelegate( IDalSession
session, object parameterObject, SqlMapper.RowDelegate rowDelegate )
+ public override IList ExecuteQueryForRowDelegate( IDalSession
session, object parameterObject, RowDelegate rowDelegate )
{
throw new DataMapperException("Insert statements cannot
be executed as a query for row delegate.");
}
@@ -143,7 +143,7 @@
/// <param name="rowDelegate"></param>
/// <returns>A hashtable of object containing the rows keyed by
keyProperty.</returns>
///<exception cref="DataMapperException">If a transaction is
not in progress, or the database throws an exception.</exception>
- public override IDictionary ExecuteQueryForMapWithRowDelegate(
IDalSession session, object parameterObject, string keyProperty, string
valueProperty, SqlMapper.DictionaryRowDelegate rowDelegate )
+ public override IDictionary ExecuteQueryForMapWithRowDelegate(
IDalSession session, object parameterObject, string keyProperty, string
valueProperty, DictionaryRowDelegate rowDelegate )
{
throw new DataMapperException("Insert statements cannot
be executed as a query for row delegate.");
}
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
Tue Aug 15 11:36:48 2006
@@ -76,7 +76,7 @@
private static readonly ILog _logger = LogManager.GetLogger(
MethodBase.GetCurrentMethod().DeclaringType );
private IStatement _statement = null;
- private SqlMapper _sqlMap = null;
+ private ISqlMapper _sqlMap = null;
private IPreparedCommand _preparedCommand = null;
private IResultStrategy _resultStrategy = null;
private ReaderAutoMapper _readerAutoMapper = null;
@@ -122,7 +122,7 @@
/// <summary>
/// The SqlMap used by this MappedStatement
/// </summary>
- public SqlMapper SqlMap
+ public ISqlMapper SqlMap
{
get { return _sqlMap; }
}
@@ -134,7 +134,7 @@
/// </summary>
/// <param name="sqlMap">An SqlMap</param>
/// <param name="statement">An SQL statement</param>
- internal MappedStatement( SqlMapper sqlMap, IStatement
statement )
+ internal MappedStatement( ISqlMapper sqlMap, IStatement
statement )
{
_sqlMap = sqlMap;
_statement = statement;
@@ -379,7 +379,7 @@
/// <param name="session">The session used to execute the
statement.</param>
/// <param name="parameterObject">The object used to set the
parameters in the SQL.</param>
/// <param name="rowDelegate"></param>
- public virtual IList ExecuteQueryForRowDelegate( IDalSession
session, object parameterObject, SqlMapper.RowDelegate rowDelegate )
+ public virtual IList ExecuteQueryForRowDelegate( IDalSession
session, object parameterObject, RowDelegate rowDelegate )
{
RequestScope request =
_statement.Sql.GetRequestScope(this, parameterObject, session);
@@ -404,7 +404,7 @@
/// <param name="rowDelegate"></param>
/// <returns>A hashtable of object containing the rows keyed by
keyProperty.</returns>
///<exception cref="DataMapperException">If a transaction is
not in progress, or the database throws an exception.</exception>
- public virtual IDictionary ExecuteQueryForMapWithRowDelegate(
IDalSession session, object parameterObject, string keyProperty, string
valueProperty, SqlMapper.DictionaryRowDelegate rowDelegate )
+ public virtual IDictionary ExecuteQueryForMapWithRowDelegate(
IDalSession session, object parameterObject, string keyProperty, string
valueProperty, DictionaryRowDelegate rowDelegate )
{
RequestScope request =
_statement.Sql.GetRequestScope(this, parameterObject, session);
@@ -463,7 +463,7 @@
/// <param name="maxResults">The maximum number of rows to
return.</param>
/// <param name="rowDelegate"></param>
/// <returns>A List of result objects.</returns>
- internal IList RunQueryForList(RequestScope request,
IDalSession session, object parameterObject, int skipResults, int maxResults,
SqlMapper.RowDelegate rowDelegate)
+ internal IList RunQueryForList(RequestScope request,
IDalSession session, object parameterObject, int skipResults, int maxResults,
RowDelegate rowDelegate)
{
IList list = null;
@@ -587,7 +587,7 @@
/// <param name="session">The session used to execute the
statement.</param>
/// <param name="parameterObject">The object used to set the
parameters in the SQL.</param>
/// <param name="rowDelegate"></param>
- public virtual IList<T> ExecuteQueryForRowDelegate<T>(IDalSession
session, object parameterObject, SqlMapper.RowDelegate<T> rowDelegate)
+ public virtual IList<T> ExecuteQueryForRowDelegate<T>(IDalSession
session, object parameterObject, RowDelegate<T> rowDelegate)
{
RequestScope request = _statement.Sql.GetRequestScope(this,
parameterObject, session);
@@ -646,7 +646,7 @@
/// <param name="maxResults">The maximum number of rows to
return.</param>
/// <param name="rowDelegate"></param>
/// <returns>A List of result objects.</returns>
- internal IList<T> RunQueryForList<T>(RequestScope request, IDalSession
session, object parameterObject, int skipResults, int maxResults,
SqlMapper.RowDelegate<T> rowDelegate)
+ internal IList<T> RunQueryForList<T>(RequestScope request, IDalSession
session, object parameterObject, int skipResults, int maxResults,
RowDelegate<T> rowDelegate)
{
IList<T> list = null;
@@ -917,7 +917,7 @@
object parameterObject,
string keyProperty,
string valueProperty,
- SqlMapper.DictionaryRowDelegate rowDelegate )
+ DictionaryRowDelegate rowDelegate )
{
IDictionary map = new Hashtable();
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/SelectMappedStatement.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/SelectMappedStatement.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/SelectMappedStatement.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/SelectMappedStatement.cs
Tue Aug 15 11:36:48 2006
@@ -43,7 +43,8 @@
/// </summary>
/// <param name="sqlMap">An SqlMap</param>
/// <param name="statement">An SQL statement</param>
- internal SelectMappedStatement( SqlMapper sqlMap, IStatement
statement ): base(sqlMap, statement)
+ internal SelectMappedStatement(ISqlMapper sqlMap, IStatement statement)
+ : base(sqlMap, statement)
{ }
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/UpdateMappedStatement.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/UpdateMappedStatement.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
---
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/UpdateMappedStatement.cs
(original)
+++
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/UpdateMappedStatement.cs
Tue Aug 15 11:36:48 2006
@@ -43,7 +43,8 @@
/// </summary>
/// <param name="sqlMap">An SqlMap</param>
/// <param name="statement">An SQL statement</param>
- internal UpdateMappedStatement( SqlMapper sqlMap, IStatement
statement ): base(sqlMap, statement)
+ internal UpdateMappedStatement(ISqlMapper sqlMap, IStatement statement)
+ : base(sqlMap, statement)
{ }
#region ExecuteQueryForMap
@@ -126,7 +127,7 @@
/// <param name="parameterObject"></param>
/// <param name="rowDelegate"></param>
/// <returns></returns>
- public override IList ExecuteQueryForRowDelegate( IDalSession
session, object parameterObject, SqlMapper.RowDelegate rowDelegate )
+ public override IList ExecuteQueryForRowDelegate( IDalSession
session, object parameterObject, RowDelegate rowDelegate )
{
throw new DataMapperException("Update statement cannot
be executed as a query for row delegate.");
}
@@ -142,7 +143,7 @@
/// <param name="rowDelegate"></param>
/// <returns>A hashtable of object containing the rows keyed by
keyProperty.</returns>
///<exception cref="DataMapperException">If a transaction is
not in progress, or the database throws an exception.</exception>
- public override IDictionary ExecuteQueryForMapWithRowDelegate(
IDalSession session, object parameterObject, string keyProperty, string
valueProperty, SqlMapper.DictionaryRowDelegate rowDelegate )
+ public override IDictionary ExecuteQueryForMapWithRowDelegate(
IDalSession session, object parameterObject, string keyProperty, string
valueProperty, DictionaryRowDelegate rowDelegate )
{
throw new DataMapperException("Update statement cannot
be executed as a query for row delegate.");
}
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyList.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyList.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyList.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyList.cs Tue Aug 15
11:36:48 2006
@@ -43,7 +43,7 @@
private object _param = null;
private object _target = null;
private ISetAccessor _setAccessor = null;
- private SqlMapper _sqlMap = null;
+ private ISqlMapper _sqlMap = null;
private string _statementId = string.Empty;
private bool _loaded = false;
private object _loadLock = new object();
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyListGeneric.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyListGeneric.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyListGeneric.cs
(original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyListGeneric.cs Tue
Aug 15 11:36:48 2006
@@ -47,7 +47,7 @@
private object _param = null;
private object _target = null;
private ISetAccessor _setAccessor = null;
- private SqlMapper _sqlMap = null;
+ private ISqlMapper _sqlMap = null;
private string _statementId = string.Empty;
private bool _loaded = false;
private object _loadLock = new object();
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyLoadInterceptor.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyLoadInterceptor.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyLoadInterceptor.cs
(original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Proxy/LazyLoadInterceptor.cs
Tue Aug 15 11:36:48 2006
@@ -31,9 +31,7 @@
using System.Reflection;
using Castle.DynamicProxy;
using IBatisNet.Common.Logging;
-using IBatisNet.Common.Utilities.Objects;
using IBatisNet.Common.Utilities.Objects.Members;
-using IBatisNet.Common.Utilities.Proxy;
using IBatisNet.DataMapper.MappedStatements;
#if dotnet2
using System.Collections.Generic;
@@ -53,7 +51,7 @@
private object _param = null;
private object _target = null;
private ISetAccessor _setAccessor= null;
- private SqlMapper _sqlMap = null;
+ private ISqlMapper _sqlMap = null;
private string _statementName = string.Empty;
private bool _loaded = false;
private IList _innerList = null;
Modified:
ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs
(original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs Tue
Aug 15 11:36:48 2006
@@ -64,7 +64,7 @@
private bool _validateSqlMap = false;
private bool _isCallFromDao = false;
- private SqlMapper _sqlMapper = null;
+ private ISqlMapper _sqlMapper = null;
private string _sqlMapNamespace = null;
private DataSource _dataSource = null;
private bool _isXmlValid = true;
@@ -128,7 +128,7 @@
/// <summary>
/// The SqlMapper we are building.
/// </summary>
- public SqlMapper SqlMapper
+ public ISqlMapper SqlMapper
{
set { _sqlMapper = value; }
get { return _sqlMapper; }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs
URL:
http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs?rev=431664&r1=431663&r2=431664&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs Tue Aug 15
11:36:48 2006
@@ -58,32 +58,6 @@
/// </summary>
public class SqlMapper : ISqlMapper
{
- /// <summary>
- /// A delegate called once per row in the QueryWithRowDelegate
method
- /// </summary>
- /// <param name="obj">The object currently being
processed.</param>
- /// <param name="parameterObject">The optional parameter object
passed into the QueryWithRowDelegate method.</param>
- /// <param name="list">The IList that will be returned to the
caller.</param>
- public delegate void RowDelegate(object obj, object
parameterObject, IList list);
-
-#if dotnet2
- /// <summary>
- /// A delegate called once per row in the QueryWithRowDelegate method
- /// </summary>
- /// <param name="obj">The object currently being processed.</param>
- /// <param name="parameterObject">The optional parameter object passed
into the QueryWithRowDelegate method.</param>
- /// <param name="list">The IList that will be returned to the
caller.</param>
- public delegate void RowDelegate<T>(object obj, object
parameterObject, IList<T> list);
-#endif
-
- /// <summary>
- /// A delegate called once per row in the
QueryForMapWithRowDelegate method
- /// </summary>
- /// <param name="key"></param>
- /// <param name="value"></param>
- /// <param name="parameterObject">The optional parameter object
passed into the QueryForMapWithRowDelegate method.</param>
- /// <param name="dictionary">The IDictionary that will be
returned to the caller.</param>
- public delegate void DictionaryRowDelegate(object key, object
value, object parameterObject, IDictionary dictionary);
#region Fields
//(MappedStatement Name, MappedStatement)
@@ -134,18 +108,9 @@
}
/// <summary>
- /// A flag that determines whether cache models were enabled
- /// when this SqlMap was built.
- /// </summary>
- public bool IsCacheModelsEnabled
- {
- get { return _cacheModelsEnabled; }
- }
-
- /// <summary>
/// Factory for DataExchange objects
/// </summary>
- internal DataExchangeFactory DataExchangeFactory
+ public DataExchangeFactory DataExchangeFactory
{
get { return _dataExchangeFactory; }
}
@@ -153,7 +118,7 @@
/// <summary>
/// The TypeHandlerFactory
/// </summary>
- internal TypeHandlerFactory TypeHandlerFactory
+ public TypeHandlerFactory TypeHandlerFactory
{
get { return _typeHandlerFactory; }
}
@@ -161,7 +126,7 @@
/// <summary>
/// The meta factory for object factory
/// </summary>
- internal IObjectFactory ObjectFactory
+ public IObjectFactory ObjectFactory
{
get { return _objectFactory; }
}
@@ -169,19 +134,20 @@
/// <summary>
/// The factory which build <see cref="IAccessor"/>
/// </summary>
- internal AccessorFactory AccessorFactory
+ public AccessorFactory AccessorFactory
{
get { return _accessorFactory; }
}
- /// <summary>
- /// Set the flag to tell us if cache models were enabled
- /// or not.
- /// </summary>
- internal bool CacheModelsEnabled
- {
+ /// <summary>
+ /// A flag that determines whether cache models were enabled
+ /// when this SqlMap was built.
+ /// </summary>
+ public bool IsCacheModelsEnabled
+ {
set { _cacheModelsEnabled = value; }
- }
+ get { return _cacheModelsEnabled; }
+ }
#endregion
@@ -193,7 +159,7 @@
/// </summary>
/// <param name="objectFactory">The object factory.</param>
/// <param name="accessorFactory">The accessor factory.</param>
- internal SqlMapper(IObjectFactory objectFactory,
+ public SqlMapper(IObjectFactory objectFactory,
AccessorFactory accessorFactory)
{
_typeHandlerFactory = new TypeHandlerFactory();
@@ -323,7 +289,7 @@
{
throw new DataMapperException("SqlMap could not
invoke OpenConnection(). A connection is already started. Call CloseConnection
first.");
}
- IDalSession session = CreateSession();
+ IDalSession session = CreateSqlMapSession();
_sessionHolder.Store(session);
session.OpenConnection();
return session;
@@ -339,7 +305,7 @@
{
throw new DataMapperException("SqlMap could not
invoke OpenConnection(). A connection is already started. Call CloseConnection
first.");
}
- IDalSession session = CreateSession();
+ IDalSession session = CreateSqlMapSession();
_sessionHolder.Store(session);
session.OpenConnection(connectionString);
return session;
@@ -379,7 +345,7 @@
{
throw new DataMapperException("SqlMap could not
invoke BeginTransaction(). A Transaction is already started. Call
CommitTransaction() or RollbackTransaction first.");
}
- IDalSession session = CreateSession();
+ IDalSession session = CreateSqlMapSession();
_sessionHolder.Store(session);
session.BeginTransaction();
return session ;
@@ -395,7 +361,7 @@
{
throw new DataMapperException("SqlMap could not
invoke BeginTransaction(). A Transaction is already started. Call
CommitTransaction() or RollbackTransaction first.");
}
- IDalSession session = CreateSession();
+ IDalSession session = CreateSqlMapSession();
_sessionHolder.Store(session);
session.BeginTransaction( connectionString );
return session ;
@@ -438,7 +404,7 @@
{
throw new DataMapperException("SqlMap could not
invoke BeginTransaction(). A Transaction is already started. Call
CommitTransaction() or RollbackTransaction first.");
}
- IDalSession session = CreateSession();
+ IDalSession session = CreateSqlMapSession();
_sessionHolder.Store(session);
session.BeginTransaction(isolationLevel);
return session;
@@ -455,7 +421,7 @@
{
throw new DataMapperException("SqlMap could not
invoke BeginTransaction(). A Transaction is already started. Call
CommitTransaction() or RollbackTransaction first.");
}
- IDalSession session = CreateSession();
+ IDalSession session = CreateSqlMapSession();
_sessionHolder.Store(session);
session.BeginTransaction( connectionString,
isolationLevel);
return session;
@@ -632,7 +598,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -673,7 +639,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -850,7 +816,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -897,7 +863,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -941,7 +907,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -990,7 +956,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -1189,7 +1155,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -1282,7 +1248,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -1335,7 +1301,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -1380,7 +1346,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -1420,7 +1386,7 @@
if (session == null)
{
- session = CreateSession();
+ session = CreateSqlMapSession();
session.OpenConnection();
isSessionLocal = true;
}
@@ -1468,7 +1434,7 @@
/// </summary>
/// <param name="key"> The key name</param>
/// <param name="mappedStatement">The statement to add</param>
- internal void AddMappedStatement(string key, IMappedStatement
mappedStatement)
+ public void AddMappedStatement(string key, IMappedStatement
mappedStatement)
{
if (_mappedStatements.Contains(key) == true)
{
@@ -1480,7 +1446,7 @@
/// <summary>
/// The MappedStatements collection
/// </summary>
- internal HybridDictionary MappedStatements
+ public HybridDictionary MappedStatements
{
get { return _mappedStatements; }
}
@@ -1490,7 +1456,7 @@
/// </summary>
/// <param name="name">The name of the ParameterMap</param>
/// <returns>The ParameterMap</returns>
- internal ParameterMap GetParameterMap(string name)
+ public ParameterMap GetParameterMap(string name)
{
if (!_parameterMaps.Contains(name))
{
@@ -1503,7 +1469,7 @@
/// Adds a (named) ParameterMap.
/// </summary>
/// <param name="parameterMap">the ParameterMap to add</param>
- internal void AddParameterMap(ParameterMap parameterMap)
+ public void AddParameterMap(ParameterMap parameterMap)
{
if (_parameterMaps.Contains(parameterMap.Id) == true)
{
@@ -1517,7 +1483,7 @@
/// </summary>
/// <param name="name">The name of the result map</param>
/// <returns>The ResultMap</returns>
- internal ResultMap GetResultMap(string name)
+ public ResultMap GetResultMap(string name)
{
if (_resultMaps.Contains(name) == false)
{
@@ -1530,7 +1496,7 @@
/// Adds a (named) ResultMap
/// </summary>
/// <param name="resultMap">The ResultMap to add</param>
- internal void AddResultMap(ResultMap resultMap)
+ public void AddResultMap(ResultMap resultMap)
{
if (_resultMaps.Contains(resultMap.Id) == true)
{
@@ -1542,7 +1508,7 @@
/// <summary>
/// The ParameterMap collection
/// </summary>
- internal HybridDictionary ParameterMaps
+ public HybridDictionary ParameterMaps
{
get { return _parameterMaps; }
}
@@ -1550,7 +1516,7 @@
/// <summary>
/// The ResultMap collection
/// </summary>
- internal HybridDictionary ResultMaps
+ public HybridDictionary ResultMaps
{
get { return _resultMaps; }
}
@@ -1580,7 +1546,7 @@
/// Adds a (named) cache.
/// </summary>
/// <param name="cache">The cache to add</param>
- internal void AddCache(CacheModel cache)
+ public void AddCache(CacheModel cache)
{
if (_cacheMaps.Contains(cache.Id))
{
@@ -1594,7 +1560,7 @@
/// </summary>
/// <param name="name">The name of the cache to get</param>
/// <returns>The cache object</returns>
- internal CacheModel GetCache(string name)
+ public CacheModel GetCache(string name)
{
if (!_cacheMaps.Contains(name))
{
@@ -1655,8 +1621,8 @@
/// <summary>
/// Creates a new IDalSession that will be used to query the
data source.
/// </summary>
- /// <returns></returns>
- protected IDalSession CreateSession()
+ /// <returns>A new session</returns>
+ public IDalSession CreateSqlMapSession()
{
return new SqlMapSession(this);
}