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/01/31 21:00:27 UTC
svn commit: r373895 [4/4] - in /ibatis/trunk/cs/mapper: ./
External-Bin/Net/2.0/ IBatisNet.Common.Logging.Log4Net/
IBatisNet.Common.Test/ IBatisNet.DataAccess.Test/ IBatisNet.DataAccess/
IBatisNet.DataMapper.Test/ IBatisNet.DataMapper.Test/NUnit/SqlMap...
Added: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj?rev=373895&view=auto
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj (added)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/IBatisNet.DataMapper.20005.csproj Tue Jan 31 11:59:02 2006
@@ -0,0 +1,604 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{F3E45F39-3224-4EAD-B138-EB5CC0E32824}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>IBatisNet.DataMapper</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Library</OutputType>
+ <RootNamespace>IBatisNet.DataMapper</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <OutputPath>bin\Debug\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE;DEBUG;dotnet2</DefineConstants>
+ <DocumentationFile>IBatisNet.DataMapper.xml</DocumentationFile>
+ <DebugSymbols>true</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>false</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>full</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <OutputPath>bin\Release\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>TRACE;dotnet2</DefineConstants>
+ <DocumentationFile>IBatisNet.DataMapper.xml</DocumentationFile>
+ <DebugSymbols>false</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>true</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>none</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Castle.DynamicProxy">
+ <Name>Castle.DynamicProxy</Name>
+ <HintPath>..\External-Bin\Net\2.0\Castle.DynamicProxy.dll</HintPath>
+ </Reference>
+ <Reference Include="System">
+ <Name>System</Name>
+ </Reference>
+ <Reference Include="System.Data">
+ <Name>System.Data</Name>
+ </Reference>
+ <Reference Include="System.Web">
+ <Name>System.Web</Name>
+ </Reference>
+ <Reference Include="System.Xml">
+ <Name>System.XML</Name>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\CommonAssemblyInfo.cs">
+ <Link>CommonAssemblyInfo.cs</Link>
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Commands\DefaultPreparedCommand.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Commands\EmbedParamsPreparedCommand.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Commands\IPreparedCommand.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Commands\IPreparedCommandProxy.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Commands\PreparedCommandFactory.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Alias\TypeAlias.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Alias\TypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Cache\CacheKey.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Cache\CacheModel.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Cache\Fifo\FifoCacheController.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Cache\FlushInterval.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Cache\ICacheController.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Cache\Lru\LruCacheController.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Cache\Memory\MemoryCacheControler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Cache\Memory\MemoryCacheLevel.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\DomSqlMapBuilder.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\ParameterMapping\InlineParameterMapParser.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\ParameterMapping\ParameterMap.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\ParameterMapping\ParameterProperty.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\ResultMapping\Discriminator.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\ResultMapping\ResultMap.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\ResultMapping\ResultProperty.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\ResultMapping\SubMap.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\CacheModelDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\DeleteDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\DeSerializerFactory.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\DiscriminatorDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\DynamicDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\InsertDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsEmptyDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsEqualDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsGreaterEqualDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsGreaterThanDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsLessEqualDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsLessThanDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsNotEmptyDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsNotEqualDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsNotNullDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsNotParameterPresentDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsNotPropertyAvailableDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsNullDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsParameterPresentDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IsPropertyAvailableDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\IterateSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\ParameterMapDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\ParameterPropertyDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\ProcedureDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\ResultMapDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\ResultPropertyDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\SelectDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\StatementDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\SubMapDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\TypeAliasDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\TypeHandlerDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Serializers\UpdateDeSerializer.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\DynamicSql.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\BaseTag.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\Conditional.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\Dynamic.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IDynamicParent.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsEmpty.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsEqual.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsGreaterEqual.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsGreaterThan.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsLessEqual.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsLessThan.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsNotEmpty.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsNotEqual.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsNotNull.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsNotParameterPresent.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsNotPropertyAvailable.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsNull.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsParameterPresent.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\IsPropertyAvailable.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\Iterate.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Elements\SqlTag.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\BaseTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\ConditionalTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\DynamicTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsEmptyTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsEqualTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsGreaterEqualTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsGreaterThanTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsLessEqualTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsLessThanTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsNotEmptyTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsNotEqualTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsNotNullTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsNotParameterPresentTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsNotPropertyAvailableTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsNullTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsParameterPresentTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IsPropertyAvailableTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\ISqlTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IterateContext.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\IterateTagHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\Handlers\SqlTagContext.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\ISqlChild.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Dynamic\SqlText.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\ISql.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\SimpleDynamic\SimpleDynamicSql.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Static\ProcedureSql.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Sql\Static\StaticSql.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\Delete.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\Generate.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\Insert.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\IStatement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\PreparedStatement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\PreparedStatementFactory.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\Procedure.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\Select.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\SelectKey.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\SqlGenerator.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\Statement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Configuration\Statements\Update.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Enumeration.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Exceptions\DataMapperException.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ExecuteEventArgs.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="LazyLoadList.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MappedStatements\CachingStatement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MappedStatements\DeleteMappedStatement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MappedStatements\IMappedStatement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MappedStatements\InsertMappedStatement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MappedStatements\MappedStatement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MappedStatements\PaginatedList.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MappedStatements\SelectMappedStatement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MappedStatements\UpdateMappedStatement.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Mapper.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Scope\ConfigurationScope.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Scope\ErrorContext.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Scope\RequestScope.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="SessionHolder.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="SqlMapper.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="SqlMapSession.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\BaseTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\BooleanTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\ByteArrayTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\ByteTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\CharTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\CustomTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\DateTimeTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\DecimalTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\DoubleTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\EnumTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\GuidTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\Int16TypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\Int32TypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\Int64TypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\IParameterSetter.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\IResultGetter.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\ITypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\ITypeHandlerCallback.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\ObjectTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\ParameterSetterImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\ResultGetterImpl.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\SingleTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\StringTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\TimeSpanTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\TypeHandlerFactory.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="TypeHandlers\UnknownTypeHandler.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Content Include="ChangeLog.txt" />
+ <Content Include="licence.txt" />
+ <Content Include="notice.txt" />
+ <Content Include="ReadMe.txt" />
+ <None Include="IBatisNet.DataMapper.build" />
+ <EmbeddedResource Include="SqlMap.xsd" />
+ <EmbeddedResource Include="SqlMapConfig.xsd" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\IBatisNet.Common\IBatisNet.Common.2005.csproj">
+ <Project>{BBC8DA4A-EA88-41D9-8B93-929B8F3ADADE}</Project>
+ <Name>IBatisNet.Common.2005</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs?rev=373895&r1=373894&r2=373895&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/CachingStatement.cs Tue Jan 31 11:59:02 2006
@@ -26,6 +26,9 @@
#region Using
using System.Collections;
+#if dotnet2
+using System.Collections.Generic;
+#endif
using System.Data;
using IBatisNet.Common;
using IBatisNet.DataMapper.Commands;
@@ -156,10 +159,11 @@
public object ExecuteInsert(IDalSession session, object parameterObject)
{
return _mappedStatement.ExecuteInsert(session, parameterObject);
- }
+ }
+ #region ExecuteQueryForList
- /// <summary>
+ /// <summary>
/// Executes the SQL and and fill a strongly typed collection.
/// </summary>
/// <param name="session">The session used to execute the statement.</param>
@@ -198,22 +202,80 @@
}
return list;
- }
+ }
+ /// <summary>
+ /// Executes the SQL and retuns all rows selected. This is exactly the same as
+ /// calling ExecuteQueryForList(session, parameterObject, NO_SKIPPED_RESULTS, NO_MAXIMUM_RESULTS).
+ /// </summary>
+ /// <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>
+ /// <returns>A List of result objects.</returns>
+ public IList ExecuteQueryForList(IDalSession session, object parameterObject)
+ {
+ return this.ExecuteQueryForList(session, parameterObject, MappedStatement.NO_SKIPPED_RESULTS, MappedStatement.NO_MAXIMUM_RESULTS);
+ }
+ #endregion
+
+ #region ExecuteQueryForList .NET 2.0
+ #if dotnet2
+
+ /// <summary>
+ /// Executes the SQL and and fill a strongly typed collection.
+ /// </summary>
+ /// <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="resultObject">A strongly typed collection of result objects.</param>
+ public void ExecuteQueryForList<T>(IDalSession session, object parameterObject, IList<T> resultObject)
+ {
+ _mappedStatement.ExecuteQueryForList(session, parameterObject, resultObject);
+ }
+
+ /// <summary>
+ /// Executes the SQL and retuns a subset of the rows selected.
+ /// </summary>
+ /// <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="skipResults">The number of rows to skip over.</param>
+ /// <param name="maxResults">The maximum number of rows to return.</param>
+ /// <returns>A List of result objects.</returns>
+ public IList<T> ExecuteQueryForList<T>(IDalSession session, object parameterObject, int skipResults, int maxResults)
+ {
+ IList<T> list = null;
+ RequestScope request = this.Statement.Sql.GetRequestScope(parameterObject, session); ;
+
+ _mappedStatement.PreparedCommand.Create(request, session, this.Statement, parameterObject);
+
+ CacheKey cacheKey = this.GetCacheKey(request);
+ cacheKey.Update("ExecuteQueryForList");
+ cacheKey.Update(skipResults);
+ cacheKey.Update(maxResults);
+
+ list = this.Statement.CacheModel[cacheKey] as IList<T>;
+ if (list == null)
+ {
+ list = _mappedStatement.RunQueryForList<T>(request, session, parameterObject, skipResults, maxResults, null);
+ this.Statement.CacheModel[cacheKey] = list;
+ }
+
+ return list;
+ }
+ /// <summary>
+ /// Executes the SQL and retuns all rows selected. This is exactly the same as
+ /// calling ExecuteQueryForList(session, parameterObject, NO_SKIPPED_RESULTS, NO_MAXIMUM_RESULTS).
+ /// </summary>
+ /// <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>
+ /// <returns>A List of result objects.</returns>
+ public IList<T> ExecuteQueryForList<T>(IDalSession session, object parameterObject)
+ {
+ return this.ExecuteQueryForList<T>(session, parameterObject, MappedStatement.NO_SKIPPED_RESULTS, MappedStatement.NO_MAXIMUM_RESULTS);
+ }
+ #endif
+ #endregion
-
- /// <summary>
- /// Executes the SQL and retuns all rows selected. This is exactly the same as
- /// calling ExecuteQueryForList(session, parameterObject, NO_SKIPPED_RESULTS, NO_MAXIMUM_RESULTS).
- /// </summary>
- /// <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>
- /// <returns>A List of result objects.</returns>
- public IList ExecuteQueryForList(IDalSession session, object parameterObject)
- {
- return this.ExecuteQueryForList( session, parameterObject, MappedStatement.NO_SKIPPED_RESULTS, MappedStatement.NO_MAXIMUM_RESULTS);
- }
+ #region ExecuteQueryForObject
- /// <summary>
+ /// <summary>
/// Executes an SQL statement that returns a single row as an Object.
/// </summary>
/// <param name="session">The session used to execute the statement.</param>
@@ -256,10 +318,59 @@
}
return obj;
- }
+ }
+ #endregion
-
- /// <summary>
+ #region ExecuteQueryForObject .NET 2.0
+ #if dotnet2
+ /// <summary>
+ /// Executes an SQL statement that returns a single row as an Object.
+ /// </summary>
+ /// <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>
+ /// <returns>The object</returns>
+ public T ExecuteQueryForObject<T>(IDalSession session, object parameterObject)
+ {
+ return this.ExecuteQueryForObject<T>(session, parameterObject, default(T));
+ }
+
+ /// <summary>
+ /// Executes an SQL statement that returns a single row as an Object of the type of
+ /// the resultObject passed in as a parameter.
+ /// </summary>
+ /// <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="resultObject">The result object.</param>
+ /// <returns>The object</returns>
+ public T ExecuteQueryForObject<T>(IDalSession session, object parameterObject, T resultObject)
+ {
+ T obj = default(T);
+ RequestScope request = this.Statement.Sql.GetRequestScope(parameterObject, session); ;
+
+ _mappedStatement.PreparedCommand.Create(request, session, this.Statement, parameterObject);
+
+ CacheKey cacheKey = this.GetCacheKey(request);
+ cacheKey.Update("ExecuteQueryForObject");
+
+ obj = (T)this.Statement.CacheModel[cacheKey];
+ // check if this query has alreay been run
+ if ((object)obj == CacheModel.NULL_OBJECT)
+ {
+ // convert the marker object back into a null value
+ obj = default(T);
+ }
+ else if ((object)obj == null)
+ {
+ obj = (T)_mappedStatement.RunQueryForObject(request, session, parameterObject, resultObject);
+ this.Statement.CacheModel[cacheKey] = obj;
+ }
+
+ return obj;
+ }
+ #endif
+ #endregion
+
+ /// <summary>
/// Runs a query with a custom object that gets a chance
/// to deal with each row as it is processed.
/// </summary>
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs?rev=373895&r1=373894&r2=373895&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/IMappedStatement.cs Tue Jan 31 11:59:02 2006
@@ -27,7 +27,9 @@
#region Imports
using System;
using System.Collections;
-
+#if dotnet2
+using System.Collections.Generic;
+#endif
using IBatisNet.Common;
using IBatisNet.DataMapper.Commands;
using IBatisNet.DataMapper.Configuration.Statements;
@@ -135,7 +137,7 @@
#endregion
- #region ExecuteQueryForList
+ #region ExecuteQueryForList
/// <summary>
/// Executes the SQL and and fill a strongly typed collection.
@@ -166,6 +168,37 @@
#endregion
+ #region ExecuteQueryForList .NET 2.0
+ #if dotnet2
+ /// <summary>
+ /// Executes the SQL and and fill a strongly typed collection.
+ /// </summary>
+ /// <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="resultObject">A strongly typed collection of result objects.</param>
+ void ExecuteQueryForList<T>(IDalSession session, object parameterObject, IList<T> resultObject);
+
+ /// <summary>
+ /// Executes the SQL and retuns a subset of the rows selected.
+ /// </summary>
+ /// <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="skipResults">The number of rows to skip over.</param>
+ /// <param name="maxResults">The maximum number of rows to return.</param>
+ /// <returns>A List of result objects.</returns>
+ IList<T> ExecuteQueryForList<T>(IDalSession session, object parameterObject, int skipResults, int maxResults);
+
+ /// <summary>
+ /// Executes the SQL and retuns all rows selected. This is exactly the same as
+ /// calling ExecuteQueryForList(session, parameterObject, NO_SKIPPED_RESULTS, NO_MAXIMUM_RESULTS).
+ /// </summary>
+ /// <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>
+ /// <returns>A List of result objects.</returns>
+ IList<T> ExecuteQueryForList<T>(IDalSession session, object parameterObject);
+ #endif
+ #endregion
+
#region ExecuteForObject
/// <summary>
@@ -187,6 +220,29 @@
object ExecuteQueryForObject( IDalSession session, object parameterObject, object resultObject );
#endregion
+
+ #region ExecuteForObject .NET 2.0
+ #if dotnet2
+
+ /// <summary>
+ /// Executes an SQL statement that returns a single row as an Object.
+ /// </summary>
+ /// <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>
+ /// <returns>The object</returns>
+ T ExecuteQueryForObject<T>(IDalSession session, object parameterObject);
+
+ /// <summary>
+ /// Executes an SQL statement that returns a single row as an Object of the type of
+ /// the resultObject passed in as a parameter.
+ /// </summary>
+ /// <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="resultObject">The result object.</param>
+ /// <returns>The object</returns>
+ T ExecuteQueryForObject<T>(IDalSession session, object parameterObject, T resultObject);
+ #endif
+ #endregion
#region Delegate
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs?rev=373895&r1=373894&r2=373895&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/MappedStatements/MappedStatement.cs Tue Jan 31 11:59:02 2006
@@ -28,6 +28,9 @@
using System;
using System.Collections;
+#if dotnet2
+using System.Collections.Generic;
+#endif
using System.Data;
using System.Reflection;
using System.Text;
@@ -476,6 +479,82 @@
#endregion
+ #region ExecuteForObject .NET 2.0
+ #if dotnet2
+
+ /// <summary>
+ /// Executes an SQL statement that returns a single row as an Object.
+ /// </summary>
+ /// <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>
+ /// <returns>The object</returns>
+ public virtual T ExecuteQueryForObject<T>(IDalSession session, object parameterObject)
+ {
+ return ExecuteQueryForObject<T>(session, parameterObject, default(T));
+ }
+
+
+ /// <summary>
+ /// Executes an SQL statement that returns a single row as an Object of the type of
+ /// the resultObject passed in as a parameter.
+ /// </summary>
+ /// <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="resultObject">The result object.</param>
+ /// <returns>The object</returns>
+ public virtual T ExecuteQueryForObject<T>(IDalSession session, object parameterObject, T resultObject)
+ {
+ T obj = default(T);
+ RequestScope request = _statement.Sql.GetRequestScope(parameterObject, session); ;
+
+ _preparedCommand.Create(request, session, this.Statement, parameterObject);
+
+ obj = (T)RunQueryForObject(request, session, parameterObject, resultObject);
+
+ return obj;
+ }
+
+
+ /// <summary>
+ /// Executes an SQL statement that returns a single row as an Object of the type of
+ /// the resultObject passed in as a parameter.
+ /// </summary>
+ /// <param name="request">The request scope.</param>
+ /// <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="resultObject">The result object.</param>
+ /// <returns>The object</returns>
+ internal T RunQueryForObject<T>(RequestScope request, IDalSession session, object parameterObject, T resultObject)
+ {
+ T result = resultObject;
+
+ using (IDbCommand command = request.IDbCommand)
+ {
+ using (IDataReader reader = command.ExecuteReader())
+ {
+ if (reader.Read())
+ {
+ result = (T)ApplyResultMap(request, reader, resultObject);
+ }
+ }
+
+ ExecutePostSelect(session, request);
+
+ #region remark
+ // If you are using the OleDb data provider (as you are), you need to close the
+ // DataReader before output parameters are visible.
+ #endregion
+
+ RetrieveOutputParameters(request, session, command, parameterObject);
+ }
+
+ RaiseExecuteEvent();
+
+ return result;
+ }
+ #endif
+ #endregion
+
#region ExecuteQueryForList
/// <summary>
@@ -662,6 +741,171 @@
#endregion
+
+ #region ExecuteQueryForList .NET 2.0
+ #if dotnet2
+
+ /// <summary>
+ /// Runs a query with a custom object that gets a chance
+ /// to deal with each row as it is processed.
+ /// </summary>
+ /// <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 rowDelegate)
+ {
+ RequestScope request = _statement.Sql.GetRequestScope(parameterObject, session); ;
+
+ _preparedCommand.Create(request, session, this.Statement, parameterObject);
+
+ if (rowDelegate == null)
+ {
+ throw new DataMapperException("A null RowDelegate was passed to QueryForRowDelegate.");
+ }
+
+ return RunQueryForList<T>(request, session, parameterObject, NO_SKIPPED_RESULTS, NO_MAXIMUM_RESULTS, rowDelegate);
+ }
+
+
+ /// <summary>
+ /// Executes the SQL and retuns all rows selected. This is exactly the same as
+ /// calling ExecuteQueryForList(session, parameterObject, NO_SKIPPED_RESULTS, NO_MAXIMUM_RESULTS).
+ /// </summary>
+ /// <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>
+ /// <returns>A List of result objects.</returns>
+ public virtual IList<T> ExecuteQueryForList<T>(IDalSession session, object parameterObject)
+ {
+ return ExecuteQueryForList<T>(session, parameterObject, NO_SKIPPED_RESULTS, NO_MAXIMUM_RESULTS);
+ }
+
+
+ /// <summary>
+ /// Executes the SQL and retuns a subset of the rows selected.
+ /// </summary>
+ /// <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="skipResults">The number of rows to skip over.</param>
+ /// <param name="maxResults">The maximum number of rows to return.</param>
+ /// <returns>A List of result objects.</returns>
+ public virtual IList<T> ExecuteQueryForList<T>(IDalSession session, object parameterObject, int skipResults, int maxResults)
+ {
+ IList<T> list = null;
+ RequestScope request = _statement.Sql.GetRequestScope(parameterObject, session); ;
+
+ _preparedCommand.Create(request, session, this.Statement, parameterObject);
+
+ list = RunQueryForList<T>(request, session, parameterObject, skipResults, maxResults, null);
+
+ return list;
+ }
+
+
+ /// <summary>
+ /// Executes the SQL and retuns a List of result objects.
+ /// </summary>
+ /// <param name="request">The request scope.</param>
+ /// <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="skipResults">The number of rows to skip over.</param>
+ /// <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 rowDelegate)
+ {
+ IList<T> list = null;
+
+ using (IDbCommand command = request.IDbCommand)
+ {
+ // TODO: Should we ignore this?, I think so in the case of generics.
+ //if (_statement.ListClass == null)
+ //{
+ // list = new ArrayList();
+ //}
+ //else
+ //{
+ // list = _statement.CreateInstanceOfListClass();
+ //}
+ list = new List<T>();
+
+ using (IDataReader reader = command.ExecuteReader())
+ {
+ // skip results
+ for (int i = 0; i < skipResults; i++)
+ {
+ if (!reader.Read())
+ {
+ break;
+ }
+ }
+
+ int n = 0;
+
+ if (rowDelegate == null)
+ {
+ while ((maxResults == NO_MAXIMUM_RESULTS || n < maxResults)
+ && reader.Read())
+ {
+ T obj = (T)ApplyResultMap(request, reader, null);
+
+ list.Add(obj);
+ n++;
+ }
+ }
+ else
+ {
+ while ((maxResults == NO_MAXIMUM_RESULTS || n < maxResults)
+ && reader.Read())
+ {
+ T obj = (T)ApplyResultMap(request, reader, null);
+
+ rowDelegate(obj, parameterObject, (IList)list);
+ n++;
+ }
+ }
+ }
+
+ ExecutePostSelect(session, request);
+
+ RetrieveOutputParameters(request, session, command, parameterObject);
+ }
+
+ return list;
+ }
+
+
+ /// <summary>
+ /// Executes the SQL and and fill a strongly typed collection.
+ /// </summary>
+ /// <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="resultObject">A strongly typed collection of result objects.</param>
+ public virtual void ExecuteQueryForList<T>(IDalSession session, object parameterObject, IList<T> resultObject)
+ {
+ RequestScope request = _statement.Sql.GetRequestScope(parameterObject, session); ;
+
+ _preparedCommand.Create(request, session, this.Statement, parameterObject);
+
+ using (IDbCommand command = request.IDbCommand)
+ {
+ using (IDataReader reader = command.ExecuteReader())
+ {
+ while (reader.Read())
+ {
+ T obj = (T)ApplyResultMap(request, reader, null);
+
+ resultObject.Add(obj);
+ }
+ }
+
+ ExecutePostSelect(session, request);
+
+ RetrieveOutputParameters(request, session, command, parameterObject);
+ }
+ }
+
+ #endif
+ #endregion
#region ExecuteUpdate, ExecuteInsert
Modified: ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs?rev=373895&r1=373894&r2=373895&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.DataMapper/SqlMapper.cs Tue Jan 31 11:59:02 2006
@@ -25,7 +25,9 @@
#endregion
#region Using
-
+#if dotnet2
+using System.Collections.Generic;
+#endif
using System;
using System.Collections;
using System.Collections.Specialized;
@@ -578,7 +580,7 @@
#endregion
#region QueryForObject
-
+
/// <summary>
/// Executes a Sql SELECT statement that returns that returns data
/// to populate a single object instance.
@@ -662,12 +664,100 @@
return result;
}
-
- #endregion
- #region QueryForMap, QueryForDictionary
+ #endregion
- /// <summary>
+ #region QueryForObject .NET 2.0
+ #if dotnet2
+ /// <summary>
+ /// Executes a Sql SELECT statement that returns that returns data
+ /// to populate a single object instance.
+ /// <p/>
+ /// The parameter object is generally used to supply the input
+ /// data for the WHERE clause parameter(s) of the SELECT statement.
+ /// </summary>
+ /// <param name="statementName">The name of the sql statement to execute.</param>
+ /// <param name="parameterObject">The object used to set the parameters in the SQL.</param>
+ /// <returns> The single result object populated with the result set data.</returns>
+ public T QueryForObject<T>(string statementName, object parameterObject)
+ {
+ bool isSessionLocal = false;
+ IDalSession session = _sessionHolder.LocalSession;
+ T result;
+
+ if (session == null)
+ {
+ session = new SqlMapSession(this.DataSource);
+ session.OpenConnection();
+ isSessionLocal = true;
+ }
+
+ try
+ {
+ IMappedStatement statement = GetMappedStatement(statementName);
+ result = statement.ExecuteQueryForObject<T>(session, parameterObject);
+ }
+ catch
+ {
+ throw;
+ }
+ finally
+ {
+ if (isSessionLocal)
+ {
+ session.CloseConnection();
+ }
+ }
+
+ return result;
+ }
+
+ /// <summary>
+ /// Executes a Sql SELECT statement that returns a single object of the type of the
+ /// resultObject parameter.
+ /// </summary>
+ /// <param name="statementName">The name of the sql statement to execute.</param>
+ /// <param name="parameterObject">The object used to set the parameters in the SQL.</param>
+ /// <param name="instanceObject">An object of the type to be returned.</param>
+ /// <returns>The single result object populated with the result set data.</returns>
+ public T QueryForObject<T>(string statementName, object parameterObject, T instanceObject)
+ {
+ bool isSessionLocal = false;
+ IDalSession session = _sessionHolder.LocalSession;
+ T result = default(T);
+
+ if (session == null)
+ {
+ session = new SqlMapSession(this.DataSource);
+ session.OpenConnection();
+ isSessionLocal = true;
+ }
+
+ try
+ {
+ IMappedStatement statement = GetMappedStatement(statementName);
+ result = statement.ExecuteQueryForObject<T>(session, parameterObject, instanceObject);
+ }
+ catch
+ {
+ throw;
+ }
+ finally
+ {
+ if (isSessionLocal)
+ {
+ session.CloseConnection();
+ }
+ }
+
+ return result;
+ }
+ #endif
+ #endregion
+
+ #region QueryForMap, QueryForDictionary
+
+ /// <summary>
/// Alias to QueryForMap, .NET spirit.
/// Feature idea by Ted Husted.
/// </summary>
@@ -891,6 +981,143 @@
}
#endregion
+
+ #region QueryForList .NET 2.0
+ #if dotnet2
+ /// <summary>
+ /// Executes a Sql SELECT statement that returns data to populate
+ /// a number of result objects.
+ /// <p/>
+ /// The parameter object is generally used to supply the input
+ /// data for the WHERE clause parameter(s) of the SELECT statement.
+ /// </summary>
+ /// <param name="statementName">The name of the sql statement to execute.</param>
+ /// <param name="parameterObject">The object used to set the parameters in the SQL.</param>
+ /// <returns>A List of result objects.</returns>
+ public IList<T> QueryForList<T>(string statementName, object parameterObject)
+ {
+ bool isSessionLocal = false;
+ IDalSession session = _sessionHolder.LocalSession;
+ IList<T> list;
+
+ if (session == null)
+ {
+ session = new SqlMapSession(this.DataSource);
+ session.OpenConnection();
+ isSessionLocal = true;
+ }
+
+ try
+ {
+ IMappedStatement statement = GetMappedStatement(statementName);
+ list = (IList<T>)statement.ExecuteQueryForList(session, parameterObject);
+ }
+ catch
+ {
+ throw;
+ }
+ finally
+ {
+ if (isSessionLocal)
+ {
+ session.CloseConnection();
+ }
+ }
+
+ return list;
+ }
+
+ /// <summary>
+ /// Executes the SQL and retuns all rows selected.
+ /// <p/>
+ /// The parameter object is generally used to supply the input
+ /// data for the WHERE clause parameter(s) of the SELECT statement.
+ /// </summary>
+ /// <param name="statementName">The name of the sql statement to execute.</param>
+ /// <param name="parameterObject">The object used to set the parameters in the SQL.</param>
+ /// <param name="skipResults">The number of rows to skip over.</param>
+ /// <param name="maxResults">The maximum number of rows to return.</param>
+ /// <returns>A List of result objects.</returns>
+ public IList<T> QueryForList<T>(string statementName, object parameterObject, int skipResults, int maxResults)
+ {
+ bool isSessionLocal = false;
+ IDalSession session = _sessionHolder.LocalSession;
+ IList<T> list;
+
+ if (session == null)
+ {
+ session = new SqlMapSession(this.DataSource);
+ session.OpenConnection();
+ isSessionLocal = true;
+ }
+
+ try
+ {
+ IMappedStatement statement = GetMappedStatement(statementName);
+ list = (IList<T>)statement.ExecuteQueryForList(session, parameterObject, skipResults, maxResults);
+ }
+ catch
+ {
+ throw;
+ }
+ finally
+ {
+ if (isSessionLocal)
+ {
+ session.CloseConnection();
+ }
+ }
+
+ return list;
+ }
+
+
+ /// <summary>
+ /// Executes a Sql SELECT statement that returns data to populate
+ /// a number of result objects.
+ /// <p/>
+ /// The parameter object is generally used to supply the input
+ /// data for the WHERE clause parameter(s) of the SELECT statement.
+ /// </summary>
+ /// <param name="statementName">The name of the sql statement to execute.</param>
+ /// <param name="parameterObject">The object used to set the parameters in the SQL.</param>
+ /// <param name="resultObject">An Ilist object used to hold the objects.</param>
+ public void QueryForList<T>(string statementName, object parameterObject, IList<T> resultObject)
+ {
+ bool isSessionLocal = false;
+ IDalSession session = _sessionHolder.LocalSession;
+
+ if (resultObject == null)
+ {
+ throw new DataMapperException("resultObject parameter must be instantiated before being passed to SqlMapper.QueryForList");
+ }
+
+ if (session == null)
+ {
+ session = new SqlMapSession(this.DataSource);
+ session.OpenConnection();
+ isSessionLocal = true;
+ }
+
+ try
+ {
+ IMappedStatement statement = GetMappedStatement(statementName);
+ statement.ExecuteQueryForList(session, parameterObject, resultObject);
+ }
+ catch
+ {
+ throw;
+ }
+ finally
+ {
+ if (isSessionLocal)
+ {
+ session.CloseConnection();
+ }
+ }
+ }
+ #endif
+ #endregion
#region QueryForPaginatedList
/// <summary>