You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by gb...@apache.org on 2005/05/16 11:40:30 UTC
svn commit: r170348 - in
/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper: Commands/
Configuration/ Configuration/ParameterMapping/ Configuration/ResultMapping/
Configuration/Statements/ MappedStatements/ Scope/ TypeHandlers/
Author: gbayon
Date: Mon May 16 02:40:26 2005
New Revision: 170348
URL: http://svn.apache.org/viewcvs?rev=170348&view=rev
Log:
- Updated typeHandler support
Modified:
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/EmbedParamsPreparedCommand.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/InlineParameterMapParser.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/ParameterProperty.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs
incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/TypeHandlerFactory.cs
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/DefaultPreparedCommand.cs Mon May 16 02:40:26 2005
@@ -190,12 +190,33 @@
#endregion
}
-
// Fix JIRA 20
//parameterCopy.Value = parameterValue;
property.TypeHandler.SetParameter(property, parameterCopy, parameterValue, property.DbType);
-
+ parameterCopy.Direction = sqlParameter.Direction;
+
+ // With a ParameterMap, we could specify the ParameterDbTypeProperty
+ if (statement.ParameterMap != null)
+ {
+ if (request.ParameterMap.GetProperty(i).DbType != null &&
+ request.ParameterMap.GetProperty(i).DbType.Length >0)
+ {
+ string dbTypePropertyName = session.DataSource.Provider.ParameterDbTypeProperty;
+
+ ObjectProbe.SetPropertyValue(parameterCopy, dbTypePropertyName, ObjectProbe.GetPropertyValue(sqlParameter, dbTypePropertyName));
+ }
+ else
+ {
+ //parameterCopy.DbType = sqlParameter.DbType;
+ }
+ }
+ else
+ {
+ //parameterCopy.DbType = sqlParameter.DbType;
+ }
+
+
#region Logging
if (_logger.IsDebugEnabled)
{
@@ -225,27 +246,6 @@
}
}
#endregion
-
- parameterCopy.Direction = sqlParameter.Direction;
-
- // With a ParameterMap, we could specify the ParameterDbTypeProperty
- if (statement.ParameterMap != null)
- {
- if (request.ParameterMap.GetProperty(i).DbType.Length >0)
- {
- string dbTypePropertyName = session.DataSource.Provider.ParameterDbTypeProperty;
-
- ObjectProbe.SetPropertyValue(parameterCopy, dbTypePropertyName, ObjectProbe.GetPropertyValue(sqlParameter, dbTypePropertyName));
- }
- else
- {
- //parameterCopy.DbType = sqlParameter.DbType;
- }
- }
- else
- {
- //parameterCopy.DbType = sqlParameter.DbType;
- }
// JIRA-49 Fixes (size, precision, and scale)
if (session.DataSource.Provider.SetDbParameterSize)
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/EmbedParamsPreparedCommand.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/EmbedParamsPreparedCommand.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/EmbedParamsPreparedCommand.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Commands/EmbedParamsPreparedCommand.cs Mon May 16 02:40:26 2005
@@ -120,7 +120,8 @@
// With a ParameterMap, we could specify the ParameterDbTypeProperty
if (statement.ParameterMap != null)
{
- if (request.ParameterMap.GetProperty(i).DbType.Length > 0)
+ if (request.ParameterMap.GetProperty(i).DbType != null &&
+ request.ParameterMap.GetProperty(i).DbType.Length >0)
{
string dbTypePropertyName = session.DataSource.Provider.ParameterDbTypeProperty;
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/DomSqlMapBuilder.cs Mon May 16 02:40:26 2005
@@ -405,7 +405,7 @@
}
_configScope.ErrorContext.MoreInfo = "Check the type attribute '" + handler.ClassName + "' (must be a class name) or the dbType '" + handler.DbType + "' (must be a DbType type name).";
- if (handler.DbType.Length > 0)
+ if (handler.DbType!= null && handler.DbType.Length > 0)
{
_configScope.TypeHandlerFactory.Register(Resources.TypeForName(handler.ClassName), handler.DbType, typeHandler);
}
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/InlineParameterMapParser.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/InlineParameterMapParser.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/InlineParameterMapParser.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/InlineParameterMapParser.cs Mon May 16 02:40:26 2005
@@ -175,7 +175,7 @@
}
else
{
- handler = ResolveTypeHandler(typeHandlerFactory, parameterClass, propertyName, null, null);
+ handler = ResolveTypeHandler(typeHandlerFactory, parameterClass, propertyName, null, dBType);
}
mapping.TypeHandler = handler;
mapping.Initialize(typeHandlerFactory, _errorContext);
@@ -205,7 +205,7 @@
}
else
{
- handler = ResolveTypeHandler(typeHandlerFactory, parameterClass, propertyName, null, null);
+ handler = ResolveTypeHandler(typeHandlerFactory, parameterClass, propertyName, null, dBType);
}
mapping.TypeHandler = handler;
mapping.Initialize(typeHandlerFactory, _errorContext);
@@ -253,11 +253,11 @@
{
handler = typeHandlerFactory.GetUnkownTypeHandler();
}
- else if (typeof(IDictionary).IsAssignableFrom(type))//java.util.Map.class.isAssignableFrom(clazz))
+ else if (typeof(IDictionary).IsAssignableFrom(type))
{
if (propertyType == null)
{
- handler = typeHandlerFactory.GetTypeHandler(typeof(object), dbType);
+ handler = typeHandlerFactory.GetUnkownTypeHandler();
}
else
{
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/ParameterProperty.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/ParameterProperty.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/ParameterProperty.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ParameterMapping/ParameterProperty.cs Mon May 16 02:40:26 2005
@@ -57,7 +57,7 @@
[NonSerialized]
private string _directionAttribute = string.Empty;
[NonSerialized]
- private string _dbType = string.Empty;
+ private string _dbType = null;
[NonSerialized]
private int _size = -1;
[NonSerialized]
@@ -317,13 +317,13 @@
if (typeHandlerFactory.IsSimpleType(type))
{
// Primitive
- _typeHandler = typeHandlerFactory.GetTypeHandler(type, null);
+ _typeHandler = typeHandlerFactory.GetTypeHandler(type);
}
else
{
// .NET object
type = ObjectProbe.GetPropertyTypeForGetter(type, this.PropertyName);
- _typeHandler = typeHandlerFactory.GetTypeHandler(type, null);
+ _typeHandler = typeHandlerFactory.GetTypeHandler(type);
}
}
}
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/ResultMapping/ResultProperty.cs Mon May 16 02:40:26 2005
@@ -25,6 +25,7 @@
#endregion
#region Imports
+
using System;
using System.Collections;
using System.Reflection;
@@ -33,7 +34,7 @@
using IBatisNet.Common.Utilities.Objects;
using IBatisNet.DataMapper.Scope;
using IBatisNet.DataMapper.TypeHandlers;
-using IBatisNet.Common.Utilities;
+
#endregion
namespace IBatisNet.DataMapper.Configuration.ResultMapping
@@ -72,7 +73,7 @@
[NonSerialized]
private ResultMap _nestedResultMap = null;
[NonSerialized]
- private string _dbType = string.Empty;
+ private string _dbType = null;
[NonSerialized]
private string _clrType = string.Empty;
[NonSerialized]
@@ -109,7 +110,7 @@
/// <summary>
/// The typeHandler used to work with the result property.
/// </summary>
- [XmlIgnoreAttribute]
+ [XmlIgnore]
public ITypeHandler TypeHandler
{
get { return _typeHandler; }
@@ -200,7 +201,7 @@
/// <summary>
///
/// </summary>
- [XmlIgnoreAttribute]
+ [XmlIgnore]
public PropertyInfo PropertyInfo
{
get { return _propertyInfo; }
@@ -209,7 +210,7 @@
/// <summary>
/// Tell if a nullValue is defined.
/// </summary>
- [XmlIgnoreAttribute]
+ [XmlIgnore]
public bool HasNullValue
{
get { return (_nullValue.Length>0); }
@@ -229,7 +230,7 @@
/// <summary>
/// A nested ResultMap use to set a property
/// </summary>
- [XmlIgnoreAttribute]
+ [XmlIgnore]
public ResultMap NestedResultMap
{
get { return _nestedResultMap; }
@@ -279,30 +280,6 @@
configScope.ErrorContext.MoreInfo = "Result property '"+_propertyName+"' set the typeHandler attribute.";
_typeHandler = configScope.ResolveTypeHandler( resultClass, _propertyName, _clrType, _dbType);
}
-// if ( propertyInfo != null)
-// {
-// _typeHandler = configScope.TypeHandlerFactory.GetTypeHandler(propertyInfo.PropertyType);
-// }
-// // If we specify a type, it can overrride
-// if (this.CLRType.Length>0)
-// {
-// _typeHandler = configScope.TypeHandlerFactory.GetTypeHandler(Resources.TypeForName(this.CLRType));
-// }
-// // If we specify a typeHandler, it can overrride
-// if (this.CallBackName.Length >0)
-// {
-// configScope.ErrorContext.MoreInfo = "Check the parameter mapping typeHandler attribute '" + this.CallBackName + "' (must be a ITypeHandlerCallback implementation).";
-// try
-// {
-// Type type = configScope.SqlMapper.GetType(this.CallBackName);
-// ITypeHandlerCallback typeHandlerCallback = (ITypeHandlerCallback) Activator.CreateInstance( type );
-// _typeHandler = new CustomTypeHandler(typeHandlerCallback);
-// }
-// catch (Exception e)
-// {
-// throw new ConfigurationException("Error occurred during custom type handler configuration. Cause: " + e.Message, e);
-// }
-// }
}
/// <summary>
@@ -315,7 +292,7 @@
{
_propertyInfo = propertyInfo;
- _typeHandler = typeHandlerFactory.GetTypeHandler(propertyInfo.PropertyType, null);
+ _typeHandler = typeHandlerFactory.GetTypeHandler(propertyInfo.PropertyType);
}
#endregion
}
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Configuration/Statements/PreparedStatementFactory.cs Mon May 16 02:40:26 2005
@@ -222,7 +222,7 @@
IDataParameter dataParameter = _session.CreateCommand(_statement.CommandType).CreateParameter();
// Manage dbType attribute if any
- if (property.DbType.Length >0)
+ if (property.DbType != null && property.DbType.Length >0)
{
// Exemple : Enum.parse(System.Data.SqlDbType, 'VarChar')
object dbType = Enum.Parse( enumDbType, property.DbType, true );
@@ -305,7 +305,7 @@
IDataParameter dataParameter = _session.CreateCommand(_statement.CommandType).CreateParameter();
// Manage dbType attribute if any
- if (property.DbType.Length >0)
+ if (property.DbType!=null && property.DbType.Length >0)
{
// Exemple : Enum.parse(System.Data.SqlDbType, 'VarChar')
object dbType = Enum.Parse( enumDbType, property.DbType, true );
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs Mon May 16 02:40:26 2005
@@ -227,125 +227,6 @@
}
}
-// /// <summary>
-// /// Create an IDbCommand for the IDalSession and the current SQL Statement
-// /// and fill IDbCommand IDataParameter's with the parameterObject.
-// /// </summary>
-// /// <param name="request"></param>
-// /// <param name="session">The IDalSession</param>
-// /// <param name="parameterObject">
-// /// The parameter object which will fill the sql parameter
-// /// </param>
-// /// <returns>An IDbCommand with all the IDataParameter filled.</returns>
-// private IDbCommand CreatePreparedCommand (RequestScope request, IDalSession session, object parameterObject )
-// {
-// // the IDbConnection & the IDbTransaction are assign in the CreateCommand
-// IDbCommand command = session.CreateCommand(_statement.CommandType);
-//
-// command.CommandText = request.PreparedStatement.PreparedSql;
-//
-// ApplyParameterMap( session, command, request, parameterObject );
-//
-// return command;
-// }
-
-// /// <summary>
-// ///
-// /// </summary>
-// /// <param name="session"></param>
-// /// <param name="command"></param>
-// /// <param name="request"></param>
-// /// <param name="parameterObject"></param>
-// private void ApplyParameterMap
-// ( IDalSession session, IDbCommand command,
-// RequestScope request, object parameterObject )
-// {
-// ArrayList properties = request.PreparedStatement.DbParametersName;
-// ArrayList parameters = request.PreparedStatement.DbParameters;
-// object parameterValue = null;
-//
-// for ( int i = 0; i < properties.Count; ++i )
-// {
-// IDataParameter sqlParameter = (IDataParameter)parameters[i];
-// string propertyName = (string)properties[i];
-//
-// if (command.CommandType == CommandType.Text)
-// {
-// if ( propertyName != "value" ) // Inline Parameters && Parameters via ParameterMap
-// {
-// ParameterProperty property = request.ParameterMap.GetProperty(i);
-//
-// parameterValue = request.ParameterMap.GetValueOfProperty(parameterObject,
-// property.PropertyName);
-// }
-// else // 'value' parameter
-// {
-// parameterValue = parameterObject;
-// }
-// }
-// else // CommandType.StoredProcedure
-// {
-// // A store procedure must always use a ParameterMap
-// // to indicate the mapping order of the properties to the columns
-// if (request.ParameterMap == null) // Inline Parameters
-// {
-// throw new DataMapperException("A procedure statement tag must alway have a parameterMap attribute, which is not the case for the procedure '"+_statement.Id+"'.");
-// }
-// else // Parameters via ParameterMap
-// {
-// ParameterProperty property = request.ParameterMap.GetProperty(i);
-//
-// if (property.DirectionAttribute.Length == 0)
-// {
-// property.Direction = sqlParameter.Direction;
-// }
-//
-// // IDbDataParameter dataParameter = (IDbDataParameter)parameters[i];
-// // property.Precision = dataParameter.Precision;
-// // property.Scale = dataParameter.Scale;
-// // property.Size = dataParameter.Size;
-//
-// sqlParameter.Direction = property.Direction;
-// parameterValue = request.ParameterMap.GetValueOfProperty( parameterObject, property.PropertyName );
-// }
-// }
-//
-// IDataParameter parameterCopy = command.CreateParameter();
-// // Fix JIRA 20
-// sqlParameter.Value = parameterValue;
-// parameterCopy.Value = parameterValue;
-//
-// parameterCopy.Direction = sqlParameter.Direction;
-//
-// // With a ParameterMap, we could specify the ParameterDbTypeProperty
-// if (_statement.ParameterMap != null)
-// {
-// if (request.ParameterMap.GetProperty(i).DbType.Length >0)
-// {
-// string dbTypePropertyName = session.DataSource.Provider.ParameterDbTypeProperty;
-//
-// ObjectProbe.SetPropertyValue(parameterCopy, dbTypePropertyName, ObjectProbe.GetPropertyValue(sqlParameter, dbTypePropertyName));
-// }
-// else
-// {
-// //parameterCopy.DbType = sqlParameter.DbType;
-// }
-// }
-// else
-// {
-// //parameterCopy.DbType = sqlParameter.DbType;
-// }
-//
-// ((IDbDataParameter)parameterCopy).Size = ((IDbDataParameter)sqlParameter).Size;
-// ((IDbDataParameter)parameterCopy).Precision = ((IDbDataParameter)sqlParameter).Precision;
-// ((IDbDataParameter)parameterCopy).Scale = ((IDbDataParameter)sqlParameter).Scale;
-//
-// parameterCopy.ParameterName = sqlParameter.ParameterName;
-//
-// command.Parameters.Add( parameterCopy );
-// }
-// }
-
/// <summary>
///
@@ -408,7 +289,7 @@
ResultProperty property = new ResultProperty();
property.PropertyName = "value";
property.ColumnIndex = 0;
- property.TypeHandler = _sqlMap.TypeHandlerFactory.GetTypeHandler(outObject.GetType(), null);
+ property.TypeHandler = _sqlMap.TypeHandlerFactory.GetTypeHandler(outObject.GetType());
SetObjectProperty(request, request.ResultMap, property, ref outObject, reader);
}
@@ -469,7 +350,7 @@
{
Type propertyType =ObjectProbe.GetPropertyTypeForGetter(result,mapping.PropertyName);
- mapping.TypeHandler = _sqlMap.TypeHandlerFactory.GetTypeHandler(propertyType, null);
+ mapping.TypeHandler = _sqlMap.TypeHandlerFactory.GetTypeHandler(propertyType);
}
}
}
@@ -850,7 +731,7 @@
if ( (_statement.ResultClass!=null) &&
_sqlMap.TypeHandlerFactory.IsSimpleType(_statement.ResultClass) )
{
- ITypeHandler typeHandler = _sqlMap.TypeHandlerFactory.GetTypeHandler(_statement.ResultClass, null);
+ ITypeHandler typeHandler = _sqlMap.TypeHandlerFactory.GetTypeHandler(_statement.ResultClass);
generatedKey = typeHandler.GetDataBaseValue(generatedKey, _statement.ResultClass);
}
}
@@ -1065,7 +946,7 @@
}
Type systemType =((IDataRecord)reader).GetFieldType(columnIndex);
- mapping.TypeHandler = _sqlMap.TypeHandlerFactory.GetTypeHandler(systemType, null);
+ mapping.TypeHandler = _sqlMap.TypeHandlerFactory.GetTypeHandler(systemType);
}
}
}
@@ -1327,7 +1208,7 @@
// Set TypeHandler
Type propertyType = reflectionInfo.GetSetterType(property.PropertyName);
- property.TypeHandler = typeHandlerFactory.GetTypeHandler( propertyType, null );
+ property.TypeHandler = typeHandlerFactory.GetTypeHandler( propertyType );
}
}
catch (Exception e)
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/Scope/ConfigurationScope.cs Mon May 16 02:40:26 2005
@@ -388,26 +388,7 @@
}
}
}
-// if (clrType.Length == 0 ) // Unknown
-// {
-// handler = this.TypeHandlerFactory.GetUnkownTypeHandler();
-// }
-// else // If we specify a CLR type, use it
-// {
-// Type type = Resources.TypeForName(clrType);
-//
-// if (this.TypeHandlerFactory.IsSimpleType(type))
-// {
-// // Primitive
-// handler = this.TypeHandlerFactory.GetTypeHandler(type);
-// }
-// else
-// {
-// // .NET object
-// type = ObjectProbe.GetPropertyTypeForGetter(type, propertyName);
-// handler = this.TypeHandlerFactory.GetTypeHandler(type);
-// }
-// }
+
return handler;
}
}
Modified: incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/TypeHandlerFactory.cs
URL: http://svn.apache.org/viewcvs/incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/TypeHandlerFactory.cs?rev=170348&r1=170347&r2=170348&view=diff
==============================================================================
--- incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/TypeHandlerFactory.cs (original)
+++ incubator/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/TypeHandlerFactory.cs Mon May 16 02:40:26 2005
@@ -113,6 +113,16 @@
#region Methods
/// <summary>
+ /// Get a TypeHandler for a Type
+ /// </summary>
+ /// <param name="type">the Type you want a TypeHandler for</param>
+ /// <returns>the handler</returns>
+ public ITypeHandler GetTypeHandler(Type type)
+ {
+ return GetTypeHandler(type, null);
+ }
+
+ /// <summary>
/// Get a TypeHandler for a type
/// </summary>
/// <param name="type">the type you want a TypeHandler for</param>