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 2006/11/19 17:07:48 UTC
svn commit: r476843 [3/3] - in /ibatis/trunk/cs/mapper:
IBatisNet.DataMapper.Test/NUnit/SqlMapTests/ IBatisNet.DataMapper/
IBatisNet.DataMapper/Commands/ IBatisNet.DataMapper/Configuration/
IBatisNet.DataMapper/Configuration/Sql/ IBatisNet.DataMapper/C...
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDecimalTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDecimalTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDecimalTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDecimalTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -36,6 +36,9 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for Nullable decimal Type
+ /// </summary>
public class NullableDecimalTypeHandler : BaseTypeHandler
{
@@ -59,8 +62,9 @@
}
}
+
/// <summary>
- ///
+ /// Gets a column value by the name
/// </summary>
/// <param name="mapping"></param>
/// <param name="dataReader"></param>
@@ -79,6 +83,12 @@
}
}
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -91,26 +101,50 @@
}
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType)
{
return new char?(Convert.ToChar(outputValue));
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
+ /// <remarks>
+ /// value decimal must be in format ######.##
+ /// where . is separator for decimal
+ /// </remarks>
public override object ValueOf(Type type, string s)
{
CultureInfo culture = new CultureInfo("en-US");
- // value decimal must be in format ######.##
- // where . is separator for decimal
return new decimal?(decimal.Parse(s, culture));
}
+ /// <summary>
+ /// Gets a value indicating whether this instance is simple type.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance is simple type; otherwise, <c>false</c>.
+ /// </value>
public override bool IsSimpleType
{
get { return true; }
}
+ /// <summary>
+ /// The null value for this type
+ /// </summary>
+ /// <value></value>
public override object NullValue
{
get { return new decimal?(); }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDoubleTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDoubleTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDoubleTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableDoubleTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -35,6 +35,9 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for Nullable double Type
+ /// </summary>
public sealed class NullableDoubleTypeHandler : BaseTypeHandler
{
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableGuidTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableGuidTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableGuidTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableGuidTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -35,9 +35,18 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for Nullable Guid type
+ /// </summary>
public sealed class NullableGuidTypeHandler : BaseTypeHandler
{
+ /// <summary>
+ /// Sets a parameter on a IDbCommand
+ /// </summary>
+ /// <param name="dataParameter">the parameter</param>
+ /// <param name="parameterValue">the parameter value</param>
+ /// <param name="dbType">the dbType of the parameter</param>
public override void SetParameter(IDataParameter dataParameter, object parameterValue, string dbType)
{
Guid? nullableValue = (Guid?)parameterValue;
@@ -52,8 +61,9 @@
}
}
+
/// <summary>
- ///
+ /// Gets a column value by the name
/// </summary>
/// <param name="mapping"></param>
/// <param name="dataReader"></param>
@@ -72,6 +82,12 @@
}
}
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -84,23 +100,44 @@
}
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType)
{
return new Guid?( new Guid(outputValue.ToString()) );
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return new Guid?( new Guid(s) );
}
+ /// <summary>
+ /// Tell us if ot is a 'primitive' type
+ /// </summary>
+ /// <value></value>
+ /// <returns></returns>
public override bool IsSimpleType
{
get { return true; }
}
+ /// <summary>
+ /// The null value for this type
+ /// </summary>
+ /// <value></value>
public override object NullValue
{
get { return new Guid?(); }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt16TypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt16TypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt16TypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt16TypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -35,9 +35,18 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for Nullable UInt16 Type
+ /// </summary>
public sealed class NullableInt16TypeHandler : BaseTypeHandler
{
+ /// <summary>
+ /// Sets a parameter on a IDbCommand
+ /// </summary>
+ /// <param name="dataParameter">the parameter</param>
+ /// <param name="parameterValue">the parameter value</param>
+ /// <param name="dbType">the dbType of the parameter</param>
public override void SetParameter(IDataParameter dataParameter, object parameterValue, string dbType)
{
Int16? nullableValue = (Int16?)parameterValue;
@@ -52,8 +61,9 @@
}
}
+
/// <summary>
- ///
+ /// Gets a column value by the name
/// </summary>
/// <param name="mapping"></param>
/// <param name="dataReader"></param>
@@ -73,6 +83,12 @@
}
}
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -85,23 +101,45 @@
}
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType)
{
return new Int16?(Convert.ToInt16(outputValue));
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return new Int16?(Int16.Parse(s));
}
+ /// <summary>
+ /// Gets a value indicating whether this instance is simple type.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance is simple type; otherwise, <c>false</c>.
+ /// </value>
public override bool IsSimpleType
{
get { return true; }
}
+ /// <summary>
+ /// The null value for this type
+ /// </summary>
+ /// <value></value>
public override object NullValue
{
get { return new Int16?(); }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt32TypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt32TypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt32TypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt32TypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -35,12 +35,18 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
- /// <summary>
- /// Summary description for Int32TypeHandler.
- /// </summary>
+ /// <summary>
+ /// TypeHandler for Nullable Int32 Type
+ /// </summary>
public sealed class NullableInt32TypeHandler : BaseTypeHandler
{
+ /// <summary>
+ /// Sets a parameter on a IDbCommand
+ /// </summary>
+ /// <param name="dataParameter">the parameter</param>
+ /// <param name="parameterValue">the parameter value</param>
+ /// <param name="dbType">the dbType of the parameter</param>
public override void SetParameter(IDataParameter dataParameter, object parameterValue, string dbType)
{
Int32? nullableValue = (Int32?)parameterValue;
@@ -76,6 +82,12 @@
}
}
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -88,23 +100,45 @@
}
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType )
{
return new Int32?( Convert.ToInt32(outputValue) );
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return new Int32?( Int32.Parse(s) );
}
+ /// <summary>
+ /// Gets a value indicating whether this instance is simple type.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance is simple type; otherwise, <c>false</c>.
+ /// </value>
public override bool IsSimpleType
{
get { return true; }
}
+ /// <summary>
+ /// The null value for this type
+ /// </summary>
+ /// <value></value>
public override object NullValue
{
get { return new Int32?(); }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt64TypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt64TypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt64TypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableInt64TypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -35,6 +35,9 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for Nullable Int64 Type
+ /// </summary>
public sealed class NullableInt64TypeHandler : BaseTypeHandler
{
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableSByteTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableSByteTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableSByteTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableSByteTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -35,9 +35,19 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for SByte TimeSpan Type
+ /// </summary>
public sealed class NullableSByteTypeHandler : BaseTypeHandler
{
+
+ /// <summary>
+ /// Sets a parameter on a IDbCommand
+ /// </summary>
+ /// <param name="dataParameter">the parameter</param>
+ /// <param name="parameterValue">the parameter value</param>
+ /// <param name="dbType">the dbType of the parameter</param>
public override void SetParameter(IDataParameter dataParameter, object parameterValue, string dbType)
{
byte? nullableValue = (byte?)parameterValue;
@@ -52,8 +62,9 @@
}
}
+
/// <summary>
- ///
+ /// Gets a column value by the name
/// </summary>
/// <param name="mapping"></param>
/// <param name="dataReader"></param>
@@ -72,6 +83,12 @@
}
}
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -84,23 +101,45 @@
}
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType)
{
return new sbyte?(Convert.ToSByte(outputValue));
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return new sbyte?(Convert.ToSByte(s));
}
+ /// <summary>
+ /// Gets a value indicating whether this instance is simple type.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance is simple type; otherwise, <c>false</c>.
+ /// </value>
public override bool IsSimpleType
{
get { return true; }
}
+ /// <summary>
+ /// The null value for this type
+ /// </summary>
+ /// <value></value>
public override object NullValue
{
get { return new sbyte?(); }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableSingleTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableSingleTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableSingleTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableSingleTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -35,9 +35,18 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for Nullable Single type
+ /// </summary>
public sealed class NullableSingleTypeHandler : BaseTypeHandler
{
+ /// <summary>
+ /// Sets a parameter on a IDbCommand
+ /// </summary>
+ /// <param name="dataParameter">the parameter</param>
+ /// <param name="parameterValue">the parameter value</param>
+ /// <param name="dbType">the dbType of the parameter</param>
public override void SetParameter(IDataParameter dataParameter, object parameterValue, string dbType)
{
Single? nullableValue = (Single?)parameterValue;
@@ -52,8 +61,9 @@
}
}
+
/// <summary>
- ///
+ /// Gets a column value by the name
/// </summary>
/// <param name="mapping"></param>
/// <param name="dataReader"></param>
@@ -72,6 +82,12 @@
}
}
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -84,23 +100,44 @@
}
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType)
{
return new Single?(Convert.ToSingle(outputValue));
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return new Single?(Convert.ToSingle(s));
}
+ /// <summary>
+ /// Tell us if ot is a 'primitive' type
+ /// </summary>
+ /// <value></value>
+ /// <returns></returns>
public override bool IsSimpleType
{
get { return true; }
}
+ /// <summary>
+ /// The null value for this type
+ /// </summary>
+ /// <value></value>
public override object NullValue
{
get { return new Single?(); }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableTimeSpanTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableTimeSpanTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableTimeSpanTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableTimeSpanTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -32,6 +32,9 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for Nullable TimeSpan Type
+ /// </summary>
public sealed class NullableTimeSpanTypeHandler : BaseTypeHandler
{
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt16TypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt16TypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt16TypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt16TypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -36,6 +36,9 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for Nullable Int16 type
+ /// </summary>
public sealed class NullableUInt16TypeHandler : BaseTypeHandler
{
@@ -60,6 +63,7 @@
}
+
/// <summary>
/// Gets a column value by the name
/// </summary>
@@ -109,6 +113,12 @@
return new UInt16?(Convert.ToUInt16(outputValue));
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return new UInt16?(UInt16.Parse(s));
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt32TypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt32TypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt32TypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt32TypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -42,6 +42,12 @@
public sealed class NullableUInt32TypeHandler : BaseTypeHandler
{
+ /// <summary>
+ /// Sets a parameter on a IDbCommand
+ /// </summary>
+ /// <param name="dataParameter">the parameter</param>
+ /// <param name="parameterValue">the parameter value</param>
+ /// <param name="dbType">the dbType of the parameter</param>
public override void SetParameter(IDataParameter dataParameter, object parameterValue, string dbType)
{
UInt32? nullableValue = (UInt32?)parameterValue;
@@ -56,8 +62,9 @@
}
}
+
/// <summary>
- ///
+ /// Gets a column value by the name
/// </summary>
/// <param name="mapping"></param>
/// <param name="dataReader"></param>
@@ -76,6 +83,12 @@
}
}
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -88,23 +101,45 @@
}
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType)
{
return new UInt32?(Convert.ToUInt32(outputValue));
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return new UInt32?(UInt32.Parse(s));
}
+ /// <summary>
+ /// Gets a value indicating whether this instance is simple type.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance is simple type; otherwise, <c>false</c>.
+ /// </value>
public override bool IsSimpleType
{
get { return true; }
}
+ /// <summary>
+ /// The null value for this type
+ /// </summary>
+ /// <value></value>
public override object NullValue
{
get { return new UInt32?(); }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt64TypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt64TypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt64TypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/Nullables/NullableUInt64TypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -35,6 +35,9 @@
namespace IBatisNet.DataMapper.TypeHandlers.Nullables
{
+ /// <summary>
+ /// TypeHandler for Nullable UInt64 Type
+ /// </summary>
public sealed class NullableUInt64TypeHandler : BaseTypeHandler
{
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ObjectTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ObjectTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ObjectTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ObjectTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -41,12 +41,12 @@
public sealed class ObjectTypeHandler : BaseTypeHandler
{
- /// <summary>
- ///
- /// </summary>
- /// <param name="mapping"></param>
- /// <param name="dataReader"></param>
- /// <returns></returns>
+ /// <summary>
+ /// Gets a column value by the name
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByName(ResultProperty mapping, IDataReader dataReader)
{
int index = dataReader.GetOrdinal(mapping.ColumnName);
@@ -61,6 +61,12 @@
}
}
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -73,17 +79,34 @@
}
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return s;
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType )
{
return outputValue;
}
+ /// <summary>
+ /// Tell us if ot is a 'primitive' type
+ /// </summary>
+ /// <value></value>
+ /// <returns></returns>
public override bool IsSimpleType
{
get { return false; }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/SingleTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/SingleTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/SingleTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/SingleTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -41,12 +41,13 @@
public sealed class SingleTypeHandler : BaseTypeHandler
{
- /// <summary>
- ///
- /// </summary>
- /// <param name="mapping"></param>
- /// <param name="dataReader"></param>
- /// <returns></returns>
+
+ /// <summary>
+ /// Gets a column value by the name
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByName(ResultProperty mapping, IDataReader dataReader)
{
int index = dataReader.GetOrdinal(mapping.ColumnName);
@@ -61,12 +62,13 @@
}
}
- /// <summary>
- ///
- /// </summary>
- /// <param name="mapping"></param>
- /// <param name="dataReader"></param>
- /// <returns></returns>
+
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -79,21 +81,35 @@
}
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return Convert.ToSingle(s);
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType )
{
return Convert.ToSingle(outputValue);
}
- /// <summary>
- ///
- /// </summary>
- /// <returns></returns>
+ /// <summary>
+ /// Gets a value indicating whether this instance is simple type.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance is simple type; otherwise, <c>false</c>.
+ /// </value>
public override bool IsSimpleType
{
get { return true; }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/StringTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/StringTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/StringTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/StringTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -41,12 +41,13 @@
public sealed class StringTypeHandler : BaseTypeHandler
{
- /// <summary>
- ///
- /// </summary>
- /// <param name="mapping"></param>
- /// <param name="dataReader"></param>
- /// <returns></returns>
+
+ /// <summary>
+ /// Gets a column value by the name
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByName(ResultProperty mapping, IDataReader dataReader)
{
int index = dataReader.GetOrdinal(mapping.ColumnName);
@@ -61,12 +62,12 @@
}
}
- /// <summary>
- ///
- /// </summary>
- /// <param name="mapping"></param>
- /// <param name="dataReader"></param>
- /// <returns></returns>
+ /// <summary>
+ /// Gets a column value by the index
+ /// </summary>
+ /// <param name="mapping"></param>
+ /// <param name="dataReader"></param>
+ /// <returns></returns>
public override object GetValueByIndex(ResultProperty mapping, IDataReader dataReader)
{
if (dataReader.IsDBNull(mapping.ColumnIndex) == true)
@@ -79,21 +80,36 @@
}
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType )
{
return outputValue;
}
+ /// <summary>
+ /// Converts the String to the type that this handler deals with
+ /// </summary>
+ /// <param name="type">the tyepe of the property (used only for enum conversion)</param>
+ /// <param name="s">the String value</param>
+ /// <returns>the converted value</returns>
public override object ValueOf(Type type, string s)
{
return s;
}
- /// <summary>
- ///
- /// </summary>
- /// <returns></returns>
+
+ /// <summary>
+ /// Gets a value indicating whether this instance is simple type.
+ /// </summary>
+ /// <value>
+ /// <c>true</c> if this instance is simple type; otherwise, <c>false</c>.
+ /// </value>
public override bool IsSimpleType
{
get { return true; }
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/UInt16TypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/UInt16TypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/UInt16TypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/UInt16TypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -34,6 +34,9 @@
namespace IBatisNet.DataMapper.TypeHandlers
{
+ /// <summary>
+ /// TypeHandler for UInt16 Type
+ /// </summary>
public sealed class UInt16TypeHandler : BaseTypeHandler
{
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/UnknownTypeHandler.cs
URL: http://svn.apache.org/viewvc/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/UnknownTypeHandler.cs?view=diff&rev=476843&r1=476842&r2=476843
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/UnknownTypeHandler.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/UnknownTypeHandler.cs Sun Nov 19 08:07:45 2006
@@ -121,6 +121,12 @@
return s;
}
+ /// <summary>
+ /// Retrieve ouput database value of an output parameter
+ /// </summary>
+ /// <param name="outputValue">ouput database value</param>
+ /// <param name="parameterType">type used in EnumTypeHandler</param>
+ /// <returns></returns>
public override object GetDataBaseValue(object outputValue, Type parameterType)
{
return outputValue;