diff --git a/Spring.build b/Spring.build index 97dc8a8a..3a6f4242 100644 --- a/Spring.build +++ b/Spring.build @@ -300,6 +300,25 @@ Build properties that may be set: + + + + + + + + + .NET 3.5 Build Skipped for Package + + + + + + + + + + @@ -342,6 +361,7 @@ Build properties that may be set: + @@ -354,6 +374,7 @@ Build properties that may be set: + @@ -377,6 +398,10 @@ Build properties that may be set: if="${build-data and nant.settings.currentframework == 'net-2.0' and not net-3.0}"/> + + @@ -444,6 +469,18 @@ Build properties that may be set: + + + + + + + + + + + @@ -574,6 +611,24 @@ Build properties that may be set: + + + + + + + + + + + + + + + + + + @@ -618,9 +673,11 @@ Build properties that may be set: - - - + + + + + @@ -653,11 +710,15 @@ Build properties that may be set: - - - - - + + + + + + + + + @@ -1003,6 +1064,10 @@ Build properties that may be set: + + + + @@ -1162,6 +1227,15 @@ Build properties that may be set: + + + + + + + + + @@ -1392,6 +1466,7 @@ Build properties that may be set: + @@ -1409,6 +1484,8 @@ Build properties that may be set: + + diff --git a/Spring.include b/Spring.include index f5739351..c90f3f77 100644 --- a/Spring.include +++ b/Spring.include @@ -40,7 +40,15 @@ if="${net-3.0.installed}" /> + + + + + @@ -392,6 +400,25 @@ + + + + + + + + + + + + + + + + diff --git a/build-support/solutions/Spring.Net.NHibernate30.2008.sln b/build-support/solutions/Spring.Net.NHibernate30.2008.sln new file mode 100644 index 00000000..e1fbc8be --- /dev/null +++ b/build-support/solutions/Spring.Net.NHibernate30.2008.sln @@ -0,0 +1,119 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F04753EF-7A1B-4837-AB63-8C0821E8155D}" + ProjectSection(SolutionItems) = preProject + ..\..\Spring.build = ..\..\Spring.build + ..\..\src\Spring\Spring.Data.NHibernate30\Spring.Data.NHibernate30.build = ..\..\src\Spring\Spring.Data.NHibernate30\Spring.Data.NHibernate30.build + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Core.2008", "..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj", "{710961A3-0DF4-49E4-A26E-F5B9C044AC84}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Aop.2008", "..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj", "{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.2008", "..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj", "{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate30.Integration.Tests.2008", "..\..\test\Spring\Spring.Data.NHibernate30.Integration.Tests\Spring.Data.NHibernate30.Integration.Tests.2008.csproj", "{93FED0CE-0B01-43AF-8CB1-244CC7C3308B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate30.Tests.2008", "..\..\test\Spring\Spring.Data.NHibernate30.Tests\Spring.Data.NHibernate30.Tests.2008.csproj", "{E4CCB8A2-2381-41D1-B44C-E20E13703056}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate30.2008", "..\..\src\Spring\Spring.Data.NHibernate30\Spring.Data.NHibernate30.2008.csproj", "{009247FE-CBAD-40FF-ADC3-D7F28B270071}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.Tests.2008", "..\..\test\Spring\Spring.Data.Tests\Spring.Data.Tests.2008.csproj", "{ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Core.Tests.2008", "..\..\test\Spring\Spring.Core.Tests\Spring.Core.Tests.2008.csproj", "{44B16BAA-6DF8-447C-9D7F-3AD3D854D904}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Release|.NET = Release|.NET + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug|.NET.ActiveCfg = Debug|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug|.NET.Build.0 = Debug|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug|Any CPU.Build.0 = Debug|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release|.NET.ActiveCfg = Release|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release|.NET.Build.0 = Release|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release|Any CPU.ActiveCfg = Release|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release|Any CPU.Build.0 = Release|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {710961A3-0DF4-49E4-A26E-F5B9C044AC84}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|.NET.ActiveCfg = Debug|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|.NET.Build.0 = Debug|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|.NET.ActiveCfg = Release|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|.NET.Build.0 = Release|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|Any CPU.Build.0 = Release|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Debug|.NET.ActiveCfg = Debug|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Debug|.NET.Build.0 = Debug|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|.NET.ActiveCfg = Release|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|.NET.Build.0 = Release|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Any CPU.Build.0 = Release|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {93FED0CE-0B01-43AF-8CB1-244CC7C3308B}.Debug|.NET.ActiveCfg = Debug|Any CPU + {93FED0CE-0B01-43AF-8CB1-244CC7C3308B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93FED0CE-0B01-43AF-8CB1-244CC7C3308B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {93FED0CE-0B01-43AF-8CB1-244CC7C3308B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {93FED0CE-0B01-43AF-8CB1-244CC7C3308B}.Release|.NET.ActiveCfg = Release|Any CPU + {93FED0CE-0B01-43AF-8CB1-244CC7C3308B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93FED0CE-0B01-43AF-8CB1-244CC7C3308B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {E4CCB8A2-2381-41D1-B44C-E20E13703056}.Debug|.NET.ActiveCfg = Debug|Any CPU + {E4CCB8A2-2381-41D1-B44C-E20E13703056}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4CCB8A2-2381-41D1-B44C-E20E13703056}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {E4CCB8A2-2381-41D1-B44C-E20E13703056}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {E4CCB8A2-2381-41D1-B44C-E20E13703056}.Release|.NET.ActiveCfg = Release|Any CPU + {E4CCB8A2-2381-41D1-B44C-E20E13703056}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4CCB8A2-2381-41D1-B44C-E20E13703056}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {009247FE-CBAD-40FF-ADC3-D7F28B270071}.Debug|.NET.ActiveCfg = Debug|Any CPU + {009247FE-CBAD-40FF-ADC3-D7F28B270071}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {009247FE-CBAD-40FF-ADC3-D7F28B270071}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {009247FE-CBAD-40FF-ADC3-D7F28B270071}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {009247FE-CBAD-40FF-ADC3-D7F28B270071}.Release|.NET.ActiveCfg = Release|Any CPU + {009247FE-CBAD-40FF-ADC3-D7F28B270071}.Release|Any CPU.ActiveCfg = Release|Any CPU + {009247FE-CBAD-40FF-ADC3-D7F28B270071}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|.NET.ActiveCfg = Debug|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|.NET.ActiveCfg = Release|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Any CPU.Build.0 = Release|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|.NET.ActiveCfg = Debug|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|.NET.ActiveCfg = Release|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Any CPU.Build.0 = Release|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {44B16BAA-6DF8-447C-9D7F-3AD3D854D904}.Release|Mixed Platforms.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + NAntAddinLastFileName = Spring.build + EndGlobalSection +EndGlobal diff --git a/lib/NHibernate30/net/3.5/Antlr3.Runtime.dll b/lib/NHibernate30/net/3.5/Antlr3.Runtime.dll new file mode 100644 index 00000000..637fc3e3 Binary files /dev/null and b/lib/NHibernate30/net/3.5/Antlr3.Runtime.dll differ diff --git a/lib/NHibernate30/net/3.5/Common.Logging.dll b/lib/NHibernate30/net/3.5/Common.Logging.dll new file mode 100644 index 00000000..d7a8f158 Binary files /dev/null and b/lib/NHibernate30/net/3.5/Common.Logging.dll differ diff --git a/lib/NHibernate30/net/3.5/Iesi.Collections.dll b/lib/NHibernate30/net/3.5/Iesi.Collections.dll new file mode 100644 index 00000000..6af854a3 Binary files /dev/null and b/lib/NHibernate30/net/3.5/Iesi.Collections.dll differ diff --git a/lib/NHibernate30/net/3.5/Iesi.Collections.license.txt b/lib/NHibernate30/net/3.5/Iesi.Collections.license.txt new file mode 100644 index 00000000..66c4a8dc --- /dev/null +++ b/lib/NHibernate30/net/3.5/Iesi.Collections.license.txt @@ -0,0 +1,9 @@ +Copyright © 2002-2004 by Aidant Systems, Inc., and by Jason Smith. + +Copied from http://www.codeproject.com/csharp/sets.asp#xx703510xx that was posted by JasonSmith 12:13 2 Jan '04 + +Feel free to use this code any way you want to. As a favor to me, you can leave the copyright in there. You never know when someone might recognize your name! + +If you do use the code in a commercial product, I would appreciate hearing about it. This message serves as legal notice that I won't be suing you for royalties! The code is in the public domain. + +On the other hand, I don't provide support. The code is actually simple enough that it shouldn't need it. diff --git a/lib/NHibernate30/net/3.5/LinFu.DynamicProxy.dll b/lib/NHibernate30/net/3.5/LinFu.DynamicProxy.dll new file mode 100644 index 00000000..22225220 Binary files /dev/null and b/lib/NHibernate30/net/3.5/LinFu.DynamicProxy.dll differ diff --git a/lib/NHibernate30/net/3.5/NHibernate.ByteCode.LinFu.dll b/lib/NHibernate30/net/3.5/NHibernate.ByteCode.LinFu.dll new file mode 100644 index 00000000..2035ee6d Binary files /dev/null and b/lib/NHibernate30/net/3.5/NHibernate.ByteCode.LinFu.dll differ diff --git a/lib/NHibernate30/net/3.5/NHibernate.dll b/lib/NHibernate30/net/3.5/NHibernate.dll new file mode 100644 index 00000000..7a9a57a3 Binary files /dev/null and b/lib/NHibernate30/net/3.5/NHibernate.dll differ diff --git a/lib/NHibernate30/net/3.5/NHibernate.license.txt b/lib/NHibernate30/net/3.5/NHibernate.license.txt new file mode 100644 index 00000000..8a88d148 --- /dev/null +++ b/lib/NHibernate30/net/3.5/NHibernate.license.txt @@ -0,0 +1,460 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + diff --git a/lib/NHibernate30/net/3.5/log4net.dll b/lib/NHibernate30/net/3.5/log4net.dll new file mode 100644 index 00000000..ffc57e11 Binary files /dev/null and b/lib/NHibernate30/net/3.5/log4net.dll differ diff --git a/lib/NHibernate30/net/3.5/log4net.license.txt b/lib/NHibernate30/net/3.5/log4net.license.txt new file mode 100644 index 00000000..29f81d81 --- /dev/null +++ b/lib/NHibernate30/net/3.5/log4net.license.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/Spring/Spring.Data.NHibernate30/AssemblyInfo.cs b/src/Spring/Spring.Data.NHibernate30/AssemblyInfo.cs new file mode 100644 index 00000000..f144223f --- /dev/null +++ b/src/Spring/Spring.Data.NHibernate30/AssemblyInfo.cs @@ -0,0 +1,5 @@ +using System; +using System.Reflection; + +[assembly: AssemblyTitle("Spring.Net NHibernate 2.1 support")] +[assembly: AssemblyDescription("Interfaces and classes that provide NHibernate 2.1 support in Spring.Net")] \ No newline at end of file diff --git a/src/Spring/Spring.Data.NHibernate30/Data/NHibernate/Generic/dontdelete.txt b/src/Spring/Spring.Data.NHibernate30/Data/NHibernate/Generic/dontdelete.txt new file mode 100644 index 00000000..b4472e3f --- /dev/null +++ b/src/Spring/Spring.Data.NHibernate30/Data/NHibernate/Generic/dontdelete.txt @@ -0,0 +1 @@ +sources are linked here from Spring.Data.NHibernate \ No newline at end of file diff --git a/src/Spring/Spring.Data.NHibernate30/Data/NHibernate/Support/dontdelete.txt b/src/Spring/Spring.Data.NHibernate30/Data/NHibernate/Support/dontdelete.txt new file mode 100644 index 00000000..b4472e3f --- /dev/null +++ b/src/Spring/Spring.Data.NHibernate30/Data/NHibernate/Support/dontdelete.txt @@ -0,0 +1 @@ +sources are linked here from Spring.Data.NHibernate \ No newline at end of file diff --git a/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.2008.csproj b/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.2008.csproj new file mode 100644 index 00000000..00b5378b --- /dev/null +++ b/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.2008.csproj @@ -0,0 +1,174 @@ + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {009247FE-CBAD-40FF-ADC3-D7F28B270071} + Library + Properties + Spring + Spring.Data.NHibernate30 + v2.0 + + + true + full + false + ..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30\Debug\ + TRACE;DEBUG;NET_2_0,NH_2_1,NH_3_0 + prompt + 4 + Spring.Data.NHibernate30.xml + true + + + + + pdbonly + true + ..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30\Release\ + TRACE;NET_2_0,NH_2_1 + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\log4net.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\NHibernate.dll + + + + + + + + + CommonAssemblyInfo.cs + + + Data\NHibernate\Generic\FindHibernateDelegate.cs + + + Data\NHibernate\Generic\HibernateDaoSupport.cs + + + Data\NHibernate\Generic\HibernateDelegate.cs + + + Data\NHibernate\Generic\HibernateTemplate.cs + + + Data\NHibernate\Generic\IFindHibernateCallback.cs + + + Data\NHibernate\Generic\IHibernateCallback.cs + + + Data\NHibernate\Generic\IHibernateOperations.cs + + + Data\NHibernate\HibernateAccessor.cs + + + Data\NHibernate\SpringSessionContext.cs + + + Data\NHibernate\SpringSessionSynchronization.cs + + + Data\NHibernate\HibernateAdoException.cs + + + Data\NHibernate\HibernateDelegate.cs + + + Data\NHibernate\HibernateQueryException.cs + + + Data\NHibernate\HibernateSystemException.cs + + + Data\NHibernate\HibernateTemplate.cs + + + Data\NHibernate\HibernateTransactionManager.cs + + + Data\NHibernate\ICommonHibernateOperations.cs + + + Data\NHibernate\IHibernateCallback.cs + + + Data\NHibernate\IHibernateOperations.cs + + + Data\NHibernate\SessionFactoryUtils.cs + + + Data\NHibernate\SessionHolder.cs + + + Data\NHibernate\Support\ConfigSectionSessionScopeSettings.cs + + + Data\NHibernate\Support\HibernateDaoSupport.cs + + + Data\NHibernate\Support\OpenSessionInViewModule.cs + + + Data\NHibernate\Support\SessionScope.cs + + + Data\NHibernate\Support\SessionScopeSettings.cs + + + Data\NHibernate\TemplateFlushMode.cs + + + Data\NHibernate\FilterDefiniitionFactoryObject.cs + + + Data\NHibernate\HibernateObjectRetrievalFailureException.cs + + + Data\NHibernate\HibernateOptimisticLockingFailureException.cs + + + Data\NHibernate\LocalSessionFactoryObject.cs + + + + + + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} + Spring.Aop.2008 + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2008 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2008 + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.build b/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.build new file mode 100644 index 00000000..12398387 --- /dev/null +++ b/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.build @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.xml b/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.xml new file mode 100644 index 00000000..c9a5f0a1 --- /dev/null +++ b/src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.xml @@ -0,0 +1,5939 @@ + + + + Spring.Data.NHibernate30 + + + + + Generic version of the Helper class that simplifies NHibernate data access code + + +

Typically used to implement data access or business logic services that + use NHibernate within their implementation but are Hibernate-agnostic in their + interface. The latter or code calling the latter only have to deal with + domain objects.

+ +

The central method is Execute() supporting Hibernate access code which + implements the HibernateCallback interface. It provides NHibernate Session + handling such that neither the IHibernateCallback implementation nor the calling + code needs to explicitly care about retrieving/closing NHibernate Sessions, + or handling Session lifecycle exceptions. For typical single step actions, + there are various convenience methods (Find, Load, SaveOrUpdate, Delete). +

+ +

Can be used within a service implementation via direct instantiation + with a ISessionFactory reference, or get prepared in an application context + and given to services as an object reference. Note: The ISessionFactory should + always be configured as an object in the application context, in the first case + given to the service directly, in the second case to the prepared template. +

+ +

This class can be considered as a direct alternative to working with the raw + Hibernate Session API (through SessionFactoryUtils.Session). +

+ +

LocalSessionFactoryObject is the preferred way of obtaining a reference + to a specific NHibernate ISessionFactory. +

+
+ Sree Nivask (.NET) + Mark Pollack (.NET) +
+ + + Base class for HibernateTemplate defining common + properties like SessionFactory and flushing behavior. + + +

Not intended to be used directly. See HibernateTemplate. +

+
+ Mark Pollack (.NET) +
+ + + The instance for this class. + + + + + Initializes a new instance of the class. + + + + + Apply the flush mode that's been specified for this accessor + to the given Session. + + The current Hibernate Session. + if set to true + if executing within an existing transaction. + + the previous flush mode to restore after the operation, + or null if none + + + + + Flush the given Hibernate Session if necessary. + + The current Hibernate Session. + if set to true + if executing within an existing transaction. + + + + Convert the given HibernateException to an appropriate exception from the + org.springframework.dao hierarchy. Will automatically detect + wrapped ADO.NET Exceptions and convert them accordingly. + + HibernateException that occured. + + The corresponding DataAccessException instance + + + The default implementation delegates to SessionFactoryUtils + and convertAdoAccessException. Can be overridden in subclasses. + + + + + Converts the ADO.NET access exception to an appropriate exception from the + org.springframework.dao hierarchy. Can be overridden in subclasses. + + ADOException that occured, wrapping underlying ADO.NET exception. + + the corresponding DataAccessException instance + + + + + Converts the ADO.NET access exception to an appropriate exception from the + org.springframework.dao hierarchy. Can be overridden in subclasses. + + + + Note that a direct SQLException can just occur when callback code + performs direct ADO.NET access via ISession.Connection(). + + + The ADO.NET exception. + The corresponding DataAccessException instance + + + + Prepare the given IQuery object, applying cache settings and/or + a transaction timeout. + + The query object to prepare. + + + + Apply the given name parameter to the given Query object. + + The query object. + Name of the parameter + The value of the parameter + The NHibernate type of the parameter (or null if none specified) + + + + Prepare the given Criteria object, applying cache settings and/or + a transaction timeout. + + + Note that for NHibernate 1.2 this only works if the + implementation is of the type CriteriaImpl, which should generally + be the case. The SetFetchSize method is not available on the + ICriteria interface + + This is a no-op for NHibernate 1.0.x since + the SetFetchSize method is not on the ICriteria interface and + the implementation class is has internal access. + + To remove the method completely for Spring's NHibernate 1.0 + support while reusing code for NHibernate 1.2 would not be + possible. So now this ineffectual operation is left in tact for + NHibernate 1.0.2 support. + + The criteria object to prepare + + + + Ensure SessionFactory is not null + + If SessionFactory property is null. + + + + Gets or sets if a new Session should be created when no transactional Session + can be found for the current thread. + + + true if allowed to create non-transaction session; + otherwise, false. + + +

HibernateTemplate is aware of a corresponding Session bound to the + current thread, for example when using HibernateTransactionManager. + If allowCreate is true, a new non-transactional Session will be created + if none found, which needs to be closed at the end of the operation. + If false, an InvalidOperationException will get thrown in this case. +

+
+
+ + + Gets or sets a value indicating whether to always + use a new Hibernate Session for this template. + + true if always use new session; otherwise, false. + +

+ Default is "false"; if activated, all operations on this template will + work on a new NHibernate ISession even in case of a pre-bound ISession + (for example, within a transaction). +

+

Within a transaction, a new NHibernate ISession used by this template + will participate in the transaction through using the same ADO.NET + Connection. In such a scenario, multiple Sessions will participate + in the same database transaction. +

+

Turn this on for operations that are supposed to always execute + independently, without side effects caused by a shared NHibernate ISession. +

+
+
+ + + Set whether to expose the native Hibernate Session to IHibernateCallback + code. Default is "false": a Session proxy will be returned, + suppressing close calls and automatically applying + query cache settings and transaction timeouts. + + true if expose native session; otherwise, false. + + + + Gets or sets the template flush mode. + + + Default is Auto. Will get applied to any new ISession + created by the template. + + The template flush mode. + + + + Gets or sets the entity interceptor that allows to inspect and change + property values before writing to and reading from the database. + + + Will get applied to any new ISession created by this object. +

Such an interceptor can either be set at the ISessionFactory level, + i.e. on LocalSessionFactoryObject, or at the ISession level, i.e. on + HibernateTemplate, HibernateInterceptor, and HibernateTransactionManager. + It's preferable to set it on LocalSessionFactoryObject or HibernateTransactionManager + to avoid repeated configuration and guarantee consistent behavior in transactions. +

+
+ The interceptor. +
+ + + Set the object name of a Hibernate entity interceptor that allows to inspect + and change property values before writing to and reading from the database. + + + Will get applied to any new Session created by this transaction manager. +

Requires the object factory to be known, to be able to resolve the object + name to an interceptor instance on session creation. Typically used for + prototype interceptors, i.e. a new interceptor instance per session. +

+

Can also be used for shared interceptor instances, but it is recommended + to set the interceptor reference directly in such a scenario. +

+
+ The name of the entity interceptor in the object factory/application context. +
+ + + Gets or sets the session factory that should be used to create + NHibernate ISessions. + + The session factory. + + + + Set the object factory instance. + + The object factory instance. + + + + Gets or sets a value indicating whether to + cache all queries executed by this template. + + + If this is true, all IQuery and ICriteria objects created by + this template will be marked as cacheable (including all + queries through find methods). +

To specify the query region to be used for queries cached + by this template, set the QueryCacheRegion property. +

+
+ true if cache queries; otherwise, false. +
+ + + Gets or sets the name of the cache region for queries executed by this template. + + + If this is specified, it will be applied to all IQuery and ICriteria objects + created by this template (including all queries through find methods). +

The cache region will not take effect unless queries created by this + template are configured to be cached via the CacheQueries property. +

+
+ The query cache region. +
+ + + Gets or sets the fetch size for this HibernateTemplate. + + The size of the fetch. + This is important for processing + large result sets: Setting this higher than the default value will increase + processing speed at the cost of memory consumption; setting this lower can + avoid transferring row data that will never be read by the application. +

Default is 0, indicating to use the driver's default.

+
+
+ + + Gets or sets the maximum number of rows for this HibernateTemplate. + + The max results. + + This is important + for processing subsets of large result sets, avoiding to read and hold + the entire result set in the database or in the ADO.NET driver if we're + never interested in the entire result in the first place (for example, + when performing searches that might return a large number of matches). +

Default is 0, indicating to use the driver's default.

+
+
+ + + Set the ADO.NET exception translator for this instance. + Applied to System.Data.Common.DbException (or provider specific exception type + in .NET 1.1) thrown by callback code, be it direct + DbException or wrapped Hibernate ADOExceptions. +

The default exception translator is either a ErrorCodeExceptionTranslator + if a DbProvider is available, or a FalbackExceptionTranslator otherwise +

+
+ The ADO exception translator. +
+ + + Gets a Session for use by this template. + + The session. + + - Returns a new Session in case of "alwaysUseNewSession" (using the same ADO.NET connection as a transaction Session, if applicable) + - a pre-bound Session in case of "AllowCreate" is set to false (not the default) + - or a pre-bound Session or new Session if no transactional or other pre-bound Session exists. + + + + + Helper class to determine if the FlushMode enumeration + was changed from its default value + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The flush mode. + + + + Gets or sets a value indicating whether the FlushMode + property was set.. + + true if FlushMode was set; otherwise, false. + + + + Gets or sets the FlushMode. + + The FlushMode. + + + + Interface that specifies a basic set of Hibernate operations. + + + Implemented by HibernateTemplate. Not often used, but a useful option + to enhance testability, as it can easily be mocked or stubbed. +

Provides HibernateTemplate's data access methods that mirror + various Session methods. See the NHibernate ISession documentation + for details on those methods. +

+
+ + Sree Nivask (.NET) + Mark Pollack (.NET) +
+ + + Interface that specifies a set of Hibernate operations that + are common across versions of Hibernate. + + + Base interface for generic and non generic IHibernateOperations interfaces + Not often used, but a useful option + to enhance testability, as it can easily be mocked or stubbed. +

Provides HibernateTemplate's data access methods that mirror + various Session methods. See the NHibernate ISession documentation + for details on those methods. +

+
+ Mark Pollack (.NET) + +
+ + + Remove all objects from the Session cache, and cancel all pending saves, + updates and deletes. + + In case of Hibernate errors + + + + Delete the given persistent instance. + + The persistent instance to delete. + In case of Hibernate errors + + + + Delete the given persistent instance. + + + Obtains the specified lock mode if the instance exists, implicitly + checking whether the corresponding database entry still exists + (throwing an OptimisticLockingFailureException if not found). + + Tthe persistent instance to delete. + The lock mode to obtain. + In case of Hibernate errors + + + + Delete all objects returned by the query. + + a query expressed in Hibernate's query language. + The number of entity instances deleted. + In case of Hibernate errors + + + + Delete all objects returned by the query. + + a query expressed in Hibernate's query language. + The value of the parameter. + The Hibernate type of the parameter (or null). + The number of entity instances deleted. + In case of Hibernate errors + + + + Delete all objects returned by the query. + + a query expressed in Hibernate's query language. + The values of the parameters. + Hibernate types of the parameters (or null) + The number of entity instances deleted. + In case of Hibernate errors + + + + Flush all pending saves, updates and deletes to the database. + + + Only invoke this for selective eager flushing, for example when ADO.NET code + needs to see certain changes within the same transaction. Else, it's preferable + to rely on auto-flushing at transaction completion. + + In case of Hibernate errors + + + + Load the persistent instance with the given identifier + into the given object, throwing an exception if not found. + + Entity the object (of the target class) to load into. + An identifier of the persistent instance. + If object not found. + In case of Hibernate errors + + + + Re-read the state of the given persistent instance. + + The persistent instance to re-read. + In case of Hibernate errors + + + + Re-read the state of the given persistent instance. + Obtains the specified lock mode for the instance. + + The persistent instance to re-read. + The lock mode to obtain. + In case of Hibernate errors + + + + Determines whether the given object is in the Session cache. + + the persistence instance to check. + + true if session cache contains the specified entity; otherwise, false. + + In case of Hibernate errors + + + + Remove the given object from the Session cache. + + The persistent instance to evict. + In case of Hibernate errors + + + + Obtain the specified lock level upon the given object, implicitly + checking whether the corresponding database entry still exists + (throwing an OptimisticLockingFailureException if not found). + + The he persistent instance to lock. + The lock mode to obtain. + If not found + In case of Hibernate errors + + + + Persist the given transient instance. + + The transient instance to persist. + The generated identifier. + In case of Hibernate errors + + + + Persist the given transient instance with the given identifier. + + The transient instance to persist. + The identifier to assign. + In case of Hibernate errors + + + + Update the given persistent instance. + + The persistent instance to update. + In case of Hibernate errors + + + + Update the given persistent instance. + Obtains the specified lock mode if the instance exists, implicitly + checking whether the corresponding database entry still exists + (throwing an OptimisticLockingFailureException if not found). + + The persistent instance to update. + The lock mode to obtain. + In case of Hibernate errors + + + + Save or update the given persistent instance, + according to its id (matching the configured "unsaved-value"?). + + Tthe persistent instance to save or update + (to be associated with the Hibernate Session). + In case of Hibernate errors + + + + Save or update the contents of given persistent object, + according to its id (matching the configured "unsaved-value"?). + Will copy the contained fields to an already loaded instance + with the same id, if appropriate. + + The persistent object to save or update. + (not necessarily to be associated with the Hibernate Session) + + The actually associated persistent object. + (either an already loaded instance with the same id, or the given object) + In case of Hibernate errors + + + + Return the persistent instance of the given entity type + with the given identifier, or if not found. + Obtains the specified lock mode if the instance exists. + + The object type to get. + The id of the object to get. + the persistent instance, or if not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity type + with the given identifier, or null if not found. + Obtains the specified lock mode if the instance exists. + + The object type to get. + The lock mode to obtain. + The lock mode. + the persistent instance, or null if not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity class + with the given identifier, throwing an exception if not found. + + The object type to load. + An identifier of the persistent instance. + The persistent instance + If not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity class + with the given identifier, throwing an exception if not found. + Obtains the specified lock mode if the instance exists. + + The object type to load. + An identifier of the persistent instance. + The lock mode. + The persistent instance + If not found + In case of Hibernate errors + + + + Return all persistent instances of the given entity class. + Note: Use queries or criteria for retrieving a specific subset. + + The object type to load. + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances. + + The object type to find. + a query expressed in Hibernate's query language + + a generic List containing 0 or more persistent instances + + In case of Hibernate errors + + + + Execute a query for persistent instances, binding + one value to a "?" parameter in the query string. + + The object type to find. + a query expressed in Hibernate's query language + the value of the parameter + + a generic List containing 0 or more persistent instances + + In case of Hibernate errors + + + + Execute a query for persistent instances, binding one value + to a "?" parameter of the given type in the query string. + + The object type to find. + a query expressed in Hibernate's query language + The value of the parameter. + Hibernate type of the parameter (or null) + + a generic List containing 0 or more persistent instances + + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to "?" parameters in the query string. + + The object type to find. + a query expressed in Hibernate's query language + the values of the parameters + a generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a number of + values to "?" parameters of the given types in the query string. + + The object type to find. + A query expressed in Hibernate's query language + The values of the parameters + Hibernate types of the parameters (or null) + + a generic List containing 0 or more persistent instances + + In case of Hibernate errors + If values and types are not null and their lenths are not equal + + + + Execute a query for persistent instances, binding + one value to a named parameter in the query string. + + The object type to find. + The name of a Hibernate query in a mapping file + The name of the parameter + The value of the parameter + a generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding + one value to a named parameter in the query string. + + The object type to find. + The name of a Hibernate query in a mapping file + The name of the parameter + The value of the parameter + Hibernate type of the parameter (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to named parameters in the query string. + + The object type to find. + A query expressed in Hibernate's query language + The names of the parameters + The values of the parameters + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to named parameters in the query string. + + The object type to find. + A query expressed in Hibernate's query language + The names of the parameters + The values of the parameters + Hibernate types of the parameters (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + If paramNames length is not equal to values length or + if paramNames length is not equal to types length (when types is not null) + + + + Execute a named query for persistent instances. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a "?" parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The value of the parameter + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a "?" parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The value of the parameter + Hibernate type of the parameter (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding a + number of values to "?" parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The values of the parameters + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding a + number of values to "?" parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The values of the parameters + Hibernate types of the parameters (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + If values and types are not null and their lengths differ. + + + + Execute a named query for persistent instances, binding + one value to a named parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + Name of the parameter + The value of the parameter + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a named parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + Name of the parameter + The value of the parameter + The Hibernate type of the parameter (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + number of values to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The names of the parameters + The values of the parameters. + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + number of values to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The names of the parameters + The values of the parameters. + Hibernate types of the parameters (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + If paramNames length is not equal to values length or + if paramNames length is not equal to types length (when types is not null) + + + + Execute a named query for persistent instances, binding the properties + of the given object to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The values of the parameters + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding the properties + of the given object to named parameters in the query string. + + The object type to find. + A query expressed in Hibernate's query language + The values of the parameters + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning the result object. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ The object type retrieved. + The delegate callback object that specifies the Hibernate action. + a result object returned by the action, or null + + In case of Hibernate errors +
+ + + Execute the action specified by the delegate within a Session. + + The object type retrieved. + The HibernateDelegate that specifies the action + to perform. + if set to true expose the native hibernate session to + callback code. + a result object returned by the action, or null + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + The object type retrieved. + The callback object that specifies the Hibernate action. + + a result object returned by the action, or null + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning the result object. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ In case of Hibernate errors +
+ + + Execute the action specified by the given action object within a Session. + + The object type retrieved. + callback object that specifies the Hibernate action. + if set to true expose the native hibernate session to + callback code. + + a result object returned by the action, or null + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning the result object. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ The object type to find. + The delegate callback object that specifies the Hibernate action. + A generic IList returned by the action, or null + + In case of Hibernate errors +
+ + + Execute the action specified by the delegate within a Session. + + The object type to find. + The FindHibernateDelegate that specifies the action + to perform. + if set to true expose the native hibernate session to + callback code. + A generic IList returned by the action, or null + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + The object type to find. + The callback object that specifies the Hibernate action. + + A generic IList returned by the action, or null + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning the result object. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+
+ + + Execute the action specified by the given action object within a Session assuming that an IList is returned. + + The object type to find. + callback object that specifies the Hibernate action. + if set to true expose the native hibernate session to + callback code. + + an IList returned by the action, or null + + In case of Hibernate errors + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Allows creation of a new non-transactional session when no + transactional Session can be found for the current thread + The session factory to create sessions. + + + + Initializes a new instance of the class. + + The session factory to create sessions. + if set to true allow creation + of a new non-transactional session when no transactional Session can be found + for the current thread. + + + + Remove all objects from the Session cache, and cancel all pending saves, + updates and deletes. + + + + + Delete the given persistent instance. + + The persistent instance to delete. + In case of Hibernate errors + + + + Delete the given persistent instance. + + Tthe persistent instance to delete. + The lock mode to obtain. + + Obtains the specified lock mode if the instance exists, implicitly + checking whether the corresponding database entry still exists + (throwing an OptimisticLockingFailureException if not found). + + In case of Hibernate errors + + + + Delete all objects returned by the query. + + a query expressed in Hibernate's query language. + The number of entity instances deleted. + In case of Hibernate errors + + + + Delete all objects returned by the query. + + a query expressed in Hibernate's query language. + The value of the parameter. + The Hibernate type of the parameter (or null). + The number of entity instances deleted. + In case of Hibernate errors + + + + Delete all objects returned by the query. + + a query expressed in Hibernate's query language. + The values of the parameters. + Hibernate types of the parameters (or null) + The number of entity instances deleted. + In case of Hibernate errors + + + + Flush all pending saves, updates and deletes to the database. + + + Only invoke this for selective eager flushing, for example when ADO.NET code + needs to see certain changes within the same transaction. Else, it's preferable + to rely on auto-flushing at transaction completion. + + In case of Hibernate errors + + + + Load the persistent instance with the given identifier + into the given object, throwing an exception if not found. + + Entity the object (of the target class) to load into. + An identifier of the persistent instance. + If object not found. + In case of Hibernate errors + + + + Re-read the state of the given persistent instance. + + The persistent instance to re-read. + In case of Hibernate errors + + + + Re-read the state of the given persistent instance. + Obtains the specified lock mode for the instance. + + The persistent instance to re-read. + The lock mode to obtain. + In case of Hibernate errors + + + + Determines whether the given object is in the Session cache. + + the persistence instance to check. + + true if session cache contains the specified entity; otherwise, false. + + In case of Hibernate errors + + + + Remove the given object from the Session cache. + + The persistent instance to evict. + In case of Hibernate errors + + + + Obtain the specified lock level upon the given object, implicitly + checking whether the corresponding database entry still exists + (throwing an OptimisticLockingFailureException if not found). + + The he persistent instance to lock. + The lock mode to obtain. + If not found + In case of Hibernate errors + + + + Persist the given transient instance. + + The transient instance to persist. + The generated identifier. + In case of Hibernate errors + + + + Persist the given transient instance with the given identifier. + + The transient instance to persist. + The identifier to assign. + In case of Hibernate errors + + + + Update the given persistent instance. + + The persistent instance to update. + In case of Hibernate errors + + + + Update the given persistent instance. + Obtains the specified lock mode if the instance exists, implicitly + checking whether the corresponding database entry still exists + (throwing an OptimisticLockingFailureException if not found). + + The persistent instance to update. + The lock mode to obtain. + In case of Hibernate errors + + + + Save or update the given persistent instance, + according to its id (matching the configured "unsaved-value"?). + + Tthe persistent instance to save or update + (to be associated with the Hibernate Session). + In case of Hibernate errors + + + + Save or update the contents of given persistent object, + according to its id (matching the configured "unsaved-value"?). + Will copy the contained fields to an already loaded instance + with the same id, if appropriate. + + The persistent object to save or update. + (not necessarily to be associated with the Hibernate Session) + + The actually associated persistent object. + (either an already loaded instance with the same id, or the given object) + In case of Hibernate errors + + + + Return the persistent instance of the given entity type + with the given identifier, or null if not found. + Obtains the specified lock mode if the instance exists. + + The object type to get. + The id of the object to get. + the persistent instance, or null if not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity type + with the given identifier, or null if not found. + Obtains the specified lock mode if the instance exists. + + The object type to get. + The lock mode to obtain. + The lock mode. + the persistent instance, or null if not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity class + with the given identifier, throwing an exception if not found. + + The object type to load. + An identifier of the persistent instance. + The persistent instance + If not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity class + with the given identifier, throwing an exception if not found. + Obtains the specified lock mode if the instance exists. + + The object type to load. + An identifier of the persistent instance. + The lock mode. + The persistent instance + If not found + In case of Hibernate errors + + + + Return all persistent instances of the given entity class. + Note: Use queries or criteria for retrieving a specific subset. + + The object type to load. + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances. + + The object type to find. + a query expressed in Hibernate's query language + + a generic List containing 0 or more persistent instances + + In case of Hibernate errors + + + + Execute a query for persistent instances, binding + one value to a "?" parameter in the query string. + + The object type to find. + a query expressed in Hibernate's query language + the value of the parameter + + a generic List containing 0 or more persistent instances + + In case of Hibernate errors + + + + Execute a query for persistent instances, binding one value + to a "?" parameter of the given type in the query string. + + The object type to find. + a query expressed in Hibernate's query language + The value of the parameter. + Hibernate type of the parameter (or null) + + a generic List containing 0 or more persistent instances + + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to "?" parameters in the query string. + + The object type to find. + a query expressed in Hibernate's query language + the values of the parameters + a generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a number of + values to "?" parameters of the given types in the query string. + + The object type to find. + A query expressed in Hibernate's query language + The values of the parameters + Hibernate types of the parameters (or null) + + a generic List containing 0 or more persistent instances + + In case of Hibernate errors + If values and types are not null and their lengths are not equal + + + + Execute a query for persistent instances, binding + one value to a named parameter in the query string. + + The object type to find. + The name of a Hibernate query in a mapping file + The name of the parameter + The value of the parameter + a generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding + one value to a named parameter in the query string. + + The object type to find. + The name of a Hibernate query in a mapping file + The name of the parameter + The value of the parameter + Hibernate type of the parameter (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to named parameters in the query string. + + The object type to find. + A query expressed in Hibernate's query language + The names of the parameters + The values of the parameters + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to named parameters in the query string. + + The object type to find. + A query expressed in Hibernate's query language + The names of the parameters + The values of the parameters + Hibernate types of the parameters (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + If paramNames length is not equal to values length or + if paramNames length is not equal to types length (when types is not null) + + + + Execute a named query for persistent instances. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a "?" parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The value of the parameter + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a "?" parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The value of the parameter + Hibernate type of the parameter (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding a + number of values to "?" parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The values of the parameters + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding a + number of values to "?" parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The values of the parameters + Hibernate types of the parameters (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + If values and types are not null and their lengths differ. + + + + Execute a named query for persistent instances, binding + one value to a named parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + Name of the parameter + The value of the parameter + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a named parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + Name of the parameter + The value of the parameter + The Hibernate type of the parameter (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + number of values to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The names of the parameters + The values of the parameters. + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + number of values to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The names of the parameters + The values of the parameters. + Hibernate types of the parameters (or null) + A generic List containing 0 or more persistent instances + In case of Hibernate errors + If paramNames length is not equal to values length or + if paramNames length is not equal to types length (when types is not null) + + + + Execute a named query for persistent instances, binding the properties + of the given object to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The object type to find. + The name of a Hibernate query in a mapping file + The values of the parameters + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding the properties + of the given object to named parameters in the query string. + + The object type to find. + A query expressed in Hibernate's query language + The values of the parameters + A generic List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning the result object. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ The object type retrieved. + The delegate callback object that specifies the Hibernate action. + a result object returned by the action, or null + + In case of Hibernate errors +
+ + + Execute the action specified by the delegate within a Session. + + The object type retrieved. + The HibernateDelegate that specifies the action + to perform. + if set to true expose the native hibernate session to + callback code. + a result object returned by the action, or null + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + The object type retrieved. + The callback object that specifies the Hibernate action. + + a result object returned by the action, or null + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning the result object. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ In case of Hibernate errors +
+ + + Execute the action specified by the given action object within a Session. + + The object type retrieved. + callback object that specifies the Hibernate action. + if set to true expose the native hibernate session to + callback code. + + a result object returned by the action, or null + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session assuming that an IList is returned. + + The object type to find. + callback object that specifies the Hibernate action. + if set to true expose the native hibernate session to + callback code. + + an IList returned by the action, or null + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning the result object. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ The object type to find. + The delegate callback object that specifies the Hibernate action. + A generic IList returned by the action, or null + + In case of Hibernate errors +
+ + + Execute the action specified by the delegate within a Session. + + The object type to find. + The FindHibernateDelegate that specifies the action + to perform. + if set to true expose the native hibernate session to + callback code. + A generic IList returned by the action, or null + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + The object type to find. + The callback object that specifies the Hibernate action. + + A generic IList returned by the action, or null + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning the result object. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+
+ + + Gets or sets if a new Session should be created when no transactional Session + can be found for the current thread. + + + true if allowed to create non-transaction session; + otherwise, false. + + +

HibernateTemplate is aware of a corresponding Session bound to the + current thread, for example when using HibernateTransactionManager. + If allowCreate is true, a new non-transactional Session will be created + if none found, which needs to be closed at the end of the operation. + If false, an InvalidOperationException will get thrown in this case. +

+
+
+ + + Gets or sets a value indicating whether to always + use a new Hibernate Session for this template. + + true if always use new session; otherwise, false. + +

+ Default is "false"; if activated, all operations on this template will + work on a new NHibernate ISession even in case of a pre-bound ISession + (for example, within a transaction). +

+

Within a transaction, a new NHibernate ISession used by this template + will participate in the transaction through using the same ADO.NET + Connection. In such a scenario, multiple Sessions will participate + in the same database transaction. +

+

Turn this on for operations that are supposed to always execute + independently, without side effects caused by a shared NHibernate ISession. +

+
+
+ + + Set whether to expose the native Hibernate Session to IHibernateCallback + code. Default is "false": a Session proxy will be returned, + suppressing close calls and automatically applying + query cache settings and transaction timeouts. + + true if expose native session; otherwise, false. + + + + Gets or sets the template flush mode. + + + Default is Auto. Will get applied to any new ISession + created by the template. + + The template flush mode. + + + + Gets or sets the entity interceptor that allows to inspect and change + property values before writing to and reading from the database. + + + Will get applied to any new ISession created by this object. +

Such an interceptor can either be set at the ISessionFactory level, + i.e. on LocalSessionFactoryObject, or at the ISession level, i.e. on + HibernateTemplate, HibernateInterceptor, and HibernateTransactionManager. + It's preferable to set it on LocalSessionFactoryObject or HibernateTransactionManager + to avoid repeated configuration and guarantee consistent behavior in transactions. +

+
+ The interceptor. +
+ + + Set the object name of a Hibernate entity interceptor that allows to inspect + and change property values before writing to and reading from the database. + + + Will get applied to any new Session created by this transaction manager. +

Requires the object factory to be known, to be able to resolve the object + name to an interceptor instance on session creation. Typically used for + prototype interceptors, i.e. a new interceptor instance per session. +

+

Can also be used for shared interceptor instances, but it is recommended + to set the interceptor reference directly in such a scenario. +

+
+ The name of the entity interceptor in the object factory/application context. +
+ + + Gets or sets the session factory that should be used to create + NHibernate ISessions. + + The session factory. + + + + Set the object factory instance. + + The object factory instance + + + + Gets or sets a value indicating whether to + cache all queries executed by this template. + + + If this is true, all IQuery and ICriteria objects created by + this template will be marked as cacheable (including all + queries through find methods). +

To specify the query region to be used for queries cached + by this template, set the QueryCacheRegion property. +

+
+ true if cache queries; otherwise, false. +
+ + + Gets or sets the name of the cache region for queries executed by this template. + + + If this is specified, it will be applied to all IQuery and ICriteria objects + created by this template (including all queries through find methods). +

The cache region will not take effect unless queries created by this + template are configured to be cached via the CacheQueries property. +

+
+ The query cache region. +
+ + + Gets or sets the fetch size for this HibernateTemplate. + + The size of the fetch. + This is important for processing + large result sets: Setting this higher than the default value will increase + processing speed at the cost of memory consumption; setting this lower can + avoid transferring row data that will never be read by the application. +

Default is 0, indicating to use the driver's default.

+
+
+ + + Gets or sets the maximum number of rows for this HibernateTemplate. + + The max results. + + This is important + for processing subsets of large result sets, avoiding to read and hold + the entire result set in the database or in the ADO.NET driver if we're + never interested in the entire result in the first place (for example, + when performing searches that might return a large number of matches). +

Default is 0, indicating to use the driver's default.

+
+
+ + + Set the ADO.NET exception translator for this instance. + Applied to System.Data.Common.DbException (or provider specific exception type + in .NET 1.1) thrown by callback code, be it direct + DbException or wrapped Hibernate ADOExceptions. +

The default exception translator is either a ErrorCodeExceptionTranslator + if a DbProvider is available, or a FalbackExceptionTranslator otherwise +

+
+ The ADO exception translator. +
+ + + Gets the classic hibernate template for access to non-generic methods. + + The classic hibernate template. + + + + Gets or sets the proxy factory. + + This may be useful to set if you create many instances of + HibernateTemplate and/or HibernateDaoSupport. This allows the same + ProxyFactory implementation to be used thereby limiting the + number of dynamic proxy types created in the temporary assembly, which + are never garbage collected due to .NET runtime semantics. + + The proxy factory. + + + + Callback interface (Generic version) for NHibernate code. + + The type of result object + To be used with HibernateTemplate execute + method. The typical implementation will call + Session.load/find/save/update to perform + some operations on persistent objects. + + + Sree Nivask (.NET) + + + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+ A result object. + The active Hibernate session +
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Callback interface (Generic version) for NHibernate code that + returns a List of objects. + + The type of result object + To be used with HibernateTemplate execute + method. The typical implementation will call + Session.load/find/save/update to perform + some operations on persistent objects. + + Sree Nivask (.NET) + Mark Pollack (.NET) + + + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+ Collection result object. +
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + NHibnerations actions taken during the transaction lifecycle. + + Mark Pollack (.NET) + + + + The instance for this class. + + + + + Initializes a new instance of the class. + + + + + Suspend this synchronization. + + +

+ Unbind Hibernate resources (SessionHolder) from + + if managing any. +

+
+
+ + + Resume this synchronization. + + +

+ Rebind Hibernate resources from + + if managing any. +

+
+
+ + + Invoked before transaction commit (before + ) + + + If the transaction is defined as a read-only transaction. + + +

+ Can flush transactional sessions to the database. +

+

+ Note that exceptions will get propagated to the commit caller and + cause a rollback of the transaction. +

+
+
+ + + Invoked before transaction commit (before + ) + Can e.g. flush transactional O/R Mapping sessions to the database + + + + This callback does not mean that the transaction will actually be + commited. A rollback decision can still occur after this method + has been called. This callback is rather meant to perform work + that's only relevant if a commit still has a chance + to happen, such as flushing SQL statements to the database. + + + Note that exceptions will get propagated to the commit caller and cause a + rollback of the transaction. + + (note: do not throw TransactionException subclasses here!) + + + + + + Invoked after transaction commit/rollback. + + + Status according to + + + Can e.g. perform resource cleanup, in this case after transaction completion. +

+ Note that exceptions will get propagated to the commit or rollback + caller, although they will not influence the outcome of the transaction. +

+
+
+ + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + PlatformTransactionManager implementation for a single Hibernate SessionFactory. + Binds a Hibernate Session from the specified factory to the thread, potentially + allowing for one thread Session per factory + + + SessionFactoryUtils and HibernateTemplate are aware of thread-bound Sessions and participate in such + transactions automatically. Using either of those is required for Hibernate + access code that needs to support this transaction handling mechanism. + + Supports custom isolation levels at the start of the transaction + , and timeouts that get applied as appropriate + Hibernate query timeouts. To support the latter, application code must either use + HibernateTemplate (which by default applies the timeouts) or call + SessionFactoryUtils.applyTransactionTimeout for each created + Hibernate Query object. + + Note that you can specify a Spring IDbProvider instance which if shared with + a corresponding instance of AdoTemplate will allow for mixing ADO.NET/NHibernate + operations within a single transaction. + + Mark Pollack (.NET) + + + + Just needed for entityInterceptorBeanName. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The session factory. + + + + Return the current transaction object. + + The current transaction object. + + If transaction support is not available. + + + In the case of lookup or system errors. + + + + + Check if the given transaction object indicates an existing, + i.e. already begun, transaction. + + + Transaction object returned by + . + + True if there is an existing transaction. + + In the case of system errors. + + + + + Begin a new transaction with the given transaction definition. + + + Transaction object returned by + . + + + instance, describing + propagation behavior, isolation level, timeout etc. + + + Does not have to care about applying the propagation behavior, + as this has already been handled by this abstract manager. + + + In the case of creation or system errors. + + + + + Suspend the resources of the current transaction. + + + Transaction object returned by + . + + + An object that holds suspended resources (will be kept unexamined for passing it into + .) + + + Transaction synchronization will already have been suspended. + + + If suspending is not supported by the transaction manager implementation. + + + in case of system errors. + + + + + Resume the resources of the current transaction. + + + Transaction object returned by + . + + + The object that holds suspended resources as returned by + . + + + Transaction synchronization will be resumed afterwards. + + + If suspending is not supported by the transaction manager implementation. + + + In the case of system errors. + + + + + Perform an actual commit on the given transaction. + + The status representation of the transaction. + +

+ An implementation does not need to check the rollback-only flag. +

+
+ + In the case of system errors. + +
+ + + Perform an actual rollback on the given transaction. + + The status representation of the transaction. + + An implementation does not need to check the new transaction flag. + + + In the case of system errors. + + + + + Set the given transaction rollback-only. Only called on rollback + if the current transaction takes part in an existing one. + + The status representation of the transaction. + + In the case of system errors. + + + + + Gets the ADO.NET IDbTransaction object from the NHibernate ITransaction object. + + The hibernate transaction. + The ADO.NET transaction. Null if could not get the transaction. Warning + messages will be logged in that case. + + + + Convert the given HibernateException to an appropriate exception from + the Spring.Dao hierarchy. Can be overridden in subclasses. + + The HibernateException that occured. + The corresponding DataAccessException instance + + + + Convert the given ADOException to an appropriate exception from the + the Spring.Dao hierarchy. Can be overridden in subclasses. + + The ADOException that occured, wrapping the underlying + ADO.NET thrown exception. + The translator to convert hibernate ADOExceptions. + + The corresponding DataAccessException instance + + + + + Cleanup resources after transaction completion. + + Transaction object returned by + . + + + This implemenation unbinds the SessionFactory and + DbProvider from thread local storage and closes the + ISession. + +

+ Called after + and + + execution on any outcome. +

+

+ Should not throw any exceptions but just issue warnings on errors. +

+
+
+ + + Invoked by an + after it has injected all of an object's dependencies. + + +

+ This method allows the object instance to perform the kind of + initialization only possible when all of it's dependencies have + been injected (set), and to throw an appropriate exception in the + event of misconfiguration. +

+

+ Please do consult the class level documentation for the + interface for a + description of exactly when this method is invoked. In + particular, it is worth noting that the + + and + callbacks will have been invoked prior to this method being + called. +

+
+ + In the event of misconfiguration (such as the failure to set a + required property) or if initialization fails. + +
+ + + Gets or sets the db provider. + + The db provider. + + + + Gets or sets a Hibernate entity interceptor that allows to inspect and change + property values before writing to and reading from the database. + When getting, return the current Hibernate entity interceptor, or null if none. + + The entity interceptor. + + Resolves an entity interceptor object name via the object factory, + if necessary. + Will get applied to any new Session created by this transaction manager. + Such an interceptor can either be set at the SessionFactory level, + i.e. on LocalSessionFactoryObject, or at the Session level, i.e. on + HibernateTemplate, HibernateInterceptor, and HibernateTransactionManager. + It's preferable to set it on LocalSessionFactoryObject or HibernateTransactionManager + to avoid repeated configuration and guarantee consistent behavior in transactions. + + If object factory is null and need to get entity interceptor via object name. + + + + Sets the object name of a Hibernate entity interceptor that + allows to inspect and change property values before writing to and reading from the database. + + The name of the entity interceptor object. + + Will get applied to any new Session created by this transaction manager. +

Requires the object factory to be known, to be able to resolve the object + name to an interceptor instance on session creation. Typically used for + prototype interceptors, i.e. a new interceptor instance per session. +

+

Can also be used for shared interceptor instances, but it is recommended + to set the interceptor reference directly in such a scenario. +

+
+
+ + + Gets or sets the ADO.NET exception translator for this transaction manager. + + + Applied to ADO.NET Exceptions (wrapped by Hibernate's ADOException) + + The ADO exception translator. + + + + Gets the default IAdoException translator, lazily creating it if nece + + The default IAdoException translator. + + + + Gets or sets the SessionFactory that this instance should manage transactions for. + + The session factory. + + + + Gets the resource factory that this transaction manager operates on, + For the HibenratePlatformTransactionManager this the SessionFactory + + The SessionFactory. + + + + Set whether to autodetect a ADO.NET connection used by the Hibernate SessionFactory, + if set via LocalSessionFactoryObject's DbProvider. Default is "true". + + + true if [autodetect data source]; otherwise, false. + + +

Can be turned off to deliberately ignore an available IDbProvider, + to not expose Hibernate transactions as ADO.NET transactions for that IDbProvider. +

+
+
+ + + The object factory just needs to be known for resolving entity interceptor + It does not need to be set for any other mode of operation. + + + Owning + (may not be ). The object can immediately + call methods on the factory. + + + + + Return whether the transaction is internally marked as rollback-only. + + + True of the transaction is marked as rollback-only. + + + + Helper class that simplifies NHibernate data access code + + +

Typically used to implement data access or business logic services that + use NHibernate within their implementation but are Hibernate-agnostic in their + interface. The latter or code calling the latter only have to deal with + domain objects.

+ +

The central method is Execute supporting Hibernate access code + implementing the HibernateCallback interface. It provides NHibernate Session + handling such that neither the IHibernateCallback implementation nor the calling + code needs to explicitly care about retrieving/closing NHibernate Sessions, + or handling Session lifecycle exceptions. For typical single step actions, + there are various convenience methods (Find, Load, SaveOrUpdate, Delete). +

+ +

Can be used within a service implementation via direct instantiation + with a ISessionFactory reference, or get prepared in an application context + and given to services as an object reference. Note: The ISessionFactory should + always be configured as an object in the application context, in the first case + given to the service directly, in the second case to the prepared template. +

+ +

This class can be considered as direct alternative to working with the raw + Hibernate Session API (through SessionFactoryUtils.Session). +

+ +

LocalSessionFactoryObject is the preferred way of obtaining a reference + to a specific NHibernate ISessionFactory. +

+
+ Mark Pollack (.NET) +
+ + + Interface that specifies a basic set of Hibernate operations. + + + Implemented by HibernateTemplate. Not often used, but a useful option + to enhance testability, as it can easily be mocked or stubbed. +

Provides HibernateTemplate's data access methods that mirror + various Session methods. See the NHibernate ISession documentation + for details on those methods. +

+
+ + Mark Pollack (.NET) +
+ + + Delete all given persistent instances. + + The persistent instances to delete. + + This can be combined with any of the find methods to delete by query + in two lines of code, similar to Session's delete by query methods. + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning a result object, i.e. a domain + object or a collection of domain objects. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ The delegate callback object that specifies the Hibernate action. + a result object returned by the action, or null + + In case of Hibernate errors +
+ + + Execute the action specified by the given action object within a Session. + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning a result object, i.e. a domain + object or a collection of domain objects. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ The callback object that specifies the Hibernate action. + a result object returned by the action, or null + + In case of Hibernate errors +
+ + + Execute the specified action assuming that the result object is a List. + + + This is a convenience method for executing Hibernate find calls or + queries within an action. + + The calback object that specifies the Hibernate action. + A IList returned by the action, or null + + In case of Hibernate errors + + + + Execute a query for persistent instances. + + a query expressed in Hibernate's query language + a List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding + one value to a "?" parameter in the query string. + + a query expressed in Hibernate's query language + the value of the parameter + a List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding one value + to a "?" parameter of the given type in the query string. + + a query expressed in Hibernate's query language + The value of the parameter. + Hibernate type of the parameter (or null) + a List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to "?" parameters in the query string. + + a query expressed in Hibernate's query language + the values of the parameters + a List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a number of + values to "?" parameters of the given types in the query string. + + A query expressed in Hibernate's query language + The values of the parameters + Hibernate types of the parameters (or null) + a List containing 0 or more persistent instances + In case of Hibernate errors + If values and types are not null and their lengths are not equal + + + + Execute a query for persistent instances, binding + one value to a named parameter in the query string. + + The name of a Hibernate query in a mapping file + The name of the parameter + The value of the parameter + a List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding + one value to a named parameter in the query string. + + The name of a Hibernate query in a mapping file + The name of the parameter + The value of the parameter + Hibernate type of the parameter (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to named parameters in the query string. + + A query expressed in Hibernate's query language + The names of the parameters + The values of the parameters + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to named parameters in the query string. + + A query expressed in Hibernate's query language + The names of the parameters + The values of the parameters + Hibernate types of the parameters (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + If paramNames length is not equal to values length or + if paramNames length is not equal to types length (when types is not null) + + + + Execute a named query for persistent instances. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a "?" parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The value of the parameter + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a "?" parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The value of the parameter + Hibernate type of the parameter (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding a + number of values to "?" parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The values of the parameters + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding a + number of values to "?" parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The values of the parameters + Hibernate types of the parameters (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + If values and types are not null and their lengths differ. + + + + Execute a named query for persistent instances, binding + one value to a named parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + Name of the parameter + The value of the parameter + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a named parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + Name of the parameter + The value of the parameter + The Hibernate type of the parameter (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + number of values to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The names of the parameters + The values of the parameters. + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + number of values to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The names of the parameters + The values of the parameters. + Hibernate types of the parameters (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + If paramNames length is not equal to values length or + if paramNames length is not equal to types length (when types is not null) + + + + Execute a named query for persistent instances, binding the properties + of the given object to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The values of the parameters + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding the properties + of the given object to named parameters in the query string. + + A query expressed in Hibernate's query language + The values of the parameters + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Return the persistent instance of the given entity type + with the given identifier, or null if not found. + + a persistent type. + An identifier of the persistent instance. + the persistent instance, or null if not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity type + with the given identifier, or null if not found. + Obtains the specified lock mode if the instance exists. + + A persistent class. + An identifier of the persistent instance. + The lock mode. + the persistent instance, or null if not found + the persistent instance, or null if not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity class + with the given identifier, throwing an exception if not found. + + Type of the entity. + An identifier of the persistent instance. + The persistent instance + If not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity class + with the given identifier, throwing an exception if not found. + Obtains the specified lock mode if the instance exists. + + Type of the entity. + An identifier of the persistent instance. + The lock mode. + The persistent instance + If not found + In case of Hibernate errors + + + + Return all persistent instances of the given entity class. + Note: Use queries or criteria for retrieving a specific subset. + + Type of the entity. + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Save or update all given persistent instances, + according to its id (matching the configured "unsaved-value"?). + + Tthe persistent instances to save or update + (to be associated with the Hibernate Session)he entities. + In case of Hibernate errors + + + + The instance for this class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The default for creating a new non-transactional + session when no transactional Session can be found for the current thread + is set to true. + The session factory to create sessions. + + + + Initializes a new instance of the class. + + The session factory to create sessions. + if set to true allow creation + of a new non-transactional when no transactional Session can be found + for the current thread. + + + + Delegate function that clears the session. + + The hibernate session. + null + + + + Flush all pending saves, updates and deletes to the database. + + + Only invoke this for selective eager flushing, for example when ADO.NET code + needs to see certain changes within the same transaction. Else, it's preferable + to rely on auto-flushing at transaction completion. + + In case of Hibernate errors + + + + Return the persistent instance of the given entity type + with the given identifier, or null if not found. + + The type. + An identifier of the persistent instance. + The persistent instance, or null if not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity type + with the given identifier, or null if not found. + Obtains the specified lock mode if the instance exists. + + The type. + The lock mode to obtain. + The lock mode. + the persistent instance, or null if not found + the persistent instance, or null if not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity class + with the given identifier, throwing an exception if not found. + + Type of the entity. + An identifier of the persistent instance. + The persistent instance + If not found + In case of Hibernate errors + + + + Return the persistent instance of the given entity class + with the given identifier, throwing an exception if not found. + Obtains the specified lock mode if the instance exists. + + Type of the entity. + An identifier of the persistent instance. + The lock mode. + The persistent instance + If not found + In case of Hibernate errors + + + + Load the persistent instance with the given identifier + into the given object, throwing an exception if not found. + + Entity the object (of the target class) to load into. + An identifier of the persistent instance. + If object not found. + In case of Hibernate errors + + + + Return all persistent instances of the given entity class. + Note: Use queries or criteria for retrieving a specific subset. + + Type of the entity. + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Re-read the state of the given persistent instance. + + The persistent instance to re-read. + In case of Hibernate errors + + + + Re-read the state of the given persistent instance. + Obtains the specified lock mode for the instance. + + The persistent instance to re-read. + The lock mode to obtain. + In case of Hibernate errors + + + + Obtain the specified lock level upon the given object, implicitly + checking whether the corresponding database entry still exists + (throwing an OptimisticLockingFailureException if not found). + + The he persistent instance to lock. + The lock mode to obtain. + If not found + In case of Hibernate errors + + + + Persist the given transient instance. + + The transient instance to persist. + The generated identifier. + In case of Hibernate errors + + + + Persist the given transient instance with the given identifier. + + The transient instance to persist. + The identifier to assign. + In case of Hibernate errors + + + + Update the given persistent instance. + + The persistent instance to update. + In case of Hibernate errors + + + + Update the given persistent instance. + Obtains the specified lock mode if the instance exists, implicitly + checking whether the corresponding database entry still exists + (throwing an OptimisticLockingFailureException if not found). + + The persistent instance to update. + The lock mode to obtain. + In case of Hibernate errors + + + + Save or update the given persistent instance, + according to its id (matching the configured "unsaved-value"?). + + Tthe persistent instance to save or update + (to be associated with the Hibernate Session). + In case of Hibernate errors + + + + Save or update all given persistent instances, + according to its id (matching the configured "unsaved-value"?). + + Tthe persistent instances to save or update + (to be associated with the Hibernate Session)he entities. + In case of Hibernate errors + + + + Save or update the contents of given persistent object, + according to its id (matching the configured "unsaved-value"?). + Will copy the contained fields to an already loaded instance + with the same id, if appropriate. + + The persistent object to save or update. + (not necessarily to be associated with the Hibernate Session) + + The actually associated persistent object. + (either an already loaded instance with the same id, or the given object) + In case of Hibernate errors + + + + Remove all objects from the Session cache, and cancel all pending saves, + updates and deletes. + + + + + Determines whether the given object is in the Session cache. + + the persistence instance to check. + + true if session cache contains the specified entity; otherwise, false. + + In case of Hibernate errors + + + + Remove the given object from the Session cache. + + The persistent instance to evict. + In case of Hibernate errors + + + + Delete the given persistent instance. + + The persistent instance to delete. + In case of Hibernate errors + + + + Delete the given persistent instance. + + Tthe persistent instance to delete. + The lock mode to obtain. + + Obtains the specified lock mode if the instance exists, implicitly + checking whether the corresponding database entry still exists + (throwing an OptimisticLockingFailureException if not found). + + In case of Hibernate errors + + + + Delete all objects returned by the query. + + a query expressed in Hibernate's query language. + The number of entity instances deleted. + In case of Hibernate errors + + + + Delete all objects returned by the query. + + a query expressed in Hibernate's query language. + The value of the parameter. + The Hibernate type of the parameter (or null). + The number of entity instances deleted. + In case of Hibernate errors + + + + Delete all objects returned by the query. + + a query expressed in Hibernate's query language. + The values of the parameters. + Hibernate types of the parameters (or null) + The number of entity instances deleted. + In case of Hibernate errors + If length for argument values and types are not equal. + + + + Delete all given persistent instances. + + The persistent instances to delete. + + This can be combined with any of the find methods to delete by query + in two lines of code, similar to Session's delete by query methods. + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning a result object, i.e. a domain + object or a collection of domain objects. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ The delegate callback object that specifies the Hibernate action. + a result object returned by the action, or null + + In case of Hibernate errors +
+ + + Execute the action specified by the delegate within a Session. + + The HibernateDelegate that specifies the action + to perform. + if set to true expose the native hibernate session to + callback code. + a result object returned by the action, or null + + + + + Execute the action specified by the given action object within a Session. + + The callback object that specifies the Hibernate action. + + a result object returned by the action, or null + + + Application exceptions thrown by the action object get propagated to the + caller (can only be unchecked). Hibernate exceptions are transformed into + appropriate DAO ones. Allows for returning a result object, i.e. a domain + object or a collection of domain objects. +

Note: Callback code is not supposed to handle transactions itself! + Use an appropriate transaction manager like HibernateTransactionManager. + Generally, callback code must not touch any Session lifecycle methods, + like close, disconnect, or reconnect, to let the template do its work. +

+
+ In case of Hibernate errors +
+ + + Execute the specified action assuming that the result object is a List. + + + This is a convenience method for executing Hibernate find calls or + queries within an action. + + The calback object that specifies the Hibernate action. + A IList returned by the action, or null + + In case of Hibernate errors + + + + Execute the action specified by the given action object within a Session. + + callback object that specifies the Hibernate action. + if set to true expose the native hibernate session to + callback code. + + a result object returned by the action, or null + + + + + Execute a query for persistent instances. + + a query expressed in Hibernate's query language + + a List containing 0 or more persistent instances + + In case of Hibernate errors + + + + Execute a query for persistent instances, binding + one value to a "?" parameter in the query string. + + a query expressed in Hibernate's query language + the value of the parameter + + a List containing 0 or more persistent instances + + In case of Hibernate errors + + + + Execute a query for persistent instances, binding one value + to a "?" parameter of the given type in the query string. + + a query expressed in Hibernate's query language + The value of the parameter. + Hibernate type of the parameter (or null) + + a List containing 0 or more persistent instances + + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to "?" parameters in the query string. + + a query expressed in Hibernate's query language + the values of the parameters + a List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a number of + values to "?" parameters of the given types in the query string. + + A query expressed in Hibernate's query language + The values of the parameters + Hibernate types of the parameters (or null) + + a List containing 0 or more persistent instances + + In case of Hibernate errors + If values and types are not null and their lengths are not equal + + + + Execute a query for persistent instances, binding + one value to a named parameter in the query string. + + The name of a Hibernate query in a mapping file + The name of the parameter + The value of the parameter + a List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding + one value to a named parameter in the query string. + + The name of a Hibernate query in a mapping file + The name of the parameter + The value of the parameter + Hibernate type of the parameter (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to named parameters in the query string. + + A query expressed in Hibernate's query language + The names of the parameters + The values of the parameters + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding a + number of values to named parameters in the query string. + + A query expressed in Hibernate's query language + The names of the parameters + The values of the parameters + Hibernate types of the parameters (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + If paramNames length is not equal to values length or + if paramNames length is not equal to types length (when types is not null) + + + + Execute a named query for persistent instances. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a "?" parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The value of the parameter + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a "?" parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The value of the parameter + Hibernate type of the parameter (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding a + number of values to "?" parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The values of the parameters + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding a + number of values to "?" parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The values of the parameters + Hibernate types of the parameters (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + If values and types are not null and their lengths differ. + + + + Execute a named query for persistent instances, binding + one value to a named parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + Name of the parameter + The value of the parameter + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + one value to a named parameter in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + Name of the parameter + The value of the parameter + The Hibernate type of the parameter (or null) + A List containing 0 or more persistent instances + + + + Execute a named query for persistent instances, binding + number of values to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The names of the parameters + The values of the parameters. + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a named query for persistent instances, binding + number of values to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The names of the parameters + The values of the parameters. + Hibernate types of the parameters (or null) + A List containing 0 or more persistent instances + In case of Hibernate errors + If paramNames length is not equal to values length or + if paramNames length is not equal to types length (when types is not null) + + + + Execute a named query for persistent instances, binding the properties + of the given object to named parameters in the query string. + A named query is defined in a Hibernate mapping file. + + The name of a Hibernate query in a mapping file + The values of the parameters + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Execute a query for persistent instances, binding the properties + of the given object to named parameters in the query string. + + A query expressed in Hibernate's query language + The values of the parameters + A List containing 0 or more persistent instances + In case of Hibernate errors + + + + Create a close-suppressing proxy for the given Hibernate Session. + The proxy also prepares returned Query and Criteria objects. + + The session. + The session proxy. + + + + Check whether write operations are allowed on the given Session. + + + Default implementation throws an InvalidDataAccessApiUsageException + in case of FlushMode.Never. Can be overridden in subclasses. + + The current Hibernate session. + If write operation is attempted in read-only mode + + + + + Compares if the flush mode enumerations, Spring's + TemplateFlushMode and NHibernates FlushMode have equal + settings. + + The template flush mode. + The NHibernate flush mode. + + Returns true if both are Never, Auto, or Commit, false + otherwise. + + + + + Gets or sets if a new Session should be created when no transactional Session + can be found for the current thread. + + + true if allowed to create non-transaction session; + otherwise, false. + + +

HibernateTemplate is aware of a corresponding Session bound to the + current thread, for example when using HibernateTransactionManager. + If allowCreate is true, a new non-transactional Session will be created + if none found, which needs to be closed at the end of the operation. + If false, an InvalidOperationException will get thrown in this case. +

+
+
+ + + Gets or sets a value indicating whether to always + use a new Hibernate Session for this template. + + true if always use new session; otherwise, false. + +

+ Default is "false"; if activated, all operations on this template will + work on a new NHibernate ISession even in case of a pre-bound ISession + (for example, within a transaction). +

+

Within a transaction, a new NHibernate ISession used by this template + will participate in the transaction through using the same ADO.NET + Connection. In such a scenario, multiple Sessions will participate + in the same database transaction. +

+

Turn this on for operations that are supposed to always execute + independently, without side effects caused by a shared NHibernate ISession. +

+
+
+ + + Gets or sets the template flush mode. + + + Default is Auto. Will get applied to any new ISession + created by the template. + + The template flush mode. + + + + Gets or sets the entity interceptor that allows to inspect and change + property values before writing to and reading from the database. + + + Will get applied to any new ISession created by this object. +

Such an interceptor can either be set at the ISessionFactory level, + i.e. on LocalSessionFactoryObject, or at the ISession level, i.e. on + HibernateTemplate, HibernateInterceptor, and HibernateTransactionManager. + It's preferable to set it on LocalSessionFactoryObject or HibernateTransactionManager + to avoid repeated configuration and guarantee consistent behavior in transactions. +

+
+ The interceptor. + If object factory is not set and need to retrieve entity interceptor by name. +
+ + + Gets or sets the name of the cache region for queries executed by this template. + + + If this is specified, it will be applied to all IQuery and ICriteria objects + created by this template (including all queries through find methods). +

The cache region will not take effect unless queries created by this + template are configured to be cached via the CacheQueries property. +

+
+ The query cache region. +
+ + + Gets or sets a value indicating whether to + cache all queries executed by this template. + + + If this is true, all IQuery and ICriteria objects created by + this template will be marked as cacheable (including all + queries through find methods). +

To specify the query region to be used for queries cached + by this template, set the QueryCacheRegion property. +

+
+ true if cache queries; otherwise, false. +
+ + + Gets or sets the maximum number of rows for this HibernateTemplate. + + The max results. + + This is important + for processing subsets of large result sets, avoiding to read and hold + the entire result set in the database or in the ADO.NET driver if we're + never interested in the entire result in the first place (for example, + when performing searches that might return a large number of matches). +

Default is 0, indicating to use the driver's default.

+
+
+ + + Set whether to expose the native Hibernate Session to IHibernateCallback + code. Default is "false": a Session proxy will be returned, + suppressing close calls and automatically applying + query cache settings and transaction timeouts. + + true if expose native session; otherwise, false. + + + + Gets or sets whether to check that the Hibernate Session is not in read-only mode + in case of write operations (save/update/delete). + + + true if check that the Hibernate Session is not in read-only mode + in case of write operations; otherwise, false. + + + Default is "true", for fail-fast behavior when attempting write operations + within a read-only transaction. Turn this off to allow save/update/delete + on a Session with flush mode NEVER. + + + + + Set the object name of a Hibernate entity interceptor that allows to inspect + and change property values before writing to and reading from the database. + + + Will get applied to any new Session created by this transaction manager. +

Requires the object factory to be known, to be able to resolve the object + name to an interceptor instance on session creation. Typically used for + prototype interceptors, i.e. a new interceptor instance per session. +

+

Can also be used for shared interceptor instances, but it is recommended + to set the interceptor reference directly in such a scenario. +

+
+ The name of the entity interceptor in the object factory/application context. +
+ + + Set the object factory instance. + + The object factory instance + + + + Gets or sets the session factory that should be used to create + NHibernate ISessions. + + The session factory. + + + + Gets or sets the fetch size for this HibernateTemplate. + + The size of the fetch. + This is important for processing + large result sets: Setting this higher than the default value will increase + processing speed at the cost of memory consumption; setting this lower can + avoid transferring row data that will never be read by the application. +

Default is 0, indicating to use the driver's default.

+
+
+ + + Gets or sets the proxy factory. + + This may be useful to set if you create many instances of + HibernateTemplate and/or HibernateDaoSupport. This allows the same + ProxyFactory implementation to be used thereby limiting the + number of dynamic proxy types created in the temporary assembly, which + are never garbage collected due to .NET runtime semantics. + + The proxy factory. + + + + Set the ADO.NET exception translator for this instance. + Applied to System.Data.Common.DbException (or provider specific exception type + in .NET 1.1) thrown by callback code, be it direct + DbException or wrapped Hibernate ADOExceptions. +

The default exception translator is either a ErrorCodeExceptionTranslator + if a DbProvider is available, or a FalbackExceptionTranslator otherwise +

+
+ The ADO exception translator. +
+ + + Callback interface for NHibernate code. + + To be used with HibernateTemplate execute + method. The typical implementation will call + Session.load/find/save/update to perform + some operations on persistent objects. + + Mark Pollack (.NET) + + + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+ A result object, or null if none. +
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Hibernate-specific subclass of UncategorizedDataAccessException, + for ADO.NET exceptions that Hibernate rethrew and could not be + mapped into the DAO exception heirarchy. + + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The root exception from the underlying data access API - ADO.NET + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning the result object created within the callback. + Note that there's special support for single step actions: + see HibernateTemplate.find etc. +

+
+ The type of result object + Sree Nivask (.NET) +
+ + + Convenient super class for Hibernate data access objects. + + + Requires a SessionFactory to be set, providing a HibernateTemplate + based on it to subclasses. Can alternatively be initialized directly with + a HibernateTemplate, to reuse the latter's settings such as the SessionFactory, + exception translator, flush mode, etc + + This base call is mainly intended for HibernateTemplate usage. + + This class will create its own HibernateTemplate if only a SessionFactory + is passed in. The "allowCreate" flag on that HibernateTemplate will be "true" + by default. A custom HibernateTemplate instance can be used through overriding + CreateHibernateTemplate. + + + Sree Nivask (.NET) + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + + + + Create a HibernateTemplate for the given ISessionFactory. + + + Only invoked if populating the DAO with a ISessionFactory reference! +

Can be overridden in subclasses to provide a HibernateTemplate instance + with different configuration, or a custom HibernateTemplate subclass. +

+
+ The new HibernateTemplate instance +
+ + + Check if the hibernate template property has been set. + + If HibernateTemplate property is null. + + + + Get a Hibernate Session, either from the current transaction or + a new one. The latter is only allowed if "allowCreate" is true. + + Note that this is not meant to be invoked from HibernateTemplate code + but rather just in plain Hibernate code. Either rely on a thread-bound + Session (via HibernateInterceptor), or use it in combination with + ReleaseSession. + + In general, it is recommended to use HibernateTemplate, either with + the provided convenience operations or with a custom HibernateCallback + that provides you with a Session to work on. HibernateTemplate will care + for all resource management and for proper exception conversion. + + + if a non-transactional Session should be created when no + transactional Session can be found for the current thread + + Hibernate session. + + If the Session couldn't be created + + + if no thread-bound Session found and allowCreate false + + + + + + Convert the given HibernateException to an appropriate exception from the + org.springframework.dao hierarchy. Will automatically detect + wrapped ADO.NET Exceptions and convert them accordingly. + + HibernateException that occured. + + The corresponding DataAccessException instance + + + The default implementation delegates to SessionFactoryUtils + and convertAdoAccessException. Can be overridden in subclasses. + + + + + Close the given Hibernate Session, created via this DAO's SessionFactory, + if it isn't bound to the thread. + + + Typically used in plain Hibernate code, in combination with the + Session property and ConvertHibernateAccessException. + + The session to close. + + + + Gets or sets the hibernate template. + + Set the HibernateTemplate for this DAO explicitly, + as an alternative to specifying a SessionFactory. + + The hibernate template. + + + + Gets or sets the session factory to be used by this DAO. + Will automatically create a HibernateTemplate for the given SessionFactory. + + The session factory. + + + + Get a Hibernate Session, either from the current transaction or a new one. + The latter is only allowed if the "allowCreate" setting of this object's + HibernateTemplate is true. + + +

Note that this is not meant to be invoked from HibernateTemplate code + but rather just in plain Hibernate code. Use it in combination with + ReleaseSession. +

+

In general, it is recommended to use HibernateTemplate, either with + the provided convenience operations or with a custom HibernateCallback + that provides you with a Session to work on. HibernateTemplate will care + for all resource management and for proper exception conversion. +

+
+ The Hibernate session. +
+ + + Hibernate-specific subclass of ObjectOptimisticLockingFailureException. + + + Converts Hibernate's StaleObjectStateException. + + Mark Pollack (.NET) + $Id: HibernateOptimisticLockingFailureException.cs,v 1.2 2008/04/23 11:41:41 lahma Exp $ + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The ex. + + + + Initializes a new instance of the class. + + The StaleStateException. + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Enumeration for the various Hibernate flush modes. + + Mark Pollack (.NET) + + + Never flush is a good strategy for read-only units of work. + + + Hibernate will not track and look for changes in this case, + avoiding any overhead of modification detection. +

In case of an existing ISession, TemplateFlushMode.Never will turn + the hibenrate flush mode + to FlushMode.Never for the scope of the current operation, resetting the previous + flush mode afterwards. +

+
+
+ + Automatic flushing is the default mode for a Hibernate Session. + + + A session will get flushed on transaction commit, and on certain find + operations that might involve already modified instances, but not + after each unit of work like with eager flushing. +

In case of an existing Session, TemplateFlushMode.Auto + will participate in the existing flush mode, not modifying + it for the current operation. + This in particular means that this setting will not modify an existing + hibernate flush mode FlushMode.Never, in contrast to TemplateFlushMode.Eager. +

+
+
+ + + Eager flushing leads to immediate synchronization with the database, + even if in a transaction. + + + This causes inconsistencies to show up and throw + a respective exception immediately, and ADO access code that participates + in the same transaction will see the changes as the database is already + aware of them then. But the drawbacks are: +
    +
  • additional communication roundtrips with the database, instead of a + single batch at transaction commit;
  • +
  • the fact that an actual database rollback is needed if the Hibernate + transaction rolls back (due to already submitted SQL statements).
  • +
+

In case of an existing Session, TemplateFlushMode.Eager + will turn the NHibernate flush mode + to FlushMode.Auto for the scope of the current operation and issue a flush at the + end, resetting the previous flush mode afterwards. +

+
+
+ + + Flushing at commit only is intended for units of work where no + intermediate flushing is desired, not even for find operations + that might involve already modified instances. + + +

In case of an existing Session, TemplateFlushMode.Commit + will turn the NHibernate flush mode + to FlushMode.Commit for the scope of the current operation, resetting the previous + flush mode afterwards. The only exception is an existing flush mode + FlushMode.Never, which will not be modified through this setting. +

+
+
+ + + Holds the references and configuration settings for a instance. + + + + + Default value for property. + + + + + Default value for property. + + + + + Initialize a new instance of with default values. + + + Calling this constructor from your derived class leaves and + uninitialized. See and for more. + + + + + Initialize a new instance of with the given sessionFactory + and default values for all other settings. + + + The instance to be used for obtaining instances. + + + Calling this constructor marks all properties initialized. + + + + + Initialize a new instance of with the given values and references. + + + The instance to be used for obtaining instances. + + + Specify the to be set on each session provided by the instance. + + + Set whether to use a single session for each request. See property for details. + + + Specify the flushmode to be applied on each session provided by the instance. + + + Calling this constructor marks all properties initialized. + + + + + Override this method to resolve an instance according to your chosen strategy. + + + + + Override this method to resolve an instance according to your chosen strategy. + + + + + Gets the configured instance to be used. + + + If the entity interceptor is not set by the constructor, this property calls + to obtain an instance. This allows derived classes to + override the behaviour of how to obtain the concrete instance. + + + + + Gets the configured instance to be used. + + + If this property is requested for the first time, is called. + This allows derived classes to override the behaviour of how to obtain the concrete instance. + + If the instance cannot be resolved. + + + + Set whether to use a single session for each request. Default is "true". + If set to false, each data access operation or transaction will use + its own session (like without Open Session in View). Each of those + sessions will be registered for deferred close, though, actually + processed at request completion. + + + + + Gets or Sets the flushmode to be applied on each newly created session. + + + This property defaults to to ensure that modifying objects outside the boundaries + of a transaction will not be persisted. It is recommended to not change this value but wrap any modifying operation + within a transaction. + + + + + Implementation of SessionScope that associates a single session within the using scope. + + + It is recommended to be used in the following type of scenario: + + using (new SessionScope()) + { + ... do multiple operation, possibly in multiple transactions. + } + + At the end of "using", the session is automatically closed. All transactions within the scope use the same session, + if you are using Spring's HibernateTemplate or using Spring's implementation of NHibernate 1.2's + ICurrentSessionContext interface. + + + It is assumed that the session factory object name is called "SessionFactory". In case that you named the object + in different way you can specify your can specify it in the application settings using the key + Spring.Data.NHibernate.Support.SessionScope.SessionFactoryObjectName. Values for EntityInterceptorObjectName + and SingleSessionMode can be specified similarly. + + + Note: + The session is managed on a per thread basis on the thread that opens the scope instance. This means that you must + never pass a reference to a instance over to another thread! + + + Robert M. (.NET) + Harald Radi (.NET) + + + + The logging instance. + + + + + Initializes a new instance of the class in single session mode, + associating a session with the thread. The session is opened lazily on demand. + + + + + Initializes a new instance of the class. + + + If set to true associate a session with the thread. If false, another + collaborating class will associate the session with the thread, potentially by calling + the Open method on this class. + + + + + Initializes a new instance of the class. + + + The name of the configuration section to read configuration settings from. + See for more info. + + + If set to true associate a session with the thread. If false, another + collaborating class will associate the session with the thread, potentially by calling + the Open method on this class. + + + + + Initializes a new instance of the class. + + + The name of the configuration section to read configuration settings from. + See for more info. + + The type, who's full name is used for prefixing appSetting keys + + If set to true associate a session with the thread. If false, another + collaborating class will associate the session with the thread, potentially by calling + the Open method on this class. + + + + + Initializes a new instance of the class. + + + The instance to be used for obtaining instances. + + + If set to true associate a session with the thread. If false, another + collaborating class will associate the session with the thread, potentially by calling + the Open method on this class. + + + + + Initializes a new instance of the class. + + + The instance to be used for obtaining instances. + + + Specify the to be set on each session provided by this instance. + + + Set whether to use a single session for each request. See property for details. + + + Specify the flushmode to be applied on each session provided by this instance. + + + If set to true associate a session with the thread. If false, another + collaborating class will associate the session with the thread, potentially by calling + the Open method on this class. + + + + + Initializes a new instance of the class. + + An instance holding the scope configuration + + If set to true associate a session with the thread. If false, another + collaborating class will associate the session with the thread, potentially by calling + the Open method on this class. + + + + + Sets a flag, whether this scope is in "open" state on the current logical thread. + + + + + Gets/Sets a flag, whether this scope manages it's own session for the current logical thread or not. + + false if session is managed by this module. false otherwise + + + + Call Close(), + + + + + Opens a new session or participates in an existing session and + registers with spring's . + + + + + Close the current view's session and unregisters + from spring's . + + + + + Set whether to use a single session for each request. Default is "true". + If set to false, each data access operation or transaction will use + its own session (like without Open Session in View). Each of those + sessions will be registered for deferred close, though, actually + processed at request completion. + + + + + Gets the flushmode to be applied on each newly created session. + + + This property defaults to to ensure that modifying objects outside the boundaries + of a transaction will not be persisted. It is recommended to not change this value but wrap any modifying operation + within a transaction. + + + + + Get or set the configured SessionFactory + + + + + Get or set the configured EntityInterceptor + + + + + Gets a flag, whether this scope is in "open" state on the current logical thread. + + + + + Gets a flag, whether this scope manages it's own session for the current logical thread or not. + + + + + This sessionHolder creates a default session only if it is needed. + + + Although a NHibernateSession deferes creation of db-connections until they are really + needed, instantiation a session is imho still more expensive than this LazySessionHolder. (EE) + + + + + Session holder, wrapping a NHibernate ISession and a NHibernate Transaction. + HibernateTransactionManager binds instances of this class + to the thread, for a given ISessionFactory. + + + Note: This is an SPI class, not intended to be used by applications. + + Mark Pollack (.NET) + + + + May be used by derived classes to create an empty SessionHolder. + + + When using this ctor in your derived class, you MUST override ! + + + + + Initializes a new instance of the class. + + The session. + + + + Initializes a new instance of the class. + + The key to store the session under. + The hibernate session. + + + + May be overridden in a derived class to e.g. lazily create a session + + + + + Gets the session given key identifier + + The key. + A hibernate session + + + + Gets the session given the key and removes the session from + the dictionary storage. + + The key. + A hibernate session + + + + Adds the session to the dictionary storage using the default key. + + The hibernate session. + + + + Adds the session to the dictionary storage using the supplied key. + + The key. + The hibernate session. + + + + Removes the session from the dictionary storage for the given key. + + The key. + The session that was previously contained in the + dictionary storage. + + + + Determines whether the holder the specified session. + + The session. + + true if the holder contains the specified session; otherwise, false. + + + + + Clear the transaction state of this resource holder. + + + + + Gets the session using the default key + + The hibernate session. + + + + Gets the first session based on iteration over + the IDictionary storage. + + Any hibernate session. + + + + Gets a value indicating whether dictionary of + hibernate sessions is empty. + + + true if this session holder is empty; otherwise, false. + + + + + Gets a value indicating whether this SessionHolder + does not hold non default session. + + + true if does not hold non default session; otherwise, false. + + + + + Gets or sets the hibernate transaction. + + The transaction. + + + + Gets or sets the ADO.NET Connection used to create the session. + + The ADO.NET connection. + + + + Gets or sets the previous flush mode. + + The previous flush mode. + + + + Gets a value indicating whether the PreviousFlushMode property + was set. + + + true if assigned PreviousFlushMode property; otherwise, false. + + + + + Gets the validated session. + + The validated session. + + + + Initialize a new instance. + + + + + Create a new session on demand + + + + + Ensure session is closed (if any) and remove circular references to avoid memory leaks! + + + + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning a result object created within the callback, i.e. + a domain object or a collection of domain objects. Note that there's + special support for single step actions: see HibernateTemplate.find etc. +

+
+
+ + + Provide support for the open session in view pattern for lazily loaded hibernate objects + used in ASP.NET pages. + + jjx: http://forum.springframework.net/member.php?u=29 + Mark Pollack (.NET) + Erich Eichinger + Harald Radi + + + + Initializes a new instance of the class. Creates a SessionScope, + but does not yet associate a session with a thread, that is lef to the lifecycle of the request. + + + + + Register context handler and look up SessionFactoryObjectName under the application configuration key, + Spring.Data.NHibernate.Support.OpenSessionInViewModule.SessionFactoryObjectName if not using the default value + (i.e. sessionFactory) and look up the SingleSession setting under the application configuration key, + Spring.Data.NHibernate.Support.OpenSessionInViewModule.SingleSession if not using the default value of true. + + The standard HTTP application context + + + + A do nothing dispose method. + + + + + Hibernate-specific subclass of UncategorizedDataAccessException, + for Hibernate system errors that do not match any concrete + Spring.Dao exceptions. + + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The cause. + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Hibernate-specific subclass of InvalidDataAccessResourceUsageException, + thrown on invalid HQL query syntax. + + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The ex. + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Gets the query string that was invalid. + + The query string that was invalid. + + + + Gets called by HibernateTemplate with an active + Hibernate Session. Does not need to care about activating or closing + the Session, or handling transactions. + + +

+ Allows for returning an IList of result objects created within the callback. + Note that there's special support for single step actions: + see HibernateTemplate.find etc. +

+
+ The type of result object + Sree Nivask (.NET) +
+ + + Hibernate-specific subclass of ObjectRetrievalFailureException. + + + Converts Hibernate's UnresolvableObjectException, ObjectNotFoundException, + ObjectDeletedException, and WrongClassException. + + Mark Pollack (.NET) + $Id: HibernateObjectRetrievalFailureException.cs,v 1.1 2008/04/07 20:12:53 lahma Exp $ + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The ex. + + + + Initializes a new instance of the class. + + The ex. + + + + Initializes a new instance of the class. + + The ex. + + + + Initializes a new instance of the class. + + The ex. + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Convenient super class for Hibernate data access objects. + + + Requires a SessionFactory to be set, providing a HibernateTemplate + based on it to subclasses. Can alternatively be initialized directly with + a HibernateTemplate, to reuse the latter's settings such as the SessionFactory, + exception translator, flush mode, etc + + This base call is mainly intended for HibernateTemplate usage. + + This class will create its own HibernateTemplate if only a SessionFactory + is passed in. The "allowCreate" flag on that HibernateTemplate will be "true" + by default. A custom HibernateTemplate instance can be used through overriding + CreateHibernateTemplate. + + + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + + + + Create a HibernateTemplate for the given ISessionFactory. + + + Only invoked if populating the DAO with a ISessionFactory reference! +

Can be overridden in subclasses to provide a HibernateTemplate instance + with different configuration, or a custom HibernateTemplate subclass. +

+
+
+ + + Check if the hibernate template property has been set. + + + + + Get a Hibernate Session, either from the current transaction or + a new one. The latter is only allowed if "allowCreate" is true. + + Note that this is not meant to be invoked from HibernateTemplate code + but rather just in plain Hibernate code. Either rely on a thread-bound + Session (via HibernateInterceptor), or use it in combination with + ReleaseSession. + + In general, it is recommended to use HibernateTemplate, either with + the provided convenience operations or with a custom HibernateCallback + that provides you with a Session to work on. HibernateTemplate will care + for all resource management and for proper exception conversion. + + + if a non-transactional Session should be created when no + transactional Session can be found for the current thread + + Hibernate session. + + If the Session couldn't be created + + + if no thread-bound Session found and allowCreate false + + + + + + Convert the given HibernateException to an appropriate exception from the + org.springframework.dao hierarchy. Will automatically detect + wrapped ADO.NET Exceptions and convert them accordingly. + + HibernateException that occured. + + The corresponding DataAccessException instance + + + The default implementation delegates to SessionFactoryUtils + and convertAdoAccessException. Can be overridden in subclasses. + + + + + Close the given Hibernate Session, created via this DAO's SessionFactory, + if it isn't bound to the thread. + + + Typically used in plain Hibernate code, in combination with the + Session property and ConvertHibernateAccessException. + + The session to close. + + + + Gets or sets the hibernate template. + + Set the HibernateTemplate for this DAO explicitly, + as an alternative to specifying a SessionFactory. + + The hibernate template. + + + + Gets or sets the session factory to be used by this DAO. + Will automatically create a HibernateTemplate for the given SessionFactory. + + The session factory. + + + + Get a Hibernate Session, either from the current transaction or a new one. + The latter is only allowed if the "allowCreate" setting of this object's + HibernateTemplate is true. + + +

Note that this is not meant to be invoked from HibernateTemplate code + but rather just in plain Hibernate code. Use it in combination with + ReleaseSession. +

+

In general, it is recommended to use HibernateTemplate, either with + the provided convenience operations or with a custom HibernateCallback + that provides you with a Session to work on. HibernateTemplate will care + for all resource management and for proper exception conversion. +

+
+ The Hibernate session. +
+ + + An IFactoryObject that creates a local Hibernate SessionFactory instance. + Behaves like a SessionFactory instance when used as bean reference, + e.g. for HibernateTemplate's "SessionFactory" property. + + + The typical usage will be to register this as singleton factory + in an application context and give objects references to application services + that need it. + + Hibernate configuration settings can be set using the IDictionary property 'HibernateProperties'. + + + This class implements the interface, + as autodetected by Spring's + for AOP-based translation of PersistenceExceptionTranslationPostProcessor. + Hence, the presence of e.g. LocalSessionFactoryBean automatically enables + a PersistenceExceptionTranslationPostProcessor to translate Hibernate exceptions. + + + Mark Pollack (.NET) + $Id: LocalSessionFactoryObject.cs,v 1.2 2008/05/01 12:50:34 lahma Exp $ + + + + TODO: consider changing to NamevalueCollection for easier + cut-n-paste from existing App.config based configurations. + + + + + The shared instance for this class (and derived classes). + + + + + Initializes a new instance of the class. + + + + + Return the singleon session factory. + + The singleon session factory. + + + + Initialize the SessionFactory for the given or the + default location. + + + + + Close the SessionFactory on application context shutdown. + + + + + Subclasses can override this method to perform custom initialization + of the Configuration instance used for ISessionFactory creation. + + + The properties of this LocalSessionFactoryObject will be applied to + the Configuration object that gets returned here. +

The default implementation creates a new Configuration instance. + A custom implementation could prepare the instance in a specific way, + or use a custom Configuration subclass. +

+
+ The configuration instance. +
+ + + To be implemented by subclasses that want to to register further mappings + on the Configuration object after this FactoryObject registered its specified + mappings. + + + Invoked before the BuildMappings call, + so that it can still extend and modify the mapping information. + + the current Configuration object + + + + To be implemented by subclasses that want to to perform custom + post-processing of the Configuration object after this FactoryObject + performed its default initialization. + + The current configuration object. + + + + Executes schema update if requested. + + + + + Execute schema drop script, determined by the Configuration object + used for creating the SessionFactory. A replacement for NHibernate's + SchemaExport class, to be invoked on application setup. + + + Fetch the LocalSessionFactoryBean itself rather than the exposed + SessionFactory to be able to invoke this method, e.g. via + LocalSessionFactoryObject lsfb = (LocalSessionFactoryObject) ctx.GetObject("mySessionFactory");. +

+ Uses the SessionFactory that this bean generates for accessing a ADO.NET + connection to perform the script. +

+
+
+ + + Execute schema creation script, determined by the Configuration object + used for creating the SessionFactory. A replacement for NHibernate's + SchemaExport class, to be invoked on application setup. + + + Fetch the LocalSessionFactoryObject itself rather than the exposed + SessionFactory to be able to invoke this method, e.g. via + LocalSessionFactoryObject lsfo = (LocalSessionFactoryObject) ctx.GetObject("mySessionFactory");. +

+ Uses the SessionFactory that this bean generates for accessing a ADO.NET + connection to perform the script. +

+
+
+ + + Execute schema update script, determined by the Configuration object + used for creating the SessionFactory. A replacement for NHibernate's + SchemaUpdate class, for automatically executing schema update scripts + on application startup. Can also be invoked manually. + + + Fetch the LocalSessionFactoryObject itself rather than the exposed + SessionFactory to be able to invoke this method, e.g. via + LocalSessionFactoryObject lsfo = (LocalSessionFactoryObject) ctx.GetObject("mySessionFactory");. +

+ Uses the SessionFactory that this bean generates for accessing a ADO.NET + connection to perform the script. +

+
+
+ + + Execute the given schema script on the given ADO.NET Connection. + + + Note that the default implementation will log unsuccessful statements + and continue to execute. Override the ExecuteSchemaStatement + method to treat failures differently. + + The connection to use. + The SQL statement to execute. + + + + Execute the given schema SQL on the given ADO.NET command. + + + Note that the default implementation will log unsuccessful statements + and continue to execute. Override this method to treat failures differently. + + + + + + + Subclasses can override this method to perform custom initialization + of the SessionFactory instance, creating it via the given Configuration + object that got prepared by this LocalSessionFactoryObject. + + +

The default implementation invokes Configuration's BuildSessionFactory. + A custom implementation could prepare the instance in a specific way, + or use a custom ISessionFactory subclass. +

+
+ The ISessionFactory instance. +
+ + + Implementation of the PersistenceExceptionTranslator interface, + as autodetected by Spring's PersistenceExceptionTranslationPostProcessor. + Converts the exception if it is a HibernateException; + else returns null to indicate an unknown exception. + translate the given exception thrown by a persistence framework to a + corresponding exception from Spring's generic DataAccessException hierarchy, + if possible. + + The exception thrown. + + the corresponding DataAccessException (or null if the + exception could not be translated. + + + + + + Convert the given HibernateException to an appropriate exception from the + Spring's DAO Exception hierarchy. + Will automatically apply a specified IAdoExceptionTranslator to a + Hibernate ADOException, else rely on Hibernate's default translation. + + The Hibernate exception that occured. + A corresponding DataAccessException + + + + Converts the ADO.NET access exception to an appropriate exception from the + org.springframework.dao hierarchy. Can be overridden in subclasses. + + ADOException that occured, wrapping underlying ADO.NET exception. + + the corresponding DataAccessException instance + + + + + Sets the assemblies to load that contain mapping files. + + The mapping assemblies. + + + + Sets the hibernate configuration files to load, i.e. hibernate.cfg.xml. + + + + + Sets the locations of Spring IResources that contain mapping + files. + + The location of mapping resources. + + + + Return the Configuration object used to build the SessionFactory. + Allows access to configuration metadata stored there (rarely needed). + + The hibernate configuration. + + + + Set NHibernate configuration properties, like "hibernate.dialect". + + The hibernate properties. + +

Can be used to override values in a NHibernate XML config file, + or to specify all necessary properties locally. +

+

Note: Do not specify a transaction provider here when using + Spring-driven transactions. It is also advisable to omit connection + provider settings and use a Spring-set IDbProvider instead. +

+
+
+ + + Get or set the DataSource to be used by the SessionFactory. + + The db provider. + + If set, this will override corresponding settings in Hibernate properties. + Note: If this is set, the Hibernate settings should not define + a connection string + (hibernate.connection.connection_string) to avoid meaningless double configuration. + + + + + + Gets or sets a value indicating whether to expose a transaction aware session factory. + + + true if want to expose transaction aware session factory; otherwise, false. + + + + + Set a NHibernate entity interceptor that allows to inspect and change + property values before writing to and reading from the database. + Will get applied to any new Session created by this factory. +

Such an interceptor can either be set at the SessionFactory level, i.e. on + LocalSessionFactoryObject, or at the Session level, i.e. on HibernateTemplate, + HibernateInterceptor, and HibernateTransactionManager. It's preferable to set + it on LocalSessionFactoryObject or HibernateTransactionManager to avoid repeated + configuration and guarantee consistent behavior in transactions.

+
+ + +
+ + + Set a Hibernate NamingStrategy for the SessionFactory, determining the + physical column and table names given the info in the mapping document. + + + + + Specify the Hibernate type definitions to register with the SessionFactory, + as Spring IObjectDefinition instances. This is an alternative to specifying + <typedef> elements in Hibernate mapping files. +

Unfortunately, Hibernate itself does not define a complete object that + represents a type definition, hence the need for Spring's TypeDefinitionBean.

+ @see TypeDefinitionBean + @see org.hibernate.cfg.Mappings#addTypeDef(String, String, java.util.Properties) +
+
+ + + Specify the NHibernate FilterDefinitions to register with the SessionFactory. + This is an alternative to specifying <filter-def> elements in + Hibernate mapping files. + + + Typically, the passed-in FilterDefinition objects will have been defined + as Spring FilterDefinitionFactoryBeans, probably as inner beans within the + LocalSessionFactoryObject definition. + + + + + + Specify the cache strategies for entities (persistent classes or named entities). + This configuration setting corresponds to the <class-cache> entry + in the "hibernate.cfg.xml" configuration format. +

For example: +

+            <property name="entityCacheStrategies">
+              <props>
+                <prop key="MyCompany.Customer">read-write</prop>
+                <prop key="MyCompany.Product">read-only,myRegion</prop>
+              </props>
+            </property>
+

+
+
+ + + Specify the cache strategies for persistent collections (with specific roles). + This configuration setting corresponds to the <collection-cache> entry + in the "hibernate.cfg.xml" configuration format. +

For example: +

+            <property name="CollectionCacheStrategies">
+              <props>
+                <prop key="MyCompany.Order.Items">read-write</prop>
+                <prop key="MyCompany.Product.Categories">read-only,myRegion</prop>
+              </props>
+            </property>
+

+
+
+ + + Specify the NHibernate event listeners to register, with listener types + as keys and listener objects as values. +

+ Instead of a single listener object, you can also pass in a list + or set of listeners objects as value. +

+
+ listener objects as values + + See the NHibernate documentation for further details on listener types + and associated listener interfaces. + +
+ + + Set whether to execute a schema update after SessionFactory initialization. +

+ For details on how to make schema update scripts work, see the NHibernate + documentation, as this class leverages the same schema update script support + in as NHibernate's own SchemaUpdate tool. +

+
+
+ + + Set the ADO.NET exception translator for this instance. + Applied to System.Data.Common.DbException (or provider specific exception type + in .NET 1.1) thrown by callback code, be it direct + DbException or wrapped Hibernate ADOExceptions. +

The default exception translator is either a ErrorCodeExceptionTranslator + if a DbProvider is available, or a FalbackExceptionTranslator otherwise +

+
+ The ADO exception translator. +
+ + + Return the type or subclass. + + The type created by this factory + + + + Returns true + + true + + + + Convenient FactoryObject for defining Hibernate FilterDefinitions. + Exposes a corresponding Hibernate FilterDefinition object. + + + +

+ Typically defined as an inner object within a LocalSessionFactoryObject + definition, as the list element for the "filterDefinitions" object property. + For example: +

+ +
+            <objectn id="sessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate">
+              ...
+              <property name="FilterDefinitions">
+               <list>
+                  <object type="Spring.Data.NHibernate.FilterDefinitionFactoryObject, Spring.Data.NHibernate">
+                    <property name="FilterName" value="myFilter"/>
+                    <property name="ParameterTypes">
+                      <props>
+                        <prop key="MyParam">string</prop>
+                        <prop key="MyOtherParam">long</prop>
+                      </props>
+                    </property>
+                  </object>
+                </list>
+              </property>
+              ...
+            </object>
+            
+

+ Alternatively, specify an object id (or name) attribute for the inner object, + instead of the "FilterName" property. +

+
+ Juergen Hoeller + Marko Lahma (.NET) + + + $Id: FilterDefiniitionFactoryObject.cs,v 1.1 2008/04/07 20:12:53 lahma Exp $ +
+ + + Initializes the filter definitions. + + + + + Returns the singleton filter definition. + + + + + + Set the name of the filter. + + + + + Set the parameter types for the filter, + with parameter names as keys and type names as values. + + + + + + Specify a default filter condition for the filter, if any. + + + + + If no explicit filter name has been specified, the object name of + the FilterDefinitionFactoryObject will be used. + + + + + + Returns the type of the object this factory produces. + + + + + Returns whether this factory produces singletons, always true. + + + + + Helper class featuring methods for Hibernate Session handling, + allowing for reuse of Hibernate Session instances within transactions. + Also provides support for exception translation. + + Mark Pollack (.NET) + + + + The instance for this class. + + + + + The ordering value for synchronizaiton this session resources. + Set to be lower than ADO.NET synchronization. + + + + + Initializes a new instance of the class. + + + + + Get a new Hibernate Session from the given SessionFactory. + Will return a new Session even if there already is a pre-bound + Session for the given SessionFactory. + + + Within a transaction, this method will create a new Session + that shares the transaction's ADO.NET Connection. More specifically, + it will use the same ADO.NET Connection as the pre-bound Hibernate Session. + + The session factory to create the session with. + The Hibernate entity interceptor, or null if none. + The new session. + If could not open Hibernate session + + + + Get a Hibernate Session for the given SessionFactory. Is aware of and will + return any existing corresponding Session bound to the current thread, for + example when using HibernateTransactionManager. Will always create a new + Session otherwise. + + + Supports setting a Session-level Hibernate entity interceptor that allows + to inspect and change property values before writing to and reading from the + database. Such an interceptor can also be set at the SessionFactory level + (i.e. on LocalSessionFactoryObject), on HibernateTransactionManager, or on + HibernateInterceptor/HibernateTemplate. + + The session factory to create the + session with. + Hibernate entity interceptor, or null if none. + AdoExceptionTranslator to use for flushing the + Session on transaction synchronization (can be null; only used when actually + registering a transaction synchronization). + The Hibernate Session + + If the session couldn't be created. + + + If no thread-bound Session found and allowCreate is false. + + + + + Get a Hibernate Session for the given SessionFactory. Is aware of and will + return any existing corresponding Session bound to the current thread, for + example when using . Will create a new Session + otherwise, if allowCreate is true. + + The session factory to create the session with. + if set to true create a non-transactional Session when no + transactional Session can be found for the current thread. + The hibernate session + + If the session couldn't be created. + + + If no thread-bound Session found and allowCreate is false. + + + + + Get a Hibernate Session for the given SessionFactory. + + Is aware of and will return any existing corresponding + Session bound to the current thread, for example whenusing + . Will create a new + Session otherwise, if "allowCreate" is true. +

Throws the orginal HibernateException, in contrast to + . +

+ The session factory. + if set to true [allow create]. + The Hibernate Session + + if the Session couldn't be created + + + If no thread-bound Session found and allowCreate is false. + +
+ + + Open a new Session from the factory. + + The session factory to create the session with. + Hibernate entity interceptor, or null if none. + the newly opened session + + + + Perform the actual closing of the Hibernate Session + catching and logging any cleanup exceptions thrown. + + The hibernate session to close + + + + Return whether the given Hibernate Session is transactional, that is, + bound to the current thread by Spring's transaction facilities. + + The hibernate session to check + The session factory that the session + was created with, can be null. + + true if the session transactional; otherwise, false. + + + + + Convert the given HibernateException to an appropriate exception from the + Spring.Dao hierarchy. Note that it is advisable to + handle AdoException specifically by using a AdoExceptionTranslator for the + underlying ADO.NET exception. + + The Hibernate exception that occured. + DataAccessException instance + + + + Close the given Session, created via the given factory, + if it is not managed externally (i.e. not bound to the thread). + + The hibernate session to close + The hibernate SessionFactory that + the session was created with. + + + + Close the given Session or register it for deferred close. + + The session. + The session factory. + + + + Initialize deferred close for the current thread and the given SessionFactory. + Sessions will not be actually closed on close calls then, but rather at a + processDeferredClose call at a finishing point (like request completion). + + The session factory. + + + + Return if deferred close is active for the current thread + and the given SessionFactory. + The session factory. + + true if [is deferred close active] [the specified session factory]; otherwise, false. + + If SessionFactory argument is null. + + + + Process Sessions that have been registered for deferred close + for the given SessionFactory. + + The session factory. + If there is no session factory associated with the thread. + + + + Applies the current transaction timeout, if any, to the given + criteria object + + The Hibernate Criteria object. + Hibernate SessionFactory that the Criteria was created for + (can be null). + If criteria argument is null. + + + + Applies the current transaction timeout, if any, to the given + Hibenrate query object. + + The Hibernate Query object. + Hibernate SessionFactory that the Query was created for + (can be null). + If query argument is null. + + + + Gets the Spring IDbProvider given the ISessionFactory. + + The matching is performed by comparing the assembly qualified + name string of the hibernate Driver.ConnectionType to those in + the DbProviderFactory definitions. No connections are created + in performing this comparison. + The session factory. + The corresponding IDbProvider, null if no mapping was found. + If DbProviderFactory's ApplicaitonContext is not + an instance of IConfigurableApplicaitonContext. + + + + Create a IAdoExceptionTranslator from the given SessionFactory. + + If a corresponding IDbProvider is found, a ErrorcodeExceptionTranslator + for the IDbProvider is created. Otherwise, a FallbackException is created. + The session factory to create the translator for + An IAdoExceptionTranslator + + + + Holds the references and configuration settings for a instance. + References are resolved by looking up the given object names in the root obtained by . + + + + + The default session factory name to use when retrieving the Hibernate session factory from + the root context. + + + + + Initializes a new instance. + + The type, who's name will be used to prefix setting variables with + + + + Initializes a new instance. + + The type, who's name will be used to prefix setting variables with + The configuration section to read setting variables from. + + + + Initializes a new instance. + + The type, who's name will be used to prefix setting variables with + The variable source to obtain settings from. + + + + Resolve the entityInterceptor by looking up + in the root application context. + + The resolved instance or + + + + Resolve the by looking up + in the root application context. + + The resolved instance or + + + + Implementation of NHibernates 1.2's ICurrentSessionContext interface + that delegates to Spring's SessionFactoryUtils for providing a + Spirng-managed current Session. + + Used by Spring's LocalSessionFactoryBean if told to expose + a transaction-aware SessionFactory. +

This ICurrentSessionContext implementation can also be specified in + custom ISessionFactory setup through the + "hibernate.current_session_context_class" property, with the fully + qualified name of this class as value.

+ Juergen Hoeller + Mark Pollack (.NET) + +
+ + + Initializes a new instance of the class + + The NHibernate session factory. + + + + Retrieve the Spring-managed Session for the current thread. + + Current session associated with the thread + On errors retrieving thread bound session. + +
+
diff --git a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/DbProviderTemplateTests.cs b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/DbProviderTemplateTests.cs index 55859c56..5980a779 100644 --- a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/DbProviderTemplateTests.cs +++ b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/DbProviderTemplateTests.cs @@ -44,16 +44,11 @@ namespace Spring.Data.NHibernate public void SetUp() { BasicConfigurator.Configure(); -#if NH_2_1 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/dbProviderTemplateTests.xml"); -#elif NH_2_0 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate/dbProviderTemplateTests.xml"); -#else - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate/dbProviderTemplateTests.xml"); -#endif + string assemblyName = GetType().Assembly.GetName().Name; + ctx = new XmlApplicationContext("assembly://" + assemblyName + "/Spring.Data.NHibernate/dbProviderTemplateTests.xml"); + userCredentialsDbProvider = ctx["DbProvider"] as UserCredentialsDbProvider; Assert.IsNotNull(userCredentialsDbProvider); - } [Test] diff --git a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/MultipleDbTests.cs b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/MultipleDbTests.cs index 3df4d555..0fa91d00 100644 --- a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/MultipleDbTests.cs +++ b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/MultipleDbTests.cs @@ -72,14 +72,8 @@ namespace Spring.Data.NHibernate public void SetUp() { BasicConfigurator.Configure(); -#if NH_2_1 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/MultipleDbTests.xml"); -#elif NH_2_0 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate/MultipleDbTests.xml"); -#else - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate/MultipleDbTests.xml"); -#endif - + string assemblyName = GetType().Assembly.GetName().Name; + ctx = new XmlApplicationContext("assembly://" + assemblyName + "/Spring.Data.NHibernate/MultipleDbTests.xml"); } // TODO: this test fails - check out why diff --git a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NHDAOTests.cs b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NHDAOTests.cs index 21178165..f89f091f 100644 --- a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NHDAOTests.cs +++ b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NHDAOTests.cs @@ -64,15 +64,10 @@ namespace Spring.Data.NHibernate public void SetUp() { BasicConfigurator.Configure(); - -#if NH_2_1 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/NHDAOTests.xml"); -#elif NH_2_0 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate/NHDAOTests.xml"); -#else - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate/NHDAOTests.xml"); -#endif + string assemblyName = GetType().Assembly.GetName().Name; + ctx = new XmlApplicationContext("assembly://" + assemblyName + "/Spring.Data.NHibernate/NHDAOTests.xml"); ctx.Name = AbstractApplicationContext.DefaultRootContextName; + if (!ContextRegistry.IsContextRegistered(AbstractApplicationContext.DefaultRootContextName)) { ContextRegistry.RegisterContext(ctx); diff --git a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NativeNHTests.cs b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NativeNHTests.cs index 961b40b5..df61cde4 100644 --- a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NativeNHTests.cs +++ b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/NativeNHTests.cs @@ -55,13 +55,9 @@ namespace Spring.Data.NHibernate public void CreateNative() { IApplicationContext ctx; -#if NH_2_1 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/templateTests.xml"); -#elif NH_2_0 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate/templateTests.xml"); -#else - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate/templateTests.xml"); -#endif + string assemblyName = GetType().Assembly.GetName().Name; + ctx = new XmlApplicationContext("assembly://" + assemblyName + "/Spring.Data.NHibernate/templateTests.xml"); + ITestObjectDao dao = (ITestObjectDao)ctx.GetObject("nativeNHTestObjectDao"); TestObject toGeorge = new TestObject(); diff --git a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/TemplateTests.cs b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/TemplateTests.cs index 330ae007..83929ebf 100644 --- a/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/TemplateTests.cs +++ b/test/Spring/Spring.Data.NHibernate.Integration.Tests/Data/NHibernate/TemplateTests.cs @@ -81,13 +81,9 @@ namespace Spring.Data.NHibernate { //NamespaceParserRegistry.RegisterParser(typeof(DatabaseNamespaceParser)); BasicConfigurator.Configure(); -#if NH_2_1 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate21.Integration.Tests/Spring.Data.NHibernate/templateTests.xml"); -#elif NH_2_0 - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate20.Integration.Tests/Spring.Data.NHibernate/templateTests.xml"); -#else - ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate.Integration.Tests/Spring.Data.NHibernate/templateTests.xml"); -#endif + string assemblyName = GetType().Assembly.GetName().Name; + ctx = new XmlApplicationContext("assembly://" + assemblyName + "/Spring.Data.NHibernate/templateTests.xml"); + dbProvider = ctx["DbProvider"] as IDbProvider; transactionManager = ctx["hibernateTransactionManager"] as IPlatformTransactionManager; CleanupDatabase(dbProvider.CreateConnection()); diff --git a/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/Config/AopConfiguration.cs b/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/Config/AopConfiguration.cs index 1a07ed2c..feb4f3ef 100644 --- a/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/Config/AopConfiguration.cs +++ b/test/Spring/Spring.Data.NHibernate.Tests/Data/NHibernate/Config/AopConfiguration.cs @@ -47,14 +47,6 @@ namespace Spring.Data.NHibernate.Config "assembly://{0}/Spring.Data.NHibernate.Config/AopConfiguration.xml" , this.GetType().Assembly.GetName().Name); ctx = new XmlApplicationContext(aopConfigPath); -//#if NH_2_1 -// ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate21.Tests/Spring.Data.NHibernate.Config/AopConfiguration.xml"); -//#elif NH_2_0 -// ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate20.Tests/Spring.Data.NHibernate.Config/AopConfiguration.xml"); -//#else -// ctx = new XmlApplicationContext("assembly://Spring.Data.NHibernate.Tests/Spring.Data.NHibernate.Config/AopConfiguration.xml"); -//#endif - } [Test] diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/AssemblyInfo.cs b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/AssemblyInfo.cs new file mode 100644 index 00000000..25b927a6 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/AssemblyInfo.cs @@ -0,0 +1,4 @@ +using System.Reflection; + +[assembly: AssemblyTitle("Spring.Data.NHibernate30 Integration Tests")] +[assembly: AssemblyDescription("Integration tests for Spring.Data.NHibernate30 assembly")] diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/Credit.hbm.xml b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/Credit.hbm.xml new file mode 100644 index 00000000..839d8d20 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/Credit.hbm.xml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/Debit.hbm.xml b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/Debit.hbm.xml new file mode 100644 index 00000000..c417592a --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/Debit.hbm.xml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/MultipleDbTests.xml b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/MultipleDbTests.xml new file mode 100644 index 00000000..d1fe79cf --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/MultipleDbTests.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + Spring.Data.NHibernate30.Integration.Tests + + + + + + + + + + + + + + + + + + + + + + + Spring.Data.NHibernate30.Integration.Tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transactionInterceptor + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/NHDAOTests.xml b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/NHDAOTests.xml new file mode 100644 index 00000000..3ac42488 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/NHDAOTests.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + Spring.Data.NHibernate30.Integration.Tests + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transactionInterceptor + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/TestObject.hbm.xml b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/TestObject.hbm.xml new file mode 100644 index 00000000..5e3b567b --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/TestObject.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/dbProviderTemplateTests.xml b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/dbProviderTemplateTests.xml new file mode 100644 index 00000000..5925dc92 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/dbProviderTemplateTests.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + assembly://Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/templateTests.xml b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/templateTests.xml new file mode 100644 index 00000000..9f8a10fd --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Data/NHibernate/templateTests.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + assembly://Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.2008.csproj b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.2008.csproj new file mode 100644 index 00000000..605ab9d5 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.2008.csproj @@ -0,0 +1,173 @@ + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {93FED0CE-0B01-43AF-8CB1-244CC7C3308B} + Library + Properties + Spring + Spring.Data.NHibernate30.Integration.Tests + + + true + full + false + ..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Integration.Tests\Debug\ + TRACE;DEBUG;NET_2_0,NH_2_0,NH_2_1 + prompt + 4 + + + pdbonly + true + ..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Integration.Tests\Release\ + TRACE;NET_2_0,NH_2_0,NH_2_1 + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\Iesi.Collections.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\LinFu.DynamicProxy.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\log4net.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\NHibernate.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\NHibernate.ByteCode.LinFu.dll + + + False + ..\..\..\lib\Net\2.0\nunit.framework.dll + + + + + + + + Data\NHibernate\AccountCreditDao.cs + + + Data\NHibernate\AccountDebitDao.cs + + + Data\NHibernate\AccountManager.cs + + + Data\NHibernate\AuditDao.cs + + + Data\NHibernate\Credit.cs + + + Data\NHibernate\DbProviderTemplateTests.cs + + + Data\NHibernate\Debit.cs + + + Data\NHibernate\IAccountCreditDao.cs + + + Data\NHibernate\IAccountDebitDao.cs + + + Data\NHibernate\IAccountManager.cs + + + Data\NHibernate\IAuditDao.cs + + + Data\NHibernate\ITestObjectDao.cs + + + Data\NHibernate\MultipleDbTests.cs + + + Data\NHibernate\NativeNHTestObjectDao.cs + + + Data\NHibernate\NativeNHTests.cs + + + Data\NHibernate\NHDAOTests.cs + + + Data\NHibernate\NHTestObjectDao.cs + + + Data\NHibernate\TemplateTests.cs + + + Data\NHibernate\TestObject.cs + + + + + + Data\NHibernate\creditdebit.sql + + + + + + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} + Spring.Aop.2008 + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2008 + + + {71368632-B8B7-4A6A-8C65-8DA848120C82} + Spring.Data.NHibernate30.2008 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2008 + + + + + + + + + + + + + + + + + + + echo "Copying .xml files for tests" +xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Integration.Tests\$(ConfigurationName)\ /y /s /q /d +xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Integration.Tests\$(ConfigurationName)\ /y /s /q + + \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.build b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.build new file mode 100644 index 00000000..e9b3f5a0 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.build @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.dll.config b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.dll.config new file mode 100644 index 00000000..12e5ecbf --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Integration.Tests/Spring.Data.NHibernate30.Integration.Tests.dll.config @@ -0,0 +1,40 @@ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate30.Tests/AssemblyInfo.cs b/test/Spring/Spring.Data.NHibernate30.Tests/AssemblyInfo.cs new file mode 100644 index 00000000..3da885ea --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Tests/AssemblyInfo.cs @@ -0,0 +1,5 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyTitle("Spring.Data.NHibernate Integration Tests")] +[assembly: AssemblyDescription("Integration tests for Spring.Data.NHibernate assembly")] diff --git a/test/Spring/Spring.Data.NHibernate30.Tests/Data/NHibernate/Config/AopConfiguration.xml b/test/Spring/Spring.Data.NHibernate30.Tests/Data/NHibernate/Config/AopConfiguration.xml new file mode 100644 index 00000000..a76e3d70 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Tests/Data/NHibernate/Config/AopConfiguration.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + assembly://Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate/TestObject.hbm.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + loggingAroundAdvice + + + + + + + + + + TestObjectDao + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate30.Tests/Data/NHibernate/Config/AopConfigurationTxPointcut.xml b/test/Spring/Spring.Data.NHibernate30.Tests/Data/NHibernate/Config/AopConfigurationTxPointcut.xml new file mode 100644 index 00000000..83c14d0f --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Tests/Data/NHibernate/Config/AopConfigurationTxPointcut.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + assembly://Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate/TestObject.hbm.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12341234asdf* + + + + + + + + + loggingAdvisor + + + + + + + + + + TestObjectDao + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate30.Tests/Data/NHibernate/TestObject.hbm.xml b/test/Spring/Spring.Data.NHibernate30.Tests/Data/NHibernate/TestObject.hbm.xml new file mode 100644 index 00000000..6d6ec1e3 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Tests/Data/NHibernate/TestObject.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.2008.csproj b/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.2008.csproj new file mode 100644 index 00000000..3bfb9e0a --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.2008.csproj @@ -0,0 +1,149 @@ + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {E4CCB8A2-2381-41D1-B44C-E20E13703056} + Library + Properties + Spring + Spring.Data.NHibernate30.Tests + + + true + full + false + ..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Tests\Debug\ + TRACE;DEBUG;NET_2_0,NH_2_0,NH_2_1 + prompt + 4 + + + pdbonly + true + ..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Tests\Release\ + TRACE;NET_2_0,NET_2_1 + prompt + 4 + + + + False + ..\..\..\lib\Net\2.0\Common.Logging.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\Iesi.Collections.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\LinFu.DynamicProxy.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\log4net.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\NHibernate.dll + + + False + ..\..\..\lib\NHibernate30\net\3.5\NHibernate.ByteCode.LinFu.dll + + + False + ..\..\..\lib\net\2.0\nunit.framework.dll + + + False + ..\..\..\lib\Net\2.0\Rhino.Mocks.dll + + + + + + + + Data\NHibernate\Config\AopConfiguration.cs + + + Data\NHibernate\HibernateTransactionManagerTests.cs + + + Data\NHibernate\ISimpleService.cs + + + Data\NHibernate\ITestObjectDao.cs + + + Data\NHibernate\LocalSessionFactoryObjectTests.cs + + + Data\NHibernate\NHTestObjectDao.cs + + + Data\NHibernate\SimpleService.cs + + + Data\NHibernate\Support\ConfigSectionSessionScopeSettingsTests.cs + + + Data\NHibernate\Support\SessionScopeSettingsTests.cs + + + Data\NHibernate\Support\SessionScopeTests.cs + + + Data\NHibernate\TestObject.cs + + + + + Always + + + + + {3A3A4E65-45A6-4B20-B460-0BEDC302C02C} + Spring.Aop.2008 + + + {710961A3-0DF4-49E4-A26E-F5B9C044AC84} + Spring.Core.2008 + + + {71368632-B8B7-4A6A-8C65-8DA848120C82} + Spring.Data.NHibernate30.2008 + + + {AE00E5AB-C39A-436F-86D2-33BFE33E2E40} + Spring.Data.2008 + + + {ACD39D47-1811-40FA-9E7E-5DEA5B9CE6C0} + Spring.Data.Tests.2008 + + + + + + + + + + + + + echo "Copying .xml files for tests" +xcopy "$(ProjectDir)Data" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Tests\$(ConfigurationName)\ /y /s /q /d +xcopy "$(ProjectDir)$(TargetFileName).config" ..\..\..\..\build\VS.Net.2008\Spring.Data.NHibernate30.Tests\$(ConfigurationName)\ /y /s /q + + \ No newline at end of file diff --git a/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.build b/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.build new file mode 100644 index 00000000..7d9be6c7 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.build @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.dll.config b/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.dll.config new file mode 100644 index 00000000..3f8da4d1 --- /dev/null +++ b/test/Spring/Spring.Data.NHibernate30.Tests/Spring.Data.NHibernate30.Tests.dll.config @@ -0,0 +1,30 @@ + + + + +
+ + +
+ + + + + + + + + + + + + + \ No newline at end of file