diff --git a/Resources/.gitignore b/Resources/.gitignore
new file mode 100644
index 00000000..1014a953
--- /dev/null
+++ b/Resources/.gitignore
@@ -0,0 +1,2 @@
+# Include all Resources
+!*
\ No newline at end of file
diff --git a/Resources/Libraries/DotNetZip/Ionic.Zip.Reduced.dll b/Resources/Libraries/DotNetZip/Ionic.Zip.Reduced.dll
new file mode 100644
index 00000000..9622cc53
Binary files /dev/null and b/Resources/Libraries/DotNetZip/Ionic.Zip.Reduced.dll differ
diff --git a/Resources/Libraries/DotNetZip/Source/BZip2/BZip2Compressor.cs b/Resources/Libraries/DotNetZip/Source/BZip2/BZip2Compressor.cs
new file mode 100644
index 00000000..68099d2a
--- /dev/null
+++ b/Resources/Libraries/DotNetZip/Source/BZip2/BZip2Compressor.cs
@@ -0,0 +1,1920 @@
+// BZip2Compressor.cs
+// ------------------------------------------------------------------
+//
+// Copyright (c) 2011 Dino Chiesa.
+// All rights reserved.
+//
+// This code module is part of DotNetZip, a zipfile class library.
+//
+// ------------------------------------------------------------------
+//
+// This code is licensed under the Microsoft Public License.
+// See the file License.txt for the license details.
+// More info on: http://dotnetzip.codeplex.com
+//
+// ------------------------------------------------------------------
+//
+// Last Saved: <2011-July-28 06:17:22>
+//
+// ------------------------------------------------------------------
+//
+// This module defines the BZip2Compressor class, which is a
+// BZIP2-compressing encoder. It is used internally in the BZIP2
+// library, by the BZip2OutputStream class and its parallel variant,
+// ParallelBZip2OutputStream. This code was originally based on Apache
+// commons source code, and significantly modified. The license below
+// applies to the original Apache code and to this modified variant.
+//
+// ------------------------------------------------------------------
+
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+/*
+ * This package is based on the work done by Keiron Liddle, Aftex Software
+ * to whom the Ant project is very grateful for his
+ * great code.
+ */
+
+
+//
+// Design notes:
+//
+// This class performs BZip2 compression. It is derived from the
+// BZip2OutputStream from the Apache commons source code, but is
+// significantly modified from that code. While the Apache class is a
+// stream that compresses, this particular class simply performs
+// compression. It follows a Manager pattern. It manages an internal
+// buffer for uncompressed data; callers place data into the buffer
+// using the Fill() method. This class then compresses the data and
+// writes the compressed form out, via the CompressAndWrite() method.
+// Because BZip2 uses byte-shredding, this class relies on a BitWriter,
+// and not a .NET Stream, to emit its output. (*Think of the BitWriter
+// class as an Adapter that enables Bit-oriented output to a standard
+// byte-oriented .NET stream.)
+//
+// This class exists to support the two distinct output streams that
+// perform BZip2 compression: BZip2OutputStream and
+// ParallelBZip2OutputStream. These streams rely on BZip2Compressor to
+// provide the encoder/compression logic. This code has been derived
+// from the bzip2 output stream in the Apache commons library; it has
+// been significantly modified from that form, in order to provide a
+// single compressor that could support both types of streams.
+//
+// In a bz2 file or stream, there is never any bit padding except for 0..7
+// bits in the final byte in the file. Successive compressed blocks in a
+// .bz2 file are not byte-aligned.
+//
+//
+
+using System;
+using System.IO;
+
+// flymake: csc.exe /t:module BZip2InputStream.cs BZip2OutputStream.cs Rand.cs BCRC32.cs @@FILE@@
+
+namespace Ionic.BZip2
+{
+ internal class BZip2Compressor
+ {
+ private int blockSize100k; // 0...9
+ private int currentByte = -1;
+ private int runLength = 0;
+ private int last; // index into the block of the last char processed
+ private int outBlockFillThreshold;
+ private CompressionState cstate;
+ private readonly Ionic.Crc.CRC32 crc = new Ionic.Crc.CRC32(true);
+ BitWriter bw;
+ int runs;
+
+ /*
+ * The following three vars are used when sorting. If too many long
+ * comparisons happen, we stop sorting, randomise the block slightly, and
+ * try again. I think this wrinkle in the implementation was removed from
+ * a later rev of the C-language bzip, not sure. -DPC 24 Jul 2011
+ *
+ */
+ private int workDone;
+ private int workLimit;
+ private bool firstAttempt;
+ private bool blockRandomised;
+ private int origPtr;
+
+ private int nInUse;
+ private int nMTF;
+
+ private static readonly int SETMASK = (1 << 21);
+ private static readonly int CLEARMASK = (~SETMASK);
+ private static readonly byte GREATER_ICOST = 15;
+ private static readonly byte LESSER_ICOST = 0;
+ private static readonly int SMALL_THRESH = 20;
+ private static readonly int DEPTH_THRESH = 10;
+ private static readonly int WORK_FACTOR = 30;
+
+ /**
+ * Knuth's increments seem to work better than Incerpi-Sedgewick here.
+ * Possibly because the number of elems to sort is usually small, typically
+ * <= 20.
+ */
+ private static readonly int[] increments = { 1, 4, 13, 40, 121, 364, 1093, 3280,
+ 9841, 29524, 88573, 265720, 797161,
+ 2391484 };
+
+ ///
+ /// BZip2Compressor writes its compressed data out via a BitWriter. This
+ /// is necessary because BZip2 does byte shredding.
+ ///
+ public BZip2Compressor(BitWriter writer)
+ : this(writer, BZip2.MaxBlockSize)
+ {
+ }
+
+ public BZip2Compressor(BitWriter writer, int blockSize)
+ {
+ this.blockSize100k = blockSize;
+ this.bw = writer;
+
+ // 20 provides a margin of slop (not to say "Safety"). The maximum
+ // size of an encoded run in the output block is 5 bytes, so really, 5
+ // bytes ought to do, but this is a margin of slop found in the
+ // original bzip code. Not sure if important for decoding
+ // (decompressing). So we'll leave the slop.
+ this.outBlockFillThreshold = (blockSize * BZip2.BlockSizeMultiple) - 20;
+ this.cstate = new CompressionState(blockSize);
+ Reset();
+ }
+
+
+ void Reset()
+ {
+ // initBlock();
+ this.crc.Reset();
+ this.currentByte = -1;
+ this.runLength = 0;
+ this.last = -1;
+ for (int i = 256; --i >= 0;)
+ this.cstate.inUse[i] = false;
+ //bw.Reset(); xxx? want this? no no no
+ }
+
+
+ public int BlockSize
+ {
+ get { return this.blockSize100k; }
+ }
+
+ public uint Crc32
+ {
+ get; private set;
+ }
+
+ public int AvailableBytesOut
+ {
+ get; private set;
+ }
+
+ ///
+ /// The number of uncompressed bytes being held in the buffer.
+ ///
+ ///
+ ///
+ /// I am thinking this may be useful in a Stream that uses this
+ /// compressor class. In the Close() method on the stream it could
+ /// check this value to see if anything has been written at all. You
+ /// may think the stream could easily track the number of bytes it
+ /// wrote, which would eliminate the need for this. But, there is the
+ /// case where the stream writes a complete block, and it is full, and
+ /// then writes no more. In that case the stream may want to check.
+ ///
+ ///
+ public int UncompressedBytes
+ {
+ get { return this.last + 1; }
+ }
+
+
+ ///
+ /// Accept new bytes into the compressor data buffer
+ ///
+ ///
+ ///
+ /// This method does the first-level (cheap) run-length encoding, and
+ /// stores the encoded data into the rle block.
+ ///
+ ///
+ public int Fill(byte[] buffer, int offset, int count)
+ {
+ if (this.last >= this.outBlockFillThreshold)
+ return 0; // We're full, I tell you!
+
+ int bytesWritten = 0;
+ int limit = offset + count;
+ int rc;
+
+ // do run-length-encoding until block is full
+ do
+ {
+ rc = write0(buffer[offset++]);
+ if (rc > 0) bytesWritten++;
+ } while (offset < limit && rc == 1);
+
+ return bytesWritten;
+ }
+
+
+
+ ///
+ /// Process one input byte into the block.
+ ///
+ ///
+ ///
+ ///
+ /// To "process" the byte means to do the run-length encoding.
+ /// There are 3 possible return values:
+ ///
+ /// 0 - the byte was not written, in other words, not
+ /// encoded into the block. This happens when the
+ /// byte b would require the start of a new run, and
+ /// the block has no more room for new runs.
+ ///
+ /// 1 - the byte was written, and the block is not full.
+ ///
+ /// 2 - the byte was written, and the block is full.
+ ///
+ ///
+ ///
+ /// 0 if the byte was not written, non-zero if written.
+ private int write0(byte b)
+ {
+ bool rc;
+ // there is no current run in progress
+ if (this.currentByte == -1)
+ {
+ this.currentByte = b;
+ this.runLength++;
+ return 1;
+ }
+
+ // this byte is the same as the current run in progress
+ if (this.currentByte == b)
+ {
+ if (++this.runLength > 254)
+ {
+ rc = AddRunToOutputBlock(false);
+ this.currentByte = -1;
+ this.runLength = 0;
+ return (rc) ? 2 : 1;
+ }
+ return 1; // not full
+ }
+
+ // This byte requires a new run.
+ // Put the prior run into the Run-length-encoded block,
+ // and try to start a new run.
+ rc = AddRunToOutputBlock(false);
+
+ if (rc)
+ {
+ this.currentByte = -1;
+ this.runLength = 0;
+ // returning 0 implies the block is full, and the byte was not written.
+ return 0;
+ }
+
+ // start a new run
+ this.runLength = 1;
+ this.currentByte = b;
+ return 1;
+ }
+
+ ///
+ /// Append one run to the output block.
+ ///
+ ///
+ ///
+ ///
+ /// This compressor does run-length-encoding before BWT and etc. This
+ /// method simply appends a run to the output block. The append always
+ /// succeeds. The return value indicates whether the block is full:
+ /// false (not full) implies that at least one additional run could be
+ /// processed.
+ ///
+ ///
+ /// true if the block is now full; otherwise false.
+ private bool AddRunToOutputBlock(bool final)
+ {
+ runs++;
+ /* add_pair_to_block ( EState* s ) */
+ int previousLast = this.last;
+
+ // sanity check only - because of the check done at the
+ // bottom of this method, and the logic in write0(), this
+ // should never ever happen.
+ if (previousLast >= this.outBlockFillThreshold && !final)
+ {
+ var msg = String.Format("block overrun(final={2}): {0} >= threshold ({1})",
+ previousLast, this.outBlockFillThreshold, final);
+ throw new Exception(msg);
+ }
+
+ // NB: the index used here into block is always (last+2). This is
+ // because last is -1 based - the initial value is -1, a flag value
+ // used to indicate that nothing has yet been written into the
+ // block. The endBlock() fn tests for -1 to detect empty blocks. Also,
+ // the first byte of block is used, during sorting, to hold block[last
+ // +1], which is the final byte value that had been written into the
+ // rle block. For those two reasons, the base offset from last is
+ // always +2.
+
+ byte b = (byte) this.currentByte;
+ byte[] block = this.cstate.block;
+ this.cstate.inUse[b] = true;
+ int rl = this.runLength;
+ this.crc.UpdateCRC(b, rl);
+
+ switch (rl)
+ {
+ case 1:
+ block[previousLast + 2] = b;
+ this.last = previousLast + 1;
+ break;
+
+ case 2:
+ block[previousLast + 2] = b;
+ block[previousLast + 3] = b;
+ this.last = previousLast + 2;
+ break;
+
+ case 3:
+ block[previousLast + 2] = b;
+ block[previousLast + 3] = b;
+ block[previousLast + 4] = b;
+ this.last = previousLast + 3;
+ break;
+
+ default:
+ rl -= 4;
+ this.cstate.inUse[rl] = true;
+ block[previousLast + 2] = b;
+ block[previousLast + 3] = b;
+ block[previousLast + 4] = b;
+ block[previousLast + 5] = b;
+ block[previousLast + 6] = (byte) rl;
+ this.last = previousLast + 5;
+ break;
+ }
+
+ // is full?
+ return (this.last >= this.outBlockFillThreshold);
+ }
+
+
+ ///
+ /// Compress the data that has been placed (Run-length-encoded) into the
+ /// block. The compressed data goes into the CompressedBytes array.
+ ///
+ ///
+ ///
+ /// Side effects: 1. fills the CompressedBytes array. 2. sets the
+ /// AvailableBytesOut property.
+ ///
+ ///
+ public void CompressAndWrite() // endBlock
+ {
+ if (this.runLength > 0)
+ AddRunToOutputBlock(true);
+
+ this.currentByte = -1;
+
+ // Console.WriteLine(" BZip2Compressor:CompressAndWrite (r={0} bcrc={1:X8})",
+ // runs, this.crc.Crc32Result);
+
+ // has any data been written?
+ if (this.last == -1)
+ return; // no data; nothing to compress
+
+ /* sort the block and establish posn of original string */
+ blockSort();
+
+ /*
+ * A 6-byte block header, the value chosen arbitrarily as 0x314159265359
+ * :-). A 32 bit value does not really give a strong enough guarantee
+ * that the value will not appear by chance in the compressed
+ * datastream. Worst-case probability of this event, for a 900k block,
+ * is about 2.0e-3 for 32 bits, 1.0e-5 for 40 bits and 4.0e-8 for 48
+ * bits. For a compressed file of size 100Gb -- about 100000 blocks --
+ * only a 48-bit marker will do. NB: normal compression/ decompression
+ * donot rely on these statistical properties. They are only important
+ * when trying to recover blocks from damaged files.
+ */
+ this.bw.WriteByte(0x31);
+ this.bw.WriteByte(0x41);
+ this.bw.WriteByte(0x59);
+ this.bw.WriteByte(0x26);
+ this.bw.WriteByte(0x53);
+ this.bw.WriteByte(0x59);
+
+ this.Crc32 = (uint) this.crc.Crc32Result;
+ this.bw.WriteInt(this.Crc32);
+
+ /* Now a single bit indicating randomisation. */
+ this.bw.WriteBits(1, (this.blockRandomised)?1U:0U);
+
+ /* Finally, block's contents proper. */
+ moveToFrontCodeAndSend();
+
+ Reset();
+ }
+
+
+ private void randomiseBlock()
+ {
+ bool[] inUse = this.cstate.inUse;
+ byte[] block = this.cstate.block;
+ int lastShadow = this.last;
+
+ for (int i = 256; --i >= 0;)
+ inUse[i] = false;
+
+ int rNToGo = 0;
+ int rTPos = 0;
+ for (int i = 0, j = 1; i <= lastShadow; i = j, j++)
+ {
+ if (rNToGo == 0)
+ {
+ rNToGo = (char) Rand.Rnums(rTPos);
+ if (++rTPos == 512)
+ {
+ rTPos = 0;
+ }
+ }
+
+ rNToGo--;
+ block[j] ^= (byte) ((rNToGo == 1) ? 1 : 0);
+
+ // handle 16 bit signed numbers
+ inUse[block[j] & 0xff] = true;
+ }
+
+ this.blockRandomised = true;
+ }
+
+ private void mainSort()
+ {
+ CompressionState dataShadow = this.cstate;
+ int[] runningOrder = dataShadow.mainSort_runningOrder;
+ int[] copy = dataShadow.mainSort_copy;
+ bool[] bigDone = dataShadow.mainSort_bigDone;
+ int[] ftab = dataShadow.ftab;
+ byte[] block = dataShadow.block;
+ int[] fmap = dataShadow.fmap;
+ char[] quadrant = dataShadow.quadrant;
+ int lastShadow = this.last;
+ int workLimitShadow = this.workLimit;
+ bool firstAttemptShadow = this.firstAttempt;
+
+ // Set up the 2-byte frequency table
+ for (int i = 65537; --i >= 0;)
+ {
+ ftab[i] = 0;
+ }
+
+ /*
+ * In the various block-sized structures, live data runs from 0 to
+ * last+NUM_OVERSHOOT_BYTES inclusive. First, set up the overshoot area
+ * for block.
+ */
+ for (int i = 0; i < BZip2.NUM_OVERSHOOT_BYTES; i++)
+ {
+ block[lastShadow + i + 2] = block[(i % (lastShadow + 1)) + 1];
+ }
+ for (int i = lastShadow + BZip2.NUM_OVERSHOOT_BYTES +1; --i >= 0;)
+ {
+ quadrant[i] = '\0';
+ }
+ block[0] = block[lastShadow + 1];
+
+ // Complete the initial radix sort:
+
+ int c1 = block[0] & 0xff;
+ for (int i = 0; i <= lastShadow; i++)
+ {
+ int c2 = block[i + 1] & 0xff;
+ ftab[(c1 << 8) + c2]++;
+ c1 = c2;
+ }
+
+ for (int i = 1; i <= 65536; i++)
+ ftab[i] += ftab[i - 1];
+
+ c1 = block[1] & 0xff;
+ for (int i = 0; i < lastShadow; i++)
+ {
+ int c2 = block[i + 2] & 0xff;
+ fmap[--ftab[(c1 << 8) + c2]] = i;
+ c1 = c2;
+ }
+
+ fmap[--ftab[((block[lastShadow + 1] & 0xff) << 8) + (block[1] & 0xff)]] = lastShadow;
+
+ /*
+ * Now ftab contains the first loc of every small bucket. Calculate the
+ * running order, from smallest to largest big bucket.
+ */
+ for (int i = 256; --i >= 0;)
+ {
+ bigDone[i] = false;
+ runningOrder[i] = i;
+ }
+
+ for (int h = 364; h != 1;)
+ {
+ h /= 3;
+ for (int i = h; i <= 255; i++)
+ {
+ int vv = runningOrder[i];
+ int a = ftab[(vv + 1) << 8] - ftab[vv << 8];
+ int b = h - 1;
+ int j = i;
+ for (int ro = runningOrder[j - h]; (ftab[(ro + 1) << 8] - ftab[ro << 8]) > a; ro = runningOrder[j
+ - h])
+ {
+ runningOrder[j] = ro;
+ j -= h;
+ if (j <= b)
+ {
+ break;
+ }
+ }
+ runningOrder[j] = vv;
+ }
+ }
+
+ /*
+ * The main sorting loop.
+ */
+ for (int i = 0; i <= 255; i++)
+ {
+ /*
+ * Process big buckets, starting with the least full.
+ */
+ int ss = runningOrder[i];
+
+ // Step 1:
+ /*
+ * Complete the big bucket [ss] by quicksorting any unsorted small
+ * buckets [ss, j]. Hopefully previous pointer-scanning phases have
+ * already completed many of the small buckets [ss, j], so we don't
+ * have to sort them at all.
+ */
+ for (int j = 0; j <= 255; j++)
+ {
+ int sb = (ss << 8) + j;
+ int ftab_sb = ftab[sb];
+ if ((ftab_sb & SETMASK) != SETMASK)
+ {
+ int lo = ftab_sb & CLEARMASK;
+ int hi = (ftab[sb + 1] & CLEARMASK) - 1;
+ if (hi > lo)
+ {
+ mainQSort3(dataShadow, lo, hi, 2);
+ if (firstAttemptShadow
+ && (this.workDone > workLimitShadow))
+ {
+ return;
+ }
+ }
+ ftab[sb] = ftab_sb | SETMASK;
+ }
+ }
+
+ // Step 2:
+ // Now scan this big bucket so as to synthesise the
+ // sorted order for small buckets [t, ss] for all t != ss.
+
+ for (int j = 0; j <= 255; j++)
+ {
+ copy[j] = ftab[(j << 8) + ss] & CLEARMASK;
+ }
+
+ for (int j = ftab[ss << 8] & CLEARMASK, hj = (ftab[(ss + 1) << 8] & CLEARMASK); j < hj; j++)
+ {
+ int fmap_j = fmap[j];
+ c1 = block[fmap_j] & 0xff;
+ if (!bigDone[c1])
+ {
+ fmap[copy[c1]] = (fmap_j == 0) ? lastShadow : (fmap_j - 1);
+ copy[c1]++;
+ }
+ }
+
+ for (int j = 256; --j >= 0;)
+ ftab[(j << 8) + ss] |= SETMASK;
+
+ // Step 3:
+ /*
+ * The ss big bucket is now done. Record this fact, and update the
+ * quadrant descriptors. Remember to update quadrants in the
+ * overshoot area too, if necessary. The "if (i < 255)" test merely
+ * skips this updating for the last bucket processed, since updating
+ * for the last bucket is pointless.
+ */
+ bigDone[ss] = true;
+
+ if (i < 255)
+ {
+ int bbStart = ftab[ss << 8] & CLEARMASK;
+ int bbSize = (ftab[(ss + 1) << 8] & CLEARMASK) - bbStart;
+ int shifts = 0;
+
+ while ((bbSize >> shifts) > 65534)
+ {
+ shifts++;
+ }
+
+ for (int j = 0; j < bbSize; j++)
+ {
+ int a2update = fmap[bbStart + j];
+ char qVal = (char) (j >> shifts);
+ quadrant[a2update] = qVal;
+ if (a2update < BZip2.NUM_OVERSHOOT_BYTES)
+ {
+ quadrant[a2update + lastShadow + 1] = qVal;
+ }
+ }
+ }
+
+ }
+ }
+
+
+ private void blockSort()
+ {
+ this.workLimit = WORK_FACTOR * this.last;
+ this.workDone = 0;
+ this.blockRandomised = false;
+ this.firstAttempt = true;
+ mainSort();
+
+ if (this.firstAttempt && (this.workDone > this.workLimit))
+ {
+ randomiseBlock();
+ this.workLimit = this.workDone = 0;
+ this.firstAttempt = false;
+ mainSort();
+ }
+
+ int[] fmap = this.cstate.fmap;
+ this.origPtr = -1;
+ for (int i = 0, lastShadow = this.last; i <= lastShadow; i++)
+ {
+ if (fmap[i] == 0)
+ {
+ this.origPtr = i;
+ break;
+ }
+ }
+
+ // assert (this.origPtr != -1) : this.origPtr;
+ }
+
+
+ /**
+ * This is the most hammered method of this class.
+ *
+ *
+ * This is the version using unrolled loops.
+ *
+ */
+ private bool mainSimpleSort(CompressionState dataShadow, int lo,
+ int hi, int d)
+ {
+ int bigN = hi - lo + 1;
+ if (bigN < 2)
+ {
+ return this.firstAttempt && (this.workDone > this.workLimit);
+ }
+
+ int hp = 0;
+ while (increments[hp] < bigN)
+ hp++;
+
+ int[] fmap = dataShadow.fmap;
+ char[] quadrant = dataShadow.quadrant;
+ byte[] block = dataShadow.block;
+ int lastShadow = this.last;
+ int lastPlus1 = lastShadow + 1;
+ bool firstAttemptShadow = this.firstAttempt;
+ int workLimitShadow = this.workLimit;
+ int workDoneShadow = this.workDone;
+
+ // Following block contains unrolled code which could be shortened by
+ // coding it in additional loops.
+
+ // HP:
+ while (--hp >= 0)
+ {
+ int h = increments[hp];
+ int mj = lo + h - 1;
+
+ for (int i = lo + h; i <= hi;)
+ {
+ // copy
+ for (int k = 3; (i <= hi) && (--k >= 0); i++)
+ {
+ int v = fmap[i];
+ int vd = v + d;
+ int j = i;
+
+ // for (int a;
+ // (j > mj) && mainGtU((a = fmap[j - h]) + d, vd,
+ // block, quadrant, lastShadow);
+ // j -= h) {
+ // fmap[j] = a;
+ // }
+ //
+ // unrolled version:
+
+ // start inline mainGTU
+ bool onceRunned = false;
+ int a = 0;
+
+ HAMMER: while (true)
+ {
+ if (onceRunned)
+ {
+ fmap[j] = a;
+ if ((j -= h) <= mj)
+ {
+ goto END_HAMMER;
+ }
+ }
+ else {
+ onceRunned = true;
+ }
+
+ a = fmap[j - h];
+ int i1 = a + d;
+ int i2 = vd;
+
+ // following could be done in a loop, but
+ // unrolled it for performance:
+ if (block[i1 + 1] == block[i2 + 1])
+ {
+ if (block[i1 + 2] == block[i2 + 2])
+ {
+ if (block[i1 + 3] == block[i2 + 3])
+ {
+ if (block[i1 + 4] == block[i2 + 4])
+ {
+ if (block[i1 + 5] == block[i2 + 5])
+ {
+ if (block[(i1 += 6)] == block[(i2 += 6)])
+ {
+ int x = lastShadow;
+ X: while (x > 0)
+ {
+ x -= 4;
+
+ if (block[i1 + 1] == block[i2 + 1])
+ {
+ if (quadrant[i1] == quadrant[i2])
+ {
+ if (block[i1 + 2] == block[i2 + 2])
+ {
+ if (quadrant[i1 + 1] == quadrant[i2 + 1])
+ {
+ if (block[i1 + 3] == block[i2 + 3])
+ {
+ if (quadrant[i1 + 2] == quadrant[i2 + 2])
+ {
+ if (block[i1 + 4] == block[i2 + 4])
+ {
+ if (quadrant[i1 + 3] == quadrant[i2 + 3])
+ {
+ if ((i1 += 4) >= lastPlus1)
+ {
+ i1 -= lastPlus1;
+ }
+ if ((i2 += 4) >= lastPlus1)
+ {
+ i2 -= lastPlus1;
+ }
+ workDoneShadow++;
+ goto X;
+ }
+ else if ((quadrant[i1 + 3] > quadrant[i2 + 3]))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((block[i1 + 4] & 0xff) > (block[i2 + 4] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((quadrant[i1 + 2] > quadrant[i2 + 2]))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((block[i1 + 3] & 0xff) > (block[i2 + 3] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((quadrant[i1 + 1] > quadrant[i2 + 1]))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((block[i1 + 2] & 0xff) > (block[i2 + 2] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((quadrant[i1] > quadrant[i2]))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((block[i1 + 1] & 0xff) > (block[i2 + 1] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+
+ }
+ goto END_HAMMER;
+ } // while x > 0
+ else {
+ if ((block[i1] & 0xff) > (block[i2] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ }
+ else if ((block[i1 + 5] & 0xff) > (block[i2 + 5] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((block[i1 + 4] & 0xff) > (block[i2 + 4] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((block[i1 + 3] & 0xff) > (block[i2 + 3] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((block[i1 + 2] & 0xff) > (block[i2 + 2] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+ }
+ else if ((block[i1 + 1] & 0xff) > (block[i2 + 1] & 0xff))
+ {
+ goto HAMMER;
+ }
+ else {
+ goto END_HAMMER;
+ }
+
+ } // HAMMER
+
+ END_HAMMER:
+ // end inline mainGTU
+
+ fmap[j] = v;
+ }
+
+ if (firstAttemptShadow && (i <= hi)
+ && (workDoneShadow > workLimitShadow))
+ {
+ goto END_HP;
+ }
+ }
+ }
+ END_HP:
+
+ this.workDone = workDoneShadow;
+ return firstAttemptShadow && (workDoneShadow > workLimitShadow);
+ }
+
+
+
+ private static void vswap(int[] fmap, int p1, int p2, int n)
+ {
+ n += p1;
+ while (p1 < n)
+ {
+ int t = fmap[p1];
+ fmap[p1++] = fmap[p2];
+ fmap[p2++] = t;
+ }
+ }
+
+ private static byte med3(byte a, byte b, byte c)
+ {
+ return (a < b) ? (b < c ? b : a < c ? c : a) : (b > c ? b : a > c ? c
+ : a);
+ }
+
+
+ /**
+ * Method "mainQSort3", file "blocksort.c", BZip2 1.0.2
+ */
+ private void mainQSort3(CompressionState dataShadow, int loSt,
+ int hiSt, int dSt)
+ {
+ int[] stack_ll = dataShadow.stack_ll;
+ int[] stack_hh = dataShadow.stack_hh;
+ int[] stack_dd = dataShadow.stack_dd;
+ int[] fmap = dataShadow.fmap;
+ byte[] block = dataShadow.block;
+
+ stack_ll[0] = loSt;
+ stack_hh[0] = hiSt;
+ stack_dd[0] = dSt;
+
+ for (int sp = 1; --sp >= 0;)
+ {
+ int lo = stack_ll[sp];
+ int hi = stack_hh[sp];
+ int d = stack_dd[sp];
+
+ if ((hi - lo < SMALL_THRESH) || (d > DEPTH_THRESH))
+ {
+ if (mainSimpleSort(dataShadow, lo, hi, d))
+ {
+ return;
+ }
+ }
+ else {
+ int d1 = d + 1;
+ int med = med3(block[fmap[lo] + d1],
+ block[fmap[hi] + d1], block[fmap[(lo + hi) >> 1] + d1]) & 0xff;
+
+ int unLo = lo;
+ int unHi = hi;
+ int ltLo = lo;
+ int gtHi = hi;
+
+ while (true)
+ {
+ while (unLo <= unHi)
+ {
+ int n = (block[fmap[unLo] + d1] & 0xff)
+ - med;
+ if (n == 0)
+ {
+ int temp = fmap[unLo];
+ fmap[unLo++] = fmap[ltLo];
+ fmap[ltLo++] = temp;
+ }
+ else if (n < 0)
+ {
+ unLo++;
+ }
+ else {
+ break;
+ }
+ }
+
+ while (unLo <= unHi)
+ {
+ int n = (block[fmap[unHi] + d1] & 0xff)
+ - med;
+ if (n == 0)
+ {
+ int temp = fmap[unHi];
+ fmap[unHi--] = fmap[gtHi];
+ fmap[gtHi--] = temp;
+ }
+ else if (n > 0)
+ {
+ unHi--;
+ }
+ else {
+ break;
+ }
+ }
+
+ if (unLo <= unHi)
+ {
+ int temp = fmap[unLo];
+ fmap[unLo++] = fmap[unHi];
+ fmap[unHi--] = temp;
+ }
+ else {
+ break;
+ }
+ }
+
+ if (gtHi < ltLo)
+ {
+ stack_ll[sp] = lo;
+ stack_hh[sp] = hi;
+ stack_dd[sp] = d1;
+ sp++;
+ }
+ else {
+ int n = ((ltLo - lo) < (unLo - ltLo)) ? (ltLo - lo)
+ : (unLo - ltLo);
+ vswap(fmap, lo, unLo - n, n);
+ int m = ((hi - gtHi) < (gtHi - unHi)) ? (hi - gtHi)
+ : (gtHi - unHi);
+ vswap(fmap, unLo, hi - m + 1, m);
+
+ n = lo + unLo - ltLo - 1;
+ m = hi - (gtHi - unHi) + 1;
+
+ stack_ll[sp] = lo;
+ stack_hh[sp] = n;
+ stack_dd[sp] = d;
+ sp++;
+
+ stack_ll[sp] = n + 1;
+ stack_hh[sp] = m - 1;
+ stack_dd[sp] = d1;
+ sp++;
+
+ stack_ll[sp] = m;
+ stack_hh[sp] = hi;
+ stack_dd[sp] = d;
+ sp++;
+ }
+ }
+ }
+ }
+
+
+
+ private void generateMTFValues()
+ {
+ int lastShadow = this.last;
+ CompressionState dataShadow = this.cstate;
+ bool[] inUse = dataShadow.inUse;
+ byte[] block = dataShadow.block;
+ int[] fmap = dataShadow.fmap;
+ char[] sfmap = dataShadow.sfmap;
+ int[] mtfFreq = dataShadow.mtfFreq;
+ byte[] unseqToSeq = dataShadow.unseqToSeq;
+ byte[] yy = dataShadow.generateMTFValues_yy;
+
+ // make maps
+ int nInUseShadow = 0;
+ for (int i = 0; i < 256; i++)
+ {
+ if (inUse[i])
+ {
+ unseqToSeq[i] = (byte) nInUseShadow;
+ nInUseShadow++;
+ }
+ }
+ this.nInUse = nInUseShadow;
+
+ int eob = nInUseShadow + 1;
+
+ for (int i = eob; i >= 0; i--)
+ {
+ mtfFreq[i] = 0;
+ }
+
+ for (int i = nInUseShadow; --i >= 0;)
+ {
+ yy[i] = (byte) i;
+ }
+
+ int wr = 0;
+ int zPend = 0;
+
+ for (int i = 0; i <= lastShadow; i++)
+ {
+ byte ll_i = unseqToSeq[block[fmap[i]] & 0xff];
+ byte tmp = yy[0];
+ int j = 0;
+
+ while (ll_i != tmp)
+ {
+ j++;
+ byte tmp2 = tmp;
+ tmp = yy[j];
+ yy[j] = tmp2;
+ }
+ yy[0] = tmp;
+
+ if (j == 0)
+ {
+ zPend++;
+ }
+ else
+ {
+ if (zPend > 0)
+ {
+ zPend--;
+ while (true)
+ {
+ if ((zPend & 1) == 0)
+ {
+ sfmap[wr] = BZip2.RUNA;
+ wr++;
+ mtfFreq[BZip2.RUNA]++;
+ }
+ else
+ {
+ sfmap[wr] = BZip2.RUNB;
+ wr++;
+ mtfFreq[BZip2.RUNB]++;
+ }
+
+ if (zPend >= 2)
+ {
+ zPend = (zPend - 2) >> 1;
+ }
+ else
+ {
+ break;
+ }
+ }
+ zPend = 0;
+ }
+ sfmap[wr] = (char) (j + 1);
+ wr++;
+ mtfFreq[j + 1]++;
+ }
+ }
+
+ if (zPend > 0)
+ {
+ zPend--;
+ while (true)
+ {
+ if ((zPend & 1) == 0)
+ {
+ sfmap[wr] = BZip2.RUNA;
+ wr++;
+ mtfFreq[BZip2.RUNA]++;
+ }
+ else
+ {
+ sfmap[wr] = BZip2.RUNB;
+ wr++;
+ mtfFreq[BZip2.RUNB]++;
+ }
+
+ if (zPend >= 2)
+ {
+ zPend = (zPend - 2) >> 1;
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+
+ sfmap[wr] = (char) eob;
+ mtfFreq[eob]++;
+ this.nMTF = wr + 1;
+ }
+
+
+ private static void hbAssignCodes(int[] code, byte[] length,
+ int minLen, int maxLen,
+ int alphaSize)
+ {
+ int vec = 0;
+ for (int n = minLen; n <= maxLen; n++)
+ {
+ for (int i = 0; i < alphaSize; i++)
+ {
+ if ((length[i] & 0xff) == n)
+ {
+ code[i] = vec;
+ vec++;
+ }
+ }
+ vec <<= 1;
+ }
+ }
+
+
+
+
+ private void sendMTFValues()
+ {
+ byte[][] len = this.cstate.sendMTFValues_len;
+ int alphaSize = this.nInUse + 2;
+
+ for (int t = BZip2.NGroups; --t >= 0;)
+ {
+ byte[] len_t = len[t];
+ for (int v = alphaSize; --v >= 0;)
+ {
+ len_t[v] = GREATER_ICOST;
+ }
+ }
+
+ /* Decide how many coding tables to use */
+ // assert (this.nMTF > 0) : this.nMTF;
+ int nGroups = (this.nMTF < 200) ? 2 : (this.nMTF < 600) ? 3
+ : (this.nMTF < 1200) ? 4 : (this.nMTF < 2400) ? 5 : 6;
+
+ /* Generate an initial set of coding tables */
+ sendMTFValues0(nGroups, alphaSize);
+
+ /*
+ * Iterate up to N_ITERS times to improve the tables.
+ */
+ int nSelectors = sendMTFValues1(nGroups, alphaSize);
+
+ /* Compute MTF values for the selectors. */
+ sendMTFValues2(nGroups, nSelectors);
+
+ /* Assign actual codes for the tables. */
+ sendMTFValues3(nGroups, alphaSize);
+
+ /* Transmit the mapping table. */
+ sendMTFValues4();
+
+ /* Now the selectors. */
+ sendMTFValues5(nGroups, nSelectors);
+
+ /* Now the coding tables. */
+ sendMTFValues6(nGroups, alphaSize);
+
+ /* And finally, the block data proper */
+ sendMTFValues7(nSelectors);
+ }
+
+ private void sendMTFValues0(int nGroups, int alphaSize)
+ {
+ byte[][] len = this.cstate.sendMTFValues_len;
+ int[] mtfFreq = this.cstate.mtfFreq;
+
+ int remF = this.nMTF;
+ int gs = 0;
+
+ for (int nPart = nGroups; nPart > 0; nPart--)
+ {
+ int tFreq = remF / nPart;
+ int ge = gs - 1;
+ int aFreq = 0;
+
+ for (int a = alphaSize - 1; (aFreq < tFreq) && (ge < a);)
+ {
+ aFreq += mtfFreq[++ge];
+ }
+
+ if ((ge > gs) && (nPart != nGroups) && (nPart != 1)
+ && (((nGroups - nPart) & 1) != 0))
+ {
+ aFreq -= mtfFreq[ge--];
+ }
+
+ byte[] len_np = len[nPart - 1];
+ for (int v = alphaSize; --v >= 0;)
+ {
+ if ((v >= gs) && (v <= ge))
+ {
+ len_np[v] = LESSER_ICOST;
+ }
+ else {
+ len_np[v] = GREATER_ICOST;
+ }
+ }
+
+ gs = ge + 1;
+ remF -= aFreq;
+ }
+ }
+
+
+ private static void hbMakeCodeLengths(byte[] len, int[] freq,
+ CompressionState state1, int alphaSize,
+ int maxLen)
+ {
+ /*
+ * Nodes and heap entries run from 1. Entry 0 for both the heap and
+ * nodes is a sentinel.
+ */
+ int[] heap = state1.heap;
+ int[] weight = state1.weight;
+ int[] parent = state1.parent;
+
+ for (int i = alphaSize; --i >= 0;)
+ {
+ weight[i + 1] = (freq[i] == 0 ? 1 : freq[i]) << 8;
+ }
+
+ for (bool tooLong = true; tooLong;)
+ {
+ tooLong = false;
+
+ int nNodes = alphaSize;
+ int nHeap = 0;
+ heap[0] = 0;
+ weight[0] = 0;
+ parent[0] = -2;
+
+ for (int i = 1; i <= alphaSize; i++)
+ {
+ parent[i] = -1;
+ nHeap++;
+ heap[nHeap] = i;
+
+ int zz = nHeap;
+ int tmp = heap[zz];
+ while (weight[tmp] < weight[heap[zz >> 1]])
+ {
+ heap[zz] = heap[zz >> 1];
+ zz >>= 1;
+ }
+ heap[zz] = tmp;
+ }
+
+ while (nHeap > 1)
+ {
+ int n1 = heap[1];
+ heap[1] = heap[nHeap];
+ nHeap--;
+
+ int yy = 0;
+ int zz = 1;
+ int tmp = heap[1];
+
+ while (true)
+ {
+ yy = zz << 1;
+
+ if (yy > nHeap)
+ {
+ break;
+ }
+
+ if ((yy < nHeap)
+ && (weight[heap[yy + 1]] < weight[heap[yy]]))
+ {
+ yy++;
+ }
+
+ if (weight[tmp] < weight[heap[yy]])
+ {
+ break;
+ }
+
+ heap[zz] = heap[yy];
+ zz = yy;
+ }
+
+ heap[zz] = tmp;
+
+ int n2 = heap[1];
+ heap[1] = heap[nHeap];
+ nHeap--;
+
+ yy = 0;
+ zz = 1;
+ tmp = heap[1];
+
+ while (true)
+ {
+ yy = zz << 1;
+
+ if (yy > nHeap)
+ {
+ break;
+ }
+
+ if ((yy < nHeap)
+ && (weight[heap[yy + 1]] < weight[heap[yy]]))
+ {
+ yy++;
+ }
+
+ if (weight[tmp] < weight[heap[yy]])
+ {
+ break;
+ }
+
+ heap[zz] = heap[yy];
+ zz = yy;
+ }
+
+ heap[zz] = tmp;
+ nNodes++;
+ parent[n1] = parent[n2] = nNodes;
+
+ int weight_n1 = weight[n1];
+ int weight_n2 = weight[n2];
+ weight[nNodes] = (int) (((uint)weight_n1 & 0xffffff00U)
+ + ((uint)weight_n2 & 0xffffff00U))
+ | (1 + (((weight_n1 & 0x000000ff)
+ > (weight_n2 & 0x000000ff))
+ ? (weight_n1 & 0x000000ff)
+ : (weight_n2 & 0x000000ff)));
+
+ parent[nNodes] = -1;
+ nHeap++;
+ heap[nHeap] = nNodes;
+
+ tmp = 0;
+ zz = nHeap;
+ tmp = heap[zz];
+ int weight_tmp = weight[tmp];
+ while (weight_tmp < weight[heap[zz >> 1]])
+ {
+ heap[zz] = heap[zz >> 1];
+ zz >>= 1;
+ }
+ heap[zz] = tmp;
+
+ }
+
+ for (int i = 1; i <= alphaSize; i++)
+ {
+ int j = 0;
+ int k = i;
+
+ for (int parent_k; (parent_k = parent[k]) >= 0;)
+ {
+ k = parent_k;
+ j++;
+ }
+
+ len[i - 1] = (byte) j;
+ if (j > maxLen)
+ {
+ tooLong = true;
+ }
+ }
+
+ if (tooLong)
+ {
+ for (int i = 1; i < alphaSize; i++)
+ {
+ int j = weight[i] >> 8;
+ j = 1 + (j >> 1);
+ weight[i] = j << 8;
+ }
+ }
+ }
+ }
+
+
+ private int sendMTFValues1(int nGroups, int alphaSize)
+ {
+ CompressionState dataShadow = this.cstate;
+ int[][] rfreq = dataShadow.sendMTFValues_rfreq;
+ int[] fave = dataShadow.sendMTFValues_fave;
+ short[] cost = dataShadow.sendMTFValues_cost;
+ char[] sfmap = dataShadow.sfmap;
+ byte[] selector = dataShadow.selector;
+ byte[][] len = dataShadow.sendMTFValues_len;
+ byte[] len_0 = len[0];
+ byte[] len_1 = len[1];
+ byte[] len_2 = len[2];
+ byte[] len_3 = len[3];
+ byte[] len_4 = len[4];
+ byte[] len_5 = len[5];
+ int nMTFShadow = this.nMTF;
+
+ int nSelectors = 0;
+
+ for (int iter = 0; iter < BZip2.N_ITERS; iter++)
+ {
+ for (int t = nGroups; --t >= 0;)
+ {
+ fave[t] = 0;
+ int[] rfreqt = rfreq[t];
+ for (int i = alphaSize; --i >= 0;)
+ {
+ rfreqt[i] = 0;
+ }
+ }
+
+ nSelectors = 0;
+
+ for (int gs = 0; gs < this.nMTF;)
+ {
+ /* Set group start & end marks. */
+
+ /*
+ * Calculate the cost of this group as coded by each of the
+ * coding tables.
+ */
+
+ int ge = Math.Min(gs + BZip2.G_SIZE - 1, nMTFShadow - 1);
+
+ if (nGroups == BZip2.NGroups)
+ {
+ // unrolled version of the else-block
+
+ int[] c = new int[6];
+
+ for (int i = gs; i <= ge; i++)
+ {
+ int icv = sfmap[i];
+ c[0] += len_0[icv] & 0xff;
+ c[1] += len_1[icv] & 0xff;
+ c[2] += len_2[icv] & 0xff;
+ c[3] += len_3[icv] & 0xff;
+ c[4] += len_4[icv] & 0xff;
+ c[5] += len_5[icv] & 0xff;
+ }
+
+ cost[0] = (short) c[0];
+ cost[1] = (short) c[1];
+ cost[2] = (short) c[2];
+ cost[3] = (short) c[3];
+ cost[4] = (short) c[4];
+ cost[5] = (short) c[5];
+ }
+ else
+ {
+ for (int t = nGroups; --t >= 0;)
+ {
+ cost[t] = 0;
+ }
+
+ for (int i = gs; i <= ge; i++)
+ {
+ int icv = sfmap[i];
+ for (int t = nGroups; --t >= 0;)
+ {
+ cost[t] += (short) (len[t][icv] & 0xff);
+ }
+ }
+ }
+
+ /*
+ * Find the coding table which is best for this group, and
+ * record its identity in the selector table.
+ */
+ int bt = -1;
+ for (int t = nGroups, bc = 999999999; --t >= 0;)
+ {
+ int cost_t = cost[t];
+ if (cost_t < bc)
+ {
+ bc = cost_t;
+ bt = t;
+ }
+ }
+
+ fave[bt]++;
+ selector[nSelectors] = (byte) bt;
+ nSelectors++;
+
+ /*
+ * Increment the symbol frequencies for the selected table.
+ */
+ int[] rfreq_bt = rfreq[bt];
+ for (int i = gs; i <= ge; i++)
+ {
+ rfreq_bt[sfmap[i]]++;
+ }
+
+ gs = ge + 1;
+ }
+
+ /*
+ * Recompute the tables based on the accumulated frequencies.
+ */
+ for (int t = 0; t < nGroups; t++)
+ {
+ hbMakeCodeLengths(len[t], rfreq[t], this.cstate, alphaSize, 20);
+ }
+ }
+
+ return nSelectors;
+ }
+
+ private void sendMTFValues2(int nGroups, int nSelectors)
+ {
+ // assert (nGroups < 8) : nGroups;
+
+ CompressionState dataShadow = this.cstate;
+ byte[] pos = dataShadow.sendMTFValues2_pos;
+
+ for (int i = nGroups; --i >= 0;)
+ {
+ pos[i] = (byte) i;
+ }
+
+ for (int i = 0; i < nSelectors; i++)
+ {
+ byte ll_i = dataShadow.selector[i];
+ byte tmp = pos[0];
+ int j = 0;
+
+ while (ll_i != tmp)
+ {
+ j++;
+ byte tmp2 = tmp;
+ tmp = pos[j];
+ pos[j] = tmp2;
+ }
+
+ pos[0] = tmp;
+ dataShadow.selectorMtf[i] = (byte) j;
+ }
+ }
+
+ private void sendMTFValues3(int nGroups, int alphaSize)
+ {
+ int[][] code = this.cstate.sendMTFValues_code;
+ byte[][] len = this.cstate.sendMTFValues_len;
+
+ for (int t = 0; t < nGroups; t++)
+ {
+ int minLen = 32;
+ int maxLen = 0;
+ byte[] len_t = len[t];
+ for (int i = alphaSize; --i >= 0;)
+ {
+ int l = len_t[i] & 0xff;
+ if (l > maxLen)
+ {
+ maxLen = l;
+ }
+ if (l < minLen)
+ {
+ minLen = l;
+ }
+ }
+
+ // assert (maxLen <= 20) : maxLen;
+ // assert (minLen >= 1) : minLen;
+
+ hbAssignCodes(code[t], len[t], minLen, maxLen, alphaSize);
+ }
+ }
+
+ private void sendMTFValues4()
+ {
+ bool[] inUse = this.cstate.inUse;
+ bool[] inUse16 = this.cstate.sentMTFValues4_inUse16;
+
+ for (int i = 16; --i >= 0;)
+ {
+ inUse16[i] = false;
+ int i16 = i * 16;
+ for (int j = 16; --j >= 0;)
+ {
+ if (inUse[i16 + j])
+ {
+ inUse16[i] = true;
+ }
+ }
+ }
+
+ uint u = 0;
+ for (int i = 0; i < 16; i++)
+ {
+ if (inUse16[i])
+ u |= 1U << (16 - i - 1);
+ }
+ this.bw.WriteBits(16, u);
+
+
+ for (int i = 0; i < 16; i++)
+ {
+ if (inUse16[i])
+ {
+ int i16 = i * 16;
+ u = 0;
+ for (int j = 0; j < 16; j++)
+ {
+ if (inUse[i16 + j])
+ {
+ u |= 1U << (16 - j - 1);
+ }
+ }
+ this.bw.WriteBits(16, u);
+ }
+ }
+ }
+
+
+ private void sendMTFValues5(int nGroups, int nSelectors)
+ {
+ this.bw.WriteBits(3, (uint) nGroups);
+ this.bw.WriteBits(15, (uint) nSelectors);
+
+ byte[] selectorMtf = this.cstate.selectorMtf;
+
+ for (int i = 0; i < nSelectors; i++)
+ {
+ for (int j = 0, hj = selectorMtf[i] & 0xff; j < hj; j++)
+ {
+ this.bw.WriteBits(1, 1);
+ }
+
+ this.bw.WriteBits(1, 0);
+ }
+ }
+
+ private void sendMTFValues6(int nGroups, int alphaSize)
+ {
+ byte[][] len = this.cstate.sendMTFValues_len;
+
+ for (int t = 0; t < nGroups; t++)
+ {
+ byte[] len_t = len[t];
+ uint curr = (uint) (len_t[0] & 0xff);
+ this.bw.WriteBits(5, curr);
+
+ for (int i = 0; i < alphaSize; i++)
+ {
+ int lti = len_t[i] & 0xff;
+ while (curr < lti)
+ {
+ this.bw.WriteBits(2, 2U);
+ curr++; /* 10 */
+ }
+
+ while (curr > lti)
+ {
+ this.bw.WriteBits(2, 3U);
+ curr--; /* 11 */
+ }
+
+ this.bw.WriteBits(1, 0U);
+ }
+ }
+ }
+
+
+ private void sendMTFValues7(int nSelectors)
+ {
+ byte[][] len = this.cstate.sendMTFValues_len;
+ int[][] code = this.cstate.sendMTFValues_code;
+ byte[] selector = this.cstate.selector;
+ char[] sfmap = this.cstate.sfmap;
+ int nMTFShadow = this.nMTF;
+
+ int selCtr = 0;
+
+ for (int gs = 0; gs < nMTFShadow;)
+ {
+ int ge = Math.Min(gs + BZip2.G_SIZE - 1, nMTFShadow - 1);
+ int ix = selector[selCtr] & 0xff;
+ int[] code_selCtr = code[ix];
+ byte[] len_selCtr = len[ix];
+
+ while (gs <= ge)
+ {
+ int sfmap_i = sfmap[gs];
+ int n = len_selCtr[sfmap_i] & 0xFF;
+ this.bw.WriteBits(n, (uint) code_selCtr[sfmap_i]);
+ gs++;
+ }
+
+ gs = ge + 1;
+ selCtr++;
+ }
+ }
+
+ private void moveToFrontCodeAndSend()
+ {
+ this.bw.WriteBits(24, (uint) this.origPtr);
+ generateMTFValues();
+ sendMTFValues();
+ }
+
+
+
+
+
+
+ private class CompressionState
+ {
+ // with blockSize 900k
+ public readonly bool[] inUse = new bool[256]; // 256 byte
+ public readonly byte[] unseqToSeq = new byte[256]; // 256 byte
+ public readonly int[] mtfFreq = new int[BZip2.MaxAlphaSize]; // 1032 byte
+ public readonly byte[] selector = new byte[BZip2.MaxSelectors]; // 18002 byte
+ public readonly byte[] selectorMtf = new byte[BZip2.MaxSelectors]; // 18002 byte
+
+ public readonly byte[] generateMTFValues_yy = new byte[256]; // 256 byte
+ public byte[][] sendMTFValues_len;
+
+ // byte
+ public int[][] sendMTFValues_rfreq;
+
+ // byte
+ public readonly int[] sendMTFValues_fave = new int[BZip2.NGroups]; // 24 byte
+ public readonly short[] sendMTFValues_cost = new short[BZip2.NGroups]; // 12 byte
+ public int[][] sendMTFValues_code;
+
+ // byte
+ public readonly byte[] sendMTFValues2_pos = new byte[BZip2.NGroups]; // 6 byte
+ public readonly bool[] sentMTFValues4_inUse16 = new bool[16]; // 16 byte
+
+ public readonly int[] stack_ll = new int[BZip2.QSORT_STACK_SIZE]; // 4000 byte
+ public readonly int[] stack_hh = new int[BZip2.QSORT_STACK_SIZE]; // 4000 byte
+ public readonly int[] stack_dd = new int[BZip2.QSORT_STACK_SIZE]; // 4000 byte
+
+ public readonly int[] mainSort_runningOrder = new int[256]; // 1024 byte
+ public readonly int[] mainSort_copy = new int[256]; // 1024 byte
+ public readonly bool[] mainSort_bigDone = new bool[256]; // 256 byte
+
+ public int[] heap = new int[BZip2.MaxAlphaSize + 2]; // 1040 byte
+ public int[] weight = new int[BZip2.MaxAlphaSize * 2]; // 2064 byte
+ public int[] parent = new int[BZip2.MaxAlphaSize * 2]; // 2064 byte
+
+ public readonly int[] ftab = new int[65537]; // 262148 byte
+ // ------------
+ // 333408 byte
+
+ public byte[] block; // 900021 byte
+ public int[] fmap; // 3600000 byte
+ public char[] sfmap; // 3600000 byte
+
+ // ------------
+ // 8433529 byte
+ // ============
+
+ /**
+ * Array instance identical to sfmap, both are used only
+ * temporarily and independently, so we do not need to allocate
+ * additional memory.
+ */
+ public char[] quadrant;
+
+ public CompressionState(int blockSize100k)
+ {
+ int n = blockSize100k * BZip2.BlockSizeMultiple;
+ this.block = new byte[(n + 1 + BZip2.NUM_OVERSHOOT_BYTES)];
+ this.fmap = new int[n];
+ this.sfmap = new char[2 * n];
+ this.quadrant = this.sfmap;
+ this.sendMTFValues_len = BZip2.InitRectangularArray(BZip2.NGroups,BZip2.MaxAlphaSize);
+ this.sendMTFValues_rfreq = BZip2.InitRectangularArray(BZip2.NGroups,BZip2.MaxAlphaSize);
+ this.sendMTFValues_code = BZip2.InitRectangularArray(BZip2.NGroups,BZip2.MaxAlphaSize);
+ }
+
+ }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Resources/Libraries/DotNetZip/Source/BZip2/BZip2InputStream.cs b/Resources/Libraries/DotNetZip/Source/BZip2/BZip2InputStream.cs
new file mode 100644
index 00000000..1c152d58
--- /dev/null
+++ b/Resources/Libraries/DotNetZip/Source/BZip2/BZip2InputStream.cs
@@ -0,0 +1,1447 @@
+// BZip2InputStream.cs
+// ------------------------------------------------------------------
+//
+// Copyright (c) 2011 Dino Chiesa.
+// All rights reserved.
+//
+// This code module is part of DotNetZip, a zipfile class library.
+//
+// ------------------------------------------------------------------
+//
+// This code is licensed under the Microsoft Public License.
+// See the file License.txt for the license details.
+// More info on: http://dotnetzip.codeplex.com
+//
+// ------------------------------------------------------------------
+//
+// Last Saved: <2011-July-31 11:57:32>
+//
+// ------------------------------------------------------------------
+//
+// This module defines the BZip2InputStream class, which is a decompressing
+// stream that handles BZIP2. This code is derived from Apache commons source code.
+// The license below applies to the original Apache code.
+//
+// ------------------------------------------------------------------
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+/*
+ * This package is based on the work done by Keiron Liddle, Aftex Software
+ * to whom the Ant project is very grateful for his
+ * great code.
+ */
+
+// compile: msbuild
+// not: csc.exe /t:library /debug+ /out:Ionic.BZip2.dll BZip2InputStream.cs BCRC32.cs Rand.cs
+
+
+
+using System;
+using System.IO;
+
+namespace Ionic.BZip2
+{
+
+ ///
+ /// A read-only decorator stream that performs BZip2 decompression on Read.
+ ///
+ public class BZip2InputStream : System.IO.Stream
+ {
+ bool _disposed;
+ bool _leaveOpen;
+ Int64 totalBytesRead;
+ private int last;
+
+ /* for undoing the Burrows-Wheeler transform */
+ private int origPtr;
+
+ // blockSize100k: 0 .. 9.
+ //
+ // This var name is a misnomer. The actual block size is 100000
+ // * blockSize100k. (not 100k * blocksize100k)
+ private int blockSize100k;
+ private bool blockRandomised;
+ private int bsBuff;
+ private int bsLive;
+ private readonly Ionic.Crc.CRC32 crc = new Ionic.Crc.CRC32(true);
+ private int nInUse;
+ private Stream input;
+ private int currentChar = -1;
+
+ ///
+ /// Compressor State
+ ///
+ enum CState
+ {
+ EOF = 0,
+ START_BLOCK = 1,
+ RAND_PART_A = 2,
+ RAND_PART_B = 3,
+ RAND_PART_C = 4,
+ NO_RAND_PART_A = 5,
+ NO_RAND_PART_B = 6,
+ NO_RAND_PART_C = 7,
+ }
+
+ private CState currentState = CState.START_BLOCK;
+
+ private uint storedBlockCRC, storedCombinedCRC;
+ private uint computedBlockCRC, computedCombinedCRC;
+
+ // Variables used by setup* methods exclusively
+ private int su_count;
+ private int su_ch2;
+ private int su_chPrev;
+ private int su_i2;
+ private int su_j2;
+ private int su_rNToGo;
+ private int su_rTPos;
+ private int su_tPos;
+ private char su_z;
+ private BZip2InputStream.DecompressionState data;
+
+
+ ///
+ /// Create a BZip2InputStream, wrapping it around the given input Stream.
+ ///
+ ///
+ ///
+ /// The input stream will be closed when the BZip2InputStream is closed.
+ ///
+ ///
+ /// The stream from which to read compressed data
+ public BZip2InputStream(Stream input)
+ : this(input, false)
+ {}
+
+
+ ///
+ /// Create a BZip2InputStream with the given stream, and
+ /// specifying whether to leave the wrapped stream open when
+ /// the BZip2InputStream is closed.
+ ///
+ /// The stream from which to read compressed data
+ ///
+ /// Whether to leave the input stream open, when the BZip2InputStream closes.
+ ///
+ ///
+ ///
+ ///
+ /// This example reads a bzip2-compressed file, decompresses it,
+ /// and writes the decompressed data into a newly created file.
+ ///
+ ///
+ /// var fname = "logfile.log.bz2";
+ /// using (var fs = File.OpenRead(fname))
+ /// {
+ /// using (var decompressor = new Ionic.BZip2.BZip2InputStream(fs))
+ /// {
+ /// var outFname = fname + ".decompressed";
+ /// using (var output = File.Create(outFname))
+ /// {
+ /// byte[] buffer = new byte[2048];
+ /// int n;
+ /// while ((n = decompressor.Read(buffer, 0, buffer.Length)) > 0)
+ /// {
+ /// output.Write(buffer, 0, n);
+ /// }
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ public BZip2InputStream(Stream input, bool leaveOpen)
+ : base()
+ {
+
+ this.input = input;
+ this._leaveOpen = leaveOpen;
+ init();
+ }
+
+ ///
+ /// Read data from the stream.
+ ///
+ ///
+ ///
+ ///
+ /// To decompress a BZip2 data stream, create a BZip2InputStream,
+ /// providing a stream that reads compressed data. Then call Read() on
+ /// that BZip2InputStream, and the data read will be decompressed
+ /// as you read.
+ ///
+ ///
+ ///
+ /// A BZip2InputStream can be used only for Read(), not for Write().
+ ///
+ ///
+ ///
+ /// The buffer into which the read data should be placed.
+ /// the offset within that data array to put the first byte read.
+ /// the number of bytes to read.
+ /// the number of bytes actually read
+ public override int Read(byte[] buffer, int offset, int count)
+ {
+ if (offset < 0)
+ throw new IndexOutOfRangeException(String.Format("offset ({0}) must be > 0", offset));
+
+ if (count < 0)
+ throw new IndexOutOfRangeException(String.Format("count ({0}) must be > 0", count));
+
+ if (offset + count > buffer.Length)
+ throw new IndexOutOfRangeException(String.Format("offset({0}) count({1}) bLength({2})",
+ offset, count, buffer.Length));
+
+ if (this.input == null)
+ throw new IOException("the stream is not open");
+
+
+ int hi = offset + count;
+ int destOffset = offset;
+ for (int b; (destOffset < hi) && ((b = ReadByte()) >= 0);)
+ {
+ buffer[destOffset++] = (byte) b;
+ }
+
+ return (destOffset == offset) ? -1 : (destOffset - offset);
+ }
+
+ private void MakeMaps()
+ {
+ bool[] inUse = this.data.inUse;
+ byte[] seqToUnseq = this.data.seqToUnseq;
+
+ int n = 0;
+
+ for (int i = 0; i < 256; i++)
+ {
+ if (inUse[i])
+ seqToUnseq[n++] = (byte) i;
+ }
+
+ this.nInUse = n;
+ }
+
+ ///
+ /// Read a single byte from the stream.
+ ///
+ /// the byte read from the stream, or -1 if EOF
+ public override int ReadByte()
+ {
+ int retChar = this.currentChar;
+ totalBytesRead++;
+ switch (this.currentState)
+ {
+ case CState.EOF:
+ return -1;
+
+ case CState.START_BLOCK:
+ throw new IOException("bad state");
+
+ case CState.RAND_PART_A:
+ throw new IOException("bad state");
+
+ case CState.RAND_PART_B:
+ SetupRandPartB();
+ break;
+
+ case CState.RAND_PART_C:
+ SetupRandPartC();
+ break;
+
+ case CState.NO_RAND_PART_A:
+ throw new IOException("bad state");
+
+ case CState.NO_RAND_PART_B:
+ SetupNoRandPartB();
+ break;
+
+ case CState.NO_RAND_PART_C:
+ SetupNoRandPartC();
+ break;
+
+ default:
+ throw new IOException("bad state");
+ }
+
+ return retChar;
+ }
+
+
+
+
+ ///
+ /// Indicates whether the stream can be read.
+ ///
+ ///
+ /// The return value depends on whether the captive stream supports reading.
+ ///
+ public override bool CanRead
+ {
+ get
+ {
+ if (_disposed) throw new ObjectDisposedException("BZip2Stream");
+ return this.input.CanRead;
+ }
+ }
+
+
+ ///
+ /// Indicates whether the stream supports Seek operations.
+ ///
+ ///
+ /// Always returns false.
+ ///
+ public override bool CanSeek
+ {
+ get { return false; }
+ }
+
+
+ ///
+ /// Indicates whether the stream can be written.
+ ///
+ ///
+ /// The return value depends on whether the captive stream supports writing.
+ ///
+ public override bool CanWrite
+ {
+ get
+ {
+ if (_disposed) throw new ObjectDisposedException("BZip2Stream");
+ return input.CanWrite;
+ }
+ }
+
+ ///
+ /// Flush the stream.
+ ///
+ public override void Flush()
+ {
+ if (_disposed) throw new ObjectDisposedException("BZip2Stream");
+ input.Flush();
+ }
+
+ ///
+ /// Reading this property always throws a .
+ ///
+ public override long Length
+ {
+ get { throw new NotImplementedException(); }
+ }
+
+ ///
+ /// The position of the stream pointer.
+ ///
+ ///
+ ///
+ /// Setting this property always throws a . Reading will return the
+ /// total number of uncompressed bytes read in.
+ ///
+ public override long Position
+ {
+ get
+ {
+ return this.totalBytesRead;
+ }
+ set { throw new NotImplementedException(); }
+ }
+
+ ///
+ /// Calling this method always throws a .
+ ///
+ /// this is irrelevant, since it will always throw!
+ /// this is irrelevant, since it will always throw!
+ /// irrelevant!
+ public override long Seek(long offset, System.IO.SeekOrigin origin)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Calling this method always throws a .
+ ///
+ /// this is irrelevant, since it will always throw!
+ public override void SetLength(long value)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ /// Calling this method always throws a .
+ ///
+ /// this parameter is never used
+ /// this parameter is never used
+ /// this parameter is never used
+ public override void Write(byte[] buffer, int offset, int count)
+ {
+ throw new NotImplementedException();
+ }
+
+
+ ///
+ /// Dispose the stream.
+ ///
+ ///
+ /// indicates whether the Dispose method was invoked by user code.
+ ///
+ protected override void Dispose(bool disposing)
+ {
+ try
+ {
+ if (!_disposed)
+ {
+ if (disposing && (this.input != null))
+ this.input.Close();
+ _disposed = true;
+ }
+ }
+ finally
+ {
+ base.Dispose(disposing);
+ }
+ }
+
+
+ void init()
+ {
+ if (null == this.input)
+ throw new IOException("No input Stream");
+
+ if (!this.input.CanRead)
+ throw new IOException("Unreadable input Stream");
+
+ CheckMagicChar('B', 0);
+ CheckMagicChar('Z', 1);
+ CheckMagicChar('h', 2);
+
+ int blockSize = this.input.ReadByte();
+
+ if ((blockSize < '1') || (blockSize > '9'))
+ throw new IOException("Stream is not BZip2 formatted: illegal "
+ + "blocksize " + (char) blockSize);
+
+ this.blockSize100k = blockSize - '0';
+
+ InitBlock();
+ SetupBlock();
+ }
+
+
+ void CheckMagicChar(char expected, int position)
+ {
+ int magic = this.input.ReadByte();
+ if (magic != (int)expected)
+ {
+ var msg = String.Format("Not a valid BZip2 stream. byte {0}, expected '{1}', got '{2}'",
+ position, (int)expected, magic);
+ throw new IOException(msg);
+ }
+ }
+
+
+ void InitBlock()
+ {
+ char magic0 = bsGetUByte();
+ char magic1 = bsGetUByte();
+ char magic2 = bsGetUByte();
+ char magic3 = bsGetUByte();
+ char magic4 = bsGetUByte();
+ char magic5 = bsGetUByte();
+
+ if (magic0 == 0x17 && magic1 == 0x72 && magic2 == 0x45
+ && magic3 == 0x38 && magic4 == 0x50 && magic5 == 0x90)
+ {
+ complete(); // end of file
+ }
+ else if (magic0 != 0x31 ||
+ magic1 != 0x41 ||
+ magic2 != 0x59 ||
+ magic3 != 0x26 ||
+ magic4 != 0x53 ||
+ magic5 != 0x59)
+ {
+ this.currentState = CState.EOF;
+ var msg = String.Format("bad block header at offset 0x{0:X}",
+ this.input.Position);
+ throw new IOException(msg);
+ }
+ else
+ {
+ this.storedBlockCRC = bsGetInt();
+ // Console.WriteLine(" stored block CRC : {0:X8}", this.storedBlockCRC);
+
+ this.blockRandomised = (GetBits(1) == 1);
+
+ // Lazily allocate data
+ if (this.data == null)
+ this.data = new DecompressionState(this.blockSize100k);
+
+ // currBlockNo++;
+ getAndMoveToFrontDecode();
+
+ this.crc.Reset();
+ this.currentState = CState.START_BLOCK;
+ }
+ }
+
+
+ private void EndBlock()
+ {
+ this.computedBlockCRC = (uint)this.crc.Crc32Result;
+
+ // A bad CRC is considered a fatal error.
+ if (this.storedBlockCRC != this.computedBlockCRC)
+ {
+ // make next blocks readable without error
+ // (repair feature, not yet documented, not tested)
+ // this.computedCombinedCRC = (this.storedCombinedCRC << 1)
+ // | (this.storedCombinedCRC >> 31);
+ // this.computedCombinedCRC ^= this.storedBlockCRC;
+
+ var msg = String.Format("BZip2 CRC error (expected {0:X8}, computed {1:X8})",
+ this.storedBlockCRC, this.computedBlockCRC);
+ throw new IOException(msg);
+ }
+
+ // Console.WriteLine(" combined CRC (before): {0:X8}", this.computedCombinedCRC);
+ this.computedCombinedCRC = (this.computedCombinedCRC << 1)
+ | (this.computedCombinedCRC >> 31);
+ this.computedCombinedCRC ^= this.computedBlockCRC;
+ // Console.WriteLine(" computed block CRC : {0:X8}", this.computedBlockCRC);
+ // Console.WriteLine(" combined CRC (after) : {0:X8}", this.computedCombinedCRC);
+ // Console.WriteLine();
+ }
+
+
+ private void complete()
+ {
+ this.storedCombinedCRC = bsGetInt();
+ this.currentState = CState.EOF;
+ this.data = null;
+
+ if (this.storedCombinedCRC != this.computedCombinedCRC)
+ {
+ var msg = String.Format("BZip2 CRC error (expected {0:X8}, computed {1:X8})",
+ this.storedCombinedCRC, this.computedCombinedCRC);
+
+ throw new IOException(msg);
+ }
+ }
+
+ ///
+ /// Close the stream.
+ ///
+ public override void Close()
+ {
+ Stream inShadow = this.input;
+ if (inShadow != null)
+ {
+ try
+ {
+ if (!this._leaveOpen)
+ inShadow.Close();
+ }
+ finally
+ {
+ this.data = null;
+ this.input = null;
+ }
+ }
+ }
+
+
+ ///
+ /// Read n bits from input, right justifying the result.
+ ///
+ ///
+ ///
+ /// For example, if you read 1 bit, the result is either 0
+ /// or 1.
+ ///
+ ///
+ ///
+ /// The number of bits to read, always between 1 and 32.
+ ///
+ private int GetBits(int n)
+ {
+ int bsLiveShadow = this.bsLive;
+ int bsBuffShadow = this.bsBuff;
+
+ if (bsLiveShadow < n)
+ {
+ do
+ {
+ int thech = this.input.ReadByte();
+
+ if (thech < 0)
+ throw new IOException("unexpected end of stream");
+
+ // Console.WriteLine("R {0:X2}", thech);
+
+ bsBuffShadow = (bsBuffShadow << 8) | thech;
+ bsLiveShadow += 8;
+ } while (bsLiveShadow < n);
+
+ this.bsBuff = bsBuffShadow;
+ }
+
+ this.bsLive = bsLiveShadow - n;
+ return (bsBuffShadow >> (bsLiveShadow - n)) & ((1 << n) - 1);
+ }
+
+
+ // private bool bsGetBit()
+ // {
+ // int bsLiveShadow = this.bsLive;
+ // int bsBuffShadow = this.bsBuff;
+ //
+ // if (bsLiveShadow < 1)
+ // {
+ // int thech = this.input.ReadByte();
+ //
+ // if (thech < 0)
+ // {
+ // throw new IOException("unexpected end of stream");
+ // }
+ //
+ // bsBuffShadow = (bsBuffShadow << 8) | thech;
+ // bsLiveShadow += 8;
+ // this.bsBuff = bsBuffShadow;
+ // }
+ //
+ // this.bsLive = bsLiveShadow - 1;
+ // return ((bsBuffShadow >> (bsLiveShadow - 1)) & 1) != 0;
+ // }
+
+ private bool bsGetBit()
+ {
+ int bit = GetBits(1);
+ return bit != 0;
+ }
+
+ private char bsGetUByte()
+ {
+ return (char) GetBits(8);
+ }
+
+ private uint bsGetInt()
+ {
+ return (uint)((((((GetBits(8) << 8) | GetBits(8)) << 8) | GetBits(8)) << 8) | GetBits(8));
+ }
+
+
+ /**
+ * Called by createHuffmanDecodingTables() exclusively.
+ */
+ private static void hbCreateDecodeTables(int[] limit,
+ int[] bbase, int[] perm, char[] length,
+ int minLen, int maxLen, int alphaSize)
+ {
+ for (int i = minLen, pp = 0; i <= maxLen; i++)
+ {
+ for (int j = 0; j < alphaSize; j++)
+ {
+ if (length[j] == i)
+ {
+ perm[pp++] = j;
+ }
+ }
+ }
+
+ for (int i = BZip2.MaxCodeLength; --i > 0;)
+ {
+ bbase[i] = 0;
+ limit[i] = 0;
+ }
+
+ for (int i = 0; i < alphaSize; i++)
+ {
+ bbase[length[i] + 1]++;
+ }
+
+ for (int i = 1, b = bbase[0]; i < BZip2.MaxCodeLength; i++)
+ {
+ b += bbase[i];
+ bbase[i] = b;
+ }
+
+ for (int i = minLen, vec = 0, b = bbase[i]; i <= maxLen; i++)
+ {
+ int nb = bbase[i + 1];
+ vec += nb - b;
+ b = nb;
+ limit[i] = vec - 1;
+ vec <<= 1;
+ }
+
+ for (int i = minLen + 1; i <= maxLen; i++)
+ {
+ bbase[i] = ((limit[i - 1] + 1) << 1) - bbase[i];
+ }
+ }
+
+
+
+ private void recvDecodingTables()
+ {
+ var s = this.data;
+ bool[] inUse = s.inUse;
+ byte[] pos = s.recvDecodingTables_pos;
+ //byte[] selector = s.selector;
+
+ int inUse16 = 0;
+
+ /* Receive the mapping table */
+ for (int i = 0; i < 16; i++)
+ {
+ if (bsGetBit())
+ {
+ inUse16 |= 1 << i;
+ }
+ }
+
+ for (int i = 256; --i >= 0;)
+ {
+ inUse[i] = false;
+ }
+
+ for (int i = 0; i < 16; i++)
+ {
+ if ((inUse16 & (1 << i)) != 0)
+ {
+ int i16 = i << 4;
+ for (int j = 0; j < 16; j++)
+ {
+ if (bsGetBit())
+ {
+ inUse[i16 + j] = true;
+ }
+ }
+ }
+ }
+
+ MakeMaps();
+ int alphaSize = this.nInUse + 2;
+
+ /* Now the selectors */
+ int nGroups = GetBits(3);
+ int nSelectors = GetBits(15);
+
+ for (int i = 0; i < nSelectors; i++)
+ {
+ int j = 0;
+ while (bsGetBit())
+ {
+ j++;
+ }
+ s.selectorMtf[i] = (byte) j;
+ }
+
+ /* Undo the MTF values for the selectors. */
+ for (int v = nGroups; --v >= 0;)
+ {
+ pos[v] = (byte) v;
+ }
+
+ for (int i = 0; i < nSelectors; i++)
+ {
+ int v = s.selectorMtf[i];
+ byte tmp = pos[v];
+ while (v > 0)
+ {
+ // nearly all times v is zero, 4 in most other cases
+ pos[v] = pos[v - 1];
+ v--;
+ }
+ pos[0] = tmp;
+ s.selector[i] = tmp;
+ }
+
+ char[][] len = s.temp_charArray2d;
+
+ /* Now the coding tables */
+ for (int t = 0; t < nGroups; t++)
+ {
+ int curr = GetBits(5);
+ char[] len_t = len[t];
+ for (int i = 0; i < alphaSize; i++)
+ {
+ while (bsGetBit())
+ {
+ curr += bsGetBit() ? -1 : 1;
+ }
+ len_t[i] = (char) curr;
+ }
+ }
+
+ // finally create the Huffman tables
+ createHuffmanDecodingTables(alphaSize, nGroups);
+ }
+
+
+ /**
+ * Called by recvDecodingTables() exclusively.
+ */
+ private void createHuffmanDecodingTables(int alphaSize,
+ int nGroups)
+ {
+ var s = this.data;
+ char[][] len = s.temp_charArray2d;
+
+ for (int t = 0; t < nGroups; t++)
+ {
+ int minLen = 32;
+ int maxLen = 0;
+ char[] len_t = len[t];
+ for (int i = alphaSize; --i >= 0;)
+ {
+ char lent = len_t[i];
+ if (lent > maxLen)
+ maxLen = lent;
+
+ if (lent < minLen)
+ minLen = lent;
+ }
+ hbCreateDecodeTables(s.gLimit[t], s.gBase[t], s.gPerm[t], len[t], minLen,
+ maxLen, alphaSize);
+ s.gMinlen[t] = minLen;
+ }
+ }
+
+
+
+ private void getAndMoveToFrontDecode()
+ {
+ var s = this.data;
+ this.origPtr = GetBits(24);
+
+ if (this.origPtr < 0)
+ throw new IOException("BZ_DATA_ERROR");
+ if (this.origPtr > 10 + BZip2.BlockSizeMultiple * this.blockSize100k)
+ throw new IOException("BZ_DATA_ERROR");
+
+ recvDecodingTables();
+
+ byte[] yy = s.getAndMoveToFrontDecode_yy;
+ int limitLast = this.blockSize100k * BZip2.BlockSizeMultiple;
+
+ /*
+ * Setting up the unzftab entries here is not strictly necessary, but it
+ * does save having to do it later in a separate pass, and so saves a
+ * block's worth of cache misses.
+ */
+ for (int i = 256; --i >= 0;)
+ {
+ yy[i] = (byte) i;
+ s.unzftab[i] = 0;
+ }
+
+ int groupNo = 0;
+ int groupPos = BZip2.G_SIZE - 1;
+ int eob = this.nInUse + 1;
+ int nextSym = getAndMoveToFrontDecode0(0);
+ int bsBuffShadow = this.bsBuff;
+ int bsLiveShadow = this.bsLive;
+ int lastShadow = -1;
+ int zt = s.selector[groupNo] & 0xff;
+ int[] base_zt = s.gBase[zt];
+ int[] limit_zt = s.gLimit[zt];
+ int[] perm_zt = s.gPerm[zt];
+ int minLens_zt = s.gMinlen[zt];
+
+ while (nextSym != eob)
+ {
+ if ((nextSym == BZip2.RUNA) || (nextSym == BZip2.RUNB))
+ {
+ int es = -1;
+
+ for (int n = 1; true; n <<= 1)
+ {
+ if (nextSym == BZip2.RUNA)
+ {
+ es += n;
+ }
+ else if (nextSym == BZip2.RUNB)
+ {
+ es += n << 1;
+ }
+ else
+ {
+ break;
+ }
+
+ if (groupPos == 0)
+ {
+ groupPos = BZip2.G_SIZE - 1;
+ zt = s.selector[++groupNo] & 0xff;
+ base_zt = s.gBase[zt];
+ limit_zt = s.gLimit[zt];
+ perm_zt = s.gPerm[zt];
+ minLens_zt = s.gMinlen[zt];
+ }
+ else
+ {
+ groupPos--;
+ }
+
+ int zn = minLens_zt;
+
+ // Inlined:
+ // int zvec = GetBits(zn);
+ while (bsLiveShadow < zn)
+ {
+ int thech = this.input.ReadByte();
+ if (thech >= 0)
+ {
+ bsBuffShadow = (bsBuffShadow << 8) | thech;
+ bsLiveShadow += 8;
+ continue;
+ }
+ else
+ {
+ throw new IOException("unexpected end of stream");
+ }
+ }
+ int zvec = (bsBuffShadow >> (bsLiveShadow - zn))
+ & ((1 << zn) - 1);
+ bsLiveShadow -= zn;
+
+ while (zvec > limit_zt[zn])
+ {
+ zn++;
+ while (bsLiveShadow < 1)
+ {
+ int thech = this.input.ReadByte();
+ if (thech >= 0)
+ {
+ bsBuffShadow = (bsBuffShadow << 8) | thech;
+ bsLiveShadow += 8;
+ continue;
+ }
+ else
+ {
+ throw new IOException("unexpected end of stream");
+ }
+ }
+ bsLiveShadow--;
+ zvec = (zvec << 1)
+ | ((bsBuffShadow >> bsLiveShadow) & 1);
+ }
+ nextSym = perm_zt[zvec - base_zt[zn]];
+ }
+
+ byte ch = s.seqToUnseq[yy[0]];
+ s.unzftab[ch & 0xff] += es + 1;
+
+ while (es-- >= 0)
+ {
+ s.ll8[++lastShadow] = ch;
+ }
+
+ if (lastShadow >= limitLast)
+ throw new IOException("block overrun");
+ }
+ else
+ {
+ if (++lastShadow >= limitLast)
+ throw new IOException("block overrun");
+
+ byte tmp = yy[nextSym - 1];
+ s.unzftab[s.seqToUnseq[tmp] & 0xff]++;
+ s.ll8[lastShadow] = s.seqToUnseq[tmp];
+
+ /*
+ * This loop is hammered during decompression, hence avoid
+ * native method call overhead of System.Buffer.BlockCopy for very
+ * small ranges to copy.
+ */
+ if (nextSym <= 16)
+ {
+ for (int j = nextSym - 1; j > 0;)
+ {
+ yy[j] = yy[--j];
+ }
+ }
+ else
+ {
+ System.Buffer.BlockCopy(yy, 0, yy, 1, nextSym - 1);
+ }
+
+ yy[0] = tmp;
+
+ if (groupPos == 0)
+ {
+ groupPos = BZip2.G_SIZE - 1;
+ zt = s.selector[++groupNo] & 0xff;
+ base_zt = s.gBase[zt];
+ limit_zt = s.gLimit[zt];
+ perm_zt = s.gPerm[zt];
+ minLens_zt = s.gMinlen[zt];
+ }
+ else
+ {
+ groupPos--;
+ }
+
+ int zn = minLens_zt;
+
+ // Inlined:
+ // int zvec = GetBits(zn);
+ while (bsLiveShadow < zn)
+ {
+ int thech = this.input.ReadByte();
+ if (thech >= 0)
+ {
+ bsBuffShadow = (bsBuffShadow << 8) | thech;
+ bsLiveShadow += 8;
+ continue;
+ }
+ else
+ {
+ throw new IOException("unexpected end of stream");
+ }
+ }
+ int zvec = (bsBuffShadow >> (bsLiveShadow - zn))
+ & ((1 << zn) - 1);
+ bsLiveShadow -= zn;
+
+ while (zvec > limit_zt[zn])
+ {
+ zn++;
+ while (bsLiveShadow < 1)
+ {
+ int thech = this.input.ReadByte();
+ if (thech >= 0)
+ {
+ bsBuffShadow = (bsBuffShadow << 8) | thech;
+ bsLiveShadow += 8;
+ continue;
+ }
+ else
+ {
+ throw new IOException("unexpected end of stream");
+ }
+ }
+ bsLiveShadow--;
+ zvec = (zvec << 1) | ((bsBuffShadow >> bsLiveShadow) & 1);
+ }
+ nextSym = perm_zt[zvec - base_zt[zn]];
+ }
+ }
+
+ this.last = lastShadow;
+ this.bsLive = bsLiveShadow;
+ this.bsBuff = bsBuffShadow;
+ }
+
+
+ private int getAndMoveToFrontDecode0(int groupNo)
+ {
+ var s = this.data;
+ int zt = s.selector[groupNo] & 0xff;
+ int[] limit_zt = s.gLimit[zt];
+ int zn = s.gMinlen[zt];
+ int zvec = GetBits(zn);
+ int bsLiveShadow = this.bsLive;
+ int bsBuffShadow = this.bsBuff;
+
+ while (zvec > limit_zt[zn])
+ {
+ zn++;
+ while (bsLiveShadow < 1)
+ {
+ int thech = this.input.ReadByte();
+
+ if (thech >= 0)
+ {
+ bsBuffShadow = (bsBuffShadow << 8) | thech;
+ bsLiveShadow += 8;
+ continue;
+ }
+ else
+ {
+ throw new IOException("unexpected end of stream");
+ }
+ }
+ bsLiveShadow--;
+ zvec = (zvec << 1) | ((bsBuffShadow >> bsLiveShadow) & 1);
+ }
+
+ this.bsLive = bsLiveShadow;
+ this.bsBuff = bsBuffShadow;
+
+ return s.gPerm[zt][zvec - s.gBase[zt][zn]];
+ }
+
+
+ private void SetupBlock()
+ {
+ if (this.data == null)
+ return;
+
+ int i;
+ var s = this.data;
+ int[] tt = s.initTT(this.last + 1);
+
+ // xxxx
+
+ /* Check: unzftab entries in range. */
+ for (i = 0; i <= 255; i++)
+ {
+ if (s.unzftab[i] < 0 || s.unzftab[i] > this.last)
+ throw new Exception("BZ_DATA_ERROR");
+ }
+
+ /* Actually generate cftab. */
+ s.cftab[0] = 0;
+ for (i = 1; i <= 256; i++) s.cftab[i] = s.unzftab[i-1];
+ for (i = 1; i <= 256; i++) s.cftab[i] += s.cftab[i-1];
+ /* Check: cftab entries in range. */
+ for (i = 0; i <= 256; i++)
+ {
+ if (s.cftab[i] < 0 || s.cftab[i] > this.last+1)
+ {
+ var msg = String.Format("BZ_DATA_ERROR: cftab[{0}]={1} last={2}",
+ i, s.cftab[i], this.last);
+ throw new Exception(msg);
+ }
+ }
+ /* Check: cftab entries non-descending. */
+ for (i = 1; i <= 256; i++)
+ {
+ if (s.cftab[i-1] > s.cftab[i])
+ throw new Exception("BZ_DATA_ERROR");
+ }
+
+ int lastShadow;
+ for (i = 0, lastShadow = this.last; i <= lastShadow; i++)
+ {
+ tt[s.cftab[s.ll8[i] & 0xff]++] = i;
+ }
+
+ if ((this.origPtr < 0) || (this.origPtr >= tt.Length))
+ throw new IOException("stream corrupted");
+
+ this.su_tPos = tt[this.origPtr];
+ this.su_count = 0;
+ this.su_i2 = 0;
+ this.su_ch2 = 256; /* not a valid 8-bit byte value?, and not EOF */
+
+ if (this.blockRandomised)
+ {
+ this.su_rNToGo = 0;
+ this.su_rTPos = 0;
+ SetupRandPartA();
+ }
+ else
+ {
+ SetupNoRandPartA();
+ }
+ }
+
+
+
+ private void SetupRandPartA()
+ {
+ if (this.su_i2 <= this.last)
+ {
+ this.su_chPrev = this.su_ch2;
+ int su_ch2Shadow = this.data.ll8[this.su_tPos] & 0xff;
+ this.su_tPos = this.data.tt[this.su_tPos];
+ if (this.su_rNToGo == 0)
+ {
+ this.su_rNToGo = Rand.Rnums(this.su_rTPos) - 1;
+ if (++this.su_rTPos == 512)
+ {
+ this.su_rTPos = 0;
+ }
+ }
+ else
+ {
+ this.su_rNToGo--;
+ }
+ this.su_ch2 = su_ch2Shadow ^= (this.su_rNToGo == 1) ? 1 : 0;
+ this.su_i2++;
+ this.currentChar = su_ch2Shadow;
+ this.currentState = CState.RAND_PART_B;
+ this.crc.UpdateCRC((byte)su_ch2Shadow);
+ }
+ else
+ {
+ EndBlock();
+ InitBlock();
+ SetupBlock();
+ }
+ }
+
+ private void SetupNoRandPartA()
+ {
+ if (this.su_i2 <= this.last)
+ {
+ this.su_chPrev = this.su_ch2;
+ int su_ch2Shadow = this.data.ll8[this.su_tPos] & 0xff;
+ this.su_ch2 = su_ch2Shadow;
+ this.su_tPos = this.data.tt[this.su_tPos];
+ this.su_i2++;
+ this.currentChar = su_ch2Shadow;
+ this.currentState = CState.NO_RAND_PART_B;
+ this.crc.UpdateCRC((byte)su_ch2Shadow);
+ }
+ else
+ {
+ this.currentState = CState.NO_RAND_PART_A;
+ EndBlock();
+ InitBlock();
+ SetupBlock();
+ }
+ }
+
+ private void SetupRandPartB()
+ {
+ if (this.su_ch2 != this.su_chPrev)
+ {
+ this.currentState = CState.RAND_PART_A;
+ this.su_count = 1;
+ SetupRandPartA();
+ }
+ else if (++this.su_count >= 4)
+ {
+ this.su_z = (char) (this.data.ll8[this.su_tPos] & 0xff);
+ this.su_tPos = this.data.tt[this.su_tPos];
+ if (this.su_rNToGo == 0)
+ {
+ this.su_rNToGo = Rand.Rnums(this.su_rTPos) - 1;
+ if (++this.su_rTPos == 512)
+ {
+ this.su_rTPos = 0;
+ }
+ }
+ else
+ {
+ this.su_rNToGo--;
+ }
+ this.su_j2 = 0;
+ this.currentState = CState.RAND_PART_C;
+ if (this.su_rNToGo == 1)
+ {
+ this.su_z ^= (char)1;
+ }
+ SetupRandPartC();
+ }
+ else
+ {
+ this.currentState = CState.RAND_PART_A;
+ SetupRandPartA();
+ }
+ }
+
+ private void SetupRandPartC()
+ {
+ if (this.su_j2 < this.su_z)
+ {
+ this.currentChar = this.su_ch2;
+ this.crc.UpdateCRC((byte)this.su_ch2);
+ this.su_j2++;
+ }
+ else
+ {
+ this.currentState = CState.RAND_PART_A;
+ this.su_i2++;
+ this.su_count = 0;
+ SetupRandPartA();
+ }
+ }
+
+ private void SetupNoRandPartB()
+ {
+ if (this.su_ch2 != this.su_chPrev)
+ {
+ this.su_count = 1;
+ SetupNoRandPartA();
+ }
+ else if (++this.su_count >= 4)
+ {
+ this.su_z = (char) (this.data.ll8[this.su_tPos] & 0xff);
+ this.su_tPos = this.data.tt[this.su_tPos];
+ this.su_j2 = 0;
+ SetupNoRandPartC();
+ }
+ else
+ {
+ SetupNoRandPartA();
+ }
+ }
+
+ private void SetupNoRandPartC()
+ {
+ if (this.su_j2 < this.su_z)
+ {
+ int su_ch2Shadow = this.su_ch2;
+ this.currentChar = su_ch2Shadow;
+ this.crc.UpdateCRC((byte)su_ch2Shadow);
+ this.su_j2++;
+ this.currentState = CState.NO_RAND_PART_C;
+ }
+ else
+ {
+ this.su_i2++;
+ this.su_count = 0;
+ SetupNoRandPartA();
+ }
+ }
+
+ private sealed class DecompressionState
+ {
+ // (with blockSize 900k)
+ readonly public bool[] inUse = new bool[256];
+ readonly public byte[] seqToUnseq = new byte[256]; // 256 byte
+ readonly public byte[] selector = new byte[BZip2.MaxSelectors]; // 18002 byte
+ readonly public byte[] selectorMtf = new byte[BZip2.MaxSelectors]; // 18002 byte
+
+ /**
+ * Freq table collected to save a pass over the data during
+ * decompression.
+ */
+ public readonly int[] unzftab;
+ public readonly int[][] gLimit;
+ public readonly int[][] gBase;
+ public readonly int[][] gPerm;
+ public readonly int[] gMinlen;
+
+ public readonly int[] cftab;
+ public readonly byte[] getAndMoveToFrontDecode_yy;
+ public readonly char[][] temp_charArray2d;
+ public readonly byte[] recvDecodingTables_pos;
+ // ---------------
+ // 60798 byte
+
+ public int[] tt; // 3600000 byte
+ public byte[] ll8; // 900000 byte
+
+ // ---------------
+ // 4560782 byte
+ // ===============
+
+ public DecompressionState(int blockSize100k)
+ {
+ this.unzftab = new int[256]; // 1024 byte
+
+ this.gLimit = BZip2.InitRectangularArray(BZip2.NGroups,BZip2.MaxAlphaSize);
+ this.gBase = BZip2.InitRectangularArray(BZip2.NGroups,BZip2.MaxAlphaSize);
+ this.gPerm = BZip2.InitRectangularArray(BZip2.NGroups,BZip2.MaxAlphaSize);
+ this.gMinlen = new int[BZip2.NGroups]; // 24 byte
+
+ this.cftab = new int[257]; // 1028 byte
+ this.getAndMoveToFrontDecode_yy = new byte[256]; // 512 byte
+ this.temp_charArray2d = BZip2.InitRectangularArray(BZip2.NGroups,BZip2.MaxAlphaSize);
+ this.recvDecodingTables_pos = new byte[BZip2.NGroups]; // 6 byte
+
+ this.ll8 = new byte[blockSize100k * BZip2.BlockSizeMultiple];
+ }
+
+ /**
+ * Initializes the tt array.
+ *
+ * This method is called when the required length of the array is known.
+ * I don't initialize it at construction time to avoid unneccessary
+ * memory allocation when compressing small files.
+ */
+ public int[] initTT(int length)
+ {
+ int[] ttShadow = this.tt;
+
+ // tt.length should always be >= length, but theoretically
+ // it can happen, if the compressor mixed small and large
+ // blocks. Normally only the last block will be smaller
+ // than others.
+ if ((ttShadow == null) || (ttShadow.Length < length))
+ {
+ this.tt = ttShadow = new int[length];
+ }
+
+ return ttShadow;
+ }
+ }
+
+
+ }
+
+ // /**
+ // * Checks if the signature matches what is expected for a bzip2 file.
+ // *
+ // * @param signature
+ // * the bytes to check
+ // * @param length
+ // * the number of bytes to check
+ // * @return true, if this stream is a bzip2 compressed stream, false otherwise
+ // *
+ // * @since Apache Commons Compress 1.1
+ // */
+ // public static boolean MatchesSig(byte[] signature)
+ // {
+ // if ((signature.Length < 3) ||
+ // (signature[0] != 'B') ||
+ // (signature[1] != 'Z') ||
+ // (signature[2] != 'h'))
+ // return false;
+ //
+ // return true;
+ // }
+
+
+ internal static class BZip2
+ {
+ internal static T[][] InitRectangularArray(int d1, int d2)
+ {
+ var x = new T[d1][];
+ for (int i=0; i < d1; i++)
+ {
+ x[i] = new T[d2];
+ }
+ return x;
+ }
+
+ public static readonly int BlockSizeMultiple = 100000;
+ public static readonly int MinBlockSize = 1;
+ public static readonly int MaxBlockSize = 9;
+ public static readonly int MaxAlphaSize = 258;
+ public static readonly int MaxCodeLength = 23;
+ public static readonly char RUNA = (char) 0;
+ public static readonly char RUNB = (char) 1;
+ public static readonly int NGroups = 6;
+ public static readonly int G_SIZE = 50;
+ public static readonly int N_ITERS = 4;
+ public static readonly int MaxSelectors = (2 + (900000 / G_SIZE));
+ public static readonly int NUM_OVERSHOOT_BYTES = 20;
+ /*
+ *
If you are ever unlucky/improbable enough to get a stack
+ * overflow whilst sorting, increase the following constant and
+ * try again. In practice I have never seen the stack go above 27
+ * elems, so the following limit seems very generous.
+
+ Doug Lea
+ Griffin Caprio (.NET)
+
+
+
+ A collection designed for holding elements prior to processing.
+
+
+
+ Besides basic operations,
+ queues provide additional insertion, extraction, and inspection
+ operations.
+
+
+ Each of these methods exists in two forms: one throws
+ an exception if the operation fails, the other returns a special
+ value (either or , depending on the
+ operation). The latter form of the insert operation is designed
+ specifically for use with capacity-restricted
+ implementations; in most implementations, insert operations cannot
+ fail.
+
+
+ Queues typically, but do not necessarily, order elements in a
+ FIFO (first-in-first-out) manner. Among the exceptions are
+ priority queues, which order elements according to a supplied
+ comparator, or the elements' natural ordering, and LIFO queues (or
+ stacks) which order the elements LIFO (last-in-first-out).
+ Whatever the ordering used, the head of the queue is that
+ element which would be removed by a call to
+ or
+ . In a FIFO queue, all new
+ elements are inserted at the tail of the queue. Other kinds of queues may
+ use different placement rules. Every implementation
+ must specify its ordering properties.
+
+
+ The method inserts an
+ element if possible, otherwise returning . This differs from the
+ method, which can fail to
+ add an element only by throwing an exception. The
+ method is designed for
+ use when failure is a normal, rather than exceptional occurrence, for example,
+ in fixed-capacity (or "bounded" queues.
+
+
+ The
+ methods remove and
+ return the head of the queue. Exactly which element is removed from the
+ queue is a function of the queue's ordering policy, which differs from
+ implementation to implementation. The
+ and
+ methods differ only in their
+ behavior when the queue is empty: the
+ method throws an exception,
+ while the method returns
+ .
+
+
+ The and
+ methods return, but do
+ not remove, the head of the queue.
+
+
+ The interface does not define the blocking queue
+ methods, which are common in concurrent programming.
+
+
+ implementations generally do not allow insertion
+ of elements, although some implementations, such as
+ a linked list, do not prohibit the insertion of .
+ Even in the implementations that permit it, should
+ not be inserted into a , as is also
+ used as a special return value by the
+ method to
+ indicate that the queue contains no elements.
+
+
+ implementations generally do not define
+ element-based versions of methods
+ and , but instead inherit the
+ identity based versions from the class object, because element-based equality
+ is not always well-defined for queues with the same elements but different
+ ordering properties.
+
+
+ Based on the back port of JCP JSR-166.
+
+
+ Doug Lea
+ Griffin Caprio (.NET)
+
+
+
+ Inserts the specified element into this queue if it is possible to do so
+ immediately without violating capacity restrictions, returning
+ upon success and throwing an
+ if no space is
+ currently available.
+
+
+ The element to add.
+
+
+ if successful.
+
+
+ If the element cannot be added at this time due to capacity restrictions.
+
+
+ If the class of the supplied prevents it
+ from being added to this queue.
+
+
+ If the specified element is and this queue does not
+ permit elements.
+
+
+ If some property of the supplied prevents
+ it from being added to this queue.
+
+
+
+
+ Inserts the specified element into this queue if it is possible to do
+ so immediately without violating capacity restrictions.
+
+
+
+ When using a capacity-restricted queue, this method is generally
+ preferable to ,
+ which can fail to insert an element only by throwing an exception.
+
+
+
+ The element to add.
+
+
+ if the element was added to this queue.
+
+
+ If the element cannot be added at this time due to capacity restrictions.
+
+
+ If the supplied is
+ .
+
+
+ If some property of the supplied prevents
+ it from being added to this queue.
+
+
+
+
+ Retrieves and removes the head of this queue.
+
+
+
+ This method differs from
+ only in that it throws an exception if this queue is empty.
+
+
+
+ The head of this queue
+
+ if this queue is empty
+
+
+
+ Retrieves and removes the head of this queue,
+ or returns if this queue is empty.
+
+
+ The head of this queue, or if this queue is empty.
+
+
+
+
+ Retrieves, but does not remove, the head of this queue.
+
+
+
+ This method differs from
+ only in that it throws an exception if this queue is empty.
+
+
+
+ The head of this queue.
+
+ If this queue is empty.
+
+
+
+ Retrieves, but does not remove, the head of this queue,
+ or returns if this queue is empty.
+
+
+ The head of this queue, or if this queue is empty.
+
+
+
+
+ Returns if there are no elements in the , otherwise.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+ This is an abstract class, and as such has no publicly
+ visible constructors.
+
+
+
+
+
+ Inserts the specified element into this queue if it is possible
+ to do so immediately without violating capacity restrictions.
+
+
+ The element to add.
+
+
+ if successful.
+
+
+ If the element cannot be added at this time due to capacity restrictions.
+
+
+
+
+ Retrieves and removes the head of this queue.
+
+
+
+ This method differs from
+ only in that
+ it throws an exception if this queue is empty.
+
+
+
+ The head of this queue
+
+
+ If this queue is empty.
+
+
+
+
+ Retrieves, but does not remove, the head of this queue.
+
+
+
+ This method differs from
+ only in that it throws an exception if this queue is empty.
+
+
+ ALso note that this implementation returns the result of
+ unless the queue
+ is empty.
+
+
+ The head of this queue.
+
+ If this queue is empty.
+
+
+
+
+ Removes all of the elements from this queue.
+
+
+
+ The queue will be empty after this call returns.
+
+
+ This implementation repeatedly invokes
+ until it
+ returns .
+
+
+
+
+
+ Adds all of the elements in the supplied
+ to this queue.
+
+
+
+ Attempts to
+
+ of a queue to itself result in .
+ Further, the behavior of this operation is undefined if the specified
+ collection is modified while the operation is in progress.
+
+
+ This implementation iterates over the specified collection,
+ and adds each element returned by the iterator to this queue, in turn.
+ An exception encountered while trying to add an element (including,
+ in particular, a element) may result in only some
+ of the elements having been successfully added when the associated
+ exception is thrown.
+
+
+
+ The collection containing the elements to be added to this queue.
+
+
+ if this queue changed as a result of the call.
+
+
+ If the supplied or any one of its elements are .
+
+
+ If the collection is the current or
+ the collection size is greater than the queue capacity.
+
+
+
+
+ Inserts the specified element into this queue if it is possible to do
+ so immediately without violating capacity restrictions.
+
+
+
+ When using a capacity-restricted queue, this method is generally
+ preferable to ,
+ which can fail to insert an element only by throwing an exception.
+
+
+
+ The element to add.
+
+
+ if the element was added to this queue.
+
+
+ If the element cannot be added at this time due to capacity restrictions.
+
+
+ If the supplied is
+ .
+
+
+ If some property of the supplied prevents
+ it from being added to this queue.
+
+
+
+
+ Retrieves, but does not remove, the head of this queue,
+ or returns if this queue is empty.
+
+
+ The head of this queue, or if this queue is empty.
+
+
+
+
+ Retrieves and removes the head of this queue,
+ or returns if this queue is empty.
+
+
+ The head of this queue, or if this queue is empty.
+
+
+
+
+ Copies the elements of the to an , starting at a particular index.
+
+ The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
+ The zero-based index in array at which copying begins.
+ array is null.
+ index is less than zero.
+ array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array.
+ The type of the source cannot be cast automatically to the type of the destination array. 2
+
+
+
+ Returns an enumerator that iterates through a collection.
+
+
+ An object that can be used to iterate through the collection.
+
+
+
+
+ Returns if there are no elements in the , otherwise.
+
+
+
+
+ Returns the current capacity of this queue.
+
+
+
+
+ Gets the number of elements contained in the .
+
+
+ The number of elements contained in the .
+
+
+
+
+ Gets an object that can be used to synchronize access to the .
+
+
+ An object that can be used to synchronize access to the .
+
+
+
+
+ Gets a value indicating whether access to the is synchronized (thread safe).
+
+
+ true if access to the is synchronized (thread safe); otherwise, false.
+
+
+
+
+ Provides a performance improved hashtable with case-insensitive (string-only! based) key handling.
+
+ Erich Eichinger
+
+
+
+ Creates a case-insensitive hashtable using .
+
+
+
+
+ Creates a case-insensitive hashtable using the given .
+
+ the to calculate the hashcode
+
+
+
+ Creates a case-insensitive hashtable using the given , initially
+ populated with entries from another dictionary.
+
+ the dictionary to copy entries from
+ the to calculate the hashcode
+
+
+
+ Initializes a new, empty instance of the class that is serializable using the specified and objects.
+
+ A object containing the source and destination of the serialized stream associated with the .
+ A object containing the information required to serialize the object.
+ info is null.
+
+
+
+ Implements the interface and returns the data needed to serialize the .
+
+
+ A object containing the source and destination of the serialized stream associated with the .
+ A object containing the information required to serialize the .
+ info is null.
+
+
+
+ Calculate the hashcode of the given string key, using the configured culture.
+
+
+
+
+
+
+ Compares two keys
+
+
+
+
+ Creates a shallow copy of the current instance.
+
+
+
+
+ is an
+ class that supports the creation of new
+ types where the underlying data
+ store is an instance.
+
+
+
+ You can use any object that implements the
+ interface to hold set
+ data. You can define your own, or you can use one of the objects
+ provided in the framework. The type of
+ you
+ choose will affect both the performance and the behavior of the
+ using it.
+
+
+ This object overrides the method,
+ but not the method, because
+ the class is mutable.
+ Therefore, it is not safe to use as a key value in a dictionary.
+
+
+ To make a typed based on your
+ own , simply derive a new
+ class with a constructor that takes no parameters. Some
+ implmentations cannot be defined
+ with a default constructor. If this is the case for your class, you
+ will need to override clone as well.
+
+
+ It is also standard practice that at least one of your constructors
+ takes an or an
+ as an argument.
+
+
+
+
+
+
+ A collection that contains no duplicate elements.
+
+
+
+
+
+ Performs a "union" of the two sets, where all the elements
+ in both sets are present.
+
+ A collection of elements.
+
+ A new containing the union of
+ this with the specified
+ collection. Neither of the input objects is modified by the union.
+
+
+
+
+
+ Performs a "union" of two sets, where all the elements in both are
+ present.
+
+
+
+ That is, the element is included if it is in either
+ or . The return
+ value is a clone of one of the sets (
+ if it is not ) with elements of the other set
+ added in. Neither of the input sets is modified by the operation.
+
+
+ A set of elements.
+ A set of elements.
+
+ A set containing the union of the input sets;
+ if both sets are .
+
+
+
+
+ Performs a "union" of two sets, where all the elements in both are
+ present.
+
+ A set of elements.
+ A set of elements.
+
+ A set containing the union of the input sets;
+ if both sets are .
+
+
+
+
+
+ Performs an "intersection" of the two sets, where only the elements
+ that are present in both sets remain.
+
+ A set of elements.
+
+ The intersection of this set with .
+
+
+
+
+
+ Performs an "intersection" of the two sets, where only the elements
+ that are present in both sets remain.
+
+
+
+ That is, the element is included only if it exists in both
+ and . Neither input
+ object is modified by the operation. The result object is a
+ clone of one of the input objects (
+ if it is not ) containing the elements from
+ the intersect operation.
+
+
+ A set of elements.
+ A set of elements.
+
+ The intersection of the two input sets; if
+ both sets are .
+
+
+
+
+ Performs an "intersection" of the two sets, where only the elements
+ that are present in both sets remain.
+
+ A set of elements.
+ A set of elements.
+
+ The intersection of the two input sets; if
+ both sets are .
+
+
+
+
+
+ Performs a "minus" of this set from the
+ set.
+
+ A set of elements.
+
+ A set containing the elements from this set with the elements in
+ removed.
+
+
+
+
+
+ Performs a "minus" of set from set
+ .
+
+
+
+ This returns a set of all the elements in set
+ , removing the elements that are also in
+ set . The original sets are not modified
+ during this operation. The result set is a clone of set
+ containing the elements from the operation.
+
+
+ A set of elements.
+ A set of elements.
+
+ A set containing
+ - elements.
+ if is
+ .
+
+
+
+
+ Performs a "minus" of set from set
+ .
+
+ A set of elements.
+ A set of elements.
+
+ A set containing
+ - elements.
+ if is
+ .
+
+
+
+
+
+ Performs an "exclusive-or" of the two sets, keeping only those
+ elements that are in one of the sets, but not in both.
+
+ A set of elements.
+
+ A set containing the result of
+ ^ this.
+
+
+
+
+
+ Performs an "exclusive-or" of the two sets, keeping only those
+ elements that are in one of the sets, but not in both.
+
+
+
+ The original sets are not modified during this operation. The
+ result set is a clone of one of the sets (
+ if it is not )
+ containing the elements from the exclusive-or operation.
+
+
+ A set of elements.
+ A set of elements.
+
+ A set containing the result of
+ ^ .
+ if both sets are .
+
+
+
+
+ Performs an "exclusive-or" of the two sets, keeping only those
+ elements that are in one of the sets, but not in both.
+
+ A set of elements.
+ A set of elements.
+
+ A set containing the result of
+ ^ .
+ if both sets are .
+
+
+
+
+
+ Adds the specified element to this set if it is not already present.
+
+ The object to add to the set.
+
+ is the object was added,
+ if the object was already present.
+
+
+
+
+ Adds all the elements in the specified collection to the set if
+ they are not already present.
+
+ A collection of objects to add to the set.
+
+ is the set changed as a result of this
+ operation.
+
+
+
+
+ Removes all objects from this set.
+
+
+
+
+ Returns if this set contains the specified
+ element.
+
+ The element to look for.
+
+ if this set contains the specified element.
+
+
+
+
+ Returns if the set contains all the
+ elements in the specified collection.
+
+ A collection of objects.
+
+ if the set contains all the elements in the
+ specified collection.
+
+
+
+
+ Removes the specified element from the set.
+
+ The element to be removed.
+
+ if the set contained the specified element.
+
+
+
+
+ Remove all the specified elements from this set, if they exist in
+ this set.
+
+ A collection of elements to remove.
+
+ if the set was modified as a result of this
+ operation.
+
+
+
+
+ Retains only the elements in this set that are contained in the
+ specified collection.
+
+
+ The collection that defines the set of elements to be retained.
+
+
+ if this set changed as a result of this
+ operation.
+
+
+
+
+ Returns a clone of the
+ instance.
+
+
+
+ This will work for derived
+ classes if the derived class implements a constructor that takes no
+ arguments.
+
+
+ A clone of this object.
+
+
+
+ Copies the elements in the to
+ an array.
+
+
+
+ The type of array needs to be compatible with the objects in the
+ , obviously.
+
+
+
+ An array that will be the target of the copy operation.
+
+
+ The zero-based index where copying will start.
+
+
+
+
+ Gets an enumerator for the elements in the
+ .
+
+
+ An over the elements
+ in the .
+
+
+
+
+ This method will test the
+ against another for
+ "equality".
+
+
+
+ In this case, "equality" means that the two sets contain the same
+ elements. The "==" and "!=" operators are not overridden by design.
+ If you wish to check for "equivalent"
+ instances, use
+ Equals(). If you wish to check to see if two references are
+ actually the same object, use "==" and "!=".
+
+
+
+ A object to compare to.
+
+
+ if the two sets contain the same elements.
+
+
+
+
+ Gets the hashcode for the object.
+
+
+
+
+ Returns if this set contains no elements.
+
+
+
+
+ The number of elements currently contained in this collection.
+
+
+
+
+ Returns if the
+ is synchronized across
+ threads.
+
+
+
+ Note that enumeration is inherently not thread-safe. Use the
+ to lock the object during enumeration.
+
+
+
+
+
+ An object that can be used to synchronize this collection to make
+ it thread-safe.
+
+
+
+ When implementing this, if your object uses a base object, like an
+ , or anything that has
+ a SyncRoot, return that object instead of "this".
+
+
+
+ An object that can be used to synchronize this collection to make
+ it thread-safe.
+
+
+
+
+ Adds the specified element to this set if it is not already present.
+
+ The object to add to the set.
+
+ is the object was added,
+ if the object was already present.
+
+
+
+
+ Adds all the elements in the specified collection to the set if
+ they are not already present.
+
+ A collection of objects to add to the set.
+
+ is the set changed as a result of this
+ operation.
+
+
+
+
+ Removes all objects from this set.
+
+
+
+
+ Returns if this set contains the specified
+ element.
+
+ The element to look for.
+
+ if this set contains the specified element.
+
+
+
+
+ Returns if the set contains all the
+ elements in the specified collection.
+
+ A collection of objects.
+
+ if the set contains all the elements in the
+ specified collection; also if the
+ supplied is .
+
+
+
+
+ Removes the specified element from the set.
+
+ The element to be removed.
+
+ if the set contained the specified element.
+
+
+
+
+ Remove all the specified elements from this set, if they exist in
+ this set.
+
+ A collection of elements to remove.
+
+ if the set was modified as a result of this
+ operation.
+
+
+
+
+ Retains only the elements in this set that are contained in the
+ specified collection.
+
+
+ The collection that defines the set of elements to be retained.
+
+
+ if this set changed as a result of this
+ operation.
+
+
+
+
+ Copies the elements in the to
+ an array.
+
+
+
+ The type of array needs to be compatible with the objects in the
+ , obviously.
+
+
+
+ An array that will be the target of the copy operation.
+
+
+ The zero-based index where copying will start.
+
+
+
+
+ Gets an enumerator for the elements in the
+ .
+
+
+ An over the elements
+ in the .
+
+
+
+
+ Provides the storage for elements in the
+ , stored as the key-set
+ of the object.
+
+
+
+ Set this object in the constructor if you create your own
+ class.
+
+
+
+
+
+ The placeholder object used as the value for the
+ instance.
+
+
+ There is a single instance of this object globally, used for all
+ s.
+
+
+
+
+ Returns if this set contains no elements.
+
+
+
+
+ The number of elements currently contained in this collection.
+
+
+
+
+ Returns if the
+ is synchronized across
+ threads.
+
+
+
+
+
+ An object that can be used to synchronize this collection to make
+ it thread-safe.
+
+
+ An object that can be used to synchronize this collection to make
+ it thread-safe.
+
+
+
+
+
+ Implements an based on a
+ hash table.
+
+
+
+ This will give the best lookup, add, and remove performance for very
+ large data-sets, but iteration will occur in no particular order.
+
+
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Creates a new instance of the class, and
+ initializes it based on a collection of elements.
+
+
+ A collection of elements that defines the initial set contents.
+
+
+
+
+ Implements an that automatically
+ changes from a list based implementation to a hashtable based
+ implementation when the size reaches a certain threshold.
+
+
+
+ This is good if you are unsure about whether you data-set will be tiny
+ or huge.
+
+
+ Because this uses a dual implementation, iteration order is not
+ guaranteed!
+
+
+
+
+
+
+ Creates a new set instance based on either a list or a hash table,
+ depending on which will be more efficient based on the data-set
+ size.
+
+
+
+
+ Initializes a new instance of the class with a given capacity
+
+ The size.
+
+
+
+ Creates a new set instance based on either a list or a hash table,
+ depending on which will be more efficient based on the data-set
+ size, and initializes it based on a collection of elements.
+
+
+ A collection of elements that defines the initial set contents.
+
+
+
+
+ Implements an immutable (read-only)
+ wrapper.
+
+
+
+ Although this class is advertised as immutable, it really isn't.
+ Anyone with access to the wrapped
+ can still change the data. So
+ is not implemented for this , as
+ is the case for all
+ implementations in this library. This design decision was based on the
+ efficiency of not having to clone the wrapped
+ every time you wrap a mutable
+ .
+
+
+
+
+
+ Constructs an immutable (read-only)
+ wrapper.
+
+
+ The that is to be wrapped.
+
+
+
+
+ Adds the specified element to this set if it is not already present.
+
+ The object to add to the set.
+
+ is the object was added,
+ if the object was already present.
+
+
+
+
+
+ Adds all the elements in the specified collection to the set if
+ they are not already present.
+
+ A collection of objects to add to the set.
+
+ is the set changed as a result of this
+ operation.
+
+
+
+
+
+ Removes all objects from this set.
+
+
+
+
+
+ Returns if this set contains the specified
+ element.
+
+ The element to look for.
+
+ if this set contains the specified element.
+
+
+
+
+ Returns if the set contains all the
+ elements in the specified collection.
+
+ A collection of objects.
+
+ if the set contains all the elements in the
+ specified collection.
+
+
+
+
+ Removes the specified element from the set.
+
+ The element to be removed.
+
+ if the set contained the specified element.
+
+
+
+
+
+ Remove all the specified elements from this set, if they exist in
+ this set.
+
+ A collection of elements to remove.
+
+ if the set was modified as a result of this
+ operation.
+
+
+
+
+
+ Retains only the elements in this set that are contained in the
+ specified collection.
+
+
+ The collection that defines the set of elements to be retained.
+
+
+ if this set changed as a result of this
+ operation.
+
+
+
+
+
+ Copies the elements in the to
+ an array.
+
+
+
+ The type of array needs to be compatible with the objects in the
+ , obviously.
+
+
+
+ An array that will be the target of the copy operation.
+
+
+ The zero-based index where copying will start.
+
+
+
+
+ Gets an enumerator for the elements in the
+ .
+
+
+ An over the elements
+ in the .
+
+
+
+
+ Returns a clone of the
+ instance.
+
+ A clone of this object.
+
+
+
+ Performs a "union" of the two sets, where all the elements
+ in both sets are present.
+
+ A collection of elements.
+
+ A new containing the union of
+ this with the specified
+ collection. Neither of the input objects is modified by the union.
+
+
+
+
+
+ Performs an "intersection" of the two sets, where only the elements
+ that are present in both sets remain.
+
+ A set of elements.
+
+ The intersection of this set with .
+
+
+
+
+
+ Performs a "minus" of this set from the
+ set.
+
+ A set of elements.
+
+ A set containing the elements from this set with the elements in
+ removed.
+
+
+
+
+
+ Performs an "exclusive-or" of the two sets, keeping only those
+ elements that are in one of the sets, but not in both.
+
+ A set of elements.
+
+ A set containing the result of
+ ^ this.
+
+
+
+
+
+ Returns if this set contains no elements.
+
+
+
+
+ The number of elements currently contained in this collection.
+
+
+
+
+ Returns if the
+ is synchronized across
+ threads.
+
+
+
+ Note that enumeration is inherently not thread-safe. Use the
+ to lock the object during enumeration.
+
+
+
+
+
+ An object that can be used to synchronize this collection to make
+ it thread-safe.
+
+
+ An object that can be used to synchronize this collection to make
+ it thread-safe.
+
+
+
+
+ Simple linked list implementation.
+
+ Simon White
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class that contains all
+ elements of the specified list.
+
+
+ A list of elements that defines the initial contents.
+
+
+
+
+ Removes the object at the specified index.
+
+ The lookup index.
+
+ If the specified is greater than the
+ number of objects within the list.
+
+
+
+
+ Inserts an object at the specified index.
+
+ The lookup index.
+ The object to be inserted.
+
+ If the specified is greater than the
+ number of objects within the list.
+
+
+
+
+ Removes the first instance of the specified object found.
+
+ The object to remove
+
+
+
+ Returns if this list contains the specified
+ element.
+
+ The element to look for.
+
+ if this list contains the specified element.
+
+
+
+
+ Removes all objects from the list.
+
+
+
+
+ Returns the index of the first instance of the specified
+ found.
+
+ The object to search for
+
+ The index of the first instance found, or -1 if the element was not
+ found.
+
+
+
+
+ Adds the specified object to the end of the list.
+
+ The object to add
+ The index that the object was added at.
+
+
+
+ Adds all of the elements of the supplied
+ list to the end of this list.
+
+ The list of objects to add.
+
+
+
+ Checks whether the list can be modified.
+
+
+ If the list cannot be modified.
+
+
+
+
+ Validates the specified index.
+
+ The lookup index.
+
+ If the index is invalid.
+
+
+
+
+ Returns the node at the specified index.
+
+ The lookup index.
+ The node at the specified index.
+
+ If the specified is greater than the
+ number of objects within the list.
+
+
+
+
+ Returns the node (and index) of the first node that contains
+ the specified value.
+
+ The value to search for.
+
+ The node, or if not found.
+
+
+
+
+ Removes the specified node.
+
+ The node to be removed.
+
+
+
+ Copies the elements in this list to an array.
+
+
+
+ The type of array needs to be compatible with the objects in this
+ list, obviously.
+
+
+
+ An array that will be the target of the copy operation.
+
+
+ The zero-based index where copying will start.
+
+
+ If the supplied is .
+
+
+ If the supplied is less than zero
+ or is greater than the length of .
+
+
+ If the supplied is of insufficient size.
+
+
+
+
+ Gets an enumerator for the elements in the
+ .
+
+
+
+ Enumerators are fail fast.
+
+
+
+ An over the elements
+ in the .
+
+
+
+
+ Is list read only?
+
+
+ if the list is read only.
+
+
+
+
+ Returns the node at the specified index.
+
+
+
+ This is the indexer for the
+ class.
+
+
+
+
+
+
+ Is the list a fixed size?
+
+
+ if the list is a fixed size list.
+
+
+
+
+ Returns if the list is synchronized across
+ threads.
+
+
+
+ This implementation always returns .
+
+
+ Note that enumeration is inherently not thread-safe. Use the
+ to lock the object during enumeration.
+
+
+
+
+
+ The number of objects within the list.
+
+
+
+
+ An object that can be used to synchronize this
+ to make it thread-safe.
+
+
+ An object that can be used to synchronize this
+ to make it thread-safe.
+
+
+
+
+ Implements a based on a list.
+
+
+
+ Performance is much better for very small lists than either
+ or .
+ However, performance degrades rapidly as the data-set gets bigger. Use a
+ instead if you are not sure your data-set
+ will always remain very small. Iteration produces elements in the order they were added.
+ However, element order is not guaranteed to be maintained by the various
+ mathematical operators.
+
+
+
+
+
+ Creates a new set instance based on a list.
+
+
+
+
+ Creates a new set instance based on a list and initializes it based on a
+ collection of elements.
+
+
+ A collection of elements that defines the initial set contents.
+
+
+
+
+ Thrown when an element is requested from an empty .
+
+ Griffin Caprio
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ 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.
+
+
+
+
+ Creates a new instance of the
+ class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the
+ class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ An unbounded priority based on a priority
+ heap. This queue orders elements according to an order specified
+ at construction time, which is specified either according to their
+ natural order (see , or according to a
+ , depending on which constructor is
+ used. A priority queue does not permit elements.
+ A priority queue relying on natural ordering also does not
+ permit insertion of non-comparable objects (doing so will result
+ .
+
+
+ The head of this queue is the lowest element
+ with respect to the specified ordering. If multiple elements are
+ tied for lowest value, the head is one of those elements -- ties are
+ broken arbitrarily.
+
+
+ A priority queue is unbounded, but has an internal
+ capacity governing the size of an array used to store the
+ elements on the queue. It is always at least as large as the queue
+ size. As elements are added to a priority queue, its capacity
+ grows automatically. The details of the growth policy are not
+ specified.
+
+
+ This class and its enumerator implement all of the
+ optional methods of the and
+ interfaces.
+ The enumerator provided in method
+ is not guaranteed to traverse the elements of the PriorityQueue in any
+ particular order.
+
+
+ Note that this implementation is NOT synchronized.
+ Multiple threads should not access a
+ instance concurrently if any of the threads modifies the list
+ structurally. Instead, use the thread-safe PriorityBlockingQueue.
+
+ Josh Bloch
+ Griffin Caprio (.NET)
+
+
+
+ Priority queue represented as a balanced binary heap: the two children
+ of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is
+ ordered by comparator, or by the elements' natural ordering, if
+ comparator is null: For each node n in the heap and each descendant d
+ of n, n <= d.
+
+ The element with the lowest value is in queue[1], assuming the queue is
+ nonempty. (A one-based array is used in preference to the traditional
+ zero-based array to simplify parent and child calculations.)
+
+ queue.length must be >= 2, even if size == 0.
+
+
+
+ The number of elements in the priority queue.
+
+
+
+ The comparator, or null if priority queue uses elements'
+ natural ordering.
+
+
+
+
+ The number of times this priority queue has been
+ structurally modified.
+
+
+
+
+ Creates a with the default initial capacity
+ (11) that orders its elements according to their natural
+ ordering (using ).
+
+
+
+
+ Creates a with the specified initial capacity
+ that orders its elements according to their natural ordering
+ (using ).
+
+ the initial capacity for this priority queue.
+
+ if is less than 1.
+
+
+
+ Creates a with the specified initial capacity
+ that orders its elements according to the specified comparator.
+
+ the initial capacity for this priority queue.
+ the comparator used to order this priority queue.
+ If then the order depends on the elements' natural ordering.
+
+ if is less than 1.
+
+
+
+ Creates a containing the elements in the
+ specified collection. The priority queue has an initial
+ capacity of 110% of the size of the specified collection or 1
+ if the collection is empty. If the specified collection is an
+ instance of a , the priority queue will be sorted
+ according to the same comparator, or according to its elements'
+ natural order if the collection is sorted according to its
+ elements' natural order. Otherwise, the priority queue is
+ ordered according to its elements' natural order.
+
+ the collection whose elements are to be placed into this priority queue.
+ if elements of cannot be
+ compared to one another according to the priority queue's ordering
+ if or any element with it is
+
+
+
+
+
+ Common code to initialize underlying queue array across
+ constructors below.
+
+
+
+
+ Performs an unsigned bitwise right shift with the specified number
+
+ Number to operate on
+ Ammount of bits to shift
+ The resulting number from the shift operation
+
+
+
+ Establishes the heap invariant assuming the heap
+ satisfies the invariant except possibly for the leaf-node indexed by k
+ (which may have a nextExecutionTime less than its parent's).
+
+
+ This method functions by "promoting" queue[k] up the hierarchy
+ (by swapping it with its parent) repeatedly until queue[k]
+ is greater than or equal to its parent.
+
+
+
+
+ Establishes the heap invariant (described above) in the subtree
+ rooted at k, which is assumed to satisfy the heap invariant except
+ possibly for node k itself (which may be greater than its children).
+
+
+ This method functions by "demoting" queue[k] down the hierarchy
+ (by swapping it with its smaller child) repeatedly until queue[k]
+ is less than or equal to its children.
+
+
+
+
+ Establishes the heap invariant in the entire tree,
+ assuming nothing about the order of the elements prior to the call.
+
+
+
+
+ Returns the of or - 1,
+ whichever is smaller.
+
+ base size
+ percentage to return
+ of
+
+
+
+ Initially fill elements of the queue array under the
+ knowledge that it is sorted or is another , in which
+ case we can just place the elements in the order presented.
+
+
+
+
+ Initially fill elements of the queue array that is not to our knowledge
+ sorted, so we must rearrange the elements to guarantee the heap
+ invariant.
+
+
+
+
+ Removes and returns element located at from queue. (Recall that the queue
+ is one-based, so 1 <= i <= size.)
+
+
+ Normally this method leaves the elements at positions from 1 up to i-1,
+ inclusive, untouched. Under these circumstances, it returns .
+ Occasionally, in order to maintain the heap invariant, it must move
+ the last element of the list to some index in the range [2, i-1],
+ and move the element previously at position (i/2) to position i.
+ Under these circumstances, this method returns the element that was
+ previously at the end of the list and is now at some position between
+ 2 and i-1 inclusive.
+
+
+
+ Resize array, if necessary, to be able to hold given index
+
+
+
+ Inserts the specified element into this queue if it is possible to do
+ so immediately without violating capacity restrictions.
+
+
+
+ When using a capacity-restricted queue, this method is generally
+ preferable to ,
+ which can fail to insert an element only by throwing an exception.
+
+
+
+ The element to add.
+
+
+ if the element was added to this queue.
+
+
+ if the specified element cannot be compared
+ with elements currently in the priority queue according
+ to the priority queue's ordering.
+
+
+ If the element cannot be added at this time due to capacity restrictions.
+
+
+ If the supplied is
+ and this queue does not permit
+ elements.
+
+
+ If some property of the supplied prevents
+ it from being added to this queue.
+
+
+
+
+ Retrieves, but does not remove, the head of this queue,
+ or returns if this queue is empty.
+
+
+ The head of this queue, or if this queue is empty.
+
+
+
+
+ Inserts the specified element into this queue if it is possible to do so
+ immediately without violating capacity restrictions, returning
+ upon success and throwing an
+ if no space is
+ currently available.
+
+
+ The element to add.
+
+
+ if successful.
+
+
+ If the element cannot be added at this time due to capacity restrictions.
+
+
+ If the specified element is and this queue does not
+ permit elements.
+
+
+ If some property of the supplied prevents
+ it from being added to this queue.
+
+
+ if the specified element cannot be compared
+ with elements currently in the priority queue according
+ to the priority queue's ordering.
+
+
+
+
+ Removes a single instance of the specified element from this
+ queue, if it is present.
+
+
+
+
+ Returns an over the elements in this queue.
+ The enumeratoar does not return the elements in any particular order.
+
+ an enumerator over the elements in this queue.
+
+
+
+ Removes all elements from the priority queue.
+ The queue will be empty after this call returns.
+
+
+
+
+ Retrieves and removes the head of this queue,
+ or returns if this queue is empty.
+
+
+ The head of this queue, or if this queue is empty.
+
+
+
+
+ Queries the queue to see if it contains the specified
+
+ element to look for.
+ if the queue contains the ,
+ otherwise.
+
+
+ Returns the comparator used to order this collection, or
+ if this collection is sorted according to its elements natural ordering
+ (using ).
+
+
+ the comparator used to order this collection, or
+ if this collection is sorted according to its elements natural ordering.
+
+
+
+
+ Save the state of the instance to a stream (that
+ is, serialize it).
+
+ The length of the array backing the instance is
+ emitted (int), followed by all of its elements (each an
+ ) in the proper order.
+
+ the stream
+ the context
+
+
+
+ Reconstitute the instance from a stream (that is,
+ deserialize it).
+
+ the stream
+ the context
+
+
+
+ Copies the elements of the to an , starting at a particular index.
+
+ The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
+ The zero-based index in array at which copying begins.
+ array is null.
+ index is less than zero.
+ array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array.
+ The type of the source cannot be cast automatically to the type of the destination array. 2
+
+
+
+ Copies the elements of the to an , starting at index 0.
+
+ The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
+ array is null.
+ index is less than zero.
+ array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array.
+ The type of the source cannot be cast automatically to the type of the destination array. 2
+
+
+
+ Gets the Capacity of this queue. Will equal
+
+
+
+
+ Returns the queue count.
+
+
+
+
+ Gets an object that can be used to synchronize access to the .
+
+
+ An object that can be used to synchronize access to the .
+
+
+
+
+ Gets a value indicating whether access to the is synchronized (thread safe).
+
+
+ true if access to the is synchronized (thread safe); otherwise, false.
+
+
+
+
+ Returns if there are no elements in the , otherwise.
+
+
+
+
+ Index (into queue array) of element to be returned by subsequent call to next.
+
+
+
+
+ Implements an based on a sorted
+ tree.
+
+
+
+ This gives good performance for operations on very large data-sets,
+ though not as good - asymptotically - as a
+ . However, iteration occurs
+ in order.
+
+
+ Elements that you put into this type of collection must implement
+ , and they must actually be comparable.
+ You can't mix and
+ values, for example.
+
+
+ This implementation does
+ not support elements that are .
+
+
+
+
+
+
+ Creates a new set instance based on a sorted tree.
+
+
+
+
+ Creates a new set instance based on a sorted tree using for ordering.
+
+
+
+
+ Creates a new set instance based on a sorted tree and initializes
+ it based on a collection of elements.
+
+
+ A collection of elements that defines the initial set contents.
+
+
+
+
+ Synchronized that should be returned by synchronized
+ dictionary implementations in order to ensure that the enumeration is thread safe.
+
+ Aleksandar Seovic
+
+
+
+ Synchronized that should be returned by synchronized
+ collections in order to ensure that the enumeration is thread safe.
+
+ Aleksandar Seovic
+
+
+
+ Synchronized that, unlike hashtable created
+ using method, synchronizes
+ reads from the underlying hashtable in addition to writes.
+
+
+
+ In addition to synchronizing reads, this implementation also fixes
+ IEnumerator/ICollection issue described at
+ http://msdn.microsoft.com/en-us/netframework/aa570326.aspx
+ (search for SynchronizedHashtable for issue description), by implementing
+ interface explicitly, and returns thread safe enumerator
+ implementations as well.
+
+
+ This class should be used whenever a truly synchronized
+ is needed.
+
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of
+
+
+
+
+ Initializes a new instance of
+
+
+
+
+ Initializes a new instance of , copying inital entries from
+ handling keys depending on .
+
+
+
+
+ Creates a instance that
+ synchronizes access to the underlying .
+
+ the hashtable to be synchronized
+
+
+
+ Creates a wrapper that synchronizes
+ access to the passed .
+
+ the hashtable to be synchronized
+
+
+
+ Adds an element with the provided key and value to the object.
+
+ The to use as the value of the element to add.
+ The to use as the key of the element to add.
+ An element with the same key already exists in the object.
+ key is null.
+ The is read-only.-or- The has a fixed size. 2
+
+
+
+ Removes all elements from the object.
+
+ The object is read-only. 2
+
+
+
+ Creates a new object that is a copy of the current instance.
+
+
+ A new object that is a copy of this instance.
+
+
+
+
+ Determines whether the object contains an element with the specified key.
+
+
+ true if the contains an element with the key; otherwise, false.
+
+ The key to locate in the object.
+ key is null. 2
+
+
+
+ Returns, whether this contains an entry with the specified .
+
+ The key to look for
+ , if this contains an entry with this
+
+
+
+ Returns, whether this contains an entry with the specified .
+
+ The valúe to look for
+ , if this contains an entry with this
+
+
+
+ Copies the elements of the to an , starting at a particular index.
+
+ The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing.
+ The zero-based index in array at which copying begins.
+ array is null.
+ The type of the source cannot be cast automatically to the type of the destination array.
+ index is less than zero.
+ array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2
+
+
+
+ Returns an object for the object.
+
+
+ An object for the object.
+
+
+
+
+ Removes the element with the specified key from the object.
+
+ The key of the element to remove.
+ The object is read-only.-or- The has a fixed size.
+ key is null. 2
+
+
+
+ Returns an enumerator that iterates through a collection.
+
+
+ An object that can be used to iterate through the collection.
+
+
+
+
+ Gets a value indicating whether the object is read-only.
+
+
+ true if the object is read-only; otherwise, false.
+
+
+
+
+ Gets a value indicating whether the object has a fixed size.
+
+
+ true if the object has a fixed size; otherwise, false.
+
+
+
+
+ Gets a value indicating whether access to the is synchronized (thread safe).
+
+
+ true if access to the is synchronized (thread safe); otherwise, false.
+
+
+
+
+ Gets an object containing the keys of the object.
+
+
+ An object containing the keys of the object.
+
+
+
+
+ Gets an object containing the values in the object.
+
+
+ An object containing the values in the object.
+
+
+
+
+ Gets an object that can be used to synchronize access to the .
+
+
+ An object that can be used to synchronize access to the .
+
+
+
+
+ Gets the number of elements contained in the .
+
+
+ The number of elements contained in the .
+
+
+
+
+ Gets or sets the element with the specified key.
+
+
+ The element with the specified key.
+
+ The key of the element to get or set.
+ The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size.
+ key is null. 2
+
+
+
+ Implements a thread-safe wrapper.
+
+
+
+ The implementation is extremely conservative, serializing critical
+ sections to prevent possible deadlocks, and locking on everything. The
+ one exception is for enumeration, which is inherently not thread-safe.
+ For this, you have to lock the SyncRoot object for the
+ duration of the enumeration.
+
+
+
+
+
+
+ Constructs a thread-safe
+ wrapper.
+
+
+ The object that this object
+ will wrap.
+
+
+ If the supplied ecposes a
+ SyncRoot value.
+
+
+
+
+ Adds the specified element to this set if it is not already present.
+
+ The object to add to the set.
+
+ is the object was added,
+ if the object was already present.
+
+
+
+
+ Adds all the elements in the specified collection to the set if
+ they are not already present.
+
+ A collection of objects to add to the set.
+
+ is the set changed as a result of this
+ operation.
+
+
+
+
+ Removes all objects from this set.
+
+
+
+
+ Returns if this set contains the specified
+ element.
+
+ The element to look for.
+
+ if this set contains the specified element.
+
+
+
+
+ Returns if the set contains all the
+ elements in the specified collection.
+
+ A collection of objects.
+
+ if the set contains all the elements in the
+ specified collection; also if the
+ supplied is .
+
+
+
+
+ Removes the specified element from the set.
+
+ The element to be removed.
+
+ if the set contained the specified element.
+
+
+
+
+ Remove all the specified elements from this set, if they exist in
+ this set.
+
+ A collection of elements to remove.
+
+ if the set was modified as a result of this
+ operation.
+
+
+
+
+ Retains only the elements in this set that are contained in the
+ specified collection.
+
+
+ The collection that defines the set of elements to be retained.
+
+
+ if this set changed as a result of this
+ operation.
+
+
+
+
+ Copies the elements in the to
+ an array.
+
+
+
+ The type of array needs to be compatible with the objects in the
+ , obviously.
+
+
+
+ An array that will be the target of the copy operation.
+
+
+ The zero-based index where copying will start.
+
+
+
+
+ Gets an enumerator for the elements in the
+ .
+
+
+ An over the elements
+ in the .
+
+
+
+
+ Returns a clone of the instance.
+
+ A clone of this object.
+
+
+
+ Returns if this set contains no elements.
+
+
+
+
+ The number of elements currently contained in this collection.
+
+
+
+
+ Returns if the
+ is synchronized across
+ threads.
+
+
+
+
+
+ An object that can be used to synchronize this collection to make
+ it thread-safe.
+
+
+ An object that can be used to synchronize this collection to make
+ it thread-safe.
+
+
+
+
+
+ Simple listener that logs application events to the console.
+
+
+
+ Intended for use during debugging only.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+
+ A listener for application events.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Handle an application event.
+
+
+ The source of the event.
+
+
+ The event that is to be handled.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Handle an application event.
+
+
+ The source of the event.
+
+
+ The event that is to be handled.
+
+
+
+
+ Event object sent to listeners registered with an
+ to inform them of
+ context lifecycle events.
+
+ Griffin Caprio (.NET)
+
+
+
+
+
+
+ Encapsulates the data associated with an event raised by an
+ .
+
+ Rod Johnson
+ Mark Pollack (.NET)
+ Griffin Caprio (.NET)
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ The date and time when the event occured.
+
+
+ The date and time when the event occured.
+
+
+
+
+ The system time in milliseconds when the event happened.
+
+
+ The system time in milliseconds when the event happened.
+
+
+
+
+ Creates a new instance of the ContextEventArgs class to represent the
+ supplied context event.
+
+ The type of context event.
+
+
+
+ Returns a string representation of this object.
+
+ A string representation of this object.
+
+
+
+ The event type.
+
+
+
+
+ The various context event types.
+
+
+
+
+ The event type when the context is refreshed or created.
+
+
+
+
+ The event type when the context is closed.
+
+
+
+
+ Event object sent to listeners registered with an
+ to inform them of
+ context lifecycle event.
+
+
+
+
+ Event object sent to listeners registered with an
+ to inform them of
+ context lifecycle event.
+
+
+
+
+ Partial implementation of the
+ interface.
+
+
+
+ Does not mandate the type of storage used for configuration, but does
+ implement common functionality. Uses the Template Method design
+ pattern, requiring concrete subclasses to implement
+ methods.
+
+
+ In contrast to a plain vanilla
+ , an
+ is supposed
+ to detect special objects defined in its object factory: therefore,
+ this class automatically registers
+ s,
+ s
+ and s that are
+ defined as objects in the context.
+
+
+ An may be also supplied as
+ an object in the context, with the special, well-known-name of
+ "messageSource". Else, message resolution is delegated to the
+ parent context.
+
+
+ Rod Johnson
+ Juergan Hoeller
+ Griffin Caprio (.NET)
+
+
+
+
+
+ Configurable implementation of the
+ interface.
+
+
+
+ This implementation
+ supports the configuration of resource access protocols and the
+ corresponding .NET types that know how to handle those protocols.
+
+
+ Basic protocol-to-resource type mappings are also defined by this class,
+ while others can be added either internally, by application contexts
+ extending this class, or externally, by the end user configuring the
+ context.
+
+
+ Only one resource type can be defined for each protocol, but multiple
+ protocols can map to the same resource type (for example, the
+ "http" and "ftp" protocols both map to the
+ type. The protocols that are
+ mapped by default can be found in the following list.
+
+
+ Aleksandar Seovic
+
+
+
+
+
+
+ Describes an object that can load
+ s.
+
+
+
+ An implementation is
+ generally required to support the functionality described by this
+ interface.
+
+
+ The class is a
+ standalone implementation that is usable outside an
+ ; the aforementioned
+ class is also used by the
+ class.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+
+
+
+ Return an handle for the
+ specified resource.
+
+
+
+ The handle should always be a reusable resource descriptor; this
+ allows one to make repeated calls to the underlying
+ .
+
+
+
+
+ Must support fully qualified URLs, e.g. "file:C:/test.dat".
+
+
+ Should support relative file paths, e.g. "test.dat" (this will be
+ implementation-specific, typically provided by an
+ implementation).
+
+
+
+
+ An handle does not imply an
+ existing resource; you need to check the value of an
+ 's
+ property to determine
+ conclusively whether or not the resource actually exists.
+
+
+ The resource location.
+
+ An appropriate handle.
+
+
+
+
+
+
+
+ The separator between the protocol name and the resource name.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class using the specified default protocol for unqualified resources.
+
+
+
+
+ Returns a that has been
+ mapped to the protocol of the supplied .
+
+ The name of the resource.
+
+ A new instance for the
+ supplied .
+
+
+ If a
+ mapping does not exist for the supplied .
+
+
+ In the case of any errors arising from the instantiation of the
+ returned instance.
+
+
+
+
+
+ Checks that the supplied starts
+ with one of the protocol names currently mapped by this
+ instance.
+
+ The name of the resource.
+
+ if the supplied
+ starts with one of the known
+ protocols; if not, or if the supplied
+ is itself .
+
+
+
+
+ Extracts the protocol name from the supplied
+ .
+
+ The name of the resource.
+
+ The extracted protocol name or if the
+ supplied is unqualified (or
+ is itself ).
+
+
+
+
+ The default protocol to use for unqualified resources.
+
+
+
+ The initial value is "file".
+
+
+
+
+
+ Provides the means to configure an application context in addition to
+ the methods exposed on the
+ interface.
+
+
+
+ This interface is to be implemented by most (if not all)
+ implementations.
+
+
+ Configuration and lifecycle methods are encapsulated here to avoid
+ making them obvious to
+ client code.
+
+
+ Calling will close this
+ application context, releasing all resources and locks that the
+ implementation might hold. This includes disposing all cached
+ singleton objects.
+
+
+ does not invoke the
+ attendant on any parent
+ context.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+
+
+ The central interface to Spring.NET's IoC container.
+
+
+
+ implementations
+ provide:
+
+
+
+ Object factory functionality inherited from the
+
+ and
+ interfaces.
+
+
+
+
+ The ability to resolve messages, supporting internationalization.
+ Inherited from the
+ interface.
+
+
+
+
+ The ability to load file resources in a generic fashion.
+ Inherited from the
+ interface.
+
+
+
+
+ Acts an an event registry for supporting loosely coupled eventing
+ between objecs. Inherited from the
+ interface.
+
+
+
+
+ The ability to raise events related to the context lifecycle. Inherited
+ from the
+ interface.
+
+
+
+
+ Inheritance from a parent context. Definitions in a descendant context
+ will always take priority.
+
+
+
+
+
+ In addition to standard object factory lifecycle capabilities,
+ implementations need
+ to detect
+ ,
+ , and
+ objects and supply
+ their attendant dependencies accordingly.
+
+
+ This interface is the central client interface in Spring.NET's IoC
+ container implementation. As such it does inherit a quite sizeable
+ number of interfaces; implementations are strongly encouraged to use
+ composition to satisfy each of the inherited interfaces (where
+ appropriate of course).
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+
+
+
+
+ Extension of the interface
+ to be implemented by object factories that can enumerate all their object instances,
+ rather than attempting object lookup by name one by one as requested by clients.
+
+
+
+ implementations that preload
+ all their objects (for example, DOM-based XML factories) may implement this
+ interface. This interface is discussed in
+ "Expert One-on-One J2EE Design and Development", by Rod Johnson.
+
+
+ If this is an ,
+ the return values will not take any
+ hierarchy into account, but
+ will relate only to the objects defined in the current factory.
+ Use the helper class to
+ get all objects.
+
+
+ With the exception of
+ ,
+ the methods and properties in this interface are not designed for frequent
+ invocation. Implementations may be slow.
+
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ The root interface for accessing a Spring.NET IoC container.
+
+
+
+ This is the basic client view of a Spring.NET IoC container; further interfaces
+ such as and
+
+ are available for specific purposes such as enumeration and configuration.
+
+
+ This is the root interface to be implemented by objects that can hold a number
+ of object definitions, each uniquely identified by a
+ name. An independent instance of any of these objects can be obtained
+ (the Prototype design pattern), or a single shared instance can be obtained
+ (a superior alternative to the Singleton design pattern, in which the instance is a
+ singleton in the scope of the factory). Which type of instance
+ will be returned depends on the object factory configuration - the API is the same.
+ The Singleton approach is more useful and hence more common in practice.
+
+
+ The point of this approach is that the IObjectFactory is a central registry of
+ application components, and centralizes the configuring of application components
+ (no more do individual objects need to read properties files, for example).
+ See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a
+ discussion of the benefits of this approach.
+
+
+ Normally an IObjectFactory will load object definitions stored in a configuration
+ source (such as an XML document), and use the
+ namespace to configure the objects. However, an implementation could simply return
+ .NET objects it creates as necessary directly in .NET code. There are no
+ constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties
+ file etc. Implementations are encouraged to support references amongst objects,
+ to either Singletons or Prototypes.
+
+
+ In contrast to the methods in
+ , all of the methods
+ in this interface will also check parent factories if this is an
+ . If an object is
+ not found in this factory instance, the immediate parent is asked. Objects in
+ this factory instance are supposed to override objects of the same name in any
+ parent factory.
+
+
+ Object factories are supposed to support the standard object lifecycle interfaces
+ as far as possible. The maximum set of initialization methods and their standard
+ order is:
+
+
+
+
+
+ 's
+ property.
+
+
+
+
+ 's
+ property.
+
+
+
+
+
+ (only applicable if running within an ).
+
+
+
+
+ The
+
+ method of
+ s.
+
+
+
+
+ 's
+ method.
+
+
+
+
+ A custom init-method definition.
+
+
+
+
+ The
+
+ method of
+ s.
+
+
+
+
+
+
+ On shutdown of an object factory, the following lifecycle methods apply:
+
+
+
+
+
+ 's
+ method.
+
+
+
+
+ A custom destroy-method definition.
+
+
+
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Is this object a singleton?
+
+
+
+ That is, will
+ always return the same object?
+
+
+ Will ask the parent factory if the object cannot be found in this factory
+ instance.
+
+
+ The name of the object to query.
+ True if the named object is a singleton.
+
+ If there's no such object definition.
+
+
+
+
+ Determines whether the specified object name is prototype. That is, will GetObject
+ always return independent instances?
+
+ This method returning false does not clearly indicate a singleton object.
+ It indicated non-independent instances, which may correspond to a scoped object as
+ well. use the IsSingleton property to explicitly check for a shared
+ singleton instance.
+ Translates aliases back to the corresponding canonical object name. Will ask the
+ parent factory if the object can not be found in this factory instance.
+
+
+
+ The name of the object to query
+
+ true if the specified object name will always deliver independent instances; otherwise, false.
+
+ if there is no object with the given name.
+
+
+
+ Does this object factory contain an object with the given name?
+
+
+
+ The concrete lookup strategy depends on the implementation. E.g. s
+ will also search their parent factory if a name isn't found .
+
+
+ The name of the object to query.
+ True if an object with the given name is defined.
+
+
+
+ Return the aliases for the given object name, if defined.
+
+
+
+ Will ask the parent factory if the object cannot be found in this factory
+ instance.
+
+
+ The object name to check for aliases.
+ The aliases, or an empty array if none.
+
+ If there's no such object definition.
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+
+
+ This method allows an object factory to be used as a replacement for the
+ Singleton or Prototype design pattern.
+
+
+ Note that callers should retain references to returned objects. There is no
+ guarantee that this method will be implemented to be efficient. For example,
+ it may be synchronized, or may need to run an RDBMS query.
+
+
+ Will ask the parent factory if the object cannot be found in this factory
+ instance.
+
+
+ The name of the object to return.
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+
+
+ This method allows an object factory to be used as a replacement for the
+ Singleton or Prototype design pattern.
+
+
+ Note that callers should retain references to returned objects. There is no
+ guarantee that this method will be implemented to be efficient. For example,
+ it may be synchronized, or may need to run an RDBMS query.
+
+
+ Will ask the parent factory if the object cannot be found in this factory
+ instance.
+
+
+ The name of the object to return.
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a static factory method. If there is no factory method and the
+ arguments are not null, then match the argument values by type and
+ call the object's constructor.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the supplied is .
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+ The name of the object to return.
+
+ The the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a factory method. If there is no factory method and the
+ supplied array is not , then
+ match the argument values by type and call the object's constructor.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the object is not of the required type.
+
+
+ If the supplied is .
+
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+
+
+ Provides a measure of type safety by throwing an exception if the object is
+ not of the required .
+
+
+ This method allows an object factory to be used as a replacement for the
+ Singleton or Prototype design pattern.
+
+
+ Note that callers should retain references to returned objects. There is no
+ guarantee that this method will be implemented to be efficient. For example,
+ it may be synchronized, or may need to run an RDBMS query.
+
+
+ Will ask the parent factory if the object cannot be found in this factory
+ instance.
+
+
+ The name of the object to return.
+
+ the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the object is not of the required type.
+
+
+
+
+ Determine the type of the object with the given name.
+
+
+
+ More specifically, checks the type of object that
+ would return.
+ For an , returns the type
+ of object that the creates.
+
+
+ The name of the object to query.
+
+ The type of the object or if not determinable.
+
+
+
+
+ Determines whether the object with the given name matches the specified type.
+
+ More specifically, check whether a GetObject call for the given name
+ would return an object that is assignable to the specified target type.
+ Translates aliases back to the corresponding canonical bean name.
+ Will ask the parent factory if the bean cannot be found in this factory instance.
+
+ The name of the object to query.
+ Type of the target to match against.
+
+ true if the object type matches; otherwise, false
+ if it doesn't match or cannot be determined yet.
+
+ Ff there is no object with the given name
+
+
+
+
+ Return an unconfigured(!) instance (possibly shared or independent) of the given object name.
+
+ The name of the object to return.
+
+ The the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a factory method. If there is no factory method and the
+ supplied array is not , then
+ match the argument values by type and call the object's constructor.
+
+ The unconfigured(!) instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the object is not of the required type.
+
+
+ If the supplied is .
+
+
+
+ This method will only instantiate the requested object. It does NOT inject any dependencies!
+
+
+
+
+ Injects dependencies into the supplied instance
+ using the named object definition.
+
+
+
+ In addition to being generally useful, typically this method is used to provide
+ dependency injection functionality for objects that are instantiated outwith the
+ control of a developer. A case in point is the way that the current (1.1)
+ ASP.NET classes instantiate web controls... the instantiation takes place within
+ a private method of a compiled page, and thus cannot be hooked into the
+ typical Spring.NET IOC container lifecycle for dependency injection.
+
+
+
+ The following code snippet assumes that the instantiated factory instance
+ has been configured with an object definition named
+ 'ExampleNamespace.BusinessObject' that has been configured to set the
+ Dao property of any ExampleNamespace.BusinessObject instance
+ to an instance of an appropriate implementation...
+
+ namespace ExampleNamespace
+ {
+ public class BusinessObject
+ {
+ private IDao _dao;
+
+ public BusinessObject() {}
+
+ public IDao Dao
+ {
+ get { return _dao; }
+ set { _dao = value; }
+ }
+ }
+ }
+
+ with the corresponding driver code looking like so...
+
+ IObjectFactory factory = GetAnIObjectFactoryImplementation();
+ BusinessObject instance = new BusinessObject();
+ factory.ConfigureObject(instance, "object_definition_name");
+ // at this point the dependencies for the 'instance' object will have been resolved...
+
+
+
+ The object instance that is to be so configured.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+ If there is no object definition for the supplied .
+
+
+ If any of the target object's dependencies could not be created.
+
+
+
+
+ Determine whether this object factory treats object names case-sensitive or not.
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+
+
+ This method allows an object factory to be used as a replacement for the
+ Singleton or Prototype design pattern.
+
+
+ Note that callers should retain references to returned objects. There is no
+ guarantee that this method will be implemented to be efficient. For example,
+ it may be synchronized, or may need to run an RDBMS query.
+
+
+ Will ask the parent factory if the object cannot be found in this factory
+ instance.
+
+
+ This is the indexer for the
+ interface.
+
+
+ The name of the object to return.
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+
+
+ Check if this object factory contains an object definition with the given name.
+
+
+
+ Does not consider any hierarchy this factory may participate in.
+
+
+ Ignores any singleton objects that have been registered by other means
+ than object definitions.
+
+
+ The name of the object to look for.
+
+ if this object factory contains an object
+ definition with the given name.
+
+
+
+
+ Return the names of all objects defined in this factory.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+
+ Does consider objects created by s,
+ or rather it considers the type of objects created by
+ (which means that
+ s will be instantiated).
+
+
+ Does not consider any hierarchy this factory may participate in.
+
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+
+ Does consider objects created by s,
+ or rather it considers the type of objects created by
+ (which means that
+ s will be instantiated).
+
+
+ Does not consider any hierarchy this factory may participate in.
+ Use
+ to include beans in ancestor factories too.
+ <p>Note: Does <i>not</i> ignore singleton objects that have been registered
+ by other means than bean definitions.
+
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+ Whether to include prototype objects too or just singletons (also applies to
+ s).
+
+
+ Whether to include s too
+ or just normal objects.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+ Return the object instances that match the given object
+ (including subclasses), judging from either object
+ definitions or the value of
+ in the case of
+ s.
+
+
+
+ This version of the
+ method matches all kinds of object definitions, be they singletons, prototypes, or
+ s. Typically, the results
+ of this method call will be the same as a call to
+ IListableObjectFactory.GetObjectsOfType(type,true,true) .
+
+
+
+ The (class or interface) to match.
+
+
+ A of the matching objects,
+ containing the object names as keys and the corresponding object instances
+ as values.
+
+
+ If the objects could not be created.
+
+
+
+
+ Return the object instances that match the given object
+ (including subclasses), judging from either object
+ definitions or the value of
+ in the case of
+ s.
+
+
+ The (class or interface) to match.
+
+
+ Whether to include prototype objects too or just singletons (also applies to
+ s).
+
+
+ Whether to include s too
+ or just normal objects.
+
+
+ A of the matching objects,
+ containing the object names as keys and the corresponding object instances
+ as values.
+
+
+ If the objects could not be created.
+
+
+
+
+ Return the number of objects defined in the factory.
+
+
+ The number of objects defined in the factory.
+
+
+
+
+ Sub-interface implemented by object factories that can be part
+ of a hierarchy.
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Determines whether the local object factory contains a bean of the given name,
+ ignoring object defined in ancestor contexts, also resolving a given alias if necessary.
+ This is an alternative to ContainsObject, ignoring an object
+ of the given name from an ancestor object factory.
+
+ The name of the object to query.
+
+ true if objects with the specified name is defined in the local factory; otherwise, false.
+
+
+
+
+ Return the parent object factory, or
+ if this factory does not have a parent.
+
+
+ The parent object factory, or
+ if this factory does not have a parent.
+
+
+
+
+ Describes an object that can resolve messages.
+
+
+
+ This enables the parameterization and internationalization of messages.
+
+
+ Spring.NET provides one out-of-the-box implementation for production
+ use:
+
+
.
+
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+ Aleksandar Seovic (.NET)
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+
+
+ If the lookup is not successful, implementations are permitted to
+ take one of two actions.
+
+
+
+ Throw an exception.
+
+
+
+ Return the supplied as is.
+
+
+
+
+ The name of the message to resolve.
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+
+
+ If the lookup is not successful, implementations are permitted to
+ take one of two actions.
+
+
+
+ Throw an exception.
+
+
+
+ Return the supplied as is.
+
+
+
+
+ The name of the message to resolve.
+
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+
+ Note that the fallback behavior based on CultureInfo seem to
+ have a bug that is fixed by installed .NET 1.1 Service Pack 1.
+
+ If the lookup is not successful, implementations are permitted to
+ take one of two actions.
+
+
+
+ Throw an exception.
+
+
+
+ Return the supplied as is.
+
+
+
+
+ The name of the message to resolve.
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+
+ Note that the fallback behavior based on CultureInfo seem to
+ have a bug that is fixed by installed .NET 1.1 Service Pack 1.
+
+ If the lookup is not successful, implementations are permitted to
+ take one of two actions.
+
+
+
+ Throw an exception.
+
+
+
+ Return the supplied as is.
+
+
+
+
+ The name of the message to resolve.
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+
+ Note that the fallback behavior based on CultureInfo seem to
+ have a bug that is fixed by installed .NET 1.1 Service Pack 1.
+
+ If the lookup is not successful, implementations are permitted to
+ take one of two actions.
+
+
+
+ Throw an exception.
+
+
+
+ Return the supplied as is.
+
+
+
+
+ The name of the message to resolve.
+ The default message if name is not found.
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+
+
+ Resolve the message using all of the attributes contained within
+ the supplied
+ argument.
+
+
+ The value object storing those attributes that are required to
+ properly resolve a message.
+
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the message could not be resolved.
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+
+ This method must use the
+
+ value to obtain a resource.
+
+
+ Examples of resources that may be resolved by this method include
+ (but are not limited to) objects such as icons and bitmaps.
+
+
+
+ The name of the resource object to resolve.
+
+
+ The resolved object, or if not found.
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+
+ Examples of resources that may be resolved by this method include
+ (but are not limited to) objects such as icons and bitmaps.
+
+
+
+ The name of the resource object to resolve.
+
+
+ The with which the
+ resource is associated.
+
+
+ The resolved object, or if not found.
+
+
+
+
+ Applies resources to object properties.
+
+
+
+ Resource key names are of the form objectName.propertyName.
+
+
+
+ An object that contains the property values to be applied.
+
+
+ The base name of the object to use for key lookup.
+
+
+ The with which the
+ resource is associated.
+
+
+
+
+ Encapsulates event publication functionality.
+
+
+
+ Serves as a super-interface for the
+ interface.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Publishes an application context event.
+
+
+ The source of the event. May be .
+
+
+ The event that is to be raised.
+
+
+
+
+ A registry that manages subscriptions to and the
+ publishing of events.
+
+ Griffin Caprio
+
+
+
+ Publishes all events of the source object.
+
+
+ The source object containing events to publish.
+
+
+
+
+ Subscribes to all events published, if the subscriber
+ implements compatible handler methods.
+
+ The subscriber to use.
+
+
+
+ Subscribes to the published events of all objects of a given
+ , if the subscriber implements
+ compatible handler methods.
+
+ The subscriber to use.
+
+ The target to subscribe to.
+
+
+
+
+ Unsubscribes to all events published, if the subscriber
+ implmenets compatible handler methods.
+
+ The subscriber to use
+
+
+
+ Unsubscribes to the published events of all objects of a given
+ , if the subscriber implements
+ compatible handler methods.
+
+ The subscriber to use.
+
+ The target to unsubscribe from
+
+
+
+
+ Raised in response to an application context event.
+
+
+
+
+ Returns the date and time this context was loaded.
+
+
+
+ This is to be set immediately after an
+ has been
+ instantiated and its configuration has been loaded. Implementations
+ are permitted to update this value if the context is reset or
+ refreshed in some way.
+
+
+
+ The representing when this context
+ was loaded.
+
+
+
+
+
+ Gets the parent context, or if there is no
+ parent context.
+
+
+
+ If the parent context is , then this context
+ is the root of any context hierarchy.
+
+
+
+ The parent context, or if there is no
+ parent.
+
+
+
+
+ Gets and sets a name for this context.
+
+
+ A name for this context.
+
+
+
+
+ Interface defining methods for start/stop lifecycle control.
+ The typical use case for this is to control asynchronous processing.
+
+
+
+ Can be implemented by both components (typically a Spring object defined in
+ a spring and containers
+ (typically a spring . Containers will
+ propagate start/stop signals to all components that apply.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Starts this component.
+
+ Should not throw an exception if the component is already running.
+ In the case of a container, this will propagate the start signal
+ to all components that apply.
+
+
+
+
+ Stops this component.
+
+
+ Should not throw an exception if the component isn't started yet.
+ In the case of a container, this will propagate the stop signal
+ to all components that apply.
+
+
+
+
+ Gets a value indicating whether this component is currently running.
+
+
+ In the case of a container, this will return true
+ only if all components that apply are currently running.
+
+
+ true if this component is running; otherwise, false.
+
+
+
+
+ Add an
+
+ that will get applied to the internal object factory of this
+ application context on refresh, before any of the object
+ definitions are evaluated.
+
+
+
+ To be invoked during context configuration.
+
+
+
+ The factory processor to register.
+
+
+
+
+
+ Load or refresh the persistent representation of the configuration,
+ which might an XML file, properties file, or relational database schema.
+
+
+ If the configuration cannot be loaded.
+
+
+ If the object factory could not be initialized.
+
+
+
+
+ Return the internal object factory of this application context.
+
+
+
+ Can be used to access specific functionality of the factory.
+
+
+ This is just guaranteed to return an instance that is not
+ after the context has been refreshed
+ at least once.
+
+
+ Do not use this to post-process the object factory; singletons
+ will already have been instantiated. Use an
+
+ to intercept the object factory setup process before objects even
+ get touched.
+
+
+
+
+
+
+ Sets the parent of this application context.
+
+
+
+ The parent should not be changed: it should only be set
+ outside a constructor if it isn't available when an instance of
+ this class is created.
+
+
+
+ The parent context.
+
+
+
+
+ Interface for registries that hold object definitions, i.e.
+
+ and
+
+ instances.
+
+
+
+ Typically implemented by object factories that work with the
+
+ hierarchy internally.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Determine whether the given object name is already in use within this registry,
+ i.e. whether there is a local object or alias registered under this name.
+
+
+
+
+ Return the names of all objects defined in this registry.
+
+
+ The names of all objects defined in this registry, or an empty array
+ if none defined
+
+
+
+
+ Check if this registry contains a object definition with the given name.
+
+
+ The name of the object to look for.
+
+
+ True if this object factory contains an object definition with the
+ given name.
+
+
+
+
+ Returns the
+
+ for the given object name.
+
+
+ The name of the object to find a definition for.
+
+
+ The for
+ the given name (never null).
+
+
+ If the object definition cannot be resolved.
+
+
+ In case of errors.
+
+
+
+
+ Register a new object definition with this registry.
+ Must support
+
+ and .
+
+
+ The name of the object instance to register.
+
+
+ The definition of the object instance to register.
+
+
+
+ Must support
+ and
+ .
+
+
+
+ If the object definition is invalid.
+
+
+
+
+ Return the aliases for the given object name, if defined.
+
+ the object name to check for aliases
+
+
+
+ Will ask the parent factory if the object cannot be found in this
+ factory instance.
+
+
+
+ The aliases, or an empty array if none.
+
+
+ If there's no such object definition.
+
+
+
+
+ Given a object name, create an alias. We typically use this method to
+ support names that are illegal within XML ids (used for object names).
+
+
+ The name of the object.
+
+
+ The alias that will behave the same as the object name.
+
+
+ If there is no object with the given name.
+
+
+ If the alias is already in use.
+
+
+
+
+ Return the number of objects defined in the registry.
+
+
+ The number of objects defined in the registry.
+
+
+
+
+ Name of the .Net config section that contains Spring.Net context definition.
+
+
+
+
+ Default name of the root context.
+
+
+
+
+ The special, well-known-name of the default
+ in the context.
+
+
+
+ If no can be found
+ in the context using this lookup key, then message resolution
+ will be delegated to the parent context (if any).
+
+
+
+
+
+ The special, well-known-name of the default
+ in the context.
+
+
+
+ If no can be found
+ in the context using this lookup key, then a default
+ will be used.
+
+
+
+
+
+ The instance for this class.
+
+
+
+
+ The instance we delegate
+ our implementation of said interface to.
+
+
+
+
+ The instance we
+ delegate our implementation of said interface to.
+
+
+
+
+ Creates a new instance of the
+ with no parent context.
+
+
+
+ This is an class, and as such exposes
+ no public constructors.
+
+
+
+
+
+ Creates a new instance of the
+ with no parent context.
+
+
+
+ This is an class, and as such exposes
+ no public constructors.
+
+
+ Flag specifying whether to make this context case sensitive or not.
+
+
+
+ Creates a new instance of the
+ with the supplied parent context.
+
+
+
+ This is an class, and as such exposes
+ no public constructors.
+
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ The parent application context.
+
+
+
+ Adds the given to the list of standard
+ processors being added to the underlying
+
+
+ Each time is called on this context, the context ensures, that
+ all default s are registered with the underlying .
+
+ The instance.
+
+
+
+ Closes this context and disposes of any resources (such as
+ singleton objects in the wrapped
+ ).
+
+
+
+
+ Subclasses must implement this method to perform the actual
+ configuration loading.
+
+
+
+ This method is invoked by
+ ,
+ before any other initialization occurs.
+
+
+
+ In the case of errors encountered while refreshing the object factory.
+
+
+
+
+ Returns the internal object factory of the parent context if it implements
+ ; else,
+ returns the parent context itself.
+
+
+ The parent context's object factory, or the parent itself.
+
+
+
+
+ Raises an application context event.
+
+
+ Any arguments to the event. May be .
+
+
+
+
+ Raises an application context event.
+
+
+ The source of the event.
+
+
+ Any arguments to the event. May be .
+
+
+
+
+ Create the strategy to be used
+
+
+
+
+ Modify the application context's internal object factory after its standard
+ initialization.
+
+
+
+ All object definitions will have been loaded, but no objects
+ will have been instantiated yet. This allows for the registration
+ of special
+ s
+ in certain
+ implementations.
+
+
+
+ The object factory used by the application context.
+
+
+ In the case of errors.
+ .
+
+
+
+ Template method which can be overridden to add context-specific
+ work before the underlying object factory gets refreshed.
+
+
+
+
+ Template method which can be overridden to add context-specific
+ refresh work.
+
+
+
+ Called on initialization of special objects, before instantiation
+ of singletons.
+
+
+
+
+
+ Template method which can be overridden to add context-specific
+ work after the context was refreshed but before the
+ event gets raised.
+
+
+
+
+ Instantiate and invoke all registered
+
+ objects, respecting any explicit ordering.
+
+
+
+ Must be called before singleton instantiation.
+
+
+ In the case of errors.
+
+
+
+ Resets the well-known ObjectPostProcessorChecker that logs an info
+ message when an object is created during IObjectPostProcessor
+ instantiation, i.e. when an object is not eligible for being
+ processed by all IObjectPostProcessors.
+
+
+
+
+ Initializes the default event registry for this context.
+
+
+
+
+ Returns the internal message source of the parent context if said
+ parent context is an , else
+ simply the parent context itself.
+
+
+ The internal message source of the parent context if said
+ parent context is an , else
+ simply the parent context itself.
+
+
+
+
+ Initializes the default message source for this context.
+
+
+
+ Uses any parent context's message source if one is not available
+ in this context.
+
+
+
+
+
+ Add a new
+ that will get applied to the internal object factory of this application context
+ on refresh, before any of the object definitions are evaluated.
+
+
+ The factory processor to register.
+
+
+
+
+ Load or refresh the persistent representation of the configuration,
+ which might an XML file, properties file, or relational database schema.
+
+
+ If the configuration cannot be loaded.
+
+
+ If the object factory could not be initialized.
+
+
+
+
+ Registers well-known s and
+ preregisters well-known dependencies using
+
+ the raw object factory as returned from
+
+
+
+ Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory
+
+
+
+
+
+ Starts this component.
+
+ Should not throw an exception if the component is already running.
+ In the case of a container, this will propagate the start signal
+ to all components that apply.
+
+
+
+
+ Stops this component.
+
+
+ Should not throw an exception if the component isn't started yet.
+ In the case of a container, this will propagate the stop signal
+ to all components that apply.
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+ Whether to include prototype objects too or just singletons (also applies to
+ s).
+
+
+ Whether to include s too
+ or just normal objects.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+
+ Return the names of all objects defined in this factory.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+
+ Return the registered
+ for the
+ given object, allowing access to its property values and constructor
+ argument values.
+
+ The name of the object.
+
+ The registered
+ .
+
+
+ If there is no object with the given name.
+
+
+ In the case of errors.
+
+
+
+
+ Return the registered
+ for the
+ given object, allowing access to its property values and constructor
+ argument values.
+
+ The name of the object.
+ Whether to search parent object factories.
+
+ The registered
+ .
+
+
+ If there is no object with the given name.
+
+
+ In the case of errors.
+
+
+
+
+ Return the object instances that match the given object
+ (including subclasses), judging from either object
+ definitions or the value of
+ in the case of
+ s.
+
+
+ The (class or interface) to match.
+
+
+ A of the matching objects,
+ containing the object names as keys and the corresponding object instances
+ as values.
+
+
+ If the objects could not be created.
+
+
+
+
+
+ Return the object instances that match the given object
+ (including subclasses), judging from either object
+ definitions or the value of
+ in the case of
+ s.
+
+
+ The (class or interface) to match.
+
+
+ Whether to include prototype objects too or just singletons (also applies to
+ s).
+
+
+ Whether to include s too
+ or just normal objects.
+
+
+ A of the matching objects,
+ containing the object names as keys and the corresponding object instances
+ as values.
+
+
+ If the objects could not be created.
+
+
+
+
+
+ Check if this object factory contains an object definition with the given name.
+
+ The name of the object to look for.
+
+ True if this object factory contains an object definition with the given name.
+
+
+
+
+
+ Does this object factory contain an object with the given name?
+
+ The name of the object to query.
+
+ if an object with the given name is defined.
+
+
+
+
+
+ Return the aliases for the given object name, if defined.
+
+ The object name to check for aliases.
+ The aliases, or an empty array if none.
+
+ If there's no such object definition.
+
+
+
+
+
+ Return an unconfigured(!) instance (possibly shared or independent) of the given object name.
+
+ The name of the object to return.
+
+ The the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a factory method. If there is no factory method and the
+ supplied array is not , then
+ match the argument values by type and call the object's constructor.
+
+ The unconfigured(!) instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the object is not of the required type.
+
+
+ If the supplied is .
+
+
+
+ This method will only instantiate the requested object. It does NOT inject any dependencies!
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+ The name of the object to return.
+
+ the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the object is not of the required type.
+
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+ The name of the object to return.
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+
+
+ This method allows an object factory to be used as a replacement for the
+ Singleton or Prototype design pattern.
+
+
+ Note that callers should retain references to returned objects. There is no
+ guarantee that this method will be implemented to be efficient. For example,
+ it may be synchronized, or may need to run an RDBMS query.
+
+
+ Will ask the parent factory if the object cannot be found in this factory
+ instance.
+
+
+ The name of the object to return.
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a static factory method. If there is no factory method and the
+ arguments are not null, then match the argument values by type and
+ call the object's constructor.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the supplied is .
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+ The name of the object to return.
+
+ The the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a factory method. If there is no factory method and the
+ supplied array is not , then
+ match the argument values by type and call the object's constructor.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the object is not of the required type.
+
+
+ If the supplied is .
+
+
+
+
+
+ Is this object a singleton?
+
+ The name of the object to query.
+ True if the named object is a singleton.
+
+ If there's no such object definition.
+
+
+
+
+
+ Determines whether the specified object name is prototype. That is, will GetObject
+ always return independent instances?
+
+ The name of the object to query
+
+ true if the specified object name will always deliver independent instances; otherwise, false.
+
+ This method returning false does not clearly indicate a singleton object.
+ It indicated non-independent instances, which may correspond to a scoped object as
+ well. use the IsSingleton property to explicitly check for a shared
+ singleton instance.
+ Translates aliases back to the corresponding canonical object name. Will ask the
+ parent factory if the object can not be found in this factory instance.
+
+
+ if there is no object with the given name.
+
+
+
+ Determines whether the object with the given name matches the specified type.
+
+ More specifically, check whether a GetObject call for the given name
+ would return an object that is assignable to the specified target type.
+ Translates aliases back to the corresponding canonical bean name.
+ Will ask the parent factory if the bean cannot be found in this factory instance.
+
+ The name of the object to query.
+ Type of the target to match against.
+
+ true if the object type matches; otherwise, false
+ if it doesn't match or cannot be determined yet.
+
+ Ff there is no object with the given name
+
+
+
+
+ Determine the of the object with the
+ given name.
+
+ The name of the object to query.
+
+ The of the object, or
+ if not determinable.
+
+
+
+
+
+ Injects dependencies into the supplied instance
+ using the named object definition.
+
+
+ The object instance that is to be so configured.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+
+
+
+ Injects dependencies into the supplied instance
+ using the supplied .
+
+
+ The object instance that is to be so configured.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+ An object definition that should be used to configure object.
+
+
+
+
+
+ Determines whether the local object factory contains a bean of the given name,
+ ignoring object defined in ancestor contexts.
+ This is an alternative to ContainsObject, ignoring an object
+ of the given name from an ancestor object factory.
+
+
+
+
+ The name of the object to query.
+
+ true if objects with the specified name is defined in the local factory; otherwise, false.
+
+
+
+
+ Determine whether the given object name is already in use within this context,
+ i.e. whether there is a local object. May be override by subclasses, the default
+ implementation simply returns
+
+
+
+
+ Register a new object definition with this registry.
+ Must support
+
+ and .
+
+ The name of the object instance to register.
+ The definition of the object instance to register.
+
+
+ Must support
+ and
+ .
+
+
+
+ If the object definition is invalid.
+
+
+
+
+ Given a object name, create an alias. We typically use this method to
+ support names that are illegal within XML ids (used for object names).
+
+ The name of the object.
+ The alias that will behave the same as the object name.
+
+ If there is no object with the given name.
+
+
+ If the alias is already in use.
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If no message could be resolved.
+
+
+ If the supplied is .
+
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+ The default message.
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If no message could be resolved.
+
+
+ If the supplied is .
+
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+
+ The resolved message if the lookup was successful.
+
+
+ If no message could be resolved.
+
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+
+ The resolved message if the lookup was successful.
+
+
+ If no message could be resolved.
+
+
+ If the supplied is .
+
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If no message could be resolved.
+
+
+ If the supplied is .
+
+
+
+
+
+ Resolve the message using all of the attributes contained within
+ the supplied
+ argument.
+
+
+ The value object storing those attributes that are required to
+ properly resolve a message.
+
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the message could not be resolved.
+
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+ The name of the resource object to resolve.
+
+
+ The with which the
+ resource is associated.
+
+
+ The resolved object, or if not found.
+
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+ The name of the resource object to resolve.
+
+
+ The resolved object, or if not found.
+
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+ The name of the resource object to resolve.
+
+
+ The with which the
+ resource is associated.
+
+
+ The resolved object, or if not found.
+
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+ The name of the resource object to resolve.
+
+
+ The resolved object, or if not found.
+
+
+
+
+
+ Applies resources to object properties.
+
+
+ An object that contains the property values to be applied.
+
+
+ The base name of the object to use for key lookup.
+
+
+ The with which the
+ resource is associated.
+
+
+
+
+
+ Publishes all events of the source object.
+
+
+ The source object containing events to publish.
+
+
+
+
+
+ Subscribes to all events published, if the subscriber
+ implements compatible handler methods.
+
+ The subscriber to use.
+
+
+
+
+ Subscribes to published events of a all objects of a given
+ , if the subscriber implements
+ compatible handler methods.
+
+ The subscriber to use.
+
+ The target to subscribe to.
+
+
+
+
+
+ Unsubscribes to all events published, if the subscriber
+ implmenets compatible handler methods.
+
+ The subscriber to use
+
+
+
+ Unsubscribes to the published events of all objects of a given
+ , if the subscriber implements
+ compatible handler methods.
+
+ The subscriber to use.
+
+ The target to unsubscribe from
+
+
+
+
+ Publishes an application context event.
+
+
+
+
+
+
+
+ The source of the event. May be .
+
+
+ The event that is to be raised.
+
+
+
+
+
+ An object that can be used to synchronize access to the
+
+
+
+
+ Set the to be used by this context.
+
+
+
+
+ The timestamp when this context was first loaded.
+
+
+ The timestamp (milliseconds) when this context was first loaded.
+
+
+
+
+ Gets a flag indicating whether context should be case sensitive.
+
+ true if object lookups are case sensitive; otherwise, false.
+
+
+
+ The for this context.
+
+
+ If the context has not been initialized yet.
+
+
+
+
+ The for this context.
+
+
+ If the context has not been initialized yet.
+
+
+
+
+ Returns the list of the
+ s
+ that will be applied to the objects created with this factory.
+
+
+
+ The elements of this list are instances of implementations of the
+
+ interface.
+
+
+
+ The list of the
+ s
+ that will be applied to the objects created with this factory.
+
+
+
+
+ Return the internal object factory of this application context.
+
+
+
+
+ Gets the parent context, or if there is no
+ parent context.
+
+
+ The parent context, or if there is no
+ parent.
+
+
+
+
+
+ Gets a value indicating whether this component is currently running.
+
+
+ true if this component is running; otherwise, false.
+
+
+ In the case of a container, this will return true
+ only if all components that apply are currently running.
+
+
+
+
+ Gets a dictionary of all singleton beans that implement the
+ ILifecycle interface in this context.
+
+ A dictionary of ILifecycle objects with object name as key.
+
+
+
+ Raised in response to an implementation-dependant application
+ context event.
+
+
+
+
+ The date and time this context was first loaded.
+
+
+ The representing when this context
+ was first loaded.
+
+
+
+
+ A name for this context.
+
+
+ A name for this context.
+
+
+
+
+ Return the number of objects defined in the factory.
+
+
+ The number of objects defined in the factory.
+
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+ The name of the object to return.
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+
+
+
+ Return the parent object factory, or if there is none.
+
+
+ The parent object factory, or if there is none.
+
+
+
+
+
+ Allows for custom modification of new object instances, e.g.
+ checking for marker interfaces or wrapping them with proxies.
+
+
+
+ Application contexts can auto-detect
+
+ objects in their object definitions and apply them before any other
+ objects get created. Plain object factories allow for programmatic
+ registration of post-processors.
+
+
+ Typically, post-processors that populate objects via marker interfaces
+ or the like will implement
+ ,
+ and post-processors that wrap objects with proxies will normally implement
+ .
+
+
+ Juergen Hoeller
+ Aleksandar Seovic (.NET)
+
+
+
+
+ Apply this
+ to the given new object instance before any object initialization callbacks.
+
+
+
+ The object will already be populated with property values.
+ The returned object instance may be a wrapper around the original.
+
+
+
+ The new object instance.
+
+
+ The name of the object.
+
+
+ The object instance to use, either the original or a wrapped one.
+
+
+ In case of errors.
+
+
+
+
+ Apply this to the
+ given new object instance after any object initialization callbacks.
+
+
+
+ The object will already be populated with property values. The returned object
+ instance may be a wrapper around the original.
+
+
+
+ The new object instance.
+
+
+ The name of the object.
+
+
+ The object instance to use, either the original or a wrapped one.
+
+
+ In case of errors.
+
+
+
+
+ Interface that can be implemented by objects that should be orderable, e.g. in an
+ .
+
+
+
+ The actual order can be interpreted as prioritization, the first object (with the
+ lowest order value) having the highest priority.
+
+
+ Juergen Hoeller
+ Aleksandar Seovic (.Net)
+
+
+
+ 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.
+
+
+
+ Abstract implementation of the interface,
+ implementing common handling of message variants, making it easy
+ to implement a specific strategy for a concrete .
+
+
+
Subclasses must implement the abstract ResolveObject
+ method.
+
Note: By default, message texts are only parsed through
+ String.Format if arguments have been passed in for the message. In case
+ of no arguments, message texts will be returned as-is. As a consequence,
+ you should only use String.Format escaping for messages with actual
+ arguments, and keep all other messages unescaped.
+
+
Supports not only IMessageSourceResolvables as primary messages
+ but also resolution of message arguments that are in turn
+ IMessageSourceResolvables themselves.
+
+
This class does not implement caching of messages per code, thus
+ subclasses can dynamically change messages over time. Subclasses are
+ encouraged to cache their messages in a modification-aware fashion,
+ allowing for hot deployment of updated messages.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+ Harald Radi (.NET)
+
+
+
+
+
+
+ Sub-interface of to be
+ implemented by objects that can resolve messages hierarchically.
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+
+ The parent message source used to try and resolve messages that
+ this object can't resolve.
+
+
+
+ If the value of this property is then no
+ further resolution is possible.
+
+
+
+
+
+ holds the logger instance shared with subclasses.
+
+
+
+
+ Initializes this instance.
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the lookup is not successful throw NoSuchMessageException
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+ The that represents
+ the culture for which the resource is localized.
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ Note that the fallback behavior based on CultureInfo seem to
+ have a bug that is fixed by installed .NET 1.1 Service Pack 1.
+
+ If the lookup is not successful, implementations are permitted to
+ take one of two actions.
+
+ If the lookup is not successful throw NoSuchMessageException
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the lookup is not successful throw NoSuchMessageException
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+ The that represents
+ the culture for which the resource is localized.
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ Note that the fallback behavior based on CultureInfo seem to
+ have a bug that is fixed by installed .NET 1.1 Service Pack 1.
+
+ If the lookup is not successful throw NoSuchMessageException.
+
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+ The default message if name is not found.
+ The that represents
+ the culture for which the resource is localized.
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ Note that the fallback behavior based on CultureInfo seem to
+ have a bug that is fixed by installed .NET 1.1 Service Pack 1.
+
+ If the lookup is not successful throw NoSuchMessageException
+
+
+
+
+
+ Resolve the message using all of the attributes contained within
+ the supplied
+ argument.
+
+ The value object storing those attributes that are required to
+ properly resolve a message.
+ The that represents
+ the culture for which the resource is localized.
+
+ The resolved message if the lookup was successful.
+
+
+ If the message could not be resolved.
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+ The name of the resource object to resolve.
+
+
+ The resolved object, or if not found.
+
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+ Note that the fallback behavior based on CultureInfo seem to
+ have a bug that is fixed by installed .NET 1.1 Service Pack 1.
+
+
+ The name of the resource object to resolve.
+
+
+ The with which the
+ resource is associated.
+
+
+ The resolved object, or if not found. If
+ the resource name resolves to null, then in .NET 1.1 the return
+ value will be String.Empty whereas in .NET 2.0 it will return
+ null.
+
+
+
+
+
+ Applies resources to object properties.
+
+
+ An object that contains the property values to be applied.
+
+
+ The base name of the object to use for key lookup.
+
+
+ The with which the
+ resource is associated.
+
+
+
+
+ Resolve the given code and arguments as message in the given culture,
+ returning null if not found. Does not fall back to the code
+ as default message. Invoked by GetMessage methods.
+
+ The code to lookup up, such as 'calculator.noRateSet'.
+ array of arguments that will be filled in for params
+ within the message.
+ The with which the
+ resource is associated.
+
+ The resolved message if the lookup was successful.
+
+
+
+
+ Try to retrieve the given message from the parent MessageSource, if any.
+
+ The code to lookup up, such as 'calculator.noRateSet'.
+ array of arguments that will be filled in for params
+ within the message.
+ The with which the
+ resource is associated.
+
+ The resolved message if the lookup was successful.
+
+
+
+
+ Return a fallback default message for the given code, if any.
+
+
+ Default is to return the code itself if "UseCodeAsDefaultMessage"
+ is activated, or return no fallback else. In case of no fallback,
+ the caller will usually receive a NoSuchMessageException from GetMessage
+
+ The code to lookup up, such as 'calculator.noRateSet'.
+ The default message to use, or null if none.
+
+
+
+ Renders the default message string. The default message is passed in as specified by the
+ caller and can be rendered into a fully formatted default message shown to the user.
+
+ Default implementation passed he String for String.Format resolving any
+ argument placeholders found in them. Subclasses may override this method to plug
+ in custom processing of default messages.
+
+ The default message.
+ The array of agruments that will be filled in for parameter
+ placeholders within the message, or null if none.
+ The with which the
+ resource is associated.
+ The rendered default message (with resolved arguments)
+
+
+
+ Format the given default message String resolving any
+ agrument placeholders found in them.
+
+ The message to format.
+ The array of agruments that will be filled in for parameter
+ placeholders within the message, or null if none.
+ The with which the
+ resource is associated.
+ The formatted message (with resolved arguments)
+
+
+
+ Search through the given array of objects, find any
+ MessageSourceResolvable objects and resolve them.
+
+
+ Allows for messages to have MessageSourceResolvables as arguments.
+
+
+ The array of arguments for a message.
+ The with which the
+ resource is associated.
+ An array of arguments with any IMessageSourceResolvables resolved
+
+
+
+ Gets the specified resource (e.g. Icon or Bitmap).
+
+ The name of the resource to resolve.
+
+ The to resolve the
+ code for.
+
+ The resource if found. otherwise.
+
+
+
+ Applies resources from the given name on the specified object.
+
+
+ An object that contains the property values to be applied.
+
+
+ The base name of the object to use for key lookup.
+
+
+ The with which the
+ resource is associated.
+
+
+
+
+ Subclasses must implement this method to resolve a message.
+
+ The code to lookup up, such as 'calculator.noRateSet'.
+ The with which the
+ resource is associated.
+ The resolved message from the backing store of message data.
+
+
+
+ Resolves an object (typically an icon or bitmap).
+
+
+
+ Subclasses must implement this method to resolve an object.
+
+
+ The code of the object to resolve.
+
+ The to resolve the
+ code for.
+
+
+ The resolved object or if not found.
+
+
+
+
+ Applies resources to object properties.
+
+
+
+ Subclasses must implement this method to apply resources
+ to an arbitrary object.
+
+
+
+ An object that contains the property values to be applied.
+
+
+ The base name of the object to use for key lookup.
+
+
+ The with which the
+ resource is associated.
+
+
+
+ Gets or Sets a value indicating whether to use the message code as
+ default message instead of throwing a NoSuchMessageException.
+ Useful for development and debugging. Default is "false".
+
+
+
Note: In case of a IMessageSourceResolvable with multiple codes
+ (like a FieldError) and a MessageSource that has a parent MessageSource,
+ do not activate "UseCodeAsDefaultMessage" in the parent:
+ Else, you'll get the first code returned as message by the parent,
+ without attempts to check further codes.
+
To be able to work with "UseCodeAsDefaultMessage" turned on in the parent,
+ AbstractMessageSource contains special checks
+ to delegate to the internal GetMessageInternal method if available.
+ In general, it is recommended to just use "UseCodeAsDefaultMessage" during
+ development and not rely on it in production in the first place, though.
+
Alternatively, consider overriding the GetDefaultMessage
+ method to return a custom fallback message for an unresolvable code.
+
+
+ true if use the message code as default message instead of
+ throwing a NoSuchMessageException; otherwise, false.
+
+
+
+
+ The parent message source used to try and resolve messages that
+ this object can't resolve.
+
+
+
+
+ If the value of this property is then no
+ further resolution is possible.
+
+
+
+
+
+ Convenient abstract superclass for
+ implementations that
+ draw their configuration from XML documents containing object
+ definitions as understood by an
+ .
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This is an class, and as such exposes
+ no public constructors.
+
+
+
+
+
+ Creates a new instance of the
+ class
+ with the given parent context.
+
+
+
+ This is an class, and as such exposes
+ no public constructors.
+
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ The parent context.
+
+
+
+ Instantiates and populates the underlying
+ with the object
+ definitions yielded up by the
+ method.
+
+
+ In the case of errors encountered while refreshing the object factory.
+
+
+ In the case of errors encountered reading any of the resources
+ yielded by the method.
+
+
+
+
+
+ Initialize the object definition reader used for loading the object
+ definitions of this context.
+
+
+
+ The default implementation of this method is a no-op; i.e. it does
+ nothing. Can be overridden in subclasses to provide custom
+ initialization of the supplied
+ ; for example, a derived
+ class may want to turn off XML validation.
+
+
+
+ The object definition reader used by this context.
+
+
+
+
+ Load the object definitions with the given
+ .
+
+
+
+ The lifecycle of the object factory is handled by
+ ;
+ therefore this method is just supposed to load and / or register
+ object definitions.
+
+
+
+ The reader containing object definitions.
+
+ In case of object registration errors.
+
+
+ In the case of errors encountered reading any of the resources
+ yielded by either the or
+ the methods.
+
+
+
+
+ Loads the object definitions into the given object factory, typically through
+ delegating to one or more object definition readers.
+
+ The object factory to lead object definitions into
+
+
+
+
+
+ Create a new reader instance for importing object definitions into the specified .
+
+ the to be associated with the reader
+ a new instance.
+
+
+
+ Customizes the internal object factory used by this context.
+
+ Called for each attempt.
+
+ The default implementation is empty. Can be overriden in subclassses to customize
+ DefaultListableBeanFatory's standard settings.
+
+ The newly created object factory for this context
+
+
+
+ Create an internal object factory for this context.
+
+
+
+ Called for each attempt.
+ This default implementation creates a
+
+ with the internal object factory of this context's parent serving
+ as the parent object factory. Can be overridden in subclasse,s
+ for example to customize DefaultListableBeanFactory's settings.
+
+
+ The object factory for this context.
+
+
+
+ Determine whether the given object name is already in use within this context's object factory,
+ i.e. whether there is a local object or alias registered under this name.
+
+
+
+
+ An array of resource locations, referring to the XML object
+ definition files that this context is to be built with.
+
+
+
+ Examples of the format of the various strings that would be
+ returned by accessing this property can be found in the overview
+ documentation of with the
+ class.
+
+
+
+ An array of resource locations, or if none.
+
+
+
+
+ An array of resources that this context is to be built with.
+
+
+
+ Examples of the format of the various strings that would be
+ returned by accessing this property can be found in the overview
+ documentation of with the
+ class.
+
+
+
+ An array of s, or if none.
+
+
+
+
+ Subclasses must return their internal object factory here.
+
+
+ The internal object factory for the application context.
+
+
+
+
+
+
+ implementation that passes the application context to object that
+ implement the
+ ,
+ , and
+ interfaces.
+
+
+
+ If an object's class implements more than one of the
+ ,
+ , and
+ interfaces, then the
+ order in which the interfaces are satisfied is as follows...
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Application contexts will automatically register this with their
+ underlying object factory. Applications should thus never need to use
+ this class directly.
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The that this
+ instance will work with.
+
+
+
+
+ Apply this
+ to the given new object instance before any object
+ initialization callbacks.
+
+
+ The new object instance.
+
+
+ The name of the object.
+
+
+ The the object instance to use, either the original or a wrapped one.
+
+
+ In case of errors.
+
+
+
+
+
+ Apply this to the
+ given new object instance after any object initialization
+ callbacks.
+
+
+ The new object instance.
+
+
+ The name of the object.
+
+
+ The object instance to use, either the original or a wrapped one.
+
+
+ In case of errors.
+
+
+
+
+
+ Convenient superclass for application objects that want to be aware of
+ the application context, e.g. for custom lookup of collaborating object
+ or for context-specific resource access.
+
+
+
+ It saves the application context reference and provides an
+ initialization callback method. Furthermore, it offers numerous
+ convenience methods for message lookup.
+
+
+ There is no requirement to subclass this class: it just makes things
+ a little easier if you need access to the context, e.g. for access to
+ file resources or to the message source. Note that many application
+ objects do not need to be aware of the application context at all,
+ as they can receive collaborating objects via object references.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ To be implemented by any object that wishes to be notified
+ of the that it runs in.
+
+
+
+ Implementing this interface makes sense when an object requires access
+ to a set of collaborating objects. Note that configuration via object
+ references is preferable to implementing this interface just for object
+ lookup purposes.
+
+
+ This interface can also be implemented if an object needs access to
+ file resources, i.e. wants to call
+ , or access to
+ the . However, it is
+ preferable to implement the more specific
+
+ interface to receive a reference to the
+ object in that scenario.
+
+
+ Note that dependencies can also
+ be exposed as object properties of the
+ type, populated via strings with
+ automatic type conversion performed by an object factory. This obviates
+ the need for implementing any callback interface just for the purpose
+ of accessing a specific file resource.
+
+
+
+ is a convenience implementation of this interface for your
+ application objects.
+
+
+ For a list of all object lifecycle methods, see the overview for the
+ interface.
+
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+
+
+
+ Sets the that this
+ object runs in.
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is an class, and as such exposes no
+ public constructors.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is an class, and as such exposes no
+ public constructors.
+
+
+
+ The that this
+ object runs in.
+
+
+
+
+ Intializes the wrapped
+ .
+
+
+
+ This is a template method that subclasses can override for custom
+ initialization behavior.
+
+
+ Gets called by the
+
+ instance directly after setting the context instance.
+
+
+ Does not get called on reinitialization of the context.
+
+
+
+ In the case of any initialization errors.
+
+
+ If thrown by application context methods.
+
+
+
+
+ The context class that any context passed to the
+
+ must be an instance of.
+
+
+ The
+ .
+
+
+
+
+ Return a for the
+ application context used by this object, for easy message access.
+
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+ When passed an unexpected
+ implementation
+ instance that is not compatible with the
+ defined by the value of the
+ .
+ property. Also, thrown when trying to re-initialize with a
+ different than was
+ originally used.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+
+ Creates an instance
+ using context definitions supplied in a custom configuration and
+ configures the with that instance.
+
+
+ Implementations of the
+ interface must provide the following two constructors:
+
+
+
+ A constructor that takes a string array of resource locations.
+
+
+
+
+ A constructor that takes a reference to a parent application context
+ and a string array of resource locations (and in that order).
+
+
+
+
+ Note that if the type attribute is not present in the declaration
+ of a particular context, then a default
+
+ is assumed. This default
+
+ is currently the
+ ; please note the exact
+ of this default is an
+ implementation detail, that, while unlikely, may do so in the future.
+ to
+
+
+
+
+ This is an example of specifying a context that reads its resources from
+ an embedded Spring.NET XML object configuration file...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This is an example of specifying a context that reads its resources from
+ a custom configuration section within the same application / web
+ configuration file and uses case insensitive object lookups.
+
+
+ Please note that you must adhere to the naming
+ of the various sections (i.e. '<sectionGroup name="spring">' and
+ '<section name="context">'.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ And this is an example of specifying a hierarchy of contexts. The
+ hierarchy in this case is only a simple parent->child hierarchy, but
+ hopefully it illustrates the nesting of context configurations. This
+ nesting of contexts can be arbitrarily deep, and is one way... child
+ contexts know about their parent contexts, but parent contexts do not
+ know how many child contexts they have (if any), or have references
+ to any such child contexts.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mark Pollack
+ Aleksandar Seovic
+ Rick Evans
+
+
+
+
+ Creates an instance
+ using the context definitions supplied in a custom
+ configuration section.
+
+
+
+ This instance is
+ also used to configure the .
+
+
+
+ The configuration settings in a corresponding parent
+ configuration section.
+
+
+ The configuration context when called from the ASP.NET
+ configuration system. Otherwise, this parameter is reserved and
+ is .
+
+
+ The for the section.
+
+
+ An instance
+ populated with the object definitions supplied in the configuration
+ section.
+
+
+
+
+ Create all child-contexts in the given for the given context.
+
+ The parent context to use
+ The current configContext
+ The list of child context elements
+
+
+
+ Instantiates a new context.
+
+
+
+
+ Gets the context's name specified in the name attribute of the context element.
+
+ The current configContext
+ The context element
+
+
+
+ Extracts the context-type from the context element.
+ If none is specified, returns the parent's type.
+
+
+
+
+ Extracts the case-sensitivity attribute from the context element
+
+
+
+
+ Gets the context specified in the type
+ attribute of the context element.
+
+
+
+ If this attribute is not defined it defaults to the
+ type.
+
+
+
+ If the context type does not implement the
+ interface.
+
+
+
+
+ Returns the array of resources containing object definitions for
+ this context.
+
+
+
+
+ Returns the array of child contexts for this context.
+
+
+
+
+ The of
+ created if no type attribute is specified on a context element.
+
+
+
+
+
+ Get the context's case-sensitivity to use if none is specified
+
+
+
+ Derived handlers may override this property to change their default case-sensitivity.
+
+
+ Defaults to 'true'.
+
+
+
+
+
+ Specifies, whether the instantiated context will be automatically registered in the
+ global .
+
+
+
+
+ Returns if the context should be lazily
+ initialized.
+
+
+
+
+ Constants defining the structure and values associated with the
+ schema for laying out Spring.NET contexts in XML.
+
+
+
+
+ Defines a single
+ .
+
+
+
+
+ Specifies a context name.
+
+
+
+
+ Specifies if context should be case sensitive or not. Default is true.
+
+
+
+
+ Specifies a .
+
+
+
+ Does not have to be fully assembly qualified, but its generally regarded
+ as better form if the names of one's objects
+ are specified explicitly.
+
+
+
+
+
+ Specifies whether context should be lazy initialized.
+
+
+
+
+ Defines an
+
+
+
+
+ Specifies the URI for an
+ .
+
+
+
+
+ Provides access to a central registry of
+ s.
+
+
+
+ A singleton implementation to access one or more application contexts. Application
+ context instances are cached.
+
+
Note that the use of this class or similar is unnecessary except (sometimes) for
+ a small amount of glue code. Excessive usage will lead to code that is more tightly
+ coupled, and harder to modify or test. Consider refactoring your code to use standard
+ Dependency Injection techniques or implement the interface IApplicationContextAware to
+ obtain a reference to an application context.
+
+ Mark Pollack
+ Aleksandar Seovic
+
+
+
+
+ The shared instance for this class (and derived classes).
+
+
+
+
+ Creates a new instance of the ContextRegistry class.
+
+
+
+ Explicit static constructor to tell C# compiler
+ not to mark type as beforefieldinit.
+
+
+
+
+
+ Registers an instance of an
+ .
+
+
+
+ This is usually called via a
+ inside a .NET
+ application configuration file.
+
+
+ The application context to be registered.
+
+ If a context has previously been registered using the same name
+
+
+
+
+ Handles events raised by an application context.
+
+
+
+
+
+
+ Removes the context from the registry
+
+
+ Has no effect if the context wasn't registered
+
+ ´the context to remove from the registry
+
+
+
+ Returns the root application context.
+
+
+
+ The first call to GetContext will create the context
+ as specified in the .NET application configuration file
+ under the location spring/context.
+
+
+ The root application context.
+
+
+
+ Returns context based on specified name.
+
+
+
+ The first call to GetContext will create the context
+ as specified in the .NET application configuration file
+ under the location spring/context.
+
+
+ The context name.
+ The specified context, or null, if context with that name doesn't exists.
+
+ If the context name is null or empty
+
+
+
+
+ Removes all registered
+ s from this
+ registry.
+
+
+ Raises the event while still holding a lock on
+
+
+
+
+ Allows to check, if a context is already registered
+
+ The context name.
+ true, if the context is already registered. false otherwise
+
+
+
+ This event is fired, if ContextRegistry.Clear() is called.
+ Clients may register to get informed
+
+
+ This event is fired while still holding a lock on the Registry.
+ 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used
+
+
+
+
+ Gets an object that should be used to synchronize access to ContextRegistry
+ from the calling code.
+
+
+
+
+ Default implementation of the
+ interface.
+
+
+
+ Provides easy ways to store all the necessary values needed to resolve
+ messages from an .
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+
+ Describes objects that are suitable for message resolution in a
+ .
+
+
+
+ Spring.NET's own validation error classes implement this interface.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+
+
+ Return the codes to be used to resolve this message, in the order
+ that they are to be tried.
+
+
+
+ The last code will therefore be the default one.
+
+
+
+ A array of codes which are associated
+ with this message.
+
+
+
+
+ Return the array of arguments to be used to resolve this message.
+
+
+ An array of objects to be used as parameters to replace
+ placeholders within the message text.
+
+
+
+
+ Return the default message to be used to resolve this message.
+
+
+ The default message, or if there is no
+ default.
+
+
+
+
+ Creates a new instance of the
+ class
+ using a single code.
+
+ The message code to be resolved.
+
+
+
+ Initializes a new instance of the class.
+
+ The codes to be used to resolve this message
+
+
+
+ Creates a new instance of the
+ class
+ using multiple codes.
+
+ The message codes to be resolved.
+
+ The arguments used to resolve the supplied .
+
+
+
+
+ Creates a new instance of the
+ class
+ using multiple codes and a default message.
+
+ The message codes to be resolved.
+
+ The arguments used to resolve the supplied .
+
+
+ The default message used if no code could be resolved.
+
+
+
+
+ Creates a new instance of the
+ class
+ from another resolvable.
+
+
+
+ This is the copy constructor for the
+ class.
+
+
+
+ The to be copied.
+
+
+ If the supplied is .
+
+
+
+
+ Returns a representation of this
+ .
+
+
+ A representation of this
+ .
+
+
+
+
+ Calls the visit method on the supplied
+ to output a version of this class.
+
+ The visitor to use.
+
+ A representation of this
+ .
+
+
+
+
+ Return the codes to be used to resolve this message, in the order
+ that they are to be tried.
+
+
+ A array of codes which are associated
+ with this message.
+
+
+
+
+
+ Return the array of arguments to be used to resolve this message.
+
+
+ An array of objects to be used as parameters to replace
+ placeholders within the message text.
+
+
+
+
+
+ Return the default code for this resolvable.
+
+
+ The default code of this resolvable; this will be the last code in
+ the codes array, or if this instance has no
+ codes.
+
+
+
+
+
+ Return the default message to be used to resolve this message.
+
+
+ The default message, or if there is no
+ default.
+
+
+
+
+
+ Default section handler that can handle any configuration section.
+
+
+
+ Simply returns the configuration section as an .
+
+
+ Aleksandar Seovic
+
+
+
+ Returns the configuration section as an
+
+
+ The configuration settings in a corresponding parent
+ configuration section.
+
+
+ The configuration context when called from the ASP.NET
+ configuration system. Otherwise, this parameter is reserved and
+ is a null reference.
+
+
+ The for the section.
+
+ Config section as XmlElement.
+
+
+
+ Empty implementation that
+ simply delegates all method calls to it's parent
+ .
+
+
+
+ If no parent is available,
+ no messages will be resolved (and a
+ will be thrown).
+
+
+ Used as placeholder by the
+ class,
+ if the context definition doesn't define its own
+ . Not intended for direct use
+ in applications.
+
+
+ Juergan Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The parent message source used to try and resolve messages that
+ this object can't resolve.
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the message could not be resolved.
+
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the message could not be resolved.
+
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the message could not be resolved.
+
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the message could not be resolved.
+
+
+
+
+
+ Resolve the message identified by the supplied
+ .
+
+ The name of the message to resolve.
+ The default message.
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The array of arguments that will be filled in for parameters within
+ the message, or if there are no parameters
+ within the message. Parameters within a message should be
+ referenced using the same syntax as the format string for the
+ method.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the message could not be resolved.
+
+
+
+
+
+ Resolve the message using all of the attributes contained within
+ the supplied
+ argument.
+
+
+ The value object storing those attributes that are required to
+ properly resolve a message.
+
+
+ The that represents
+ the culture for which the resource is localized.
+
+
+ The resolved message if the lookup was successful (see above for
+ the return value in the case of an unsuccessful lookup).
+
+
+ If the message could not be resolved.
+
+
+ If the message could not be resolved.
+
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+ The name of the resource object to resolve.
+
+
+ The resolved object, or if not found.
+
+
+
+
+
+ Gets a localized resource object identified by the supplied
+ .
+
+
+ The name of the resource object to resolve.
+
+
+ The with which the
+ resource is associated.
+
+
+ The resolved object, or if not found.
+
+
+
+
+
+ Applies resources to object properties.
+
+
+ An object that contains the property values to be applied.
+
+
+ The base name of the object to use for key lookup.
+
+
+ The with which the
+ resource is associated.
+
+
+
+
+
+ The parent message source used to try and resolve messages that
+ this object can't resolve.
+
+
+
+
+
+ Generic ApplicationContext implementation that holds a single internal
+ instance and does not
+ assume a specific object definition format.
+
+
+ Implements the interface in order
+ to allow for aplying any object definition readers to it.
+ Typical usage is to register a variety of object definitions via the
+ interface and then call
+ to initialize those
+ objects with application context semantics (handling
+ , auto-detecting
+ ObjectFactoryPostProcessors, etc).
+
+ In contrast to other IApplicationContext implementations that create a new internal
+ IObjectFactory instance for each refresh, the internal IObjectFactory of this context
+ is available right from the start, to be able to register object definitions on it.
+ may only be called once
+ Usage examples
+
+ GenericApplicationContext ctx = new GenericApplicationContext();
+ // register your objects and object definitions
+ ctx.RegisterObjectDefinition(...)
+ ctx.Refresh();
+
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ if set to true names in the context are case sensitive.
+
+
+
+ Initializes a new instance of the class.
+
+ The object factory instance to use for this context.
+
+
+
+ Initializes a new instance of the class.
+
+ The parent application context.
+
+
+
+ Initializes a new instance of the class.
+
+ The name of the application context.
+ if set to true names in the context are case sensitive.
+ The parent application context.
+
+
+
+ Initializes a new instance of the class.
+
+ The object factory to use for this context
+ The parent applicaiton context.
+
+
+
+ Initializes a new instance of the class.
+
+ The name of the application context.
+ if set to true names in the context are case sensitive.
+ The parent application context.
+ The object factory to use for this context
+
+
+
+ Do nothing operation. We hold a single internal ObjectFactory and rely on callers
+ to register objects throug our public methods (or the ObjectFactory's).
+
+
+ In the case of errors encountered while refreshing the object factory.
+
+
+
+
+ Determines whether the given object name is already in use within this factory,
+ i.e. whether there is a local object or alias registered under this name or
+ an inner object created with this name.
+
+
+
+
+ Return the internal object factory of this application context.
+
+
+
+
+
+ Gets the underlying object factory of this context, available for
+ registering object definitions.
+
+ You need to call Refresh to initialize the
+ objects factory and its contained objects with application context
+ semantics (autodecting IObjectFactoryPostProcessors, etc).
+ The internal object factory (as DefaultListableObjectFactory).
+
+
+
+ Helper class for easy access to messages from an
+ , providing various
+ overloaded GetMessage methods.
+
+
+
+ Available from
+ , but also
+ reusable as a standalone helper to delegate to in application objects.
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+
+
+ Creates a new instance of the
+ class
+ that uses the current
+ for all locale specific lookups.
+
+
+ The to use to locate messages.
+
+
+
+
+ Creates a new instance of the
+ class
+
+
+ The to use to locate
+ messages.
+
+
+ The to use for
+ locale specific messages.
+
+
+
+
+ Retrieve the message for the given code and the default
+ .
+
+ The code of the message.
+ The message.
+
+
+
+ Retrieve the message for the given code and the given
+ .
+
+ The code of the message.
+
+ The to use for
+ lookups.
+
+ The message.
+
+
+
+ Retrieve the message for the given code and the default
+ .
+
+ The code of the message.
+
+ The arguments for the message, or if none.
+
+ The message.
+
+ If the message could not be found.
+
+
+
+
+ Retrieve the message for the given code and the given
+ .
+
+ The code of the message.
+
+ The to use for
+ lookups.
+
+
+ The arguments for the message, or if none.
+
+ The message.
+
+ If the message could not be found.
+
+
+
+
+ Retrieve a mesage using the given
+ .
+
+
+ The .
+
+ The message.
+
+ If the message could not be found.
+
+
+
+
+ Retrieve a mesage using the given
+ in the given
+ .
+
+
+ The .
+
+
+ The to use for
+ lookups.
+
+ The message
+
+ If the message could not be found.
+
+
+
+
+ Visitor class to represent
+ instances.
+
+
+
+ Used in the first instance to supply stringified versions of
+ instances.
+
+
+ Other methods can be added here to return different representations,
+ including XML, CSV, etc..
+
+
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Outputs the supplied
+ as a nicely formatted .
+
+
+ The to output.
+
+
+
+
+ Configuration section handler for the (recommended, Spring.NET standard) parsers
+ config section.
+
+
+
+ Spring.NET allows the registration of custom configuration parsers that
+ can be used to create simplified configuration schemas that better
+ describe object definitions.
+
+
+ For example, Spring.NET uses this facility internally in order to
+ define simplified schemas for various AOP, Data and Services definitions.
+
+
+
+
+ The following example shows how to configure both this section handler
+ and how to define custom configuration parsers within a Spring.NET
+ config section.
+
+
+
+
+
+
+
+
+
+
+
+
+ ...
+
+ ...
+
+
+
+
+ Aleksandar Seovic
+
+
+
+
+ Registers parsers specified in the (recommended, Spring.NET standard)
+ parsers config section with the .
+
+
+ The configuration settings in a corresponding parent
+ configuration section.
+
+
+ The configuration context when called from the ASP.NET
+ configuration system. Otherwise, this parameter is reserved and
+ is .
+
+
+ The for the section.
+
+
+ This method always returns , because parsers
+ are registered as a side-effect of this object's execution and there
+ is thus no need to return anything.
+
+
+
+
+ An that doesn't do a whole lot.
+
+
+
+ is an implementation of
+ the NullObject pattern. It should be used in those situations where a
+ needs to be passed (say to a
+ method) but where the resolution of messages is not required.
+
+
+ There should not (typically) be a need to instantiate instances of this class;
+ does not maintan any state
+ and the instance is
+ thus safe to pass around.
+
+
+ Aleksandar Seovic
+
+
+
+ The canonical instance of the
+ class.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+ Consider using
+ instead.
+
+
+
+
+
+ Simply returns the supplied message as-is.
+
+ The code of the message to resolve.
+
+ The to resolve the
+ code for.
+
+
+ The supplied message as-is.
+
+
+
+
+ Always returns .
+
+ The code of the object to resolve.
+
+ The to resolve the
+ code for.
+
+
+ (always).
+
+
+
+
+ Does nothing.
+
+
+ An object that contains the property values to be applied.
+
+
+ The base name of the object to use for key lookup.
+
+
+ The with which the
+ resource is associated.
+
+
+
+
+ Handler for Spring.NET resourceHandlers config section.
+
+
+
+ Spring allows registration of custom resource handlers that can be used to load
+ object definitions from.
+
+
+ For example, if you wanted to store your object definitions in a database instead
+ of in the config file, you could write a custom implementation
+ and register it with Spring using 'db' as a protocol name.
+
+
+ Afterwards, you would simply specify resource URI within the context config element
+ using your custom resource handler.
+
+
+
+
+ The following example shows how to configure both this section handler,
+ how to define custom resource within Spring config section, and how to load
+ object definitions using custom resource handler:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Aleksandar Seovic
+
+
+
+
+ Registers resource handlers that are specified in
+ the resources config section with the .
+
+
+ The configuration settings in a corresponding parent
+ configuration section. Ignored.
+
+
+ The configuration context when called from the ASP.NET
+ configuration system. Otherwise, this parameter is reserved and
+ is .
+
+
+ The for the section.
+
+
+ This method always returns null, because resource handlers are registered
+ as a sideffect of its execution and there is no need to return anything.
+
+
+
+
+ An implementation that
+ accesses resources from .resx / .resource files.
+
+ Note that for the method
+ GetResourceObject if the resource name resolves to null, then in
+ .NET 1.1 the return value will be String.Empty whereas
+ in .NET 2.0 it will return null.
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+ Aleksandar Seovic (.NET)
+
+
+
+ Defines a simple initialization callback for objects that need to to some
+ post-initialization logic after all of their dependencies have been injected.
+
+
+
+ An implementation of the
+
+ method might perform some additional custom initialization (over and above that
+ performed by the constructor), or merely check that all mandatory properties
+ have been set (this last example is a very typical use case of this interface).
+
+
+ The use of the
+ interface
+ by non-Spring.NET framework code can be avoided (and is generally
+ discouraged). The Spring.NET container provides support for a generic
+ initialization method given to the object definition in the object
+ configuration store (be it XML, or a database, etc). This requires
+ slightly more configuration (one attribute-value pair in the case of
+ XML configuration), but removes any dependency on Spring.NET from the
+ class definition.
+
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+
+ 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.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Resolves a given code by searching through each assembly name in
+ the base names array.
+
+ The code to resolve.
+
+ The to use for lookups.
+
+ The message from the resource set.
+
+
+
+ Resolves a given code by searching through each assembly name in the array.
+
+ The code to resolve.
+
+ The to use for lookups.
+
+ The object from the resource set.
+
+
+
+ Uses a System.ComponentModel.ComponentResourceManager
+ to apply resources to object properties.
+ Resource key names are of the form objectName.propertyName
+
+
+ This feature is not currently supported on version 1.0 of the .NET platform.
+
+
+ An object that contains the property values to be applied.
+
+
+ The base name of the object to use for the key lookup.
+
+
+ The to use for lookups.
+ If , uses the
+ value.
+
+
+ This feature is not currently supported on version 1.0 of the .NET platform.
+
+
+
+
+ Resolves a code into an object given a base name.
+
+ The to search.
+ The code to resolve.
+
+ The to use for lookups.
+
+ The object from the resource file.
+
+
+
+ Returns a representation of the
+ .
+
+ A representation of the
+ .
+
+
+
+ Invoked by an
+ after it has set all object properties supplied.
+
+
+
+ The list may contain objects of type or
+ . types
+ are converted to instances using the notation
+ resourcename, assembly partial name.
+
+
+
+ If the conversion from a to a
+ can't be performed.
+
+
+
+
+ The collection of s
+ in this .
+
+
+
+
+ that allows concrete registration of
+ objects and messages in code, rather than from external configuration sources.
+
+
+
+ Mainly useful for testing.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the StaticApplicationContext class.
+
+
+
+
+ Creates a new instance of the StaticApplicationContext class.
+
+ The parent application context.
+
+
+
+ Creates a new, named instance of the StaticApplicationContext class.
+
+ the context name
+ The parent application context.
+
+
+
+ Do nothing: we rely on callers to update our public methods.
+
+
+
+
+ Register a singleton object with the default object factory.
+
+ The name of the object.
+ The of the object.
+ The property values for the singleton instance.
+
+
+
+ Registers a prototype object with the default object factory.
+
+ The name of the prototype object.
+ The of the prototype object.
+ The property values for the prototype instance.
+
+
+
+ Associate the given message with the given code.
+
+ The lookup code.
+
+ The that the message should be found within.
+
+ The message associated with the lookup code.
+
+
+
+ Simple implementation of
+ that allows messages to be held in an object and added programmatically.
+
+
+
+ Mainly useful for testing.
+
+
+ This supports internationalization.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Returns a format string.
+
+ The code of the message to resolve.
+
+ The to resolve the
+ code for.
+
+
+ A format string or if not found.
+
+
+
+
+
+ Resolves an object (typically an icon or bitmap).
+
+ The code of the object to resolve.
+
+ The to resolve the
+ code for.
+
+
+ The resolved object or if not found.
+
+
+
+
+
+ Applies resources to object properties.
+
+
+
+ Uses a System.ComponentModel.ComponentResourceManager
+ internally to apply resources to object properties. Resource key
+ names are of the form objectName.propertyName.
+
+
+ This feature is not currently supported on version 1.0 of the .NET platform.
+
+
+
+ An object that contains the property values to be applied.
+
+
+ The base name of the object to use for key lookup.
+
+
+ The with which the
+ resource is associated.
+
+
+ This feature is not currently supported on version 1.0 of the .NET platform.
+
+
+
+
+
+ Associate the supplied with the
+ supplied .
+
+ The lookup code.
+
+ The to resolve the
+ code for.
+
+
+ The message format associated with this lookup code.
+
+
+
+
+ Associate the supplied with the
+ supplied .
+
+ The lookup code.
+
+ The to resolve the
+ code for.
+
+
+ The object associated with this lookup code.
+
+
+
+
+ Returns a representation of this
+ message source.
+
+
+ A containing all of this message
+ source's messages.
+
+
+
+
+ Configuration section handler for the Spring.NET typeAliases
+ config section.
+
+
+
+ Type aliases can be used instead of fully qualified type names anywhere
+ a type name is expected in a Spring.NET configuration file.
+
+
+ This includes type names specified within an object definition, as well
+ as values of the properties or constructor arguments that expect
+ instances.
+
+
+
+
+ The following example shows how to configure both this section handler and
+ how to define type aliases within a Spring.NET config section:
+
+
+
+
+
+
+
+
+
+
+
+
+ ...
+
+ ...
+
+
+
+
+ Aleksandar Seovic
+
+
+
+
+ Populates using values specified in
+ the typeAliases config section.
+
+
+ The configuration settings in a corresponding parent
+ configuration section.
+
+
+ The configuration context when called from the ASP.NET
+ configuration system. Otherwise, this parameter is reserved and
+ is .
+
+
+ The for the section.
+
+
+ This method always returns , because the
+ is populated as a side-effect of this
+ object's execution and thus there is no need to return anything.
+
+
+
+
+ Configuration section handler for the Spring.NET typeConverters
+ config section.
+
+
+
+ Type converters are used to convert objects from one type into another
+ when injecting property values, evaluating expressions, performing data
+ binding, etc.
+
+
+ They are a very powerful mechanism as they allow Spring.NET to automatically
+ convert string-based property values from the configuration file into the appropriate
+ type based on the target property's type or to convert string values submitted
+ via a web form into a type that is used by your data model when Spring.NET data
+ binding is used. Because they offer such tremendous help, you should always provide
+ a type converter implementation for your custom types that you want to be able to use
+ for injected properties or for data binding.
+
+
+ The standard .NET mechanism for specifying type converter for a particular type is
+ to decorate the type with a , passing the type
+ of the -derived class as a parameter.
+
+
+ This mechanism will still work and is a preferred way of defining type converters if
+ you control the source code for the type that you want to define a converter for. However,
+ this configuration section allows you to specify converters for the types that you don't
+ control and it also allows you to override some of the standard type converters, such as
+ the ones that are defined for some of the types in the .NET Base Class Library.
+
+
+
+
+ The following example shows how to configure both this section handler and
+ how to define type converters within a Spring.NET config section:
+
+
+
+
+
+
+
+
+
+
+
+
+ ...
+
+ ...
+
+
+
+
+ Aleksandar Seovic
+
+
+
+
+ Populates using values specified in
+ the typeConverters config section.
+
+
+ The configuration settings in a corresponding parent
+ configuration section.
+
+
+ The configuration context when called from the ASP.NET
+ configuration system. Otherwise, this parameter is reserved and
+ is .
+
+
+ The for the section.
+
+
+ This method always returns , because the
+ is populated as a side-effect of
+ its execution and thus there is no need to return anything.
+
+
+
+
+ An implementation that
+ reads context definitions from XML based resources.
+
+
+
+ Currently, the resources that are supported are the file,
+ http, ftp, config and assembly resource
+ types.
+
+
+ You can provide custom implementations of the
+ interface and and register them
+ with any that inherits
+ from the
+
+ interface.
+
+
+ In case of multiple config locations, later object definitions will
+ override ones defined in previously loaded resources. This can be
+ leveraged to deliberately override certain object definitions via an
+ extra XML file.
+
+
+
+
+ Find below some examples of instantiating an
+ using a
+ variety of different XML resources.
+
+
+ // an XmlApplicationContext that reads its object definitions from an
+ // XML file that has been embedded in an assembly...
+ IApplicationContext context = new XmlApplicationContext
+ (
+ "assembly://AssemblyName/NameSpace/ResourceName"
+ );
+
+ // an XmlApplicationContext that reads its object definitions from a
+ // number of disparate XML resources...
+ IApplicationContext context = new XmlApplicationContext
+ (
+ // from an XML file that has been embedded in an assembly...
+ "assembly://AssemblyName/NameSpace/ResourceName",
+ // and from a (relative) filesystem-based resource...
+ "file://Objects/services.xml",
+ // and from an App.config / Web.config resource...
+ "config://spring/objects"
+ );
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+
+
+
+ Initializes a new instance of the XmlApplicationContext class.
+
+
+
+
+ Creates a new instance of the
+ class,
+ loading the definitions from the supplied XML resource locations.
+
+ The created context will be case sensitive.
+
+ Any number of XML based object definition resource locations.
+
+
+
+
+ Creates a new instance of the
+ class,
+ loading the definitions from the supplied XML resource locations.
+
+ Flag specifying whether to make this context case sensitive or not.
+
+ Any number of XML based object definition resource locations.
+
+
+
+
+ Creates a new instance of the
+ class,
+ loading the definitions from the supplied XML resource locations.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+
+ Any number of XML based object definition resource locations.
+
+
+
+
+ Creates a new instance of the
+ class,
+ loading the definitions from the supplied XML resource locations,
+ with the given .
+
+
+ The parent context (may be ).
+
+
+ Any number of XML based object definition resource locations.
+
+
+
+
+ Creates a new instance of the
+ class,
+ loading the definitions from the supplied XML resource locations,
+ with the given .
+
+ Flag specifying whether to make this context case sensitive or not.
+
+ The parent context (may be ).
+
+
+ Any number of XML based object definition resource locations.
+
+
+
+
+ Creates a new instance of the
+ class,
+ loading the definitions from the supplied XML resource locations,
+ with the given .
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+
+ The parent context (may be ).
+
+
+ Any number of XML based object definition resource locations.
+
+
+
+
+ Creates a new instance of the
+ class,
+ loading the definitions from the supplied XML resource locations,
+ with the given .
+
+
+ This constructor is meant to be used by derived classes. By passing =false, it is
+ the responsibility of the deriving class to call to initialize the context instance.
+
+ if true, is called automatically.
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+
+ The parent context (may be ).
+
+
+ Any number of XML based object definition resource locations.
+
+
+
+
+ An array of resource locations, referring to the XML object
+ definition files with which this context is to be built.
+
+
+ An array of resource locations, or if none.
+
+
+
+
+
+ An array of resources instances with which this context is to be built.
+
+
+ An array of s, or if none.
+
+
+
+
+
+ Encapsulates arguments to the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name.
+ The parent context.
+ The configuration locations.
+ The configuration resources.
+
+
+
+ Initializes a new instance of the XmlApplicationContextArgs class.
+
+ The name.
+ The parent context.
+ The configuration locations.
+ The configuration resources.
+ if set to true [case sensitive].
+ if set to true [refresh].
+
+
+ Exception thrown during application context initialization.
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Thrown on an unrecoverable problem encountered in the
+ objects namespace or sub-namespaces, e.g. bad class or field.
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Superclass for all exceptions thrown in the Objects namespace and sub-namespaces.
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+ Creates a new instance of the ObjectsException class.
+
+
+
+ Creates a new instance of the ObjectsException class. with the specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the ObjectsException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectsException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Creates a new instance of the FatalObjectException class.
+
+
+
+
+ Creates a new instance of the FatalObjectException class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the FatalObjectException class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the FatalObjectException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ 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.
+
+
+
+
+ Creates a new instance of the
+ class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the
+ class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Marks an interface as being an application event listener.
+
+ Griffin Caprio
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ The callback for application events.
+
+
+
+
+ To be implemented by any object that wishes to be notified
+ of the associated with it.
+
+
+
+ In the current implementation, the
+ will typically be the
+ associated that
+ spawned the implementing object.
+
+
+ The can usually also be
+ passed on as an object reference to arbitrary object properties or
+ constructor arguments, because a
+ is typically defined as an
+ object with the well known name "messageSource" in the
+ associated application context.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ Sets the associated
+ with this object.
+
+
+
+ Invoked after population of normal object properties but
+ before an initializing callback such as the
+
+ method of the
+ interface
+ or a custom init-method.
+
+
+ It is also invoked before the
+
+ property of any
+
+ implementation.
+
+
+
+ The associated
+ with this object.
+
+
+
+
+ Interface to be implemented by any object that wishes to be notified
+ of the (typically the
+ ) that it runs in.
+
+
+
+ Note that dependencies can also
+ be exposed as object properties of type
+ , populated via strings with
+ automatic type conversion by the object factory. This obviates the
+ need for implementing any callback interface just for the purpose of
+ accessing a specific resource.
+
+
+ You typically need an
+ when your application object has to access a variety of file resources
+ whose names are calculated. A good strategy is to make the object use
+ a default resource loader but still implement the
+ interface to allow
+ for overriding when running in an
+ .
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+
+
+
+ Sets the
+ that this object runs in.
+
+
+
+ Invoked after population of normal objects properties but
+ before an init callback such as
+ 's
+
+ or a custom init-method. Invoked before setting
+ 's
+
+ property.
+
+
+
+
+
+ Thrown when a message cannot be resolved.
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The code that could not be resolved for given culture.
+
+
+ The that was used
+ to search for the code.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The code that could not be resolved for the current UI culture.
+
+
+
+
+ Convenience base class for
+ implementations, pre-implementing typical behavior.
+
+
+
+ The method will
+ check whether a or
+ can be opened;
+ will always return
+ ;
+ and
+ throw an exception;
+ and will
+ return the value of the
+ property.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+ Aleksandar Seovic (.NET)
+
+
+
+
+ The central abstraction for Spring.NET's access to resources such as
+ s.
+
+
+
+ This interface encapsulates a resource descriptor that abstracts away
+ from the underlying type of resource; possible resource types include
+ files, memory streams, and databases (this list is not exhaustive).
+
+
+ A can definitely be opened and accessed
+ for every such resource; if the resource exists in a physical form (for
+ example, the resource is not an in-memory stream or one that has been
+ extracted from an assembly or ZIP file), a or
+ can also be accessed. The actual
+ behavior is implementation-specific.
+
+
+ This interface, when used in tandem with the
+ interface, forms the backbone of
+ Spring.NET's resource handling. Third party extensions or libraries
+ that want to integrate external resources with Spring.NET's IoC
+ container are encouraged expose such resources via this abstraction.
+
+
+ Interfaces cannot obviously mandate implementation, but derived classes
+ are strongly encouraged to expose a constructor that takes a
+ single as it's sole argument (see example).
+ Exposing such a constructor will make your custom
+ implementation integrate nicely
+ with the class.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+
+ Simple interface for objects that are sources for
+ s.
+
+
+
+ This is the base interface for the abstraction encapsulated by
+ Spring.NET's interface.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ Return an for this resource.
+
+
+
+ Clients of this interface must be aware that every access of this
+ property will create a fresh;
+ it is the responsibility of the calling code to close any such
+ .
+
+
+
+ An .
+
+
+ If the stream could not be opened.
+
+
+
+
+ Creates a resource relative to this resource.
+
+
+ The path (always resolved as relative to this resource).
+
+
+ The relative resource.
+
+
+ If the relative resource could not be created from the supplied
+ path.
+
+
+ If the resource does not support the notion of a relative path.
+
+
+
+
+ Does this resource represent a handle with an open stream?
+
+
+
+ If , the
+ cannot be read multiple times, and must be read and then closed to
+ avoid resource leaks.
+
+
+ Will be for all usual resource descriptors.
+
+
+
+ if this resource represents a handle with an
+ open stream.
+
+
+
+
+
+ Returns the handle for this resource.
+
+
+
+ For safety, always check the value of the
+ property prior to
+ accessing this property; resources that cannot be exposed as
+ a will typically return
+ from a call to the
+ property.
+
+
+
+ The handle for this resource.
+
+
+ If the resource is not available or cannot be exposed as a
+ .
+
+
+
+
+
+
+ Returns a handle for this resource.
+
+
+
+ For safety, always check the value of the
+ property prior to
+ accessing this property; resources that cannot be exposed as
+ a will typically return
+ from a call to the
+ property.
+
+
+
+ The handle for this resource.
+
+
+ If the resource is not available on a filesystem, or cannot be
+ exposed as a handle.
+
+
+
+
+
+
+ Returns a description for this resource.
+
+
+
+ The description is typically used for diagnostics and other such
+ logging when working with the resource.
+
+
+ Implementations are also encouraged to return this value from their
+ method.
+
+
+
+ A description for this resource.
+
+
+
+
+ Does this resource actually exist in physical form?
+
+
+
+ An example of a resource that physically exists would be a
+ file on a local filesystem. An example of a resource that does not
+ physically exist would be an in-memory stream.
+
+
+
+ if this resource actually exists in physical
+ form (for example on a filesystem).
+
+
+
+
+
+
+ The default special character that denotes the base (home, or root)
+ path.
+
+
+
+ Will be resolved (by those
+ implementations that support it) to the home (or root) path for
+ the specific implementation.
+
+
+ For example, in the case of a web application this will (probably)
+ resolve to the virtual directory of said web application.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is an class, and as such exposes no
+ public constructors.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is an class, and as such exposes no
+ public constructors.
+
+
+
+ A string representation of the resource.
+
+
+ If the supplied is
+ or contains only whitespace character(s).
+
+
+
+
+ Strips any protocol name from the supplied
+ .
+
+
+
+ If the supplied does not
+ have any protocol associated with it, then the supplied
+ will be returned as-is.
+
+
+
+
+ GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt");
+ // returns www.mycompany.com/resource.txt
+
+
+
+ The name of the resource.
+
+
+ The name of the resource without the protocol name.
+
+
+
+
+ Resolves the supplied to its value
+ sans any leading protocol.
+
+
+ The name of the resource.
+
+
+ The name of the resource without the protocol name.
+
+
+
+
+
+ Resolves the presence of the
+ value
+ in the supplied into a path.
+
+
+
+ The default implementation simply returns the supplied
+ as is.
+
+
+
+ The name of the resource.
+
+
+ The string that is a placeholder for a base path.
+
+
+ The name of the resource with any
+ value having been resolved into an actual path.
+
+
+
+
+ This implementation returns the
+ of this resource.
+
+
+
+
+
+ Determines whether the specified is
+ equal to the current .
+
+
+
+ This implementation compares values.
+
+
+
+
+
+
+ Serves as a hash function for a particular type, suitable for use
+ in hashing algorithms and data structures like a hash table.
+
+
+
+ This implementation returns the hashcode of the
+ property.
+
+
+
+
+
+
+ Factory Method. Create a new instance of the current resource type using the given resourceName
+
+
+
+
+ The ResourceLoader to be used for resolving relative resources
+
+
+
+
+ Does the supplied relative ?
+
+
+ The name of the resource to test.
+
+
+ if resource name is relative;
+ otherwise .
+
+
+
+
+ Creates a new resource that is relative to this resource based on the
+ supplied .
+
+
+
+ This method can accept either a fully qualified resource name or a
+ relative resource name as it's parameter.
+
+
+ A fully qualified resource is one that has a protocol prefix and
+ all elements of the resource name. All other resources are treated
+ as relative to this resource, and the following rules are used to
+ locate a relative resource:
+
+
+
+ If the starts with '..',
+ the current resource path is navigated backwards before the
+ is concatenated to the current
+ of
+ this resource.
+
+
+ If the starts with '/', the
+ current resource path is ignored and a new resource name is
+ appended to the
+ of
+ this resource.
+
+
+ If the starts with '.' or a
+ letter, a new path is appended to the current
+ of
+ this resource.
+
+
+
+
+ The name of the resource to create.
+
+ The relative resource.
+
+ If the process of resolving the relative resource yielded an
+ invalid URI.
+
+
+ If this resource does not support the resolution of relative
+ resources (as determined by the value of the
+
+ property).
+
+
+
+
+
+ Calculates a new resource path based on the supplied
+ .
+
+
+ The relative path to evaluate.
+
+ The newly calculated resource path.
+
+
+
+ The special character that denotes the base (home, or root)
+ path.
+
+
+
+ Will be resolved (by those
+ implementations that support it) to the home (or root) path for
+ the specific implementation.
+
+
+ For example, in the case of a web application this will (probably)
+ resolve to the virtual directory of said web application.
+
+
+
+
+
+
+ Return an for this resource.
+
+
+ An .
+
+
+ If the stream could not be opened.
+
+
+
+
+
+ Returns a description for this resource.
+
+
+ A description for this resource.
+
+
+
+
+
+ Returns the protocol associated with this resource (if any).
+
+
+
+ The value of this property may be if no
+ protocol is associated with the resource type (for example if the
+ resource is a memory stream).
+
+
+
+ The protocol associated with this resource (if any).
+
+
+
+
+ Does this resource represent a handle with an open stream?
+
+
+
+ This, the default implementation, always returns
+ .
+
+
+
+ if this resource represents a handle with an
+ open stream.
+
+
+
+
+
+ Returns the handle for this resource.
+
+
+
+
+
+ Returns a handle for this resource.
+
+
+
+ This, the default implementation, always throws a
+ , assuming that the
+ resource cannot be resolved to an absolute file path.
+
+
+
+ The handle for this resource.
+
+
+ This implementation always throws a
+ .
+
+
+
+
+
+
+ Does this resource actually exist in physical form?
+
+
+
+ This implementation checks whether a
+ can be opened, falling back to whether a
+ can be opened.
+
+
+ This will cover both directories and content resources.
+
+
+ This implementation will also return if
+ permission to the (file's) path is denied.
+
+
+
+ if this resource actually exists in physical
+ form (for example on a filesystem).
+
+
+
+
+
+
+ Does this support relative
+ resource retrieval?
+
+
+
+ This property is generally to be consulted prior to attempting
+ to attempting to access a resource that is relative to this
+ resource (via a call to
+ ).
+
+
+ This, the default implementation, always returns
+ .
+
+
+
+ if this
+ supports relative resource
+ retrieval.
+
+
+
+
+ Gets the root location of the resource.
+
+
+
+ Where root resource can be taken to mean that part of the resource
+ descriptor that doesn't change when a relative resource is looked
+ up. Examples of such a root location would include a drive letter,
+ a web server name, an assembly name, etc.
+
+
+
+ The root location of the resource.
+
+
+ This, the default implementation, always throws a
+ .
+
+
+
+
+ Gets the current path of the resource.
+
+
+
+ An example value of this property would be the name of the
+ directory containing a filesystem based resource.
+
+
+
+ The current path of the resource.
+
+
+ This, the default implementation, always throws a
+ .
+
+
+
+
+ Gets those characters that are valid path separators for the
+ resource type.
+
+
+
+ An example value of this property would be the
+ and
+ values for a
+ filesystem based resource.
+
+
+ Any derived classes that override this method are expected to
+ return a new array for each access of this property.
+
+
+
+ Those characters that are valid path separators for the resource
+ type.
+
+
+ This, the default implementation, always throws a
+ .
+
+
+
+
+ An implementation for
+ resources stored within assemblies.
+
+
+
+ This implementation expects any resource name passed to the
+ constructor to adhere to the following format:
+
+
+ Aleksandar Seovic (.NET)
+ Federico Spinazzi (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The name of the assembly resource.
+
+
+ If the supplied did not conform
+ to the expected format.
+
+
+ If the assembly specified in the supplied
+ was loaded twice with two
+ different evidences.
+
+
+ If the assembly specified in the supplied
+ could not be found.
+
+
+ If the caller does not have the required permission to load
+ the assembly specified in the supplied
+ .
+
+
+
+
+
+ Does the supplied relative ?
+
+
+ The name of the resource to test.
+
+
+ if resource name is relative;
+ otherwise .
+
+
+
+
+ Return an for this resource.
+
+
+ An .
+
+
+ If the stream could not be opened.
+
+
+ If the caller does not have the required permission to load
+ the underlying assembly's manifest.
+
+
+
+
+
+
+ Does the embedded resource specified in the value passed to the
+ constructor exist?
+
+
+ if this resource actually exists in physical
+ form (for example on a filesystem).
+
+
+
+
+
+
+
+ Does this support relative
+ resource retrieval?
+
+
+
+ This implementation does support relative resource retrieval, and
+ so will always return .
+
+
+
+ if this
+ supports relative resource
+ retrieval.
+
+
+
+
+
+ Gets the root location of the resource (the assembly name in this
+ case).
+
+
+ The root location of the resource.
+
+
+
+
+
+ Gets the current path of the resource (the namespace in which the
+ target resource was embedded in this case).
+
+
+ The current path of the resource.
+
+
+
+
+
+ Gets those characters that are valid path separators for the
+ resource type.
+
+
+ Those characters that are valid path separators for the resource
+ type.
+
+
+
+
+
+ Returns a description for this resource.
+
+
+ A description for this resource.
+
+
+
+
+
+ Returns the handle for this resource.
+
+
+
+
+
+ Used when retrieving information from the standard .NET configuration
+ files (App.config / Web.config).
+
+
+
+ If created with the name of a configuration section, then all methods
+ aside from the description return ,
+ , or throw an exception. If created with an
+ , then the
+ property
+ will return a corresponding to parse.
+
+
+ Mark Pollack
+ Rick Evans
+
+
+
+ Creates new instance of the
+ class.
+
+
+ The actual XML configuration section.
+
+
+ If the supplied is .
+
+
+
+
+ Creates new instance of the
+ class.
+
+
+ The name of the configuration section.
+
+
+ If the supplied is
+ or contains only whitespace character(s).
+
+
+
+
+ Returns the handle for this resource.
+
+
+
+ This implementation always returns .
+
+
+
+ .
+
+
+
+
+
+ Returns a handle for this resource.
+
+
+
+ This implementation always returns .
+
+
+
+ .
+
+
+
+
+
+ Returns a description for this resource (the name of the
+ configuration section in this case).
+
+
+ A description for this resource.
+
+
+
+
+
+ Does this resource actually exist in physical form?
+
+
+
+ This implementation always returns .
+
+
+
+
+
+
+
+
+
+
+ Return an for this resource.
+
+
+ An .
+
+
+ If the stream could not be opened.
+
+
+
+
+
+ Exposes the actual for the
+ configuration section.
+
+
+
+ Introduced to accomodate line info tracking during parsing.
+
+
+
+
+
+ Holder that combines with a specific encoding to be used for reading
+ from the resource
+
+ Juergen Hoeller
+ Erich Eichinger (.NET)
+
+
+
+ Create an encoded resource, autodetecting the encoding from the resource stream.
+
+
+
+
+
+ Create an encoded resource, autodetecting the encoding from the resource stream.
+
+ the resource to read from. Must not be null
+ whether to autoDetect encoding from byte-order marks ()
+
+
+
+ Create an encoded resource using the specified encoding.
+
+ the resource to read from. Must not be null
+ the encoding to use. If null, encoding will be autodetected.
+ whether to autoDetect encoding from byte-order marks ()
+
+
+
+
+
+
+
+
+
+ Determine whether equals this instance.
+
+
+ true if obj is an and both
+ , and are equal.
+
+
+
+
+ Calculate the unique hash code for this instance.
+
+
+
+
+
+ Get a textual description of the resource.
+
+
+
+
+ Get the underlying resource
+
+
+
+
+ Get the encoding to use for reading, if any. May be null
+
+
+
+
+ whether to autoDetect encoding from byte-order marks ()
+
+
+
+
+ A backed resource.
+
+
+
+ Supports resolution as both a and a
+ .
+
+
+ Also supports the use of the ~ character. If the ~ character
+ is the first character in a resource path (sans protocol), the ~
+ character will be replaced with the value of the
+ System.AppDomain.CurrentDomain.BaseDirectory property (an example of
+ this can be seen in the examples below).
+
+
+
+
+ Consider the example of an application that is running (has been launched
+ from) the C:\App\ directory. The following resource paths will map
+ to the following resources on the filesystem...
+
+
+ strings.txt C:\App\strings.txt
+ ~/strings.txt C:\App\strings.txt
+ file://~/strings.txt C:\App\strings.txt
+ file://~/../strings.txt C:\strings.txt
+ ../strings.txt C:\strings.txt
+ ~/../strings.txt C:\strings.txt
+
+ // note that only a leading ~ character is resolved to the executing directory...
+ stri~ngs.txt C:\App\stri~ngs.txt
+
+
+ Juergen Hoeller
+ Leonardo Susatyo (.NET)
+ Aleksandar Seovic (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The name of the file system resource.
+
+
+ If the supplied is
+ or contains only whitespace character(s).
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The name of the file system resource.
+
+
+ Supresses initialization of this instance. Used from derived classes.
+
+
+ If the supplied is
+ or contains only whitespace character(s).
+
+
+
+
+ Initializes this instance.
+
+
+
+
+
+ Resolves the handle
+ for the supplied .
+
+
+ The name of the file system resource.
+
+
+ The handle for this resource.
+
+
+
+
+ Resolves the root location for the supplied .
+
+
+ The name of the file system resource.
+
+
+ The root location of the resource.
+
+
+
+
+ Resolves the path for the supplied .
+
+
+ The name of the file system resource.
+
+
+ The current path of the resource.
+
+
+
+
+ Resolves the presence of the
+ value
+ in the supplied into a path.
+
+
+ The name of the resource.
+
+
+ The string that is a placeholder for a base path.
+
+
+ The name of the resource with any
+ value having been resolved into an actual path.
+
+
+
+
+ Does the supplied relative ?
+
+
+ The name of the resource to test.
+
+
+ if resource name is relative;
+ otherwise .
+
+
+
+
+ Returns the underlying handle for
+ this resource.
+
+
+ The handle for this resource.
+
+
+
+
+
+ Does this support relative
+ resource retrieval?
+
+
+
+ This implementation does support relative resource retrieval, and
+ so will always return .
+
+
+
+ if this
+ supports relative resource
+ retrieval.
+
+
+
+
+
+ Gets the root location of the resource (a drive or UNC file share
+ name in this case).
+
+
+ The root location of the resource.
+
+
+
+
+
+ Gets the current path of the resource.
+
+
+ The current path of the resource.
+
+
+
+
+
+ Gets those characters that are valid path separators for the
+ resource type.
+
+
+ Those characters that are valid path separators for the resource
+ type.
+
+
+
+
+
+
+ Return an for this resource.
+
+
+ An .
+
+
+ If the stream could not be opened.
+
+
+ If the underlying file could not be found.
+
+
+
+
+
+ Returns a description for this resource.
+
+
+ A description for this resource.
+
+
+
+
+
+ Returns the handle for this resource.
+
+
+ The handle for this resource.
+
+
+ If the resource is not available or cannot be exposed as a
+ .
+
+
+
+
+
+ adapter implementation for a
+ .
+
+
+
+ Should only be used if no other
+ implementation is applicable.
+
+
+ In contrast to other
+ implementations, this is an adapter for an already opened
+ resource - the
+ therefore always returns . Do not use this class
+ if you need to keep the resource descriptor somewhere, or if you need
+ to read a stream multiple times.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The input to use.
+
+
+ Where the input comes from.
+
+
+ If the supplied is
+ .
+
+
+
+
+ The input to use.
+
+
+ If the underlying has already
+ been read.
+
+
+
+
+ Returns a description for this resource.
+
+
+ A description for this resource.
+
+
+
+
+
+ This implementation always returns true
+
+
+
+
+ This implemementation always returns true
+
+
+
+
+ Custom type converter for instances.
+
+
+
+ A resource path may contain placeholder variables of the form ${...}
+ that will be expended to environment variables.
+
+
+ Currently only supports conversion from a
+ instance.
+
+
+
+
+ On Win9x boxes, this resource path, ${userprofile}\objects.xml will
+ be expanded at runtime with the value of the 'userprofile' environment
+ variable substituted for the '${userprofile}' portion of the path.
+
+
+ // assuming a user called Rick, running on a plain vanilla Windows XP setup...
+ // this resource path...
+
+ ${userprofile}\objects.xml
+
+ // will become (after expansion)...
+
+ C:\Documents and Settings\Rick\objects.xml
+
+
+ Mark Pollack
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class using the specified resourceLoader.
+
+ the underlying IResourceLoader to be used to resolve resources
+
+
+
+ Returns whether this converter can convert an object of one
+ to a
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+
+ if the conversion is possible.
+
+
+
+
+ Convert from a string value to a
+ instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ An if successful.
+
+
+ If the resource name objectained form the supplied
+ is malformed.
+
+
+ In the case of any errors arising from the instantiation of the
+ returned instance.
+
+
+
+
+ Resolve the given path, replacing placeholder values with
+ corresponding property values if necessary.
+
+
+
+ This implementation resolves environment variables only.
+
+
+ The original resource path.
+ The resolved resource path.
+
+
+
+ Return the used to
+ resolve the string.
+
+
+ The used to resolve
+ the string.
+
+
+
+
+ Registry class that allows users to register and retrieve protocol handlers.
+
+
+
+ Resource handler is an implementation of interface
+ that should be used to process resources with the specified protocol.
+
+
+ They are used throughout the framework to access resources from various
+ sources. For example, application context loads object definitions from the resources
+ that are processed using one of the registered resource handlers.
+
+ Following resource handlers are registered by default:
+
+
+ Protocol
+ Handler Type
+ Description
+
+
+ config
+
+ Resolves the resources by loading specified configuration section from the standard .NET config file.
+
+
+ file
+
+ Resolves filesystem resources.
+
+
+ http
+
+ Resolves remote web resources.
+
+
+ https
+
+ Resolves remote web resources via HTTPS.
+
+
+ ftp
+
+ Resolves ftp resources.
+
+
+ assembly
+
+ Resolves resources that are embedded into an assembly.
+
+
+ web
+ Spring.Core.IO.WebResource, Spring.Web*
+ Resolves resources relative to the web application's virtual directory.
+
+
+ * only available in web applications.
+
+ Users can create and register their own protocol handlers by implementing interface
+ and mapping custom protocol name to that implementation. See for details
+ on how to register custom protocol handler.
+
+
+ Aleksandar Seovic
+
+
+
+ Name of the .Net config section that contains definitions
+ for custom resource handlers.
+
+
+
+
+ Registers standard and user-configured resource handlers.
+
+
+
+
+ Returns resource handler for the specified protocol name.
+
+
+
+ This method returns object that should be used
+ to create an instance of the -derived type by passing
+ resource location as a parameter.
+
+
+ Name of the protocol to get the handler for.
+ Resource handler constructor for the specified protocol name.
+ If is null.
+
+
+
+ Returns true if a handler is registered for the specified protocol,
+ false otherwise.
+
+ Name of the protocol.
+
+ true if a handler is registered for the specified protocol, false otherwise.
+
+ If is null.
+
+
+
+ Registers resource handler and maps it to the specified protocol name.
+
+
+
+ If the mapping already exists, the existing mapping will be
+ silently overwritten with the new mapping.
+
+
+
+ The protocol to add (or override).
+
+
+ The type name of the concrete implementation of the
+ interface that will handle
+ the specified protocol.
+
+
+ If the supplied is
+ or contains only whitespace character(s); or
+ if the supplied is
+ .
+
+
+ If the supplied is not a
+ that derives from the
+ interface; or (having passed
+ this first check), the supplied
+ does not expose a constructor that takes a single
+ parameter.
+
+
+
+
+ Registers resource handler and maps it to the specified protocol name.
+
+
+
+ If the mapping already exists, the existing mapping will be
+ silently overwritten with the new mapping.
+
+
+
+ The protocol to add (or override).
+
+
+ The concrete implementation of the
+ interface that will handle
+ the specified protocol.
+
+
+ If the supplied is
+ or contains only whitespace character(s); or
+ if the supplied is
+ .
+
+
+ If the supplied is not a
+ that derives from the
+ interface; or (having passed
+ this first check), the supplied
+ does not expose a constructor that takes a single
+ parameter.
+
+
+
+
+ Allows to create any arbitrary Url format
+
+
+
+
+ A adapter implementation encapsulating a simple string.
+
+ Erich Eichinger
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Get the to
+ for accessing this resource.
+
+
+
+
+ Returns a description for this resource.
+
+
+ A description for this resource.
+
+
+
+
+
+ This implementation always returns true
+
+
+
+
+ This implemementation always returns true
+
+
+
+
+ Gets the encoding used to create a byte stream of the string.
+
+
+
+
+ Gets the content encapsulated by this .
+
+
+
+
+ A backed resource
+ on top of
+
+
+
+ Obviously supports resolution as a , and also
+ as a in the case of the "file:"
+ protocol.
+
+
+
+
+ Some examples of the strings that can be used to initialize a new
+ instance of the class
+ include...
+
+
+ file:///Config/objects.xml
+
+
+ http://www.mycompany.com/services.txt
+
+
+
+
+ Juergen Hoeller
+ Leonardo Susatyo (.NET)
+ Aleksandar Seovic (.NET)
+
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ Some examples of the values that the
+ can typically be expected to hold include...
+
+
+ file:///Config/objects.xml
+
+
+ http://www.mycompany.com/services.txt
+
+
+
+
+
+ A string representation of the resource.
+
+
+
+
+ Does the supplied relative ?
+
+
+ The name of the resource to test.
+
+
+ if resource name is relative;
+ otherwise .
+
+
+
+
+ Returns the instance
+ used for the resource resolution.
+
+
+ A instance.
+
+
+
+
+
+
+ Return an for this resource.
+
+
+ An .
+
+
+ If the stream could not be opened.
+
+
+
+
+
+ Returns the handle for this resource.
+
+
+ The handle for this resource.
+
+
+ If the resource is not available or cannot be exposed as a
+ .
+
+
+
+
+
+ Returns a handle for this resource.
+
+
+ The handle for this resource.
+
+
+ If the resource is not available on a filesystem.
+
+
+
+
+
+ Does this support relative
+ resource retrieval?
+
+
+
+ This implementation does support relative resource retrieval, and
+ so will always return .
+
+
+
+ if this
+ supports relative resource
+ retrieval.
+
+
+
+
+
+ Gets the root location of the resource.
+
+
+ The root location of the resource.
+
+
+
+
+
+ Gets the current path of the resource.
+
+
+ The current path of the resource.
+
+
+
+
+
+ Gets those characters that are valid path separators for the
+ resource type.
+
+
+ Those characters that are valid path separators for the resource
+ type.
+
+
+
+
+
+ Returns a description for this resource.
+
+
+ A description for this resource.
+
+
+
+
+
+ Converts string representation of a credential for Web client authentication
+ into an instance of .
+
+
+
+ Find below some examples of the XML formatted strings that this
+ converter will sucessfully convert.
+
+
+
+
+
+
+
+
+ Bruno Baia
+
+
+
+ Can we convert from the sourcetype
+ to a instance ?
+
+
+
+ Currently only supports conversion from a instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ if the conversion is possible.
+
+
+
+ Convert from a value to an
+ instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A instance if successful.
+
+
+
+
+ A custom for any
+ primitive numeric type such as ,
+ , , etc.
+
+
+
+ Can use a given for
+ (locale-specific) parsing and rendering.
+
+
+ This is not meant to be used as a system
+ but rather as a
+ locale-specific number converter within custom controller code, to
+ parse user-entered number strings into number properties of objects,
+ and render them in a UI form.
+
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The primitive numeric to convert to.
+
+
+ The to use for
+ (locale-specific) parsing and rendering
+
+
+ Is an empty string allowed to be converted? If
+ , an empty string value will be converted to
+ numeric 0.
+
+ Id the supplied is not a primitive
+ .
+
+
+
+
+
+ Returns whether this converter can convert an object of one
+ to a
+
+
+
+ Currently only supports conversion from a
+ instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+
+ if the conversion is possible.
+
+
+
+
+ Converts the specified object (a string) to the required primitive
+ type.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+ A primitive representation of the string value.
+
+
+
+ Converter for instances.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Returns whether this converter can convert an object of one
+ to a
+
+
+
+ Currently only supports conversion from a
+ instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ True if the conversion is possible.
+
+
+
+ Convert from a string value to a instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A if successful.
+
+
+
+
+ Custom implementation for
+ objects.
+
+
+
+ Handles conversion from an XML formatted string to a
+ object
+ (see below for an example of the expected XML format).
+
+
+ This converter must be registered before it will be available. Standard
+ converters in this namespace are automatically registered by the
+ class.
+
+
+
+
+ Find below some examples of the XML formatted strings that this
+ converter will sucessfully convert. Note that the name of the top level
+ (document) element is quite arbitrary... it is only the content that
+ matters (and which must be in the format
+ <add key="..." value="..."/>. For your continued sanity
+ though, you may wish to standardize on the top level name of
+ 'dictionary' (although you are of course free to not do so).
+
+
+
+
+
+
+
+
+ The following example uses a different top level (document) element
+ name, but is equivalent to the first example.
+
+
+
+
+
+
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Returns whether this converter can convert an object of one
+ to a
+
+
+
+
+ Currently only supports conversion from an
+ XML formatted instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ True if the conversion is possible.
+
+
+
+ Convert from a string value to a
+ instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A
+ if successful.
+
+
+
+
+ Converts string representation of a regular expression into an instance of .
+
+ Aleksandar Seovic
+
+
+
+ Can we convert from the sourcetype to a ?
+
+
+
+ Currently only supports conversion from a instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ if the conversion is possible.
+
+
+
+ Convert from a value to an
+ instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A if successful.
+
+
+
+
+ Converts string representation of the registry key
+ into instance.
+
+ Aleksandar Seovic
+
+
+
+ Can we convert from a the sourcetype to a ?
+
+
+
+ Currently only supports conversion from a instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ if the conversion is possible.
+
+
+
+ Convert from a value to an
+ instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A array if successful.
+
+
+
+
+ Generates partial registry key name.
+
+
+ Key elements.
+
+
+ Index of the last element to use.
+
+
+ Friendly key name containing key element from
+ 0 to , inclusive.
+
+
+
+
+ Returns for the specified
+ root hive name.
+
+
+ Root hive name.
+
+
+ Registry key for the specified name.
+
+
+
+
+ Converts a two part string, (resource name, assembly name)
+ to a ResourceManager instance.
+
+
+
+
+ This constant represents the name of the folder/assembly containing global resources.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Returns whether this converter can convert an object of one
+ to a
+
+
+
+
+ Currently only supports conversion from a
+ instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ True if the conversion is possible.
+
+
+
+ Convert from a string value to a
+ instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A
+ if successful.
+
+ If the specified does not denote a valid resource
+
+
+
+ Converter for from a comma separated
+ list of RBG values.
+
+
+
+ Please note that this class does not implement converting
+ to a comma separated list of RBG values from a
+ .
+
+
+ Federico Spinazzi
+
+
+
+ Returns whether this converter can convert an object of one
+ to a
+ .
+
+
+
+ Currently only supports conversion from a
+ instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ if the conversion is possible.
+
+
+
+ Converts the specified object (a string) a
+ instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture: currently ignored.
+
+
+ The value that is to be converted, in "R,G,B", "A,R,G,B", or
+ symbolic color name ().
+
+
+ A representation of the string value.
+
+
+ If the input string is not in a supported format, or is not one of the
+ predefined system colors ().
+
+
+
+
+ A custom for
+ runtime type references.
+
+
+
+ Currently only supports conversion to and from a
+ .
+
+
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Returns whether this converter can convert an object of one
+ to the
+ of this converter.
+
+
+
+ Currently only supports conversion from a
+ instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ True if the conversion is possible.
+
+
+
+ Returns whether this converter can convert the object to the specified
+ .
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert to.
+
+ True if the conversion is possible.
+
+
+
+ Converts the given value to the type of this converter.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ An that represents the converted value.
+
+
+
+
+ Converts the given value object to the specified type,
+ using the specified context and culture information.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ The to convert the
+ parameter to.
+
+
+ An that represents the converted value.
+
+
+
+
+ Converter for to directly set a
+ property.
+
+ Jurgen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Create a new StreamConverter using the default
+ .
+
+
+
+
+ Create a new StreamConverter using the given
+ .
+
+
+ The to use.
+
+
+
+ Returns whether this converter can convert an object of one
+ to a
+
+
+
+ Currently only supports conversion from a
+ instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ True if the conversion is possible.
+
+
+
+ Convert from a string value to a instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A if successful.
+
+
+
+
+ Converts a separated to a
+ array.
+
+
+
+ Defaults to using the , (comma) as the list separator. Note that the value
+ of the current is
+ not used.
+
+
+ If you want to provide your own list separator, you can set the value of the
+
+ property to the value that you want. Please note that this value will be used
+ for all future conversions in preference to the default list separator.
+
+
+ Please note that the individual elements of a string will be passed
+ through as is (i.e. no conversion or trimming of surrounding
+ whitespace will be performed).
+
+
+ This should be
+ automatically registered with any
+ implementations.
+
+
+
+
+ public class StringArrayConverterExample
+ {
+ public static void Main()
+ {
+ StringArrayConverter converter = new StringArrayConverter();
+
+ string csvWords = "This,Is,It";
+ string[] frankBoothWords = converter.ConvertFrom(csvWords);
+
+ // the 'frankBoothWords' array will have 3 elements, namely
+ // "This", "Is", "It".
+
+ // please note that extraneous whitespace is NOT trimmed off
+ // in the current implementation...
+ string csv = " Cogito ,ergo ,sum ";
+ string[] descartesWords = converter.ConvertFrom(csv);
+
+ // the 'descartesWords' array will have 3 elements, namely
+ // " Cogito ", "ergo ", "sum ".
+ // notice how the whitespace has NOT been trimmed.
+ }
+ }
+
+
+
+
+
+
+ Can we convert from a the sourcetype to a array?
+
+
+
+ Currently only supports conversion from a instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ if the conversion is possible.
+
+
+
+ Convert from a value to a
+ array.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A array if successful.
+
+
+
+
+ The value that will be used as the list separator when performing
+ conversions.
+
+
+ A 'single' string character that will be used as the list separator
+ when performing conversions.
+
+
+ If the supplied value is not and is an empty
+ string, or has more than one character.
+
+
+
+
+ Base parser for custom specifiers.
+
+
+
+
+ Convert int value to a Timespan based on the specifier
+
+
+
+
+
+
+ Check if the string contains the specifier and
+
+
+
+
+
+
+ Specifier
+
+
+
+
+ Recognize 10d as ten days
+
+
+
+
+ Parse value as days
+
+ Timespan in days
+
+
+
+
+ Day specifier: d
+
+
+
+
+ Recognize 10h as ten hours
+
+
+
+
+ Parse value as hours
+
+ Timespan in hours
+
+
+
+
+ Hour specifier: h
+
+
+
+
+ Recognize 10m as ten minutes
+
+
+
+
+ Parse value as minutes
+
+ Timespan in minutes
+
+
+
+
+ Minute specifier: m
+
+
+
+
+ Recognize 10s as ten seconds
+
+
+
+
+ Parse value as seconds
+
+ Timespan in seconds
+
+
+
+
+ Second specifier: s
+
+
+
+
+ Recognize 10ms as ten milliseconds
+
+
+
+
+ Parse value as milliseconds
+
+ Timespan in milliseconds
+
+
+
+
+ Millisecond specifier: ms
+
+
+
+
+ Converter for instances.
+
+ Bruno Baia
+ Roberto Paterlini
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Convert from a string value to a instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A if successful.
+
+
+
+
+ Utility methods that are used to convert objects from one type into another.
+
+ Aleksandar Seovic
+
+
+
+ Convert the value to the required (if necessary from a string).
+
+ The proposed change value.
+
+ The we must convert to.
+
+ Property name, used for error reporting purposes...
+
+ If there is an internal error.
+
+ The new value, possibly the result of type conversion.
+
+
+
+ Utility method to create a property change event.
+
+
+ The full name of the property that has changed.
+
+ The property old value
+ The property new value
+
+ A new .
+
+
+
+
+ Determines if a Type implements a specific generic interface.
+
+ Candidate to evaluate.
+ The to test for in the Candidate .
+ if a match, else
+
+
+
+ Registry class that allows users to register and retrieve type converters.
+
+ Aleksandar Seovic
+
+
+
+ Name of the .Net config section that contains Spring.Net type aliases.
+
+
+
+
+ Registers standard and configured type converters.
+
+
+
+
+ Returns for the specified type.
+
+ Type to get the converter for.
+ a type converter for the specified type.
+ If is null.
+
+
+
+ Registers for the specified type.
+
+ Type to register the converter for.
+ Type converter to register.
+ If either of arguments is null.
+
+
+
+ Registers for the specified type.
+
+
+ This is a convinience method that accepts the names of both
+ type to register converter for and the converter itself,
+ resolves them using , creates an
+ instance of type converter and calls overloaded
+ method.
+
+ Type name of the type to register the converter for (can be a type alias).
+ Type name of the type converter to register (can be a type alias).
+ If either of arguments is null or empty string.
+
+ If either of arguments fails to resolve to a valid .
+
+
+ If type converter does not derive from or if it cannot be instantiated.
+
+
+
+
+ Converts between instances of and their string representations.
+
+ Erich Eichinger
+
+
+
+ Can we convert from the sourcetype to a ?
+
+
+
+ Currently only supports conversion from a instance.
+
+
+
+ A that provides a format context.
+
+
+ A that represents the you want to convert from.
+
+ if the conversion is possible.
+
+
+
+ Convert from a value to an instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A if successful, otherwise.
+
+ The conversion cannot be performed.
+
+
+
+ Returns whether this converter can convert the object to the specified type, using the specified context.
+
+ An that provides a format context.
+ A that represents the type you want to convert to.
+
+ true if this converter can perform the conversion; otherwise, false.
+
+
+ At the moment only conversion to string is supported.
+
+
+
+
+ Converts the given value object to the specified type, using the specified context and culture information.
+
+
+
+ An that represents the converted value.
+
+
+ A . If null is passed, the current culture is assumed.
+ An that provides a format context.
+ The to convert the value parameter to.
+ The to convert.
+ The conversion cannot be performed.
+ The destinationType parameter is null.
+
+
+
+ Converter for instances.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Returns whether this converter can convert an object of one
+ to a
+
+
+
+ Currently only supports conversion from a
+ instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ True if the conversion is possible.
+
+
+
+ Convert from a string value to a instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A if successful.
+
+
+
+
+ Resolves (instantiates) a by it's (possibly
+ assembly qualified) name, and caches the
+ instance against the type name.
+
+ Rick Evans
+ Bruno Baia
+ Erich Eichinger
+
+
+
+ Resolves a by name.
+
+
+
+ The rationale behind the creation of this interface is to centralise
+ the resolution of type names to instances
+ beyond that offered by the plain vanilla
+ method call.
+
+
+ Rick Evans
+
+
+
+ Resolves the supplied to a
+
+ instance.
+
+
+ The (possibly partially assembly qualified) name of a
+ .
+
+
+ A resolved instance.
+
+
+ If the supplied could not be resolved
+ to a .
+
+
+
+
+ The cache, mapping type names ( instances) against
+ instances.
+
+
+
+
+ Creates a new instance of the class.
+
+
+ The that this instance will delegate
+ actual resolution to if a
+ cannot be found in this instance's cache.
+
+
+ If the supplied is .
+
+
+
+
+ Resolves the supplied to a
+
+ instance.
+
+
+ The (possibly partially assembly qualified) name of a
+ .
+
+
+ A resolved instance.
+
+
+ If the supplied could not be resolved
+ to a .
+
+
+
+
+ Holder for the generic arguments when using type parameters.
+
+
+
+ Type parameters can be applied to classes, interfaces,
+ structures, methods, delegates, etc...
+
+
+
+
+
+ The generic arguments prefix.
+
+
+
+
+ The generic arguments suffix.
+
+
+
+
+ The generic arguments prefix.
+
+
+
+
+ The generic arguments suffix.
+
+
+
+
+ The character that separates a list of generic arguments.
+
+
+
+
+ Creates a new instance of the GenericArgumentsHolder class.
+
+
+ The string value to parse looking for a generic definition
+ and retrieving its generic arguments.
+
+
+
+
+ Returns the array declaration portion of the definition, e.g. "[,]"
+
+
+
+
+
+ Returns an array of unresolved generic arguments types.
+
+
+
+ A empty string represents a type parameter that
+ did not have been substituted by a specific type.
+
+
+
+ An array of strings that represents the unresolved generic
+ arguments types or an empty array if not generic.
+
+
+
+
+ The (unresolved) generic type name portion
+ of the original value when parsing a generic type.
+
+
+
+
+ The (unresolved) generic method name portion
+ of the original value when parsing a generic method.
+
+
+
+
+ Is the string value contains generic arguments ?
+
+
+
+ A generic argument can be a type parameter or a type argument.
+
+
+
+
+
+ Is generic arguments only contains type parameters ?
+
+
+
+
+ Is this an array type definition?
+
+
+
+
+ Resolves a generic by name.
+
+ Bruno Baia
+
+
+
+ Resolves a by name.
+
+ Rick Evans
+ Aleksandar Seovic
+ Bruno Baia
+
+
+
+ Resolves the supplied to a
+ instance.
+
+
+ The unresolved (possibly partially assembly qualified) name
+ of a .
+
+
+ A resolved instance.
+
+
+ If the supplied could not be resolved
+ to a .
+
+
+
+
+ Uses
+ to load an and then the attendant
+ referred to by the
+ parameter.
+
+
+
+ is
+ deprecated in .NET 2.0, but is still used here (even when this class is
+ compiled for .NET 2.0);
+ will
+ still resolve (non-.NET Framework) local assemblies when given only the
+ display name of an assembly (the behaviour for .NET Framework assemblies
+ and strongly named assemblies is documented in the docs for the
+ method).
+
+
+
+ The assembly and type to be loaded.
+
+
+ A , or .
+
+
+
+
+
+
+
+ Uses
+ to load the attendant referred to by
+ the parameter.
+
+
+ The type to be loaded.
+
+
+ A , or .
+
+
+
+
+ Creates a new instance
+ from the given
+
+
+
+
+ Creates a new instance
+ from the given with the given inner
+
+
+
+
+ Resolves the supplied generic to a
+ instance.
+
+
+ The unresolved (possibly generic) name of a .
+
+
+ A resolved instance.
+
+
+ If the supplied could not be resolved
+ to a .
+
+
+
+
+ Holds data about a and it's
+ attendant .
+
+
+
+
+ The string that separates a name
+ from the name of it's attendant
+ in an assembly qualified type name.
+
+
+
+
+ Creates a new instance of the TypeAssemblyHolder class.
+
+
+ The unresolved name of a .
+
+
+
+
+ The (unresolved) type name portion of the original type name.
+
+
+
+
+ The (unresolved, possibly partial) name of the attandant assembly.
+
+
+
+
+ Is the type name being resolved assembly qualified?
+
+
+
+
+ Provides access to a central registry of aliased s.
+
+
+
+ Simplifies configuration by allowing aliases to be used instead of
+ fully qualified type names.
+
+
+ Comes 'pre-loaded' with a number of convenience alias' for the more
+ common types; an example would be the 'int' (or 'Integer'
+ for Visual Basic.NET developers) alias for the
+ type.
+
+
+ Aleksandar Seovic
+
+
+
+
+ Name of the .Net config section that contains Spring.Net type aliases.
+
+
+
+
+ The alias around the 'int' type.
+
+
+
+
+ The alias around the 'Integer' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'int[]' array type.
+
+
+
+
+ The alias around the 'Integer()' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'decimal' type.
+
+
+
+
+ The alias around the 'Decimal' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'decimal[]' array type.
+
+
+
+
+ The alias around the 'Decimal()' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'char' type.
+
+
+
+
+ The alias around the 'Char' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'char[]' array type.
+
+
+
+
+ The alias around the 'Char()' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'long' type.
+
+
+
+
+ The alias around the 'Long' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'long[]' array type.
+
+
+
+
+ The alias around the 'Long()' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'short' type.
+
+
+
+
+ The alias around the 'Short' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'short[]' array type.
+
+
+
+
+ The alias around the 'Short()' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'unsigned int' type.
+
+
+
+
+ The alias around the 'unsigned long' type.
+
+
+
+
+ The alias around the 'ulong[]' array type.
+
+
+
+
+ The alias around the 'uint[]' array type.
+
+
+
+
+ The alias around the 'unsigned short' type.
+
+
+
+
+ The alias around the 'ushort[]' array type.
+
+
+
+
+ The alias around the 'double' type.
+
+
+
+
+ The alias around the 'Double' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'double[]' array type.
+
+
+
+
+ The alias around the 'Double()' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'float' type.
+
+
+
+
+ The alias around the 'Single' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'float[]' array type.
+
+
+
+
+ The alias around the 'Single()' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'DateTime' type.
+
+
+
+
+ The alias around the 'DateTime' type (C# style).
+
+
+
+
+ The alias around the 'DateTime' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'DateTime[]' array type.
+
+
+
+
+ The alias around the 'DateTime[]' array type.
+
+
+
+
+ The alias around the 'DateTime()' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'bool' type.
+
+
+
+
+ The alias around the 'Boolean' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'bool[]' array type.
+
+
+
+
+ The alias around the 'Boolean()' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'string' type.
+
+
+
+
+ The alias around the 'string' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'string[]' array type.
+
+
+
+
+ The alias around the 'string[]' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'object' type.
+
+
+
+
+ The alias around the 'object' type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'object[]' array type.
+
+
+
+
+ The alias around the 'object[]' array type (Visual Basic.NET style).
+
+
+
+
+ The alias around the 'int?' type.
+
+
+
+
+ The alias around the 'int?[]' array type.
+
+
+
+
+ The alias around the 'decimal?' type.
+
+
+
+
+ The alias around the 'decimal?[]' array type.
+
+
+
+
+ The alias around the 'char?' type.
+
+
+
+
+ The alias around the 'char?[]' array type.
+
+
+
+
+ The alias around the 'long?' type.
+
+
+
+
+ The alias around the 'long?[]' array type.
+
+
+
+
+ The alias around the 'short?' type.
+
+
+
+
+ The alias around the 'short?[]' array type.
+
+
+
+
+ The alias around the 'unsigned int?' type.
+
+
+
+
+ The alias around the 'unsigned long?' type.
+
+
+
+
+ The alias around the 'ulong?[]' array type.
+
+
+
+
+ The alias around the 'uint?[]' array type.
+
+
+
+
+ The alias around the 'unsigned short?' type.
+
+
+
+
+ The alias around the 'ushort?[]' array type.
+
+
+
+
+ The alias around the 'double?' type.
+
+
+
+
+ The alias around the 'double?[]' array type.
+
+
+
+
+ The alias around the 'float?' type.
+
+
+
+
+ The alias around the 'float?[]' array type.
+
+
+
+
+ The alias around the 'bool?' type.
+
+
+
+
+ The alias around the 'bool?[]' array type.
+
+
+
+
+ Registers standard and user-configured type aliases.
+
+
+
+
+ Registers an alias for the specified .
+
+
+
+ This overload does eager resolution of the
+ referred to by the parameter. It will throw a
+ if the referred
+ to by the parameter cannot be resolved.
+
+
+
+ A string that will be used as an alias for the specified
+ .
+
+
+ The (possibly partially assembly qualified) name of the
+ to register the alias for.
+
+
+ If either of the supplied parameters is or
+ contains only whitespace character(s).
+
+
+ If the referred to by the supplied
+ cannot be loaded.
+
+
+
+
+ Registers short type name as an alias for
+ the supplied .
+
+
+ The to register.
+
+
+ If the supplied is .
+
+
+
+
+ Registers an alias for the supplied .
+
+
+ The alias for the supplied .
+
+
+ The to register the supplied under.
+
+
+ If the supplied is ; or if
+ the supplied is or
+ contains only whitespace character(s).
+
+
+
+
+ Resolves the supplied to a .
+
+
+ The alias to resolve.
+
+
+ The the supplied was
+ associated with, or if no
+ was previously registered for the supplied .
+
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+
+
+
+ Returns a flag specifying whether TypeRegistry contains
+ specified alias or not.
+
+
+ Alias to check.
+
+
+ true if the specified type alias is registered,
+ false otherwise.
+
+
+
+
+ Helper methods with regard to type resolution.
+
+
+
+ Not intended to be used directly by applications.
+
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the class.
+
+
+
+ This is a utility class, and as such exposes no public constructors.
+
+
+
+
+
+ Resolves the supplied type name into a
+ instance.
+
+
+
+ If you require special resolution, do
+ not use this method, but rather instantiate
+ your own .
+
+
+
+ The (possibly partially assembly qualified) name of a
+ .
+
+
+ A resolved instance.
+
+
+ If the type cannot be resolved.
+
+
+
+
+ Resolves a string array of interface names to
+ a array.
+
+
+ An array of valid interface names. Each name must include the full
+ interface and assembly name.
+
+ An array of interface s.
+
+ If any of the interfaces can't be loaded.
+
+
+ If any of the s specified is not an interface.
+
+
+ If (or any of its elements ) is
+ .
+
+
+
+
+ Match a method against the given pattern.
+
+ the pattern to match against.
+ the method to match.
+
+ if the method matches the given pattern; otherwise .
+
+
+ If the supplied is invalid.
+
+
+
+
+ Exception thrown when the ObjectFactory cannot load the specified type of a given object.
+
+ Mark Pollack
+
+
+
+ Thrown on an unrecoverable problem encountered in the
+ objects namespace or sub-namespaces, e.g. bad class or field.
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Superclass for all exceptions thrown in the Objects namespace and sub-namespaces.
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+ Creates a new instance of the ObjectsException class.
+
+
+
+ Creates a new instance of the ObjectsException class. with the specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the ObjectsException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectsException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Creates a new instance of the FatalObjectException class.
+
+
+
+
+ Creates a new instance of the FatalObjectException class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the FatalObjectException class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the FatalObjectException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ 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 that is being wrapped.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The resource description that the object definition came from.
+ Name of the object requested
+ Name of the object type.
+ The root 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.
+
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ Gets he name of the object we are trying to load.
+
+ The name of the object.
+
+
+
+ Gets the name of the object type we are trying to load.
+
+ The name of the object type.
+
+
+
+ Gets the resource description that the object definition came from
+
+ The resource description.
+
+
+
+ A implementation that represents
+ a composed collection of instances.
+
+
+
+
+ The criteria for an arbitrary filter.
+
+ Rick Evans
+
+
+
+ Does the supplied satisfy the criteria
+ encapsulated by this instance?
+
+
+ The datum to be checked by this criteria instance.
+
+
+ if the supplied
+ satisfies the criteria encapsulated by this instance;
+ if not, or the supplied
+ is .
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A user-defined (child) criteria that will be composed into this instance.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+ The data to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ Adds the supplied into the criteria
+ composed within this instance.
+
+
+ The to be added.
+
+
+
+
+ The list of composing this
+ instance.
+
+
+
+
+ Factory class to conceal any default implementation.
+
+ Rod Johnson
+ Simon White (.NET)
+
+
+
+ Creates a new instance of the
+ implementation provided by this factory.
+
+
+ A new instance of the
+ implementation provided by this factory.
+
+
+
+
+ Interface to be implemented by objects that can return information about
+ the current call stack.
+
+
+
+ Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific.
+
+
+ Rod Johnson
+ Aleksandar Seovic (.Net)
+
+
+
+ Detects whether the caller is under the supplied ,
+ according to the current stacktrace.
+
+
+ The to look for.
+
+
+ if the caller is under the supplied .
+
+
+
+
+ Detects whether the caller is under the supplied
+ and , according to the current stacktrace.
+
+
+ The to look for.
+
+ The name of the method to look for.
+
+ if the caller is under the supplied
+ and .
+
+
+
+
+ Does the current stack trace contain the supplied ?
+
+ The token to match against.
+
+ if the current stack trace contains the supplied
+ .
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Detects whether the caller is under the supplied ,
+ according to the current stacktrace.
+
+
+
+
+
+ Detects whether the caller is under the supplied
+ and , according to the current stacktrace.
+
+
+
+ Matches the whole method name.
+
+
+
+
+
+
+ Does the current stack trace contain the supplied ?
+
+
+
+ This leaves it up to the caller to decide what matches, but is obviously less of
+ an abstraction because the caller must know the exact format of the underlying
+ stack trace.
+
+
+
+
+
+
+ Provides methods to support various naming and other conventions used throughout the framework.
+ Mainly for internal use within the framework.
+
+ Rob Harrop
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Convert Strings in attribute name format (lowercase, hyphens separating words)
+ into property name format (camel-cased). For example, transaction-manager is
+ converted into transactionManager.
+
+
+
+
+ Convenience class that exposes a signature that matches the
+ delegate.
+
+
+
+ Useful when filtering members via the
+ mechanism.
+
+
+ Rick Evans
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Returns true if the supplied instance
+ satisfies the supplied (which must be an
+ implementation).
+
+
+ The instance that will be checked to see if
+ it matches the supplied .
+
+
+ The criteria against which to filter the supplied
+ instance.
+
+
+ True if the supplied instance
+ satisfies the supplied (which must be an
+ implementation); false if not or the
+ supplied is not an
+ implementation or is null.
+
+
+
+
+ Interface that can be implemented by exceptions etc that are error coded.
+
+
+
+ The error code is a , rather than a number, so it can
+ be given user-readable values, such as "object.failureDescription".
+
+
+ Rod Johnson
+ Aleksandar Seovic (.Net)
+
+
+
+ Return the error code associated with this failure.
+
+
+
+ The GUI can render this anyway it pleases, allowing for I18n etc.
+
+
+
+ The error code associated with this failure,
+ or the empty string instance if not error-coded.
+
+
+
+
+ Thrown in response to referring to an invalid property (most often via reflection).
+
+ Rick Evans
+
+
+
+ Creates 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.
+
+
+ The that is (or rather was) the source of the
+ offending property.
+
+
+ The name of the offending property.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The that is (or rather was) the source of the
+ offending property.
+
+
+ The name of the offending property.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the InvalidPropertyException class.
+
+
+ The that is (or rather was) the source of the
+ offending property.
+
+
+ The name of the offending property.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ The that is (or rather was) the source of the
+ offending property.
+
+
+
+
+ The name of the offending property.
+
+
+
+
+ Extension of the interface, expressing a 'priority'
+ ordering: Order values expressed by IPriorityOrdered objects always
+ apply before order values of 'plain' Ordered values.
+
+
+ This is primarily a special-purpose interface, used for objects
+ where it is particularly important to determine 'prioritized'
+ objects first, without even obtaining the remaining objects.
+ A typical example: Prioritized post-processors in a Spring
+
+
+ IPriorityOrdered post-processor objects are initialized in
+ a special phase, ahead of other post-processor objects.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+
+
+
+ Criteria that is satisfied if the of each of the
+ arguments matches each of the parameter s of a given
+ .
+
+
+
+ If no array is passed to the overloaded constructor,
+ any method that has no parameters will satisfy an instance of this
+ class. The same effect could be achieved by passing the
+ array to the overloaded constructor.
+
+
+ Rick Evans
+ Bruno Baia
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ If the supplied array is null, then this
+ constructor uses the array.
+
+
+
+ The array that this criteria will use to
+ check parameter s.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+
+
+ This implementation respects the inheritance chain of any parameter
+ s... i.e. methods that have a base type (or
+ interface) that is assignable to the in the
+ same corresponding index of the parameter types will satisfy this
+ criteria instance.
+
+
+ The datum to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ Criteria that is satisfied if the number of generic arguments to a given
+ matches an arbitrary number.
+
+
+
+ This class supports checking the generic arguments count of both
+ generic methods and constructors.
+
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This constructor sets the
+
+ property to zero (0).
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The number of generic arguments that a
+ must have to satisfy this criteria.
+
+
+ If the supplied is less
+ than zero.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+ The datum to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ The number of generic arguments that a
+ must have to satisfy this criteria.
+
+
+ If the supplied value is less than zero.
+
+
+
+
+ Thrown when a method (typically a property getter or setter invoked via reflection)
+ throws an exception, analogous to a .
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Superclass for exceptions related to a property access, such as a
+ mismatch or a target invocation exception.
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ Create a new instance of the PropertyAccessException class.
+
+
+ A message about the exception.
+
+ Describes the change attempted on the property.
+
+
+
+ Create a new instance of the PropertyAccessException class.
+
+
+ A message about the exception.
+
+ Describes the change attempted on the property.
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the PropertyAccessException class.
+
+
+
+
+ Creates a new instance of the PropertyAccessException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the PropertyAccessExceptionsException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the PropertyAccessExceptionsException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Returns the PropertyChangeEventArgs that resulted in the problem.
+
+
+
+
+ The string error code used to classify the error.
+
+
+
+
+ Creates a new instance of the MethodInvocationException class.
+
+
+
+
+ Creates a new instance of the MethodInvocationException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the MethodInvocationException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Constructor to use when an exception results from a
+ .
+
+
+ The raised by the invoked property.
+
+
+ The that
+ resulted in an exception.
+
+
+
+
+ Creates a new instance of the MethodInvocationException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ The error code string for this exception.
+
+
+
+
+ Criteria that is satisfied if the method Name of an
+ instance matches a
+ supplied string pattern.
+
+
+
+ Supports the following simple pattern styles:
+ "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.
+
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This constructor sets the
+
+ property to * (any method name).
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+ The pattern that names
+ must match against in order to satisfy this criteria.
+
+ If the supplied is null or resolve to an empty string.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+ The datum to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ The number of parameters that a
+ must have to satisfy this criteria.
+
+
+ If the supplied value is null or resolve to an empty string.
+
+
+
+
+ Helper class that encapsulates the specification of a method parameter, i.e.
+ a MethodInfo or ConstructorInfo plus a parameter index.
+ Useful as a specification object to pass along.
+
+ Juergen Hoeller
+ Rob Harrop
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class for the given
+ MethodInfo.
+
+ The MethodInfo to specify a parameter for.
+ Index of the parameter.
+
+
+
+ Initializes a new instance of the class.
+
+ The ConstructorInfo to specify a parameter for.
+ Index of the parameter.
+
+
+
+ Create a new MethodParameter for the given method or donstructor.
+ This is a convenience constructor for scenarios where a
+ Method or Constructor reference is treated in a generic fashion.
+
+ The method or constructor to specify a parameter for.
+ Index of the parameter.
+ the corresponding MethodParameter instance
+
+
+
+ Parameters the name of the method/constructor parameter.
+
+ the parameter name.
+
+
+
+ Gets the type of the method/constructor parameter.
+
+ The type of the parameter. (never null)
+
+
+
+ Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available.
+
+ The MethodInfo, or null if none.
+
+
+
+ Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available.
+
+ The ConstructorInfo, or null if none
+
+
+
+ Criteria that is satisfied if the number of parameters to a given
+ matches an arbitrary number.
+
+
+
+ This class supports checking the parameter count of both methods and
+ constructors.
+
+
+ Default parameters, etc need to taken into account.
+
+
+ Rick Evans
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This constructor sets the
+
+ property to zero (0).
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The number of parameters that a
+ must have to satisfy this criteria.
+
+
+ If the supplied is less
+ than zero.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+ The datum to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ The number of parameters that a
+ must have to satisfy this criteria.
+
+
+ If the supplied value is less than zero.
+
+
+
+
+ Criteria that is satisfied if the of each of the
+ parameters of a given matches each
+ of the parameter s of a given
+ .
+
+
+
+ If no array is passed to the overloaded constructor,
+ any method that has no parameters will satisfy an instance of this
+ class. The same effect could be achieved by passing the
+ array to the overloaded constructor.
+
+
+ Rick Evans
+ Bruno Baia
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ If the supplied array is null, then this
+ constructor uses the array.
+
+
+
+ The array that this criteria will use to
+ check parameter s.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+ The datum to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ Criteria that is satisfied if the return of a given
+ matches a given .
+
+ Rick Evans
+
+
+
+ The return to match against if no
+ is provided explictly.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The that the return type of a given
+ must match in order to satisfy
+ this criteria.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+ The datum to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ The that the return type of a given
+ must match in order to satisfy
+ this criteria.
+
+
+
+
+ Thrown in response to a failed attempt to read a property.
+
+
+
+ Typically thrown when attempting to read the value of a write-only
+ property via reflection.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates 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.
+
+
+ The that is (or rather was) the source of the
+ offending property.
+
+
+ The name of the offending property.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Thrown in response to a failed attempt to write a property.
+
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the NotWritablePropertyException class.
+
+
+
+
+ Creates a new instance of the NotWritablePropertyException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the NotWritablePropertyException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the NotWritablePropertyException class.
+
+
+ The that is (or rather was) the source of the
+ offending property.
+
+
+ The name of the offending property.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the NotWritablePropertyException class
+ summarizing what property was not writable.
+
+
+ The name of the property that is not writable.
+
+
+ The in which the property is not writable.
+
+
+
+
+ Creates new NotWritablePropertyException with a root cause.
+
+
+ The name of the property that is not writable.
+
+
+ The in which the property is not writable.
+
+
+ The root cause indicating why the property was not writable.
+
+
+
+
+ Creates a new instance of the NotWritablePropertyException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Thrown in response to encountering a value
+ when traversing a nested path expression.
+
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The of the object where the property was not found.
+
+ The name of the property not found.
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The of the object where the property was not found.
+
+ The name of the property not found.
+ A message about the exception.
+
+
+
+ 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.
+
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ The name of the offending property.
+
+
+
+
+ The of the class where the property was last looked for.
+
+
+
+
+ Comparator implementation for objects, sorting by
+ order value ascending (resp. by priority descending).
+
+
+
+ Non- objects are treated as greatest order values,
+ thus ending up at the end of a list, in arbitrary order (just like same order values of
+ objects).
+
+
+ Juergen Hoeller
+ Aleksandar Seovic (.Net)
+
+
+
+ Compares two objects and returns a value indicating whether one is less than,
+ equal to or greater than the other.
+
+
+
+ Uses direct evaluation instead of
+ to avoid unnecessary boxing.
+
+
+ The first object to compare.
+ The second object to compare.
+
+ -1 if first object is less then second, 1 if it is greater, or 0 if they are equal.
+
+
+
+
+ Handle the case when both objects have equal sort order priority. By default returns 0,
+ but may be overriden for handling special cases.
+
+ The first object to compare.
+ The second object to compare.
+
+ -1 if first object is less then second, 1 if it is greater, or 0 if they are equal.
+
+
+
+
+ Provides additional data for the PropertyChanged event.
+
+
+
+ Provides some additional properties over and above the name of the
+ property that has changed (which is inherited from the
+ base class).
+ This allows calling code to determine whether or not a property has
+ actually changed (i.e. a PropertyChanged event may have been
+ raised, but the value itself may be equivalent).
+
+
+
+
+
+
+ Create a new instance of the
+ class.
+
+
+ The name of the property that was changed.
+ The old value of the property.
+ the new value of the property.
+
+
+
+ Get the old value for the property.
+
+
+
+
+
+ Get the new value of the property.
+
+
+
+
+
+ A base class for all
+ implementations that are regular expression based.
+
+ Rick Evans
+
+
+
+ The default pattern... matches absolutely anything.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The regular expression pattern to be applied.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+ The datum to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ Convenience method that calls the
+
+ on the supplied .
+
+ The input to match against.
+ True if the matches.
+
+
+
+ The regular expression pattern to be applied.
+
+
+
+
+ The regular expression options to be applied.
+
+
+
+
+ The regular expression to be applied.
+
+
+
+
+ Criteria that is satisfied if the Name property of an
+ instance matches a
+ supplied regular expression pattern.
+
+ Rick Evans
+
+
+
+ The default event name pattern... matches pretty much any event name.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The pattern that names
+ must match against in order to satisfy this criteria.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+ The datum to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ Criteria that is satisfied if the Name property of an
+ instance matches a
+ supplied regular expression pattern.
+
+ Rick Evans
+
+
+
+ The default method name pattern... matches pretty much any method name.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The pattern that names
+ must match against in order to satisfy this criteria.
+
+
+
+
+ Does the supplied satisfy the criteria encapsulated by
+ this instance?
+
+ The datum to be checked by this criteria instance.
+
+ True if the supplied satisfies the criteria encapsulated
+ by this instance; false if not or the supplied is null.
+
+
+
+
+ Exception thrown on a mismatch when trying to set a property
+ or resolve an argument to a method invocation.
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the TypeMismatchException class.
+
+
+
+
+ Creates a new instance of the TypeMismatchException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the TypeMismatchException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the TypeMismatchException class describing the
+ property and required type that could not used to set a property on the target object.
+
+
+ The description of the property that was to be changed.
+
+ The target conversion type.
+
+
+
+ Creates a new instance of the TypeMismatchException class describing the
+ property, required type, and underlying exception that could not be used
+ to set a property on the target object.
+
+
+ The description of the property that was to be changed.
+
+ The target conversion type.
+ The underlying exception.
+
+
+
+ Creates a new instance of the TypeMismatchException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ The string error code used to classify the exception.
+
+
+
+
+ Abstract base class for implementations.
+
+ Aleksandar Seovic
+
+
+
+ An interface that defines the methods that have to be implemented by all data bindings.
+
+ Aleksandar Seovic
+
+
+
+ Binds source object to target object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+
+
+ Binds source object to target object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Binds target object to source object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+
+
+ Binds target object to source object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Sets error message that should be displayed in the case
+ of a non-fatal binding error.
+
+
+ Resource ID of the error message.
+
+
+ List of error providers message should be added to.
+
+
+
+
+ The name of the always filled error provider
+
+
+
+
+ Gets or sets a flag specifying whether this binding is valid.
+
+
+ true if this binding evaluated without errors;
+ false otherwise.
+
+
+
+
+ Marks this binding's state as invalid for this validationErrors collection.
+ Returns false if is null.
+
+
+ false, if validationErrors is null
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Binds source object to target object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+
+
+ Binds target object to source object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+
+
+ Binds source object to target object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Binds target object to source object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Sets error message that should be displayed in the case
+ of a non-fatal binding error.
+
+
+ Resource ID of the error message.
+
+
+ List of error providers message should be added to.
+
+
+
+
+ Determines whether the specified is equal to the current .
+
+
+ true if the specified is equal to the current ; otherwise, false.
+
+ The to compare with the current . 2
+
+
+
+ Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table.
+
+
+ A hash code for the current .
+
+
+
+
+ Gets the unique ID of this binding instance.
+
+
+
+
+ Gets or sets the .
+
+ The binding direction.
+
+
+
+ Gets the error message.
+
+ The error message.
+
+
+
+ Gets the error providers.
+
+
+
+
+ Abstract base class for simple, one-to-one implementations.
+
+ Aleksandar Seovic
+
+
+
+ Initialize a new instance of without any
+
+
+
+
+ Initialize a new instance of with the
+ specified .
+
+
+
+
+ Binds source object to target object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Concrete implementation if source to target binding.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Binds target object to source object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Concrete implementation of target to source binding.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Gets the source value for the binding.
+
+
+ Source object to extract value from.
+
+
+ Variables for expression evaluation.
+
+
+ The source value for the binding.
+
+
+
+
+ Sets the source value for the binding.
+
+
+ The source object to set the value on.
+
+
+ The value to set.
+
+
+ Variables for expression evaluation.
+
+
+
+
+ Gets the target value for the binding.
+
+
+ Source object to extract value from.
+
+
+ Variables for expression evaluation.
+
+
+ The target value for the binding.
+
+
+
+
+ Sets the target value for the binding.
+
+
+ The target object to set the value on.
+
+
+ The value to set.
+
+
+ Variables for expression evaluation.
+
+
+
+
+ Gets or sets the to use.
+
+ The formatter to use.
+
+
+
+ Base implementation of the .
+
+ Aleksandar Seovic
+
+
+
+ An interface that has to be implemented by all data binding containers.
+
+ Aleksandar Seovic
+
+
+
+ Adds the binding.
+
+
+ Binding definition to add.
+
+
+ Added instance.
+
+
+
+
+ Adds the binding with a default
+ binding direction of .
+
+
+ This is a convinience method for adding SimpleExpressionBinding,
+ one of the most often used binding types, to the bindings list.
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ Added instance.
+
+
+
+
+ Adds the binding.
+
+
+ This is a convinience method for adding SimpleExpressionBinding,
+ one of the most often used binding types, to the bindings list.
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ Binding direction.
+
+
+ Added instance.
+
+
+
+
+ Adds the binding with a default
+ binding direction of .
+
+
+ This is a convinience method for adding SimpleExpressionBinding,
+ one of the most often used binding types, to the bindings list.
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ to use for value formatting and parsing.
+
+
+ Added instance.
+
+
+
+
+ Adds the binding.
+
+
+ This is a convinience method for adding SimpleExpressionBinding,
+ one of the most often used binding types, to the bindings list.
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ Binding direction.
+
+
+ to use for value formatting and parsing.
+
+
+ Added instance.
+
+
+
+
+ Gets a value indicating whether this data binding container
+ has bindings.
+
+
+ true if this data binding container has bindings;
+ false otherwise.
+
+
+
+
+ Creates a new instance of .
+
+
+
+
+ Adds the binding.
+
+
+ Binding definition to add.
+
+
+ Added instance.
+
+
+
+
+ Adds the binding with a default
+ binding direction of .
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ Added instance.
+
+
+
+
+ Adds the binding.
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ Binding direction.
+
+
+ Added instance.
+
+
+
+
+ Adds the binding with a default
+ binding direction of .
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ to use for value formatting and parsing.
+
+
+ Added instance.
+
+
+
+
+ Adds the binding.
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ Binding direction.
+
+
+ to use for value formatting and parsing.
+
+
+ Added instance.
+
+
+
+
+ Binds source object to target object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+
+
+ Binds source object to target object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Binds target object to source object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+
+
+ Binds target object to source object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Implemented as a NOOP for containers.
+ of a non-fatal binding error.
+
+
+ Resource ID of the error message.
+
+
+ List of error providers message should be added to.
+
+
+
+
+ Gets a list of bindings for this container.
+
+
+ A list of bindings for this container.
+
+
+
+
+ Gets a value indicating whether this instance has bindings.
+
+
+ true if this instance has bindings; otherwise, false.
+
+
+
+
+ BaseBindingManager keeps track of all registered bindings and
+ represents an entry point for the binding and unbinding process.
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Enumeration that defines possible values for data binding direction.
+
+ Aleksandar Seovic
+
+
+
+ Specifies that value from the control property should be bound to a data model.
+
+
+
+
+ Specifies that value from the data model should be bound to control property.
+
+
+
+
+ Specifies that binding is bidirectional.
+
+
+
+
+ Represents an ErrorMessage specific to a binding instance.
+
+ Erich Eichinger
+
+
+
+ Represents a single validation error message.
+
+ Aleksandar Seovic
+ Goran Milosavljevic
+
+
+
+ Default constructor.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Error message resource identifier.
+ Parameters that should be used for message resolution.
+
+
+
+ Initializes a new instance of the class copying values from another instance.
+
+ Another Error message instance to copy values from.
+
+
+
+ This property is reserved, apply the
+
+ to the class instead.
+
+
+ An
+ that describes the XML representation of the object that
+ is produced by the
+
+ method and consumed by the
+
+ method.
+
+
+
+
+
+ Generates an object from its XML representation.
+
+
+ The stream
+ from which the object is deserialized.
+
+
+
+
+ Converts an object into its XML representation.
+
+
+ The stream
+ to which the object is serialized.
+
+
+
+
+ Resolves the message against specified .
+
+ Message source to resolve this error message against.
+ Resolved error message.
+
+
+
+ Determines whether the specified is equal to the current .
+
+
+ true if the specified is equal to the current ; otherwise, false.
+
+ The to compare with the current . 2
+
+
+
+ Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table.
+
+
+ A hash code for the current .
+
+
+
+
+ Gets or sets the resource identifier for this message.
+
+ The resource identifier for this message.
+
+
+
+ Gets or sets the message parameters.
+
+ The message parameters.
+
+
+
+ Initializes a new instance of the class.
+
+ the id of the binding this error message is associated with
+ the message id
+ optional parameters to this message
+
+
+
+ Generates an object from its XML representation.
+
+
+ The stream
+ from which the object is deserialized.
+
+
+
+
+ Converts an object into its XML representation.
+
+
+ The stream
+ to which the object is serialized.
+
+
+
+
+ Determines whether the specified is equal to the current .
+
+
+ true if the specified is equal to the current ; otherwise, false.
+
+ The to compare with the current . 2
+
+
+
+ Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table.
+
+
+ A hash code for the current .
+
+
+
+
+ Get the ID of the binding this message instance relates to.
+
+
+
+
+ Interface that should be implemented by data bound objects, such as
+ web pages, user controls, windows forms, etc.
+
+ Aleksandar Seovic
+
+
+
+ Gets the binding manager.
+
+ The binding manager.
+
+
+
+ implementation that allows
+ data binding between collections that implement
+ interface.
+
+ Aleksandar Seovic
+
+
+
+ Binds source object to target object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Binds target object to source object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Simple, expression-based implementation of that
+ binds source to target one-to-one.
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class.
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ The formatter to use.
+
+
+
+
+ Gets the source value for the binding.
+
+
+ Source object to extract value from.
+
+
+ Variables for expression evaluation.
+
+
+ The source value for the binding.
+
+
+
+
+ Sets the source value for the binding.
+
+
+ The source object to set the value on.
+
+
+ The value to set.
+
+
+ Variables for expression evaluation.
+
+
+
+
+ Gets the target value for the binding.
+
+
+ Source object to extract value from.
+
+
+ Variables for expression evaluation.
+
+
+ The target value for the binding.
+
+
+
+
+ Sets the target value for the binding.
+
+
+ The target object to set the value on.
+
+
+ The value to set.
+
+
+ Variables for expression evaluation.
+
+
+
+
+ Gets the source expression.
+
+ The source expression.
+
+
+
+ Gets the target expression.
+
+ The target expression.
+
+
+
+ Minimal AST node interface used by ANTLR AST generation and tree-walker.
+
+
+
+
+ Add a (rightmost) child to this node
+
+
+
+
+
+ Get the first child of this node; null if no children
+
+
+
+
+ Get the next sibling in line after this one
+
+
+
+
+ Get the token text for this node
+
+
+
+
+
+ Get number of children of this node; if leaf, returns 0
+
+ Number of children
+
+
+
+ Set the first child of a node.
+
+
+
+
+
+ Set the next sibling after this one.
+
+
+
+
+
+ Set the token text for this node
+
+
+
+
+
+ Set the token type for this node
+
+
+
+
+
+ Get the token type for this node
+
+
+
+
+ Event type.
+
+
+
+ Used for creating Token instances.
+
+
+ Used for caching lookahead characters.
+
+
+
+ This method is executed by ANTLR internally when it detected an illegal
+ state that cannot be recovered from.
+ The previous implementation of this method called
+ and writes directly to , which is usually not
+ appropriate when a translator is embedded into a larger application.
+
+ Error message.
+
+
+
+ A creator of Token object instances.
+
+
+
+ This class and it's sub-classes exists primarily as an optimization
+ of the reflection-based mechanism(s) previously used exclusively to
+ create instances of Token objects.
+
+
+ Since Lexers in ANTLR use a single Token type, each TokenCreator can
+ create one class of Token objects (that's why it's not called TokenFactory).
+
+
+
+
+
+ Constructs a instance.
+
+
+
+
+ Returns the fully qualified name of the Token type that this
+ class creates.
+
+
+
+
+ The fully qualified name of the Token type to create.
+
+
+
+
+ Type object used as a template for creating tokens by reflection.
+
+
+
+
+ Returns the fully qualified name of the Token type that this
+ class creates.
+
+
+
+
+ Constructs a instance.
+
+
+
+
+ Returns the fully qualified name of the Token type that this
+ class creates.
+
+
+
+ This type was created in VisualAge.
+
+
+
+ Report exception errors caught in nextToken()
+
+
+
+ Parser error-reporting function can be overridden in subclass
+
+
+
+ Parser warning-reporting function can be overridden in subclass
+
+
+
+
+ Represents a stream of characters fed to the lexer from that can be rewound
+ via mark()/rewind() methods.
+
+
+
+ A dynamic array is used to buffer up all the input characters. Normally,
+ "k" characters are stored in the buffer. More characters may be stored
+ during guess mode (testing syntactic predicate), or when LT(i>k) is referenced.
+ Consumption of characters is deferred. In other words, reading the next
+ character is not done by conume(), but deferred until needed by LA or LT.
+
+
+
+
+ This should NOT be called from anyone other than ParserEventSupport!
+
+
+
+ This should NOT be called from anyone other than ParserEventSupport!
+
+
+
+
+ Provides an abstract base for implementing subclasses.
+
+
+
+ This abstract class is provided to make it easier to create s.
+ You should extend this base class rather than creating your own.
+
+
+
+
+
+ Handle the "Done" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "CharConsumed" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "CharLA" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "Mark" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "Rewind" event.
+
+ Event source object
+ Event data object
+
+
+ charBufferConsume method comment.
+
+
+
+ charBufferLA method comment.
+
+
+
+
+ @deprecated as of 2.7.2. This method calls System.exit() and writes
+ directly to stderr, which is usually not appropriate when
+ a parser is embedded into a larger application. Since the method is
+ static, it cannot be overridden to avoid these problems.
+ ANTLR no longer uses this method internally or in generated code.
+
+
+
+
+
+ Specify an object with support code (shared by Parser and TreeParser.
+ Normally, the programmer does not play with this, using
+ instead.
+
+
+
+
+
+ Specify the type of node to create during tree building.
+
+ Fully qualified AST Node type name.
+
+
+
+ Specify the type of node to create during tree building.
+ use now to be consistent with
+ Token Object Type accessor.
+
+ Fully qualified AST Node type name.
+
+
+
+
+
+
+
+ Get another token object from the token stream
+
+
+
+ Return the token type of the ith token of lookahead where i=1
+ is the current token being examined by the parser (i.e., it
+ has not been matched yet).
+
+
+
+ Make sure current lookahead symbol matches token type t.
+ Throw an exception upon mismatch, which is catch by either the
+ error handler or by the syntactic predicate.
+
+
+
+ Make sure current lookahead symbol matches the given set
+ Throw an exception upon mismatch, which is catch by either the
+ error handler or by the syntactic predicate.
+
+
+
+ Parser error-reporting function can be overridden in subclass
+
+
+
+ Parser error-reporting function can be overridden in subclass
+
+
+
+ Parser warning-reporting function can be overridden in subclass
+
+
+
+ User can override to do their own debugging
+
+
+
+ This should NOT be called from anyone other than ParserEventSupport!
+
+
+
+
+ Provides an abstract base for implementing subclasses.
+
+
+
+ This abstract class is provided to make it easier to create s.
+ You should extend this base class rather than creating your own.
+
+
+
+
+
+ Handle the "Done" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "ReportError" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "ReportWarning" event.
+
+ Event source object
+ Event data object
+
+
+ This should NOT be called from anyone other than ParserEventSupport!
+
+
+
+ A class to assist in firing parser events
+ NOTE: I intentionally _did_not_ synchronize the event firing and
+ add/remove listener methods. This is because the add/remove should
+ _only_ be called by the parser at its start/end, and the _same_thread_
+ should be performing the parsing. This should help performance a tad...
+
+
+
+
+ Provides an abstract base for implementing subclasses.
+
+
+
+ This abstract class is provided to make it easier to create s.
+ You should extend this base class rather than creating your own.
+
+
+
+
+
+ Handle the "Done" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "EnterRule" event
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "ExitRule" event
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "Consume" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "ParserLA" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "Match" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "MatchNot" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "MisMatch" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "MisMatchNot" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "ReportError" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "ReportWarning" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "SemPreEvaluated" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "SynPredFailed" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "SynPredStarted" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "SynPredSucceeded" event.
+
+ Event source object
+ Event data object
+
+
+ This should NOT be called from anyone other than ParserEventSupport!
+
+
+
+
+ Provides an abstract base for implementing subclasses.
+
+
+
+ This abstract class is provided to make it easier to create s.
+ You should extend this base class rather than creating your own.
+
+
+
+
+
+ Handle the "Done" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "Match" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "MatchNot" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "MisMatch" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "MisMatchNot" event.
+
+ Event source object
+ Event data object
+
+
+
+ Provides an abstract base for implementing subclasses.
+
+
+
+ This abstract class is provided to make it easier to create s.
+ You should extend this base class rather than creating your own.
+
+
+
+
+
+ Handle the "Done" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "EnterRule" event
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "ExitRule" event
+
+ Event source object
+ Event data object
+
+
+ This should NOT be called from anyone other than ParserEventSupport!
+
+
+
+
+ Provides an abstract base for implementing subclasses.
+
+
+
+ This abstract class is provided to make it easier to create s.
+ You should extend this base class rather than creating your own.
+
+
+
+
+
+ Handle the "Done" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "Consume" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "ParserLA" event.
+
+ Event source object
+ Event data object
+
+
+
+ Specifies the behaviour required (i.e. parser modifications)
+ specifically to support parse tree debugging and derivation.
+
+
+
+ Override the standard matching and rule entry/exit routines
+ to build parse trees. This class is useful for 2.7.3 where
+ you can specify a superclass like
+
+
+ class TinyCParser extends Parser(ParseTreeDebugParser);
+
+
+
+
+
+ Each new rule invocation must have it's own subtree. Tokens are
+ added to the current root so we must have a stack of subtree roots.
+
+
+
+
+ Track most recently created parse subtree so that when parsing
+ is finished, we can get to the root.
+
+
+
+
+ For every rule replacement with a production, we bump up count.
+
+
+
+
+ Adds LT(1) to the current parse subtree.
+
+
+
+ Note that the match() routines add the node before checking for
+ correct match. This means that, upon mismatched token, there
+ will a token node in the tree corresponding to where that token
+ was expected. For no viable alternative errors, no node will
+ be in the tree as nothing was matched() (the lookahead failed
+ to predict an alternative).
+
+
+
+
+
+ Create a rule node, add to current tree, and make it current root
+
+
+
+
+
+ Pop current root; back to adding to old root
+
+
+
+
+ A class to assist in firing parser events
+ NOTE: I intentionally _did_not_ synchronize the event firing and
+ add/remove listener methods. This is because the add/remove should
+ _only_ be called by the parser at its start/end, and the _same_thread_
+ should be performing the parsing. This should help performance a tad...
+
+
+
+ This should NOT be called from anyone other than ParserEventSupport!
+
+
+
+
+ Provides an abstract base for implementing subclasses.
+
+
+
+ This abstract class is provided to make it easier to create s.
+ You should extend this base class rather than creating your own.
+
+
+
+
+
+ Handle the "Done" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "SemPreEvaluated" event.
+
+ Event source object
+ Event data object
+
+
+
+ Provides an abstract base for implementing subclasses.
+
+
+
+ This abstract class is provided to make it easier to create s.
+ You should extend this base class rather than creating your own.
+
+
+
+
+
+ Handle the "Done" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "SynPredFailed" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "SynPredStarted" event.
+
+ Event source object
+ Event data object
+
+
+
+ Handle the "SynPredSucceeded" event.
+
+ Event source object
+ Event data object
+
+
+ This should NOT be called from anyone other than ParserEventSupport!
+
+
+
+
+ AST Support code shared by TreeParser and Parser.
+
+
+
+ We use delegation to share code (and have only one
+ bit of code to maintain) rather than subclassing
+ or superclassing (forces AST support code to be
+ loaded even when you don't want to do AST stuff).
+
+
+ Typically, is used to specify the
+ homogeneous type of node to create, but you can override
+ to make heterogeneous nodes etc...
+
+
+
+
+
+ Constructs an ASTFactory with the default AST node type of
+ .
+
+
+
+
+ Constructs an ASTFactory and use the specified AST node type
+ as the default.
+
+
+ Name of default AST node type for this factory.
+
+
+
+
+ Constructs an ASTFactory and use the specified AST node type
+ as the default.
+
+
+ MetaType of default AST node type for this factory.
+
+
+
+
+ Stores the Type of the default AST node class to be used during tree construction.
+
+
+
+
+ Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass
+ and ASTNodeCreator.
+
+
+
+
+ Stores the mapping between AST node typenames and their token ID.
+
+
+
+
+ Specify an "override" for the type created for
+ the specified Token type.
+
+
+ This method is useful for situations that ANTLR cannot oridinarily deal
+ with (i.e., when you create a token based upon a nonliteral token symbol
+ like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token
+ type (and hence the AST) statically.
+
+ Token type to override.
+
+ Fully qualified AST typename (or null to specify
+ the factory's default AST type).
+
+
+
+
+ Register an AST Node Type for a given Token type ID.
+
+ The Token type ID.
+ The AST Node Type to register.
+
+
+
+ Register an ASTNodeCreator for a given Token type ID.
+
+ The Token type ID.
+ The creater to register.
+
+
+
+ Register an ASTNodeCreator to be used for creating node by default.
+
+ The ASTNodeCreator.
+
+
+
+ Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings
+ to the specified size.
+ This is primarily a convenience method that can be used to prevent
+ unnecessary and costly re-org of the mappings list.
+
+ Maximum Token Type ID.
+
+
+
+ Add a child to the current AST
+
+ The AST to add a child to
+ The child AST to be added
+
+
+
+ Creates a new uninitialized AST node. Since a specific AST Node Type
+ wasn't indicated, the new AST node is created using the current default
+ AST Node type -
+
+ An uninitialized AST node object.
+
+
+
+ Creates and initializes a new AST node using the specified Token Type ID.
+ The used for creating this new AST node is
+ determined by the following:
+
+ the current TokenTypeID-to-ASTNodeType mapping (if any) or,
+ the otherwise
+
+
+ Token type ID to be used to create new AST Node.
+ An initialized AST node object.
+
+
+
+ Creates and initializes a new AST node using the specified Token Type ID.
+ The used for creating this new AST node is
+ determined by the following:
+
+ the current TokenTypeID-to-ASTNodeType mapping (if any) or,
+ the otherwise
+
+
+ Token type ID to be used to create new AST Node.
+ Text for initializing the new AST Node.
+ An initialized AST node object.
+
+
+
+ Creates a new AST node using the specified AST Node Type name. Once created,
+ the new AST node is initialized with the specified Token type ID and string.
+ The used for creating this new AST node is
+ determined solely by ASTNodeTypeName.
+ The AST Node type must have a default/parameterless constructor.
+
+ Token type ID to be used to create new AST Node.
+ Text for initializing the new AST Node.
+ Fully qualified name of the Type to be used for creating the new AST Node.
+ An initialized AST node object.
+
+
+
+ Creates a new AST node using the specified AST Node Type name.
+
+ Token instance to be used to initialize the new AST Node.
+
+ Fully qualified name of the Type to be used for creating the new AST Node.
+
+ A newly created and initialized AST node object.
+
+ Once created, the new AST node is initialized with the specified Token
+ instance. The used for creating this new AST
+ node is determined solely by ASTNodeTypeName.
+ The AST Node type must have a default/parameterless constructor.
+
+
+
+
+ Creates and initializes a new AST node using the specified AST Node instance.
+ the new AST node is initialized with the specified Token type ID and string.
+ The used for creating this new AST node is
+ determined solely by aNode.
+ The AST Node type must have a default/parameterless constructor.
+
+ AST Node instance to be used for creating the new AST Node.
+ An initialized AST node object.
+
+
+
+ Creates and initializes a new AST node using the specified Token instance.
+ The used for creating this new AST node is
+ determined by the following:
+
+ the current TokenTypeID-to-ASTNodeType mapping (if any) or,
+ the otherwise
+
+
+ Token instance to be used to create new AST Node.
+ An initialized AST node object.
+
+
+
+ Returns a copy of the specified AST Node instance. The copy is obtained by
+ using the method Clone().
+
+ AST Node to copy.
+ An AST Node (or null if t is null).
+
+
+
+ Duplicate AST Node tree rooted at specified AST node and all of it's siblings.
+
+ Root of AST Node tree.
+ Root node of new AST Node tree (or null if t is null).
+
+
+
+ Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings.
+
+ Root of AST Node tree.
+ Root node of new AST Node tree (or null if t is null).
+
+
+
+ Make a tree from a list of nodes. The first element in the
+ array is the root. If the root is null, then the tree is
+ a simple list not a tree. Handles null children nodes correctly.
+ For example, build(a, b, null, c) yields tree (a b c). build(null,a,b)
+ yields tree (nil a b).
+
+ List of Nodes.
+ AST Node tree.
+
+
+
+ Make a tree from a list of nodes, where the nodes are contained
+ in an ASTArray object.
+
+ List of Nodes.
+ AST Node tree.
+
+
+
+ Make an AST the root of current AST.
+
+
+
+
+
+
+ Sets the global default AST Node Type for this ASTFactory instance.
+ This method also attempts to load the instance
+ for the specified typename.
+
+ Fully qualified AST Node Type name.
+
+
+
+ To change where error messages go, can subclass/override this method
+ and then setASTFactory in Parser and TreeParser. This method removes
+ a prior dependency on class antlr.Tool.
+
+
+
+
+
+ A creator of AST node instances.
+
+
+
+ This class and it's sub-classes exists primarily as an optimization
+ of the reflection-based mechanism(s) previously used exclusively to
+ create instances of AST node objects.
+
+
+ Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever
+ they need to create an AST node objeect. What this class does is to support
+ performant extensibility of the basic ASTFactory. The ASTFactory can now be
+ extnded as run-time to support more new AST node types without using needing
+ to use reflection.
+
+
+
+
+
+ Constructs an instance.
+
+
+
+
+ Returns the fully qualified name of the AST type that this
+ class creates.
+
+
+
+
+ Summary description for ASTVisitor.
+
+
+
+
+ Get number of children of this node; if leaf, returns 0
+
+ Number of children
+
+
+
+ Small buffer used to avoid reading individual chars
+
+
+
+
+ Small buffer used to avoid reading individual chars
+
+
+
+
+ Constructs a instance.
+
+
+
+
+ Returns the fully qualified name of the AST type that this
+ class creates.
+
+
+
+
+ Constructs a instance.
+
+
+
+
+ Returns the fully qualified name of the AST type that this
+ class creates.
+
+
+
+
+ A token is minimally a token type. Subclasses can add the text matched
+ for the token and line info.
+
+
+
+
+ Constructs a instance.
+
+
+
+
+ Returns the fully qualified name of the Token type that this
+ class creates.
+
+
+
+
+ Constructs a instance.
+
+
+
+
+ Returns the fully qualified name of the Token type that this
+ class creates.
+
+
+
+
+ Summary description for DumpASTVisitor.
+
+ Simple class to dump the contents of an AST to the output
+
+
+
+ Append a char to the msg buffer. If special, then show escaped version
+
+ Message buffer
+ Char to append
+
+
+
+ Walk parse tree and return requested number of derivation steps.
+ If steps less-than 0, return node text. If steps equals 1, return derivation
+ string at step.
+
+ derivation steps
+
+
+
+
+ Get derivation and return how many you did (less than requested for
+ subtree roots.
+
+ string buffer
+ derivation steps
+
+
+
+
+ Do a step-first walk, building up a buffer of tokens until
+ you've reached a particular step and print out any rule subroots
+ insteads of descending.
+
+ derivation buffer
+ derivation steps
+
+
+
+
+ This token stream tracks the *entire* token stream coming from
+ a lexer, but does not pass on the whitespace (or whatever else
+ you want to discard) to the parser.
+
+
+
+ This class can then be asked for the ith token in the input stream.
+ Useful for dumping out the input stream exactly after doing some
+ augmentation or other manipulations. Tokens are index from 0..n-1
+
+
+ You can insert stuff, replace, and delete chunks. Note that the
+ operations are done lazily--only if you convert the buffer to a
+ string. This is very efficient because you are not moving data around
+ all the time. As the buffer of tokens is converted to strings, the
+ toString() method(s) check to see if there is an operation at the
+ current index. If so, the operation is done and then normal string
+ rendering continues on the buffer. This is like having multiple Turing
+ machine instruction streams (programs) operating on a single input tape. :)
+
+
+ Since the operations are done lazily at toString-time, operations do not
+ screw up the token index values. That is, an insert operation at token
+ index i does not change the index values for tokens i+1..n-1.
+
+
+ Because operations never actually alter the buffer, you may always get
+ the original token stream back without undoing anything. Since
+ the instructions are queued up, you can easily simulate transactions and
+ roll back any changes if there is an error just by removing instructions.
+ For example,
+
+ For example:
+
+ TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer);
+ JavaRecognizer parser = new JavaRecognizer(rewriteEngine);
+ ...
+ rewriteEngine.insertAfter("pass1", t, "foobar");}
+ rewriteEngine.insertAfter("pass2", u, "start");}
+ System.Console.Out.WriteLine(rewriteEngine.ToString("pass1"));
+ System.Console.Out.WriteLine(rewriteEngine.ToString("pass2"));
+
+
+
+ You can also have multiple "instruction streams" and get multiple
+ rewrites from a single pass over the input. Just name the instruction
+ streams and use that name again when printing the buffer. This could be
+ useful for generating a C file and also its header file--all from the
+ same buffer.
+
+
+ If you don't use named rewrite streams, a "default" stream is used.
+
+
+ Terence Parr, parrt@cs.usfca.edu
+ University of San Francisco
+ February 2004
+
+
+
+
+
+ Track the incoming list of tokens
+
+
+
+
+ You may have multiple, named streams of rewrite operations.
+ I'm calling these things "programs."
+ Maps string (name) -> rewrite (List)
+
+
+
+
+ Map string (program name) -> Integer index
+
+
+
+
+ track index of tokens
+
+
+
+
+ Who do we suck tokens from?
+
+
+
+
+ Which (whitespace) token(s) to throw out
+
+
+
+
+ Rollback the instruction stream for a program so that
+ the indicated instruction (via instructionIndex) is no
+ longer in the stream.
+
+
+ UNTESTED!
+
+
+
+
+
+
+ Reset the program so that no instructions exist
+
+
+
+
+
+ If op.index > lastRewriteTokenIndexes, just add to the end.
+ Otherwise, do linear
+
+
+
+
+
+ Execute the rewrite operation by possibly adding to the buffer.
+
+ rewrite buffer
+ The index of the next token to operate on.
+
+
+
+ This token tracks it's own index 0..n-1 relative to the beginning
+ of the stream. It is designed to work with
+ in TokenStreamRewriteEngine.cs
+
+
+
+
+ Index into token array indicating position in input stream
+
+
+
+
+ @deprecated as of 2.7.2. This method calls System.exit() and writes
+ directly to stderr, which is usually not appropriate when
+ a parser is embedded into a larger application. Since the method is
+ static, it cannot be overridden to avoid these problems.
+ ANTLR no longer uses this method internally or in generated code.
+
+
+
+
+
+ Implementation of the average aggregator.
+
+ Aleksandar Seovic
+
+
+
+ Defines an interface that should be implemented
+ by all collection processors and aggregators.
+
+
+
+
+ Processes a list of source items and returns a result.
+
+
+ The source list to process.
+
+
+ An optional processor arguments array.
+
+
+ The processing result.
+
+
+
+
+ Returns the average of the numeric values in the source collection.
+
+
+ The source collection to process.
+
+
+ Ignored.
+
+
+ The average of the numeric values in the source collection.
+
+
+
+
+ Converts all elements in the input list to a given target type.
+
+ Erich Eichinger
+
+
+
+ Processes a list of source items and returns a result.
+
+
+ The source list to process.
+
+
+ An optional processor arguments array.
+
+
+ The processing result.
+
+
+
+
+ Implementation of the count aggregator.
+
+ Aleksandar Seovic
+
+
+
+ Returns the number of items in the source collection.
+
+
+ The source collection to process.
+
+
+ Ignored.
+
+
+ The number of items in the source collection,
+ or zero if the collection is empty or null.
+
+
+
+
+ Converts a string literal to a instance.
+
+ Erich Eichinger
+
+
+
+
+ Erich Eichinger
+
+
+
+ Implementation of the distinct processor.
+
+ Aleksandar Seovic
+
+
+
+ Returns distinct items from the collection.
+
+
+ The source collection to process.
+
+
+ 0: boolean flag specifying whether to include null
+ in the results or not. Default is false, which means that
+ null values will not be included in the results.
+
+
+ A collection containing distinct source collection elements.
+
+
+ If there is more than one argument, or if the single optional argument
+ is not Boolean.
+
+
+
+
+ Implementation of the maximum aggregator.
+
+ Aleksandar Seovic
+
+
+
+ Returns the largest item in the source collection.
+
+
+ The source collection to process.
+
+
+ Ignored.
+
+
+ The largest item in the source collection.
+
+
+
+
+ Implementation of the minimum aggregator.
+
+ Aleksandar Seovic
+
+
+
+ Returns the smallest item in the source collection.
+
+
+ The source collection to process.
+
+
+ Ignored.
+
+
+ The smallest item in the source collection.
+
+
+
+
+ Implementation of the non-null processor.
+
+ Aleksandar Seovic
+
+
+
+ Returns non-null items from the collection.
+
+
+ The source collection to process.
+
+
+ Ignored.
+
+
+ A collection containing non-null source collection elements.
+
+
+
+
+ Implementation of the 'order by' processor.
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ Sorts the source collection using custom sort criteria.
+
+
+ Please note that your compare function needs to take care about
+ proper conversion of types to be comparable!
+
+
+ The source collection to sort.
+
+
+ Sort criteria to use.
+
+
+ A sorted array containing collection elements.
+
+
+
+
+ Reverts order of elements in the list
+
+ Erich Eichinger
+
+
+
+ Processes a list of source items and returns a result.
+
+
+ The source list to process.
+
+
+ An optional processor arguments array.
+
+
+ The processing result.
+
+
+
+
+ Implementation of the sort processor.
+
+ Aleksandar Seovic
+
+
+
+ Sorts the source collection.
+
+
+ Please not that this processor requires that collection elements
+ are of a uniform type and that they implement
+ interface.
+
+ If you want to perform custom sorting based on element properties
+ you should consider using instead.
+
+
+ The source collection to sort.
+
+
+ Ignored.
+
+
+ An array containing sorted collection elements.
+
+
+ If collection is not empty and it is
+ neither nor .
+
+
+
+
+ Implementation of the sum aggregator.
+
+ Aleksandar Seovic
+
+
+
+ Returns the sum of the numeric values in the source collection.
+
+
+ The source collection to process.
+
+
+ Ignored.
+
+
+ The sum of the numeric values in the source collection.
+
+
+
+
+ Represents parsed method node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Base type for nodes that accept arguments.
+
+ Aleksandar Seovic
+
+
+
+ Base type for all expression nodes.
+
+ Aleksandar Seovic
+
+
+
+ For internal purposes only. Use for expression node implementations.
+
+
+ This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST
+ unfortunately is not marked as [Serializable].
+
+ Note:Since SpringAST implements , deriving classes
+ have to explicitely override if they need to persist additional
+ data during serialization.
+
+
+
+
+ The global SpringAST node factory
+
+
+
+
+ Create an instance
+
+
+
+
+ Create an instance from a token
+
+
+
+
+ initialize this instance from an AST
+
+
+
+
+ initialize this instance from an IToken
+
+
+
+
+ initialize this instance from a token type number and a text
+
+
+
+
+ sets the text of this node
+
+
+
+
+ gets the text of this node
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ populate SerializationInfo from this instance
+
+
+
+
+ gets or sets the token type of this node
+
+
+
+
+ gets or sets the text of this node
+
+
+
+
+ Interface that all navigation expression nodes have to implement.
+
+ Aleksandar Seovic
+
+
+
+ Returns expression value.
+
+ Value of the expression.
+
+
+
+ Returns expression value.
+
+ Object to evaluate expression against.
+ Value of the expression.
+
+
+
+ Returns expression value.
+
+ Object to evaluate expression against.
+ Expression variables map.
+ Value of the expression.
+
+
+
+ Sets expression value.
+
+ Object to evaluate expression against.
+ New value for the last node of the expression.
+
+
+
+ Sets expression value.
+
+ Object to evaluate expression against.
+ Expression variables map.
+ New value for the last node of the expression.
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns node's value.
+
+ Node's value.
+
+
+
+ Returns node's value for the given context.
+
+ Object to evaluate node against.
+ Node's value.
+
+
+
+ Returns node's value for the given context.
+
+ Object to evaluate node against.
+ Expression variables map.
+ Node's value.
+
+
+
+ Returns node's value for the given context.
+
+ Node's value.
+
+
+
+ Evaluates this node for the given context, switching local variables map to the ones specified in .
+
+
+
+
+ Sets node's value for the given context.
+
+ Object to evaluate node against.
+ New value for this node.
+
+
+
+ Sets node's value for the given context.
+
+ Object to evaluate node against.
+ Expression variables map.
+ New value for this node.
+
+
+
+ Sets node's value for the given context.
+
+
+
+ This is a default implementation of Set method, which
+ simply throws .
+
+
+ This was done in order to avoid redundant Set method implementations,
+ because most of the node types do not support value setting.
+
+
+
+
+
+ Returns a string representation of this node instance.
+
+
+
+
+ Evaluates this node, switching local variables map to the ones specified in .
+
+
+
+
+ Holds the state during evaluating an expression.
+
+
+
+
+ Gets/Sets the root context of the current evaluation
+
+
+
+
+ Gets/Sets the current context of the current evaluation
+
+
+
+
+ Gets/Sets global variables of the current evaluation
+
+
+
+
+ Gets/Sets local variables of the current evaluation
+
+
+
+
+ Initializes a new EvaluationContext instance.
+
+ The root context for this evaluation
+ dictionary of global variables used during this evaluation
+
+
+
+ Switches current ThisContext.
+
+
+
+
+ Switches current LocalVariables.
+
+
+
+
+ Gets the type of the
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Append an argument node to the list of child nodes
+
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Initializes the node.
+
+
+
+
+ Asserts the argument count.
+
+ The required count.
+
+
+
+ Resolves the arguments.
+
+ Current expression evaluation context.
+ An array of argument values
+
+
+
+ Resolves the named arguments.
+
+ Current expression evaluation context.
+ A dictionary of argument name to value mappings.
+
+
+
+ Resolves the argument.
+
+ Argument position.
+ Current expression evaluation context.
+ Resolved argument value.
+
+
+
+ Resolves the argument without ensuring was called.
+
+ Argument position.
+ Current expression evaluation context.
+ Resolved argument value.
+
+
+
+ Resolves the named argument.
+
+ Argument name.
+ Current expression evaluation context.
+ Resolved named argument value.
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Creates new instance of the type defined by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed assignment node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Assigns value of the right operand to the left one.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed attribute node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Represents parsed method node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Creates new instance of the type defined by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Determines the type of object that should be instantiated.
+
+
+ The type name to resolve.
+
+
+ The type of object that should be instantiated.
+
+
+ If the type cannot be resolved.
+
+
+
+
+ Initializes this node by caching necessary constructor and property info.
+
+
+
+
+
+
+ Sets the named arguments (properties).
+
+ Instance to set property values on.
+ Argument (property) name to value mappings.
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Tries to determine attribute type based on the specified
+ attribute type name.
+
+
+ Attribute type name to resolve.
+
+
+ Resolved attribute type.
+
+
+ If type cannot be resolved.
+
+
+
+
+ Base class for binary operators.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance with the supplied operands
+
+
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Evaluate the left operand
+
+
+
+
+ Evaluate the left operand
+
+
+
+
+ Gets the left operand.
+
+ The left operand.
+
+
+
+ Gets the right operand.
+
+ The right operand.
+
+
+
+ Represents parsed boolean literal node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the boolean literal node.
+
+
+ This is the entrypoint into evaluating this expression.
+
+ Node's value.
+
+
+
+ Represents parsed default node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns left operand if it is not null, or the right operand if it is.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Container object for the parsed expression.
+
+
+
+ Preparing this object once and reusing it many times for expression
+ evaluation can result in significant performance improvements, as
+ expression parsing and reflection lookups are only performed once.
+
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class
+ by parsing specified expression string.
+
+ Expression to parse.
+
+
+
+ Registers lambda expression under the specified .
+
+ Function name to register expression as.
+ Lambda expression to register.
+ Variables dictionary that the function will be registered in.
+
+
+
+ Initializes a new instance of the class
+ by parsing specified primary expression string.
+
+ Primary expression to parse.
+
+
+
+ Initializes a new instance of the class
+ by parsing specified property expression string.
+
+ Property expression to parse.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Evaluates this expression for the specified root object and returns
+ value of the last node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Value of the last node.
+
+
+
+ Evaluates this expression for the specified root object and sets
+ value of the last node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Value to set last node to.
+ If navigation expression is empty.
+
+
+
+ Evaluates this expression for the specified root object and returns
+ of the last node, if possible.
+
+ Context to evaluate expression against.
+ Expression variables map.
+ Value of the last node.
+
+
+
+ Contains a list of reserved variable names.
+ You must not use any variable names with the reserved prefix!
+
+
+
+
+ Variable Names using this prefix are reserved for internal framework use
+
+
+
+
+ variable name of the currently processed object factory, if any
+
+
+
+
+ Converts string representation of expression into an instance of .
+
+ Aleksandar Seovic
+
+
+
+ Can we convert from a the sourcetype to a ?
+
+
+
+ Currently only supports conversion from a instance.
+
+
+
+ A
+ that provides a format context.
+
+
+ A that represents the
+ you want to convert from.
+
+ if the conversion is possible.
+
+
+
+ Convert from a value to an
+ instance.
+
+
+ A
+ that provides a format context.
+
+
+ The to use
+ as the current culture.
+
+
+ The value that is to be converted.
+
+
+ A array if successful.
+
+
+
+
+ Utility class that enables easy expression evaluation.
+
+
+
+ This class allows users to get or set properties, execute methods, and evaluate
+ logical and arithmetic expressions.
+
+
+ Methods in this class parse expression on every invocation.
+ If you plan to reuse the same expression many times, you should prepare
+ the expression once using the static method,
+ and then call to evaluate it.
+
+
+ This can result in significant performance improvements as it avoids expression
+ parsing and node resolution every time it is called.
+
+
+
+
+ Aleksandar Seovic
+
+
+
+ Parses and evaluates specified expression.
+
+ Root object.
+ Expression to evaluate.
+ Value of the last node in the expression.
+
+
+
+ Parses and evaluates specified expression.
+
+ Root object.
+ Expression to evaluate.
+ Expression variables map.
+ Value of the last node in the expression.
+
+
+
+ Parses and specified expression and sets the value of the
+ last node to the value of the newValue parameter.
+
+ Root object.
+ Expression to evaluate.
+ Value to set last node to.
+
+
+
+ Parses and specified expression and sets the value of the
+ last node to the value of the newValue parameter.
+
+ Root object.
+ Expression to evaluate.
+ Expression variables map.
+ Value to set last node to.
+
+
+
+ Represents parsed expression list node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a result of the last expression in a list.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Result of the last expression in a list
+
+
+
+ Represents parsed function node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Evaluates function represented by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Result of the function evaluation.
+
+
+
+ Represents parsed hexadecimal integer literal node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the hexadecimal integer literal node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed indexer node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns node's value for the given context.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Sets node's value for the given context.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ New value for this node.
+
+
+
+ Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory.
+
+ Context to resolve property against.
+ Expression variables map.
+ PropertyInfo for this node.
+
+
+
+ Represents parsed integer literal node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the integer literal node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents lambda expression.
+
+ Aleksandar Seovic
+
+
+
+ caches argumentNames of this instance
+
+
+
+
+ caches body expression of this lambda function
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Assigns value of the right operand to the left one.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Evaluates this node, switching local variables map to the ones specified in .
+
+
+
+
+ Gets argument names for this lambda expression.
+
+
+
+
+ Represents parsed list initializer node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Creates new instance of the list defined by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents local function node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Evaluates function represented by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Result of the function evaluation.
+
+
+
+ Represents parsed variable node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns value of the local variable represented by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Sets value of the local variable represented by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ New value for this node.
+
+
+
+ Represents parsed map entry node.
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of .
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Creates new instance of the map entry defined by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed map initializer node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of .
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Creates new instance of the map defined by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed method node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Static constructor. Initializes a map of special collection processor methods.
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns node's value for the given context.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Gets the best method given the name, argument values, for a given type.
+
+ The type on which to search for the method.
+ Name of the method.
+ The binding flags.
+ The arg values.
+ Best matching method or null if none found.
+
+
+
+ Represents parsed named argument node in the expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns the value of the named argument defined by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed null literal node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the null literal node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents arithmetic addition operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the arithmetic addition operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents AND operator (both, bitwise and logical).
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical AND operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents logical BETWEEN operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical IN operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+
+ true if the left operand is contained within the right operand, false otherwise.
+
+
+
+
+ Represents arithmetic division operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the arithmetic division operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents logical equality operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical equality operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents logical "greater than" operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical "greater than" operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents logical "greater than or equal" operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical "greater than or equal" operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents logical IN operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical IN operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+
+ true if the left operand is contained within the right operand, false otherwise.
+
+
+
+
+ Represents logical IS operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical IS operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+
+ true if the left operand is contained within the right operand, false otherwise.
+
+
+
+
+ Represents logical "less than" operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical "less than" operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents logical "less than or equal" operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical "less than or equal" operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents VB-style logical LIKE operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical LIKE operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+
+ true if the left operand matches the right operand, false otherwise.
+
+
+
+
+ Represents logical MATCHES operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical MATCHES operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+
+ true if the left operand matches the right operand, false otherwise.
+
+
+
+
+ Represents arithmetic modulus operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the arithmetic modulus operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents arithmetic multiplication operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the arithmetic multiplication operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents NOT operator (both, bitwise and logical).
+
+ Aleksandar Seovic
+
+
+
+ Base class for unary operators.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Gets the operand.
+
+ The operand.
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical NOT operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents logical inequality operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical inequality operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents OR operator (both, bitwise and logical).
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical OR operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents arithmetic exponent operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the arithmetic exponent operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents arithmetic subtraction operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the arithmetic subtraction operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents unary minus operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the unary plus operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents unary plus operator.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the unary plus operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+
+ Erich Eichinger
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the logical AND operator node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed projection node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a containing results of evaluation
+ of projection expression against each node in the context.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents node that navigates to object's property or public field.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Initializes the node.
+
+ The parent.
+
+
+
+ Attempts to resolve property or field.
+
+
+ Type to search for a property or a field.
+
+
+ Property or field name.
+
+
+ Binding flags to use.
+
+
+ Resolved property or field accessor, or null
+ if specified cannot be resolved.
+
+
+
+
+ Returns node's value for the given context.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Sets node's value for the given context.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ New value for this node.
+
+
+
+ Retrieves property or field value.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Property or field value.
+
+
+
+ Sets property value, doing any type conversions that are necessary along the way.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ New value for this node.
+
+
+
+ Sets property or field value using either dynamic or standard reflection.
+
+ Object to evaluate node against.
+ New value for this node, converted to appropriate type.
+
+
+
+ In the case of read only collections or custom collections that are not assignable from
+ IList, try to add to the collection.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ New value for this node.
+ true if was able add to IList, IDictionary, or ISet
+
+
+
+ Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory.
+ We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo...
+
+ Context to resolve property against.
+ PropertyInfo for this node.
+
+
+
+ Gets a value indicating whether this node represents a property.
+
+
+ true if this node is a property; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this node represents a field.
+
+
+ true if this node is a field; otherwise, false.
+
+
+
+
+ Represents parsed named argument node in the expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns the value of the named argument defined by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Overrides getText to allow easy way to get fully
+ qualified identifier.
+
+
+ Fully qualified identifier as a string.
+
+
+
+
+ Represents parsed real literal node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the real literal node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents a reference to a Spring-managed object.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the integer literal node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed selection node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns the first context item that matches selection expression.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed selection node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns the last context item that matches selection expression.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed selection node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a containing results of evaluation
+ of selection expression against each node in the context.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed string literal node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the string literal node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Exception thrown when detecting invalid SpEL syntax
+
+ Erich Eichinger
+
+
+
+ TODO
+
+
+
+
+ TODO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets a message that provides details on the syntax error.
+
+
+
+
+ The expression that caused the error
+
+
+
+
+ Represents ternary expression node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns a value for the string literal node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Represents parsed type node in the navigation expression.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns node's value for the given context.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Overrides getText to allow easy way to get fully
+ qualified typename.
+
+
+ Fully qualified typename as a string.
+
+
+
+
+ Represents parsed variable node.
+
+ Aleksandar Seovic
+
+
+
+ Create a new instance
+
+
+
+
+ Create a new instance from SerializationInfo
+
+
+
+
+ Returns value of the variable represented by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ Node's value.
+
+
+
+ Sets value of the variable represented by this node.
+
+ Context to evaluate expressions against.
+ Current expression evaluation context.
+ New value for this node.
+
+
+
+ Implementation of that can be used to
+ format and parse boolean values.
+
+ Erich Eichinger
+
+
+
+ Interface that should be implemented by all formatters.
+
+
+
+ Formatters assume that source value is a string, and make no assumptions
+ about the target value's type, which means that Parse method can return
+ object of any type.
+
+
+ Aleksandar Seovic
+
+
+
+ Formats the specified value.
+
+ The value to format.
+ Formatted .
+
+
+
+ Parses the specified value.
+
+ The value to parse.
+ Parsed .
+
+
+
+ Initializes a new instance of the class
+ using default values
+
+
+
+
+ Initializes a new instance of the class
+
+
+
+
+ Formats the specified boolean value.
+
+ The value to format.
+ Formatted boolean value.
+ If is null.
+ If is not of type .
+
+
+
+ Parses the specified boolean value according to settings of and
+
+ The boolean value to parse.
+ Parsed boolean value as a .
+ If does not match or .
+
+
+
+ Set/Get value to control casesensitivity of
+
+
+ Defaults to true
+
+
+
+
+ Set/Get value to recognize as boolean "true" value
+
+
+ Defaults to
+
+
+
+
+ Set/Get value to recognize as boolean "false" value
+
+
+ Defaults to
+
+
+
+
+ Implementation of that can be used to
+ format and parse currency values.
+
+
+
+ CurrencyFormatter uses currency related properties of the
+ to format and parse currency values.
+
+
+ If you use one of the constructors that accept culture as a parameter
+ to create an instance of CurrencyFormatter, default NumberFormatInfo
+ for the specified culture will be used.
+
+
+ You can also use properties exposed by the CurrencyFormatter in order
+ to override some of the default currency formatting parameters.
+
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class
+ using default for the current thread's culture.
+
+
+
+
+ Initializes a new instance of the class
+ using default for the specified culture.
+
+ The culture name.
+
+
+
+ Initializes a new instance of the class
+ using default for the specified culture.
+
+ The culture.
+
+
+
+ Initializes a new instance of the class
+ using specified .
+
+
+ The instance that defines how
+ currency values are formatted.
+
+
+
+
+ Formats the specified currency value.
+
+ The value to format.
+ Formatted currency .
+ If is null.
+ If is not a number.
+
+
+
+ Parses the specified currency value.
+
+ The currency value to parse.
+ Parsed currency value as a .
+
+
+
+ Gets or sets the currency decimal digits.
+
+ The currency decimal digits.
+
+
+
+
+ Gets or sets the currency decimal separator.
+
+ The currency decimal separator.
+
+
+
+
+ Gets or sets the currency group sizes.
+
+ The currency group sizes.
+
+
+
+
+ Gets or sets the currency group separator.
+
+ The currency group separator.
+
+
+
+
+ Gets or sets the currency symbol.
+
+ The currency symbol.
+
+
+
+
+ Gets or sets the currency negative pattern.
+
+ The currency negative pattern.
+
+
+
+
+ Gets or sets the currency positive pattern.
+
+ The currency positive pattern.
+
+
+
+
+ Implementation of that can be used to
+ format and parse values.
+
+
+
+ DateTimeFormatter uses properties of the
+ to format and parse values.
+
+
+ If you use one of the constructors that accept culture as a parameter
+ to create an instance of DateTimeFormatter, default DateTimeFormatInfo
+ for the specified culture will be used.
+
+
+ You can also use properties exposed by the DateTimeFormatter in order
+ to override some of the default formatting parameters.
+
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class
+ using default for the current thread's culture.
+
+ Date/time format string.
+
+
+
+ Initializes a new instance of the class
+ using default for the specified culture.
+
+ Date/time format string.
+ The culture name.
+
+
+
+ Initializes a new instance of the class
+ using default for the specified culture.
+
+ Date/time format string.
+ The culture.
+
+
+
+ Formats the specified value.
+
+ The value to format.
+ Formatted value.
+ If is null.
+ If is not an instance of .
+
+
+
+ Parses the specified value.
+
+ The string to parse.
+ Parsed value.
+
+
+
+ Provides base functionality for filtering values before they actually get parsed/formatted.
+
+ Erich Eichinger
+
+
+
+ Creates a new instance of this FilteringFormatter.
+
+ an optional underlying formatter
+
+ If no underlying formatter is specified, the values
+ get passed through "as-is" after being filtered
+
+
+
+
+ Parses the specified value.
+
+ The value to parse.
+ Parsed .
+
+
+
+ Formats the specified value.
+
+ The value to format.
+ Formatted .
+
+
+
+ Allows to rewrite a value before it gets parsed by the underlying formatter
+
+
+
+
+ Allows to change a value before it gets formatted by the underlying formatter
+
+
+
+
+ Implementation of that can be used to
+ format and parse floating point numbers.
+
+
+
+ This formatter allows you to format and parse numbers that conform
+ to number style (leading and trailing
+ white space, leading sign, decimal point, exponent).
+
+
+ Aleksandar Seovic
+
+
+
+ Default format string.
+
+
+
+
+ Initializes a new instance of the class,
+ using default format string of '{0:F}' and current thread's culture.
+
+
+
+
+ Initializes a new instance of the class,
+ using specified format string and current thread's culture.
+
+ The format string.
+
+
+
+ Initializes a new instance of the class,
+ using default format string of '{0:F}' and specified culture.
+
+ The culture.
+
+
+
+ Initializes a new instance of the class,
+ using specified format string and current thread's culture.
+
+ The format string.
+ The culture name.
+
+
+
+ Initializes a new instance of the class,
+ using specified format string and culture.
+
+ The format string.
+ The culture.
+
+
+
+ Formats the specified float value.
+
+ The value to format.
+ Formatted floating point number.
+ If is null.
+ If is not a number.
+
+
+
+ Parses the specified float value.
+
+ The float value to parse.
+ Parsed float value as a .
+
+
+
+ Replaces input strings with a given default value,
+ if they are null or contain whitespaces only,
+
+ Erich Eichinger
+
+
+
+ Creates a new instance of this HasTextFilteringFormatter using null as default value.
+
+ an optional underlying formatter
+
+ If no underlying formatter is specified, the values
+ get passed through "as-is" after being filtered
+
+
+
+
+ Creates a new instance of this HasTextFilteringFormatter.
+
+ the default value to be returned, if input text doesn't contain text
+ an optional underlying formatter
+
+ If no underlying formatter is specified, the values
+ get passed through "as-is" after being filtered
+
+
+
+
+ If value contains no text, it will be replaced by a defaultValue.
+
+
+
+
+ Implementation of that can be used to
+ format and parse integer numbers.
+
+
+
+ This formatter allows you to format and parse numbers that conform
+ to number style (leading and trailing
+ white space, leading sign).
+
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class,
+ using default format string of '{0:D}'.
+
+
+
+
+ Initializes a new instance of the class,
+ using specified format string.
+
+
+
+
+ Formats the specified integer value.
+
+ The value to format.
+ Formatted integer number.
+ If is null.
+ If is not an integer number.
+
+
+
+ Parses the specified integer value.
+
+ The integer value to parse.
+ Parsed number value as a .
+
+
+
+ Implementation of that simply calls .
+
+
+ This formatter is a no-operation implementation.
+
+ Erich Eichinger
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Converts the passed value to a string by calling .
+
+ The value to convert.
+ to string converted value.
+
+
+
+ Returns the passed string "as is".
+
+ The value to return.
+ The value passed into this method.
+
+
+
+ Implementation of that can be used to
+ format and parse numbers.
+
+
+
+ NumberFormatter uses number-related properties of the
+ to format and parse numbers.
+
+
+ This formatter works with both integer and decimal numbers and allows
+ you to format and parse numbers that conform to
+ number style (leading and trailing white space and/or sign, thousands separator,
+ decimal point)
+
+
+ If you use one of the constructors that accept culture as a parameter
+ to create an instance of NumberFormatter, default NumberFormatInfo
+ for the specified culture will be used.
+
+
+ You can also use properties exposed by the NumberFormatter in order
+ to override some of the default number formatting parameters.
+
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class
+ using default for the current thread's culture.
+
+
+
+
+ Initializes a new instance of the class
+ using default for the specified culture.
+
+ The culture name.
+
+
+
+ Initializes a new instance of the class
+ using default for the specified culture.
+
+ The culture.
+
+
+
+ Initializes a new instance of the class
+ using specified .
+
+
+ The instance that defines how
+ numbers are formatted and parsed.
+
+
+
+
+ Formats the specified number value.
+
+ The value to format.
+ Formatted number .
+ If is null.
+ If is not a number.
+
+
+
+ Parses the specified number value.
+
+ The number value to parse.
+ Parsed number value as a .
+
+
+
+ Gets or sets the number of decimal digits.
+
+ The number of decimal digits.
+
+
+
+
+ Gets or sets the decimal separator.
+
+ The decimal separator.
+
+
+
+
+ Gets or sets the number group sizes.
+
+ The number group sizes.
+
+
+
+
+ Gets or sets the number group separator.
+
+ The number group separator.
+
+
+
+
+ Gets or sets the negative pattern.
+
+ The number negative pattern.
+
+
+
+
+ Implementation of that can be used to
+ format and parse numbers.
+
+
+
+ PercentFormatter uses percent-related properties of the
+ to format and parse percentages.
+
+
+ If you use one of the constructors that accept culture as a parameter
+ to create an instance of PercentFormatter, default NumberFormatInfo
+ for the specified culture will be used.
+
+
+ You can also use properties exposed by the PercentFormatter in order
+ to override some of the default number formatting parameters.
+
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class
+ using default for the current thread's culture.
+
+
+
+
+ Initializes a new instance of the class
+ using default for the specified culture.
+
+ The culture name.
+
+
+
+ Initializes a new instance of the class
+ using default for the specified culture.
+
+ The culture.
+
+
+
+ Initializes a new instance of the class
+ using specified .
+
+
+ The instance that defines how
+ numbers are formatted and parsed.
+
+
+
+
+ Formats the specified percentage value.
+
+ The value to format.
+ Formatted percentage.
+ If is null.
+ If is not a number.
+
+
+
+ Parses the specified percentage value.
+
+ The percentage value to parse.
+ Parsed percentage value as a .
+
+
+
+ Gets or sets the number of decimal digits.
+
+ The number of decimal digits.
+
+
+
+
+ Gets or sets the decimal separator.
+
+ The decimal separator.
+
+
+
+
+ Gets or sets the percent group sizes.
+
+ The percent group sizes.
+
+
+
+
+ Gets or sets the percent group separator.
+
+ The percent group separator.
+
+
+
+
+ Gets or sets the negative pattern.
+
+ The percent negative pattern.
+
+
+
+
+ Gets or sets the positive pattern.
+
+ The percent positive pattern.
+
+
+
+
+ Gets or sets the percent symbol.
+
+ The percent symbol.
+
+
+
+
+ Gets or sets the per mille symbol.
+
+ The per mille symbol.
+
+
+
+
+ Loads a list of resources that should be applied from the .NET .
+
+
+
+ This implementation will iterate over all resource managers
+ within the message source and return a list of all the resources whose name starts with '$this'.
+
+
+ All other resources will be ignored, but you can retrieve them by calling one of
+ GetMessage methods on the message source directly.
+
+
+ Aleksandar Seovic
+
+
+
+ Abstract base class that all localizers should extend
+
+
+
+ This class contains the bulk of the localizer logic, including implementation
+ of the ApplyResources methods that are defined in
+ interface.
+
+
+ All specific localizers need to do is inherit this class and implement
+ GetResources method that will return a list of
+ objects that should be applied to a specified target.
+
+
+ Custom implementations can use whatever type of resource storage they want,
+ such as standard .NET resource sets, custom XML files, database, etc.
+
+
+ Aleksandar Seovic
+
+
+
+ Defines an interface that localizers have to implement.
+
+
+
+ Localizers are used to automatically apply resources to object's members
+ using reflection.
+
+
+ Aleksandar Seovic
+
+
+
+ Applies resources of the specified culture to the specified target object.
+
+ Target object to apply resources to.
+ instance to retrieve resources from.
+ Resource culture to use for resource lookup.
+
+
+
+ Applies resources to the specified target object, using current thread's culture to resolve resources.
+
+ Target object to apply resources to.
+ instance to retrieve resources from.
+
+
+
+ Gets or sets the resource cache instance.
+
+ The resource cache instance.
+
+
+
+ Applies resources of the specified culture to the specified target object.
+
+ Target object to apply resources to.
+ instance to retrieve resources from.
+ Resource culture to use for resource lookup.
+
+
+
+ Applies resources to the specified target object, using current thread's uiCulture to resolve resources.
+
+ Target object to apply resources to.
+ instance to retrieve resources from.
+
+
+
+ Returns a list of instances that should be applied to the target.
+
+ Target to get a list of resources for.
+ instance to retrieve resources from.
+ Resource locale.
+ A list of resources to apply.
+
+
+
+ Loads resources from the storage and creates a list of instances that should be applied to the target.
+
+ Target to get a list of resources for.
+ instance to retrieve resources from.
+ Resource locale.
+ A list of resources to apply.
+
+
+
+ Gets or sets the resource cache instance.
+
+ The resource cache instance.
+
+
+
+ Loads resources from the storage and creates a list of instances that should be applied to the target.
+
+
+ This feature is not currently supported on version 1.0 of the .NET platform.
+
+ Target to get a list of resources for.
+ instance to retrieve resources from.
+ Resource locale.
+ A list of resources to apply.
+
+
+
+ implementation
+ that simply returns the
+ value of the
+
+ property (if said property value is not ), or the
+ of the current thread if it is
+ .
+
+ Aleksandar Seovic
+
+
+
+ Strategy interface for
+ resolution.
+
+ Aleksandar Seovic
+
+
+
+ Resolves the
+ from some context.
+
+
+
+ The 'context' is determined by the appropriate implementation class.
+ An example of such a context might be a thread local bound
+ , or a
+ sourced from an HTTP
+ session.
+
+
+
+ The that should be used
+ by the caller.
+
+
+
+
+ Sets the .
+
+
+
+ This is an optional operation and does not need to be implemented
+ such that it actually does anything useful (i.e. it can be a no-op).
+
+
+
+ The new or
+ to clear the current .
+
+
+
+
+ Returns the default .
+
+
+
+ It tries to get the
+ from the value of the
+
+ property and falls back to the of the
+ current thread if the
+
+ is .
+
+
+
+ The default
+
+
+
+
+ Resolves the
+ from some context.
+
+
+
+ The 'context' in this implementation is the
+ value of the
+
+ property (if said property value is not ), or the
+ of the current thread if it is
+ .
+
+
+
+ The that should be used
+ by the caller.
+
+
+
+
+ Sets the .
+
+
+ The new or
+ to clear the current .
+
+
+
+
+
+
+ The default .
+
+
+ The default .
+
+
+
+
+ Abstract base class that all resource cache implementations should extend.
+
+ Aleksandar Seovic
+
+
+
+ Defines an interface that resource cache adapters have to implement.
+
+ Aleksandar Seovic
+
+
+
+ Gets the list of resources from cache.
+
+ Target to get a list of resources for.
+ Resource culture.
+ A list of cached resources for the specified target object and culture.
+
+
+
+ Puts the list of resources in the cache.
+
+ Target to cache a list of resources for.
+ Resource culture.
+ A list of resources to cache.
+ A list of cached resources for the specified target object and culture.
+
+
+
+ Gets the list of resources from the cache.
+
+ Target to get a list of resources for.
+ Resource culture.
+ A list of cached resources for the specified target object and culture.
+
+
+
+ Puts the list of resources in the cache.
+
+ Target to cache a list of resources for.
+ Resource culture.
+ A list of resources to cache.
+ A list of cached resources for the specified target object and culture.
+
+
+
+ Crates resource cache key for the specified target object and culture.
+
+ Target object to apply resources to.
+ Resource culture to use for resource lookup.
+
+
+
+ Gets the list of resources from cache.
+
+ Cache key to use for lookup.
+ A list of cached resources for the specified target object and culture.
+
+
+
+ Puts the list of resources in the cache.
+
+ Cache key to use for the specified resources.
+ A list of resources to cache.
+ A list of cached resources for the specified target object and culture.
+
+
+
+ Resource cache implementation that doesn't cache resources.
+
+ Aleksandar Seovic
+
+
+
+ Gets the list of resources from cache.
+
+ Cache key to use for lookup.
+ Always returns null.
+
+
+
+ Puts the list of resources in the cache.
+
+ Cache key to use for the specified resources.
+ A list of resources to cache.
+
+
+
+ Holds mapping between control property and it's value
+ as read from the resource file.
+
+ Aleksandar Seovic
+
+
+
+ Creates instance of resource mapper.
+
+ Target property.
+ Resource value.
+
+
+
+ Gets parsed target property expression. See
+ for more information on object navigation expressions.
+
+
+
+
+ Value of the resource that target property should be set to.
+
+
+
+
+ Utility class to aid in the manipulation of events and delegates.
+
+ Griffin Caprio
+
+
+
+ Returns a new instance of the requested .
+
+
+
+ Often used to wire subscribers to event publishers.
+
+
+
+ The of delegate to create.
+
+
+ The target subscriber object that contains the delegate implementation.
+
+
+ referencing the delegate method on the subscriber.
+
+
+ A delegate handler that can be added to an events list of handlers, or called directly.
+
+
+
+
+ Queries the input type for a signature matching the input
+ signature.
+
+
+ Typically used to query a potential subscriber to see if they implement an event handler.
+
+ to match against
+ to query
+
+ matching input
+ signature, or if there is no match.
+
+
+
+
+ Creates a new instance of the EventManipulationUtilities class.
+
+
+
+ This is a utility class, and as such has no publicly visible constructors.
+
+
+
+
+
+ Default implementation of the
+ interface.
+
+ Griffin Caprio
+
+
+
+ Creates a new instance of the EventRegistry class.
+
+
+
+
+ Adds the input object to the list of publishers.
+
+
+ This publishes all events of the source object to any object
+ wishing to subscribe
+
+ The source object to publish.
+
+
+
+ Subscribes to all events published, if the subscriber implements
+ compatible handler methods.
+
+ The subscriber to use.
+
+
+
+ Subscribes to published events of all objects of a given type, if the
+ subscriber implements compatible handler methods.
+
+ The subscriber to use.
+
+ The target to subscribe to.
+
+
+
+
+ Unsubscribes to all events published, if the subscriber
+ implmenets compatible handler methods.
+
+ The subscriber to use
+
+
+
+ Unsubscribes to the published events of all objects of a given
+ , if the subscriber implements
+ compatible handler methods.
+
+ The subscriber to use.
+ The target to unsubscribe from
+
+
+
+ The list of event publishers.
+
+ The list of event publishers.
+
+
+
+ To be implemented by any object that wishes to receive a reference to
+ an .
+
+
+
+ This interface only applies to objects that have been instantiated
+ within the context of an
+ . This interface does
+ not typically need to be implemented by application code, but is rather
+ used by classes internal to Spring.NET.
+
+
+ Mark Pollack
+ Rick Evans
+
+
+
+ Set the
+ associated with the
+ that created this
+ object.
+
+
+
+ This property will be set by the relevant
+ after all of this
+ object's dependencies have been resolved. This object can use the
+ supplied
+ immediately to publish or subscribe to one or more events.
+
+
+
+
+
+ Marks a property as being 'required': that is, the setter property
+ must be configured to be dependency-injected with a value.
+
+ Consult the SDK documentation for ,
+ which, by default, checks for the presence of this annotation.
+
+ Rob Harrop
+ Mark Pollack
+
+
+
+ A implementation that enforces required properties to have been configured.
+ Required properties are detected through an attribute, by default, Spring's
+ attribute.
+
+
+ The motivation for the existence of this IObjectPostProcessor is to allow
+ developers to annotate the setter properties of their own classes with an
+ arbitrary attribute to indicate that the container must check
+ for the configuration of a dependency injected value. This neatly pushes
+ responsibility for such checking onto the container (where it arguably belongs),
+ and obviates the need (in part) for a developer to code a method that
+ simply checks that all required properties have actually been set.
+
+ Please note that an 'init' method may still need to implemented (and may
+ still be desirable), because all that this class does is enforce that a
+ 'required' property has actually been configured with a value. It does
+ not check anything else... In particular, it does not check that a
+ configured value is not null.
+
+
+ Rob Harrop
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Adapter that implements all methods on
+ as no-ops, which will not change normal processing of each object instantiated
+ by the container. Subclasses may override merely those methods that they are
+ actually interested in.
+
+
+ Note that this base class is only recommendable if you actually require
+ functionality. If all you need
+ is plain functionality, prefer a straight
+ implementation of that (simpler) interface.
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Extension of the interface,
+ adding a callback for predicting the eventual type of a processed object.
+
+ This interface is a special purpose interface, mainly for
+ internal use within the framework. In general, application-provided
+ post-processors should simply implement the plain
+ interface or derive from the
+ class. New methods might be added to this interface even in point releases.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Subinterface of
+
+ that adds a before-instantiation callback and a callback after instantiation but before
+ explicit properties are set or autowiring occurs.
+
+
+
+ Typically used to suppress default instantiation for specific target objects,
+ for example to create proxies with special Spring.Aop.ITargetSources (pooling targets,
+ lazily initializing targets, etc), or to implement additional injection strategies such as field
+ injection.
+
+
+ This interface is a special purpose interface, mainly for internal use within the framework.
+ It is recommended to implement the plain interface as far as
+ possible, or to derive from in order to be shielded
+ from extension to this interface.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Apply this
+
+ before the target object gets instantiated.
+
+
+
+ The returned object may be a proxy to use instead of the target
+ object, effectively suppressing the default instantiation of the
+ target object.
+
+
+ If the object is returned by this method is not
+ , the object creation process will be
+ short-circuited. The returned object will not be processed any
+ further; in particular, no further
+
+ callbacks will be applied to it. This mechanism is mainly intended
+ for exposing a proxy instead of an actual target object.
+
+
+ This callback will only be applied to object definitions with an
+ object class. In particular, it will not be applied to
+ objects with a "factory-method" (i.e. objects that are to be
+ instantiated via a layer of indirection anyway).
+
+
+
+ The of the target object that is to be
+ instantiated.
+
+
+ The name of the target object.
+
+
+ The object to expose instead of a default instance of the target
+ object.
+
+
+ In the case of any errors.
+
+
+
+
+
+
+ Perform operations after the object has been instantiated, via a constructor or factory method,
+ but before Spring property population (from explicit properties or autowiring) occurs.
+
+ The object instance created, but whose properties have not yet been set
+ Name of the object.
+ true if properties should be set on the object; false if property population
+ should be skipped. Normal implementations should return true. Returning false will also
+ prevent any subsequent InstantiationAwareObjectPostProcessor instances from being
+ invoked on this object instance.
+
+
+
+ Post-process the given property values before the factory applies them
+ to the given object.
+
+ Allows for checking whether all dependencies have been
+ satisfied, for example based on a "Required" annotation on bean property setters.
+ Also allows for replacing the property values to apply, typically through
+ creating a new MutablePropertyValues instance based on the original PropertyValues,
+ adding or removing specific values.
+
+
+ The property values that the factory is about to apply (never null).
+ he relevant property infos for the target object (with ignored
+ dependency types - which the factory handles specifically - already filtered out)
+ The object instance created, but whose properties have not yet
+ been set.
+ Name of the object.
+ The actual property values to apply to the given object (can be the
+ passed-in PropertyValues instances0 or null to skip property population.
+
+
+
+ Predicts the type of the object to be eventually returned from this
+ processors callback.
+
+ The raw Type of the object.
+ Name of the object.
+ The type of the object, or null if not predictable.
+ in case of errors
+
+
+
+ Determines the candidate constructors to use for the given object.
+
+ The raw Type of the object.
+ Name of the object.
+ The candidate constructors, or null if none specified
+ in case of errors
+
+
+
+ Predicts the type of the object to be eventually returned from this
+ processors PostProcessBeforeInstantiation callback.
+
+ The raw Type of the object.
+ Name of the object.
+ The type of the object, or null if not predictable.
+ in case of errors
+
+
+
+ Determines the candidate constructors to use for the given object.
+
+ The raw Type of the object.
+ Name of the object.
+ The candidate constructors, or null if none specified
+ in case of errors
+
+
+
+ Apply this
+
+ before the target object gets instantiated.
+
+
+
+ The returned object may be a proxy to use instead of the target
+ object, effectively suppressing the default instantiation of the
+ target object.
+
+
+ If the object is returned by this method is not
+ , the object creation process will be
+ short-circuited. The returned object will not be processed any
+ further; in particular, no further
+
+ callbacks will be applied to it. This mechanism is mainly intended
+ for exposing a proxy instead of an actual target object.
+
+
+ This callback will only be applied to object definitions with an
+ object class. In particular, it will not be applied to
+ objects with a "factory-method" (i.e. objects that are to be
+ instantiated via a layer of indirection anyway).
+
+
+
+ The of the target object that is to be
+ instantiated.
+
+
+ The name of the target object.
+
+
+ The object to expose instead of a default instance of the target
+ object.
+
+
+ In the case of any errors.
+
+
+
+
+
+
+ Perform operations after the object has been instantiated, via a constructor or factory method,
+ but before Spring property population (from explicit properties or autowiring) occurs.
+
+ The object instance created, but whose properties have not yet been set
+ Name of the object.
+ true if properties should be set on the object; false if property population
+ should be skipped. Normal implementations should return true. Returning false will also
+ prevent any subsequent InstantiationAwareObjectPostProcessor instances from being
+ invoked on this object instance.
+
+
+
+ Post-process the given property values before the factory applies them
+ to the given object.
+
+ Allows for checking whether all dependencies have been
+ satisfied, for example based on a "Required" annotation on bean property setters.
+ Also allows for replacing the property values to apply, typically through
+ creating a new MutablePropertyValues instance based on the original PropertyValues,
+ adding or removing specific values.
+
+
+ The property values that the factory is about to apply (never null).
+ he relevant property infos for the target object (with ignored
+ dependency types - which the factory handles specifically - already filtered out)
+ The object instance created, but whose properties have not yet
+ been set.
+ Name of the object.
+ The actual property values to apply to the given object (can be the
+ passed-in PropertyValues instances0 or null to skip property population.
+
+
+
+ Apply this
+ to the given new object instance before any object initialization callbacks.
+
+
+
+ The object will already be populated with property values.
+ The returned object instance may be a wrapper around the original.
+
+
+
+ The new object instance.
+
+
+ The name of the object.
+
+
+ The object instance to use, either the original or a wrapped one.
+
+
+ In case of errors.
+
+
+
+
+ Apply this to the
+ given new object instance after any object initialization callbacks.
+
+
+
+ The object will already be populated with property values. The returned object
+ instance may be a wrapper around the original.
+
+
+
+ The new object instance.
+
+
+ The name of the object.
+
+
+ The object instance to use, either the original or a wrapped one.
+
+
+ In case of errors.
+
+
+
+
+ Cache for validated object names, skipping re-validation for the same object
+
+
+
+
+ Post-process the given property values before the factory applies them
+ to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType.
+
+ The property values that the factory is about to apply (never null).
+ The relevant property infos for the target object (with ignored
+ dependency types - which the factory handles specifically - already filtered out)
+ The object instance created, but whose properties have not yet
+ been set.
+ Name of the object.
+
+ The actual property values to apply to the given object (can be the
+ passed-in PropertyValues instances or null to skip property population.
+
+ If a required property value has not been specified
+ in the configuration metadata.
+
+
+
+ Determines whether the supplied property is required to have a value, that is to be dependency injected.
+
+
+ This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that
+ the property has a setter method.
+
+ The target PropertyInfo
+
+ true if the supplied property has been marked as being required;; otherwise, false if
+ not or if the supplied property does not have a setter method
+
+
+
+
+ Builds an exception message for the given list of invalid properties.
+
+ The list of names of invalid properties.
+ Name of the object.
+ The exception message
+
+
+
+ Sets the type of the required attribute, to be used on a property setter
+
+
+ The default required attribute type is the Spring-provided attribute.
+ This setter property exists so that developers can provide their own
+ (non-Spring-specific) annotation type to indicate that a property value is required.
+
+ The type of the required attribute.
+
+
+
+ Base class that provides common functionality needed for several IObjectFactoryPostProcessor
+ implementations
+
+ Mark Pollack
+
+
+
+ Allows for custom modification of an application context's object
+ definitions, adapting the object property values of the context's
+ underlying object factory.
+
+
+
+ Application contexts can auto-detect
+ IObjectFactoryPostProcessor objects in their object definitions and
+ apply them before any other objects get created.
+
+
+ Useful for custom config files targeted at system administrators that
+ override object properties configured in the application context.
+
+
+ See PropertyResourceConfigurer and its concrete implementations for
+ out-of-the-box solutions that address such configuration needs.
+
+
+ Juergen Hoeller
+ Rick Evans (.Net)
+
+
+
+ Modify the application context's internal object factory after its
+ standard initialization.
+
+
+
+ All object definitions will have been loaded, but no objects will have
+ been instantiated yet. This allows for overriding or adding properties
+ even to eager-initializing objects.
+
+
+
+ The object factory used by the application context.
+
+
+ In case of errors.
+
+
+
+
+ Modify the application context's internal object factory after its
+ standard initialization.
+
+ The object factory used by the application context.
+
+
+ All object definitions will have been loaded, but no objects will have
+ been instantiated yet. This allows for overriding or adding properties
+ even to eager-initializing objects.
+
+
+
+ In case of errors.
+
+
+
+
+ Resolves the supplied into a
+ instance.
+
+ The object that is to be resolved into a
+ instance.
+ The error context source.
+ The error context string.
+ A resolved .
+
+
+ This (default) implementation supports resolving
+ s and s.
+ Only override this method if you want to key your type alias
+ on something other than s
+ and s.
+
+
+
+ If the supplied is ,
+ or the supplied cannot be resolved.
+
+
+
+
+ Return the order value of this object, with a higher value meaning
+ greater in terms of sorting.
+
+ The order value.
+
+
+
+
+ Simple template superclass for
+ implementations that allows for the creation of a singleton or a prototype
+ instance (depending on a flag).
+
+
+ If the value of the
+
+ property is (this is the default), this class
+ will create a single instance of it's object upon initialization and
+ subsequently return the singleton instance; else, this class will
+ create a new instance each time (prototype mode). Subclasses must
+ implement the
+
+ template method to actually create objects.
+
+ Juergen Hoeller
+ Keith Donald
+ Simon White (.NET)
+
+
+
+ Interface to be implemented by objects used within an
+ that are themselves
+ factories.
+
+
+
+ If an object implements this interface, it is used as a factory,
+ not directly as an object. s
+ can support singletons and prototypes
+ ()...
+ please note that an
+ itself can only ever be a singleton. It is a logic error to configure an
+ itself to be a prototype.
+
+
+ An object that implements this interface cannot be used as a normal object.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+
+ If this method is being called in the context of an enclosing IoC container and
+ returns , the IoC container will consider this factory
+ object as not being fully initialized and throw a corresponding (and most
+ probably fatal) exception.
+
+
+
+ An instance (possibly shared or independent) of the object managed by
+ this factory.
+
+
+
+
+ Return the of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+
+ Invoked by an
+ after it has injected all of an object's dependencies.
+
+
+ In the event of misconfiguration (such as the failure to set a
+ required property) or if initialization fails.
+
+
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+ An instance (possibly shared or independent) of the object managed by
+ this factory.
+
+
+
+
+
+ Template method that subclasses must override to construct
+ the object returned by this factory.
+
+
+ Invoked once immediately after the initialization of this
+ in the case of
+ a singleton; else, on each call to the
+
+ method.
+
+
+ If an exception occured during object creation.
+
+
+ A distinct instance of the object created by this factory.
+
+
+
+
+ Performs cleanup on any cached singleton object.
+
+
+
+ Only makes sense in the context of a singleton object.
+
+
+
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+ Please note that changing the value of this property after
+ this factory object instance has been created by an enclosing
+ Spring.NET IoC container really is a programming error. This
+ property should really only be set once, prior to the invocation
+ of the
+
+ callback method.
+
+
+
+
+
+
+ Return the of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+
+ The various autowiring modes.
+
+ Rick Evans
+
+
+
+ Do not autowire.
+
+
+
+
+ Autowire by name.
+
+
+
+
+ Autowire by .
+
+
+
+
+ Autowiring by constructor.
+
+
+
+
+ The autowiring strategy is to be determined by introspection
+ of the object's .
+
+
+
+
+ Implementation of that
+ resolves variable name against command line arguments.
+
+ Aleksandar Seovic
+
+
+
+ Defines contract that different variable sources have to implement.
+
+
+
+ The "variable sources" are objects containing name-value pairs
+ that allow a variable value to be retrieved for the given name.
+
+ Out of the box, Spring.NET supports a number of variable sources,
+ that allow users to obtain variable values from .NET config files,
+ Java-style property files, environment, registry, etc.
+
+ Users can always write their own variable sources implementations,
+ that will allow them to load variable values from the database or
+ other proprietary data source.
+
+
+
+
+
+
+
+ Aleksandar Seovic
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Resolves variable value for the specified variable name.
+
+
+ The name of the variable to resolve.
+
+
+ The variable value if able to resolve, null otherwise.
+
+
+
+
+ Default constructor.
+ Initializes command line arguments from the environment.
+
+
+
+
+ Constructor that allows arguments to be passed externally.
+ Useful for testing.
+
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Resolves variable value for the specified variable name.
+
+
+ The name of the variable to resolve.
+
+
+ The variable value if able to resolve, null otherwise.
+
+
+
+
+ Initializes command line arguments dictionary.
+
+
+
+
+ Gets or sets a prefix that should be used to
+ identify arguments to extract values from.
+
+
+ A prefix that should be used to identify arguments
+ to extract values from. Defaults to slash ("/").
+
+
+
+
+ Gets or sets a character that should be used to
+ separate argument name from its value.
+
+
+ A character that should be used to separate argument
+ name from its value. Defaults to colon (":").
+
+
+
+
+ Implementation of that
+ resolves variable name against name-value sections in
+ the standard .NET configuration file.
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of
+
+
+
+
+ Initializes a new instance of from the given
+
+
+
+
+ Initializes a new instance of from the given
+
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Resolves variable value for the specified variable name.
+
+
+ The name of the variable to resolve.
+
+
+ The variable value if able to resolve, null otherwise.
+
+
+
+
+ Initializes properties based on the specified
+ property file locations.
+
+
+
+
+ Gets or sets a list of section names variables should be loaded from.
+
+
+ All sections specified need to be handled by the
+ in order to be processed successfully.
+
+
+ A list of section names variables should be loaded from.
+
+
+
+
+ Convinience property. Gets or sets a single section
+ to read properties from.
+
+
+ The section specified needs to be handled by the
+ in order to be processed successfully.
+
+
+ A section to read properties from.
+
+
+
+
+ Implementation of that
+ resolves variable name against provided variables.
+
+
+ Variable name resolution is case insensitive.
+
+ Bruno Baia
+
+
+
+ Initializes a new instance of .
+
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Resolves variable value for the specified variable name.
+
+
+ The name of the variable to resolve.
+
+
+ The variable value if able to resolve, null otherwise.
+
+
+
+
+ Gets or sets variables.
+
+
+
+
+ Various utility methods for .NET style .config files.
+
+
+
+ Currently supports reading custom configuration sections and returning them as
+ objects.
+
+
+ Simon White
+ Mark Pollack
+
+
+
+ Initializes the type members
+
+
+
+
+ Reads the specified configuration section into a
+ .
+
+ The resource to read.
+ The section name.
+
+ A newly populated
+ .
+
+
+ If any errors are encountered while attempting to open a stream
+ from the supplied .
+
+
+ If any errors are encountered while loading or reading (this only applies to
+ v1.1 and greater of the .NET Framework) the actual XML.
+
+
+ If any errors are encountered while loading or reading (this only applies to
+ v1.0 of the .NET Framework).
+
+
+ If the configuration section was otherwise invalid.
+
+
+
+
+ Reads the specified configuration section into the supplied
+ .
+
+ The resource to read.
+ The section name.
+
+ The collection that is to be populated. May be
+ .
+
+
+ A newly populated
+ .
+
+
+ If any errors are encountered while attempting to open a stream
+ from the supplied .
+
+
+ If any errors are encountered while loading or reading (this only applies to
+ v1.1 and greater of the .NET Framework) the actual XML.
+
+
+ If any errors are encountered while loading or reading (this only applies to
+ v1.0 of the .NET Framework).
+
+
+ If the configuration section was otherwise invalid.
+
+
+
+
+ Reads the specified configuration section into the supplied
+ .
+
+ The resource to read.
+ The section name.
+
+ The collection that is to be populated. May be
+ .
+
+
+ If a key already exists, is its value to be appended to the current
+ value or replaced?
+
+
+ The populated
+ .
+
+
+ If any errors are encountered while attempting to open a stream
+ from the supplied .
+
+
+ If any errors are encountered while loading or reading (this only applies to
+ v1.1 and greater of the .NET Framework) the actual XML.
+
+
+ If any errors are encountered while loading or reading (this only applies to
+ v1.0 of the .NET Framework).
+
+
+ If the configuration section was otherwise invalid.
+
+
+
+
+ Read from the specified configuration from the supplied XML
+ into a
+ .
+
+
+
+ Does not support section grouping. The supplied XML
+ must already be loaded.
+
+
+
+ The to read from.
+
+
+ The configuration section name to read.
+
+
+ A newly populated
+ .
+
+
+ If any errors are encountered while reading (this only applies to
+ v1.1 and greater of the .NET Framework).
+
+
+ If any errors are encountered while reading (this only applies to
+ v1.0 of the .NET Framework).
+
+
+ If the configuration section was otherwise invalid.
+
+
+
+
+ Returns the section from the specified resource with the given section name
+
+
+
+
+ Returns the section from the specified resource with the given section name. Use
+ in case no section handler is specified.
+
+
+
+
+ Returns the typed section from the specified resource with the given section name
+
+
+
+
+ Returns the section from the specified resource with the given section name. Use
+ in case no section handler is specified.
+
+
+
+
+ Returns the typed result of evaluating the specified .
+
+ if the result's type does not match the expected type
+
+
+
+ Reads the specified configuration section from the given
+
+
+
+
+
+
+
+ Reads the specified configuration section from the given
+
+
+
+
+
+
+
+
+ Determine the configuration section handler type
+
+
+
+
+ Populates the supplied with values from
+ a .NET application configuration file.
+
+
+ The
+ to add any key-value pairs to.
+
+
+ The configuration section name in the a .NET application configuration
+ file.
+
+
+ If a key already exists, is its value to be appended to the current
+ value or replaced?
+
+
+ if the supplied
+ was found.
+
+
+
+
+ Creates a new instance of the ConfigurationReader class.
+
+
+
+ This is a utility class, and as such has no publicly visible
+ constructors.
+
+
+
+
+
+ Implementation of that
+ resolves variable name connection strings defined in
+ the standard .NET configuration file.
+
+
+
+ When the <connectionStrings> configuration section is processed by this class,
+ two variables are defined for each connection string: one for connection string and
+ the second one for the provider name.
+
+ Variable names are generated by appending '.connectionString' and '.providerName'
+ literals to the value of the name attribute of the connection string element.
+ For example:
+
+
+
+
+
+
+ will result in two variables being created: myConn.connectionString and myConn.providerName.
+ You can reference these variables within your object definitions, just like any other variable.
+
+ Aleksandar Seovic
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Resolves variable value for the specified variable name.
+
+
+ The name of the variable to resolve.
+
+
+ The variable value if able to resolve, null otherwise.
+
+
+
+
+ Initializes properties based on the specified
+ property file locations.
+
+
+
+
+ Holder for constructor argument values for an object.
+
+
+
+ Supports values for a specific index or parameter name (case
+ insensitive) in the constructor argument list, and generic matches by
+ .
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ Can be used as an argument filler for the
+
+ overload when one is not looking for an argument by index.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The
+ to be used to populate this instance.
+
+
+
+
+ Copy all given argument values into this object.
+
+
+ The
+ to be used to populate this instance.
+
+
+
+
+ Add argument value for the given index in the constructor argument list.
+
+
+ The index in the constructor argument list.
+
+
+ The argument value.
+
+
+
+
+ Add argument value for the given index in the constructor argument list.
+
+ The index in the constructor argument list.
+ The argument value.
+
+ The of the argument
+ .
+
+
+
+
+ Add argument value for the given name in the constructor argument list.
+
+ The name in the constructor argument list.
+ The argument value.
+
+ If the supplied is
+ or is composed wholly of whitespace.
+
+
+
+
+ Get argument value for the given index in the constructor argument list.
+
+ The index in the constructor argument list.
+
+ The required of the argument.
+
+
+ The
+
+ for the argument, or if none set.
+
+
+
+
+ Get argument value for the given name in the constructor argument list.
+
+ The name in the constructor argument list.
+
+ The
+
+ for the argument, or if none set.
+
+
+
+
+ Does this set of constructor arguments contain a named argument matching the
+ supplied name?
+
+
+
+ The comparison is performed in a case-insensitive fashion.
+
+
+ The named argument to look up.
+
+ if this set of constructor arguments
+ contains a named argument matching the supplied
+ name.
+
+
+
+
+ Add generic argument value to be matched by type.
+
+
+ The argument value.
+
+
+
+
+ Add generic argument value to be matched by type.
+
+ The argument value.
+
+ The of the argument
+ .
+
+
+
+
+ Look for a generic argument value that matches the given
+ .
+
+
+ The to match.
+
+
+ The
+
+ for the argument, or if none set.
+
+
+
+
+ Look for a generic argument value that matches the given
+ .
+
+
+ The to match.
+
+
+ A of
+
+ objects that have already been used in the current resolution
+ process and should therefore not be returned again; this allows one
+ to return the next generic argument match in the case of multiple
+ generic argument values of the same type.
+
+
+ The
+
+ for the argument, or if none set.
+
+
+
+
+ Look for an argument value that either corresponds to the given index
+ in the constructor argument list or generically matches by
+ .
+
+
+ The index in the constructor argument list.
+
+
+ The to match.
+
+
+ The
+
+ for the argument, or if none is set.
+
+
+
+
+ Look for an argument value that either corresponds to the given index
+ in the constructor argument list or generically matches by
+ .
+
+
+ The index in the constructor argument list.
+
+
+ The to match.
+
+
+ A of
+
+ objects that have already been used in the current resolution
+ process and should therefore not be returned again; this allows one
+ to return the next generic argument match in the case of multiple
+ generic argument values of the same type.
+
+
+ The
+
+ for the argument, or if none is set.
+
+
+
+
+ Look for an argument value that either corresponds to the given index
+ in the constructor argument list or generically matches by
+ .
+
+
+ The name of the argument in the constructor argument list. May be
+ , in which case generic matching by
+ is assumed.
+
+
+ The to match.
+
+
+ The
+
+ for the argument, or if none is set.
+
+
+
+
+ Look for an argument value that either corresponds to the given index
+ in the constructor argument list or generically matches by
+ .
+
+
+ The name of the argument in the constructor argument list. May be
+ , in which case generic matching by
+ is assumed.
+
+
+ The to match.
+
+
+ A of
+
+ objects that have already been used in the current resolution
+ process and should therefore not be returned again; this allows one
+ to return the next generic argument match in the case of multiple
+ generic argument values of the same type.
+
+
+ The
+
+ for the argument, or if none is set.
+
+
+
+
+ Look for an argument value that either corresponds to the given index
+ in the constructor argument list, or to the named argument, or
+ generically matches by .
+
+
+ The index of the argument in the constructor argument list. May be
+ negative, to denote the fact that we are not looking for an
+ argument by index (see
+ .
+
+
+ The name of the argument in the constructor argument list. May be
+ .
+
+
+ The to match.
+
+
+ A of
+
+ objects that have already been used in the current resolution
+ process and should therefore not be returned again; this allows one
+ to return the next generic argument match in the case of multiple
+ generic argument values of the same type.
+
+
+ The
+
+ for the argument, or if none is set.
+
+
+
+
+ Return the map of indexed argument values.
+
+
+ An with
+ indices as keys and
+ s
+ as values.
+
+
+
+
+ Return the map of named argument values.
+
+
+ An with
+ named arguments as keys and
+ s
+ as values.
+
+
+
+
+ Return the set of generic argument values.
+
+
+ A of
+ s.
+
+
+
+
+ Return the number of arguments held in this instance.
+
+
+
+
+ Returns true if this holder does not contain any argument values,
+ neither indexed ones nor generic ones.
+
+
+
+
+ Holder for a constructor argument value, with an optional
+ attribute indicating the target
+ of the actual constructor argument.
+
+
+
+
+ Creates a new instance of the ValueHolder class.
+
+
+ The value of the constructor argument.
+
+
+
+
+ Creates a new instance of the ValueHolder class.
+
+
+ The value of the constructor argument.
+
+
+ The of the argument
+ . Can also be one of the common
+ aliases (int, bool,
+ float, etc).
+
+
+
+
+ A that represents the current
+ .
+
+
+ A that represents the current
+ .
+
+
+
+
+ Gets and sets the value for the constructor argument.
+
+
+
+ Only necessary for manipulating a registered value, for example in
+ s.
+
+
+
+
+
+ Return the of the constructor
+ argument.
+
+
+
+
+
+ implementation that allows for convenient registration of custom
+ s.
+
+
+
+ The use of this class is typically not required; the .NET
+ mechanism of associating a
+ with a
+ via the use of the
+ is the
+ recommended (and standard) way. This class primarily exists to cover
+ those cases where third party classes to which one does not have the
+ source need to be exposed to the type conversion mechanism.
+
+
+ Because the
+
+ class implements the
+
+ interface, instances of this class that have been exposed in the
+ scope of an
+ will
+ automatically be picked up by the application context and made
+ available to the IoC container whenever type conversion is required. If
+ one is using a
+
+ object definition within the scope of an
+ , no such automatic
+ pickup of the
+
+ is performed (custom converters will have to be added manually using the
+
+ method). For most application scenarios, one will get better
+ mileage using the
+ abstraction.
+
+
+
+
+ The following examples all assume XML based configuration, and use
+ inner object definitions to define the custom
+ objects (nominally to
+ avoid polluting the object name space, but also because the
+ configuration simply reads better that way).
+
+
+
+
+
+ The following example illustrates a complete (albeit naieve) use case
+ for this class, including a custom
+ implementation, said
+ converters domain class, and the XML configuration that hooks the
+ converter in place and makes it available to a Spring.NET container for
+ use during object resolution.
+
+
+ The domain class is a simple data-only object that contains the data
+ required to send an email message (such as the host and user account
+ name). A developer would prefer to use a string of the form
+ UserName=administrator,Password=r1l0k1l3y,Host=localhost to
+ configure the mail settings and just let the container take care of the
+ conversion.
+
+
+ namespace ExampleNamespace
+ {
+ public sealed class MailSettings
+ {
+ private string _userName;
+ private string _password;
+ private string _host;
+
+ public string Host
+ {
+ get { return _host; }
+ set { _host = value; }
+ }
+
+ public string UserName
+ {
+ get { return _userName; }
+ set { _userName = value; }
+ }
+
+ public string Password
+ {
+ get { return _password; }
+ set { _password = value; }
+ }
+ }
+
+ public sealed class MailSettingsConverter : TypeConverter
+ {
+ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
+ {
+ if (typeof (string) == sourceType)
+ {
+ return true;
+ }
+ return base.CanConvertFrom(context, sourceType);
+ }
+
+ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
+ {
+ string text = value as string;
+ if(text != null)
+ {
+ MailSettings mailSettings = new MailSettings();
+ string[] tokens = text.Split(',');
+ for (int i = 0; i < tokens.Length; ++i)
+ {
+ string token = tokens[i];
+ string[] settings = token.Split('=');
+ typeof(MailSettings).GetProperty(settings[0])
+ .SetValue(mailSettings, settings[1], null);
+ }
+ return mailSettings;
+ }
+ return base.ConvertFrom(context, culture, value);
+ }
+ }
+
+ // a very naieve class that uses the MailSettings class...
+ public sealed class ExceptionLogger
+ {
+ private MailSettings _mailSettings;
+
+ public MailSettings MailSettings {
+ {
+ set { _mailSettings = value; }
+ }
+
+ public void Log(object value)
+ {
+ Exception ex = value as Exception;
+ if(ex != null)
+ {
+ // use _mailSettings instance...
+ }
+ }
+ }
+ }
+
+
+ The attendant XML configuration for the above classes would be...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+
+
+
+ Registers any custom converters with the supplied
+ .
+
+
+ The object factory to register the converters with.
+
+
+ In case of errors.
+
+
+
+
+ Resolves the supplied into a
+ instance.
+
+
+ The object that is to be resolved into a
+ instance.
+
+
+ A resolved instance.
+
+
+ If the supplied is ,
+ or the supplied cannot be resolved.
+
+
+
+
+ The custom converters to register.
+
+
+
+ The uses the type name
+ of the class that requires conversion as the key, and an
+ instance of the
+ that will effect
+ the conversion. Alternatively, the actual
+ of the class that requires conversion
+ can be used as the key.
+
+
+
+
+
+ IDictionary converters = new Hashtable();
+ converters.Add( "System.Date", new MyCustomDateConverter() );
+ // a System.Type instance can also be used as the key...
+ converters.Add( typeof(Color), new MyCustomRBGColorConverter() );
+
+
+ Supports the creation of s for both
+ instance and methods.
+
+
+ Rick Evans
+
+
+
+ Callback method called once all factory properties have been set.
+
+
+ In the event of misconfiguration (such as failure to set an essential
+ property) or if initialization fails.
+
+
+
+
+
+ Creates the delegate.
+
+
+ If an exception occured during object creation.
+
+ The object returned by this factory.
+
+
+
+
+ The of
+ created by this factory.
+
+
+
+ Returns the
+ if accessed prior to the method
+ being called.
+
+
+
+
+
+ The of the
+ created by this factory.
+
+
+
+
+ The name of the method that is to be invoked by the created
+ delegate.
+
+
+
+
+ The target if the
+ refers to a method.
+
+
+
+
+ The target object if the
+ refers to an instance method.
+
+
+
+
+ A generic implementation of an , that delegates post processing to a passed delegate
+
+
+ This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization.
+
+
+ The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on
+ the context instance:
+
+ IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null);
+ ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of =>
+ {
+ of.RegisterSingleton("someObject", someObject);
+ }));
+
+
+ Erich Eichinger
+
+
+
+ Get or Set the handler to delegate configuration to
+
+
+
+
+ Descriptor for a specific dependency that is about to be injected.
+ Wraps a constructor parameter, a method parameter or a field,
+ allowing unified access to their metadata.
+
+ Juergen Hoeller
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class for a method or constructor parameter.
+ Considers the dependency as 'eager'
+
+ The MethodParameter to wrap.
+ if set to true if the dependency is required.
+
+
+
+ Initializes a new instance of the class for a method or a constructor parameter.
+
+ The MethodParameter to wrap.
+ if set to true the dependency is required.
+ if set to true the dependency is 'eager' in the sense of
+ eagerly resolving potential target objects for type matching.
+
+
+
+ Gets a value indicating whether this dependency is required.
+
+ true if required; otherwise, false.
+
+
+
+ Determine the declared (non-generic) type of the wrapped parameter/field.
+
+ The type of the dependency (never null
+
+
+
+ Gets a value indicating whether this is eager in the sense of
+ eagerly resolving potential target beans for type matching.
+
+ true if eager; otherwise, false.
+
+
+
+ Gets the wrapped MethodParameter, if any.
+
+ The method parameter.
+
+
+
+ Simple factory for shared instances.
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ Constructs a new instance of the target dictionary.
+
+ The new instance.
+
+
+
+ Set the source .
+
+
+
+ This value will be used to populate the
+ returned by this factory.
+
+
+
+
+
+ Set the of the
+ implementation to use.
+
+
+
+ The default is the .
+
+
+
+ If the value is .
+
+
+ If the value is an .
+
+
+ If the value is an interface.
+
+
+
+
+ The of objects created by this factory.
+
+
+ Always returns the .
+
+
+
+
+ A very simple, hashtable-based implementation of
+
+ Erich Eichinger
+
+
+
+ Creates a new, empty variable source
+
+
+
+
+ Creates a new, empty and case-insensitive variable source
+
+
+
+
+ Create a new variable source from a list of paired string values.
+
+
+
+ The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs:
+
+ new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } )
+
+
+
+ the argument list containing pairs, or null
+
+
+
+ Initializes a new instance of the DictionaryVariableSource class.
+
+
+
+
+ Creates a new variable source, reading values from another dictionary
+ and converting them to strings if necessary
+
+
+
+
+ Adds a key/value pair
+
+ this dictionary. allows for fluent config
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Performs a variable name lookup
+
+
+
+
+ Specifies how instances of the
+
+ class must apply environment variables when replacing values.
+
+ Mark Pollack
+
+
+
+ Never replace environment variables.
+
+
+
+
+ If properties are not specified via a resource,
+ then resolve using environment variables.
+
+
+
+
+ Apply environment variables first before applying properties from a
+ resource.
+
+
+
+
+ Implementation of that
+ resolves variable name against environment variables.
+
+ Aleksandar Seovic
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Resolves variable value for the specified variable name.
+
+
+ The name of the variable to resolve.
+
+
+ The variable value if able to resolve, null otherwise.
+
+
+
+
+ Holder for event handler values for an object.
+
+ Rick Evans (.NET)
+
+
+
+ The empty array of s.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The
+ to be used to populate this instance.
+
+
+
+
+ Copy all given argument values into this object.
+
+
+ The
+ to be used to populate this instance.
+
+
+
+
+ Adds the supplied handler to the collection of event handlers.
+
+ The handler to be added.
+
+
+
+ The mapping of event names to an
+ of
+ s.
+
+
+
+
+ Gets the of events
+ that have handlers associated with them.
+
+
+
+
+ Gets the of
+ s for the supplied
+ event name.
+
+
+
+
+ Immutable placeholder class used for the value of a
+ object when it's a reference
+ to a Spring that should be evaluated at runtime.
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the
+
+ class.
+
+ The expression to resolve.
+
+
+
+ Returns a string representation of this instance.
+
+ A string representation of this instance.
+
+
+
+ Gets or sets the expression string. Setting the expression string will cause
+ the expression to be parsed.
+
+ The expression string.
+
+
+
+ Return the expression.
+
+
+
+
+ Properties for this expression node.
+
+
+
+
+ implementation that
+ retrieves a static or non-static public field value.
+
+
+
+ Typically used for retrieving public constants.
+
+
+
+
+ The following example retrieves the field value...
+
+
+
+
+
+
+
+
+ The previous example could also have been written using the convenience
+
+ property, like so...
+
+
+
+
+
+
+
+ This class also implements the
+ interface
+ ().
+ If the id (or name) of one's
+
+ object definition is set to the
+ of the field to be retrieved, then the id (or
+ name) of one's object definition will be used for the name of the
+ field lookup. See below for an example of this
+ concise style of definition.
+
+
+
+
+
+
+
+
+
+ The usage for retrieving instance fields is similar. No example is shown
+ because public instance fields are generally bad practice; but if
+ you have some legacy code that exposes public instance fields, or if you
+ just really like coding public instance fields, then you can use this
+ implementation to
+ retrieve such field values.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Interface to be implemented by objects that wish to be aware of their object
+ name in an .
+
+
+
+ Note that most objects will choose to receive references to collaborating
+ objects via respective properties.
+
+
+ For a list of all object lifecycle methods, see the
+ API documentation.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+
+ The name of the object in the factory.
+
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+
+ Invoked by an
+ after it has set all object properties supplied
+ (and satisfied
+ and ApplicationContextAware).
+
+
+
+ This method allows the object instance to perform initialization only
+ possible when all object properties have been set and to throw an
+ exception in the event of misconfiguration.
+
+
+
+ In the event of misconfiguration (such as failure to set an essential
+ property) or if initialization fails.
+
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+ An instance (possibly shared or independent) of the object managed by
+ this factory.
+
+
+
+
+
+ The of the
+ field to be retrieved.
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+
+ The name of the object in the factory.
+
+
+
+ In the context of the
+
+ class, the
+
+ value will be interepreted as the value of the
+
+ property if no value has been explicitly assigned to the
+
+ property. This allows for concise object definitions with just an id or name;
+ see the class documentation for
+
+ for an example of this style of usage.
+
+
+
+
+
+ The name of the field the value of which is to be retrieved.
+
+
+
+ If the
+
+ has been set (and is not ), then the value of this property
+ refers to an instance field name; it otherwise refers to a
+ field name.
+
+
+
+
+
+ The object instance on which the field is defined.
+
+
+
+
+ The on which the field is defined.
+
+
+
+
+ The of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+
+ Extension of the
+ interface to be implemented by object factories that are capable of
+ autowiring and expose this functionality for existing object instances.
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Create a new object instance of the given class with the specified
+ autowire strategy.
+
+
+ The of the object to instantiate.
+
+
+ The desired autowiring mode.
+
+
+ Whether to perform a dependency check for objects (not applicable to
+ autowiring a constructor, thus ignored there).
+
+ The new object instance.
+
+ If the wiring fails.
+
+
+
+
+
+ Autowire the object properties of the given object instance by name or
+ .
+
+
+ The existing object instance.
+
+
+ The desired autowiring mode.
+
+
+ Whether to perform a dependency check for the object.
+
+
+ If the wiring fails.
+
+
+
+
+
+ Apply s
+ to the given existing object instance, invoking their
+
+ methods.
+
+
+
+ The returned object instance may be a wrapper around the original.
+
+
+
+ The existing object instance.
+
+
+ The name of the object.
+
+
+ The object instance to use, either the original or a wrapped one.
+
+
+ If any post-processing failed.
+
+
+
+
+
+ Apply s
+ to the given existing object instance, invoking their
+
+ methods.
+
+
+
+ The returned object instance may be a wrapper around the original.
+
+
+
+ The existing object instance.
+
+
+ The name of the object.
+
+
+ The object instance to use, either the original or a wrapped one.
+
+
+ If any post-processing failed.
+
+
+
+
+
+ Resolve the specified dependency against the objects defined in this factory.
+
+ The descriptor for the dependency.
+ Name of the object which declares the present dependency.
+ A list that all names of autowired object (used for
+ resolving the present dependency) are supposed to be added to.
+ the resolved object, or null if none found
+ if dependency resolution failed
+
+
+
+ Extension of the interface
+ that injects dependencies into the object managed by the factory.
+
+ Bruno Baia
+
+
+
+ Gets the template object definition that should be used
+ to configure the instance of the object managed by this factory.
+
+
+
+
+ SPI interface to be implemented by most if not all listable object factories.
+
+
+
+ Allows for framework-internal plug'n'play, e.g. in
+ .
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Configuration interface to be implemented by most if not all object
+ factories.
+
+
+
+ Provides the means to configure an object factory in addition to the
+ object factory client methods in the
+ interface.
+
+
+ Allows for framework-internal plug'n'play even when needing access to object
+ factory configuration methods.
+
+
+ When disposed, it will destroy all cached singletons in this factory. Call
+ when you want to shutdown
+ the factory.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Interface that defines a registry for shared object instances.
+
+
+ Can be implemented by
+ implementations in order to expose their singleton management facility
+ in a uniform manner.
+
+ The interface extends this interface.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Registers the given existing object as singleton in the object registry,
+ under the given object name.
+
+
+
+ The given instance is supposed to be fully initialized; the registry
+ will not perform any initialization callbacks (in particular, it won't
+ call IInitializingObject's AfterPropertiesSet method).
+ The given instance will not receive any destruction callbacks
+ (like IDisposable's Dispose method) either.
+
+
+ If running within a full IObjectFactory: Register an object definition
+ instead of an existing instance if your object is supposed to receive
+ initialization and/or destruction callbacks.
+
+
+ Typically invoked during registry configuration, but can also be used
+ for runtime registration of singletons. As a consequence, a registry
+ implementation should synchronize singleton access; it will have to do
+ this anyway if it supports a BeanFactory's lazy initialization of singletons.
+
+
+ Name of the object.
+ The singleton object.
+
+
+
+
+
+ Return the (raw) singleton object registered under the given name.
+
+
+
+ Only checks already instantiated singletons; does not return an Object
+ for singleton object definitions which have not been instantiated yet.
+
+
+ The main purpose of this method is to access manually registered singletons
+ . Can also be used to access a singleton
+ defined by an object definition that already been created, in a raw fashion.
+
+
+ Name of the object to look for.
+ the registered singleton object, or null if none found
+
+
+
+
+ Check if this registry contains a singleton instance with the given name.
+
+
+
+ Only checks already instantiated singletons; does not return true
+ for singleton bean definitions which have not been instantiated yet.
+
+
+ The main purpose of this method is to check manually registered singletons
+ . Can also be used to check whether a
+ singleton defined by an object definition has already been created.
+
+
+ To check whether an object factory contains an object definition with a given name,
+ use ListableBeanFactory's ContainsObjectDefinition. Calling both
+ ContainsObjectDefinition and ContainsSingleton answers
+ whether a specific object factory contains an own object with the given name.
+
+
+ Use IObjectFactory's ContainsObject for general checks whether the
+ factory knows about an object with a given name (whether manually registered singleton
+ instance or created by bean definition), also checking ancestor factories.
+
+
+ Name of the object to look for.
+
+ true if this bean factory contains a singleton instance with the given name; otherwise, false.
+
+
+
+
+
+
+
+ Gets the names of singleton objects registered in this registry.
+
+
+
+ Only checks already instantiated singletons; does not return names
+ for singleton bean definitions which have not been instantiated yet.
+
+
+ The main purpose of this method is to check manually registered singletons
+ . Can also be used to check which
+ singletons defined by an object definition have already been created.
+
+
+ The list of names as String array (never null).
+
+
+
+
+
+
+ Gets the number of singleton beans registered in this registry.
+
+
+
+ Only checks already instantiated singletons; does not count
+ singleton object definitions which have not been instantiated yet.
+
+
+ The main purpose of this method is to check manually registered singletons
+ . Can also be used to count the number of
+ singletons defined by an object definition that have already been created.
+
+
+ The number of singleton objects.
+
+
+
+
+
+
+ Ignore the given dependency type for autowiring.
+
+
+
+ To be invoked during factory configuration.
+
+
+ This will typically be used for dependencies that are resolved
+ in other ways, like
+ through .
+
+
+
+ The to be ignored.
+
+
+
+
+ Determines whether the specified object name is currently in creation..
+
+ Name of the object.
+
+ true if the specified object name is currently in creation; otherwise, false.
+
+
+
+
+ Add a new
+ that will get applied to objects created by this factory.
+
+
+
+ To be invoked during factory configuration.
+
+
+
+ The
+ to register.
+
+
+
+
+ Given an object name, create an alias.
+
+
+
+ This is typically used to support names that are illegal within
+ XML ids (which are used for object names).
+
+
+ Typically invoked during factory configuration, but can also be
+ used for runtime registration of aliases. Therefore, a factory
+ implementation should synchronize alias access.
+
+
+ The name of the object.
+
+
+ The alias that will behave the same as the object name.
+
+
+ If there is no object with the given name.
+
+
+ If the alias is already in use.
+
+
+
+
+ Register the given custom
+ for all properties of the given .
+
+
+
+ To be invoked during factory configuration.
+
+
+
+ The required of the property.
+
+
+ The to register.
+
+
+
+
+ Set the parent of this object factory.
+
+
+
+ Note that the parent shouldn't be changed: it should only be set outside
+ a constructor if it isn't available when an object of this class is
+ created.
+
+
+
+
+
+ Returns the current number of registered
+ s.
+
+
+ The current number of registered
+ s.
+
+
+
+
+ Return the registered
+ for the
+ given object, allowing access to its property values and constructor
+ argument values.
+
+ The name of the object.
+
+ The registered
+ .
+
+
+ If there is no object with the given name.
+
+
+ In the case of errors.
+
+
+
+
+ Return the registered
+ for the
+ given object, allowing access to its property values and constructor
+ argument values.
+
+ The name of the object.
+ Whether to search parent object factories.
+
+ The registered
+ .
+
+
+ If there is no object with the given name.
+
+
+ In the case of errors.
+
+
+
+
+ Register a new object definition with this registry.
+ Must support
+
+ and .
+
+
+ The name of the object instance to register.
+
+
+ The definition of the object instance to register.
+
+
+
+ Must support
+ and
+ .
+
+
+
+ If the object definition is invalid.
+
+
+
+
+ Injects dependencies into the supplied instance
+ using the supplied .
+
+
+ The object instance that is to be so configured.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+ An object definition that should be used to configure object.
+
+
+
+
+
+ Ensure that all non-lazy-init singletons are instantiated, also
+ considering s.
+
+
+
+ Typically invoked at the end of factory setup, if desired.
+
+
+ As this is a startup method, it should destroy already created singletons if
+ it fails, to avoid dangling resources. In other words, after invocation
+ of that method, either all or no singletons at all should be
+ instantiated.
+
+
+
+ If one of the singleton objects could not be created.
+
+
+
+
+ Register a special dependency type with corresponding autowired value.
+
+
+ This is intended for factory/context references that are supposed
+ to be autowirable but are not defined as objects in the factory:
+ e.g. a dependency of type ApplicationContext resolved to the
+ ApplicationContext instance that the object is living in.
+
+ Note there are no such default types registered in a plain IObjectFactory,
+ not even for the BeanFactory interface itself.
+
+
+ Type of the dependency to register.
+ This will typically be a base interface such as IObjectFactory, with extensions of it resolved
+ as well if declared as an autowiring dependency (e.g. IListableBeanFactory),
+ as long as the given value actually implements the extended interface.
+
+ The autowired value. This may also be an
+ implementation o the interface,
+ which allows for lazy resolution of the actual target value.
+
+
+
+ Determines whether the specified object qualifies as an autowire candidate,
+ to be injected into other beans which declare a dependency of matching type.
+ This method checks ancestor factories as well.
+
+ Name of the object to check.
+ The descriptor of the dependency to resolve.
+
+ true if the object should be considered as an autowire candidate; otherwise, false.
+
+ if there is no object with the given name.
+
+
+
+ May be used to store custom value references in object definition properties.
+
+
+ Erich Eichinger
+
+
+
+
+
+ the object factory holding the given object definition
+
+
+ The name of the object that is having the value of one of its properties resolved.
+
+
+ The definition of the named object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The value of the property that is being resolved.
+
+
+
+
+ Subinterface of
+ that adds
+ a before-destruction callback.
+
+
+ The typical usage will be to invoke custom destruction callbacks on
+ specific object types, matching corresponding initialization callbacks.
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ Apply this
+ to the
+ given new object instance before its destruction. Can invoke custom
+ destruction callbacks.
+
+ The new object instance.
+ The name of the object.
+
+ In case of errors.
+
+
+
+
+ Denotes a special placeholder collection that may contain
+ s or
+ other placeholder objects that will need to be resolved.
+
+
+
+ 'A special placeholder collection' means that the elements of this
+ collection can be placeholders for objects that will be resolved later by
+ a Spring.NET IoC container, i.e. the elements themselves will be
+ resolved at runtime by the enclosing IoC container.
+
+
+ The core Spring.NET library already provides three implementations of this interface
+ straight out of the box; they are...
+
+
+
+
+ .
+
+
+
+
+ .
+
+
+
+
+ .
+
+
+
+
+ If you have a custom collection class (i.e. a class that either implements the
+ directly or derives from a class that does)
+ that you would like to expose as a special placeholder collection (i.e. one that can
+ have s as elements
+ that will be resolved at runtime by an appropriate Spring.NET IoC container, just
+ implement this interface.
+
+
+
+
+ Lets say one has a Bag class (i.e. a collection that supports bag style semantics).
+
+
+ using System;
+
+ using Spring.Objects.Factory.Support;
+
+ namespace MyNamespace
+ {
+ public sealed class Bag : ICollection
+ {
+ // ICollection implementation elided for clarity...
+
+ public void Add(object o)
+ {
+ // implementation elided for clarity...
+ }
+ }
+
+ public class ManagedBag : Bag, IManagedCollection
+ {
+ public ICollection Resolve(
+ string objectName, RootObjectDefinition definition,
+ string propertyName, ManagedCollectionElementResolver resolver)
+ {
+ Bag newBag = new Bag();
+ string elementName = propertyName + "[bag-element]";
+ foreach(object element in this)
+ {
+ object resolvedElement = resolver(objectName, definition, elementName, element);
+ newBag.Add(resolvedElement);
+ }
+ return newBag;
+ }
+ }
+ }
+
+
+ Rick Evans
+
+
+
+ Resolves this managed collection at runtime.
+
+
+ The name of the top level object that is having the value of one of it's
+ collection properties resolved.
+
+
+ The definition of the named top level object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The callback that will actually do the donkey work of resolving
+ this managed collection.
+
+ A fully resolved collection.
+
+
+
+ Resolves a single element value of a managed collection.
+
+
+
+ If the does not need to be resolved or
+ converted to an appropriate , the
+ will be returned as-is.
+
+
+
+ The name of the top level object that is having the value of one of it's
+ collection properties resolved.
+
+
+ The definition of the named top level object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ That element of a managed collection that may need to be resolved
+ to a concrete value.
+
+ A fully resolved element.
+
+
+
+ Describes an object instance, which has property values, constructor
+ argument values, and further information supplied by concrete implementations.
+
+
+
+ This is just a minimal interface: the main intention is to allow
+
+ (like PropertyPlaceholderConfigurer) to access and modify property values.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Return the property values to be applied to a new instance of the object.
+
+
+
+
+ Return the constructor argument values for this object.
+
+
+
+
+ Return the event handlers for any events exposed by this object.
+
+
+
+
+ Return a description of the resource that this object definition
+ came from (for the purpose of showing context in case of errors).
+
+
+
+
+ Is this object definition a "template", i.e. not meant to be instantiated
+ itself but rather just serving as an object definition for configuration
+ templates used by .
+
+
+ if this object definition is a "template".
+
+
+
+
+ Is this object definition "abstract", i.e. not meant to be instantiated
+ itself but rather just serving as parent for concrete child object
+ definitions.
+
+
+ if this object definition is "abstract".
+
+
+
+
+ Return whether this a Singleton, with a single, shared instance
+ returned on all calls.
+
+
+
+ If , an object factory will apply the Prototype
+ design pattern, with each caller requesting an instance getting an
+ independent instance. How this is defined will depend on the
+ object factory implementation. Singletons are the commoner type.
+
+
+
+
+
+ Is this object lazily initialized?
+
+
+ Only applicable to a singleton object.
+
+
+ If , it will get instantiated on startup by object factories
+ that perform eager initialization of singletons.
+
+
+
+
+
+ The name of the parent definition of this object definition, if any.
+
+
+
+
+ The target scope for this object.
+
+
+
+
+ Get the role hint for this object definition
+
+
+
+
+ Returns the of the object definition (if any).
+
+
+ A resolved object .
+
+
+ If the of the object definition is not a
+ resolved or .
+
+
+
+
+ Returns the of the
+ of the object definition.
+
+ Note that this does not have to be the actual type name used at runtime,
+ in case of a child definition overrding/inheriting the the type name from its
+ parent. It can be modifed during object factory post-processing, typically
+ replacing the original class name with a parsed variant of it.
+ Hence, do not consider this to be the definitive bean type at runtime
+ but rather only use it for parsing purposes at the individual object
+ definition level.
+
+
+
+
+ The autowire mode as specified in the object definition.
+
+
+
+ This determines whether any automagical detection and setting of
+ object references will happen. Default is
+ ,
+ which means there's no autowire.
+
+
+
+
+
+ The object names that this object depends on.
+
+
+
+ The object factory will guarantee that these objects get initialized
+ before.
+
+
+ Note that dependencies are normally expressed through object properties
+ or constructor arguments. This property should just be necessary for
+ other kinds of dependencies like statics (*ugh*) or database
+ preparation on startup.
+
+
+
+
+
+ The name of the initializer method.
+
+
+
+ The default is , in which case there is no initializer method.
+
+
+
+
+
+ Return the name of the destroy method.
+
+
+
+ The default is , in which case there is no destroy method.
+
+
+
+
+
+ The name of the factory method to use (if any).
+
+
+
+ This method will be invoked with constructor arguments, or with no
+ arguments if none are specified. The static method will be invoked on
+ the specified .
+
+
+
+
+
+ The name of the factory object to use (if any).
+
+
+
+
+ Gets a value indicating whether this instance a candidate for getting autowired into some other
+ object.
+
+
+ true if this instance is autowire candidate; otherwise, false.
+
+
+
+
+ Simple factory for shared instances.
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ Constructs a new instance of the target dictionary.
+
+ The new instance.
+
+
+
+ Set the source .
+
+
+
+ This value will be used to populate the
+ returned by this factory.
+
+
+
+
+
+ Set the of the
+ implementation to use.
+
+
+
+ The default is the .
+
+
+
+
+
+ The of objects created by this factory.
+
+
+ Always returns the .
+
+
+
+
+ implementation that
+ creates instances of the class.
+
+
+
+ Typically used for retrieving shared
+ instances for common topics (such as the 'DAL', 'BLL', etc). The
+
+ property determines the name of the
+ Common.Logging logger.
+
+
+ Rick Evans
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The name of the instance served up by
+ this factory.
+
+
+ If the supplied is
+ or contains only whitespace character(s).
+
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+ An instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+
+
+
+ Invoked by an
+ after it has set all object properties supplied
+ (and satisfied the
+
+ and
+ interfaces).
+
+
+ In the event of misconfiguration (such as failure to set an essential
+ property) or if initialization fails.
+
+
+
+
+
+ The name of the instance served up by
+ this factory.
+
+
+ The name of the instance served up by
+ this factory.
+
+
+ If the supplied to the setter is
+ or contains only whitespace character(s).
+
+
+
+
+ Return the type of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+
+
+ Tag subclass used to hold a dictionary of managed elements.
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Interface representing an object whose value set can be merged with that of a parent object.
+
+ Rob Harrop
+ Mark Pollack (.NET)
+
+
+
+ Merges the current value set with that of the supplied object.
+
+ The supplied object is considered the parent, and values in the
+ callee's value set must override those of the supplied object.
+
+ The parent object to merge with
+ The result of the merge operation
+ If the supplied parent is null
+ If merging is not enabled for this instance,
+ (i.e. MergeEnabled equals false.
+
+
+
+ Gets a value indicating whether this instance is merge enabled for this instance
+
+
+ true if this instance is merge enabled; otherwise, false.
+
+
+
+
+ Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer.
+
+
+
+
+ Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer.
+
+ The approximate number of elements that the object can initially contain. is less than zero.
+
+
+
+ Resolves this managed collection at runtime.
+
+
+ The name of the top level object that is having the value of one of it's
+ collection properties resolved.
+
+
+ The definition of the named top level object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The callback that will actually do the donkey work of resolving
+ this managed collection.
+
+ A fully resolved collection.
+
+
+
+ Merges the current value set with that of the supplied object.
+
+ The supplied object is considered the parent, and values in the
+ callee's value set must override those of the supplied object.
+
+ The parent object to merge with
+ The result of the merge operation
+ If the supplied parent is null
+ If merging is not enabled for this instance,
+ (i.e. MergeEnabled equals false.
+
+
+
+ Gets or sets the unresolved name for the
+ of the keys of this managed dictionary.
+
+ The unresolved name for the type of the keys of this managed dictionary.
+
+
+
+ Gets or sets the unresolved name for the
+ of the values of this managed dictionary.
+
+ The unresolved name for the type of the values of this managed dictionary.
+
+
+
+ Gets a value indicating whether this instance is merge enabled for this instance
+
+
+ true if this instance is merge enabled; otherwise, false.
+
+
+
+
+ Tag subclass used to hold a list of managed elements.
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Initializes a new instance of the ManagedList class that is empty and has the default initial capacity.
+
+
+
+
+ Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity.
+
+ The number of elements that the new list can initially store. is less than zero.
+
+
+
+ Resolves this managed collection at runtime.
+
+
+ The name of the top level object that is having the value of one of it's
+ collection properties resolved.
+
+
+ The definition of the named top level object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The callback that will actually do the donkey work of resolving
+ this managed collection.
+
+ A fully resolved collection.
+
+
+
+ Merges the current value set with that of the supplied object.
+
+ The supplied object is considered the parent, and values in the
+ callee's value set must override those of the supplied object.
+
+ The parent object to merge with
+ The result of the merge operation
+ If the supplied parent is null
+ If merging is not enabled for this instance,
+ (i.e. MergeEnabled equals false.
+
+
+
+ Gets or sets the unresolved name for the
+ of the elements of this managed list.
+
+ The unresolved name for the type of the elements of this managed list.
+
+
+
+ Gets a value indicating whether this instance is merge enabled for this instance
+
+
+ true if this instance is merge enabled; otherwise, false.
+
+
+
+
+ Tag class which represent a Spring-managed instance that
+ supports merging of parent/child definitions.
+
+
+
+
+ Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.
+
+
+
+
+ Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer.
+
+ The initial number of entries that the can contain. is less than zero.
+
+
+
+ Merges the current value set with that of the supplied object.
+
+ The supplied object is considered the parent, and values in the
+ callee's value set must override those of the supplied object.
+
+ The parent object to merge with
+ The result of the merge operation
+ If the supplied parent is null
+ If merging is not enabled for this instance,
+ (i.e. MergeEnabled equals false.
+
+
+
+ Gets a value indicating whether this instance is merge enabled for this instance
+
+
+ true if this instance is merge enabled; otherwise, false.
+
+
+
+
+ Tag subclass used to hold a set of managed elements.
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates a new set instance based on either a list or a hash table,
+ depending on which will be more efficient based on the data-set
+ size.
+
+
+
+
+ Initializes a new instance of the class with a given capacity
+
+ The size.
+
+
+
+ Resolves this managed collection at runtime.
+
+
+ The name of the top level object that is having the value of one of it's
+ collection properties resolved.
+
+
+ The definition of the named top level object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The callback that will actually do the donkey work of resolving
+ this managed collection.
+
+ A fully resolved collection.
+
+
+
+ Merges the current value set with that of the supplied object.
+
+ The supplied object is considered the parent, and values in the
+ callee's value set must override those of the supplied object.
+
+ The parent object to merge with
+ The result of the merge operation
+ If the supplied parent is null
+ If merging is not enabled for this instance,
+ (i.e. MergeEnabled equals false.
+
+
+
+ Gets or sets the unresolved name for the
+ of the elements of this managed set.
+
+ The unresolved name for the type of the elements of this managed set.
+
+
+
+ Gets a value indicating whether this instance is merge enabled for this instance
+
+
+ true if this instance is merge enabled; otherwise, false.
+
+
+
+
+ An that returns a value
+ that is the result of a or instance method invocation.
+
+
+
+ Note that this class generally is expected to be used for accessing factory methods,
+ and as such defaults to operating in singleton mode. The first request to
+
+ by the owning object factory will cause a method invocation, the return
+ value of which will be cached for all subsequent requests. The
+ property may be set to
+ , to cause this factory to invoke the target method each
+ time it is asked for an object.
+
+
+ A target method may be specified by setting the
+ property to a string representing
+ the method name, with specifying
+ the that the method is defined on.
+ Alternatively, a target instance method may be specified, by setting the
+ property as the target object, and
+ the property as the name of the
+ method to call on that target object. Arguments for the method invocation may be
+ specified by setting the property.
+
+
+ Another (esoteric) use case for this factory object is when one needs to call a method
+ that doesn't return any value (for example, a class method to
+ force some sort of initialization to happen)... this use case is not supported by
+ factory-methods, since a return value is needed to become the object.
+
+
+
+ This class depends on the
+
+ method being called after all properties have been set, as per the
+ contract. If you are
+ using this class outside of a Spring.NET IoC container, you must call one of either
+ or
+ yourself to ready the object's internal
+ state, or you will get a nasty .
+
+
+
+
+
+ The following example uses an instance of this class to call a
+ factory method...
+
+ The following example is similar to the preceding example; the only pertinent difference is the fact that
+ a number of different objects are passed as arguments, demonstrating that not only simple value types
+ are valid as elements of the argument list...
+
+ Similarly, the following example uses an instance of this class to call an instance method...
+
+
+
+
+
+
+
+
+
+
+
+ The above example could also have been written using an anonymous inner object definition... if the
+ object on which the method is to be invoked is not going to be used outside of the factory object
+ definition, then this is the preferred idiom because it limits the scope of the object on which the
+ method is to be invoked to the surrounding factory object.
+
+
+
+
+
+
+
+
+
+
+ Colin Sampaleanu
+ Juergen Hoeller
+ Rick Evans (.NET)
+ Simon White (.NET)
+
+
+
+
+
+ Specialisation of the class that tries
+ to convert the given arguments for the actual target method via an
+ appropriate implementation.
+
+ Juergen Hoeller
+ Rick Evans
+
+
+
+
+ Helper class allowing one to declaratively specify a method call for later invocation.
+
+
+
+ Typically not used directly but via its subclasses such as
+ .
+
+
+ Usage: specify either the and
+ or the
+ and
+ properties respectively, and
+ (optionally) any arguments to the method. Then call the
+ method to prepare the invoker.
+ Once prepared, the invoker can be invoked any number of times.
+
+
+
+
+ The following example uses the class to invoke the
+ ToString() method on the Foo class using a mixture of both named and unnamed
+ arguments.
+
+
+ public class Foo
+ {
+ public string ToString(string name, int age, string address)
+ {
+ return string.Format("{0}, {1} years old, {2}", name, age, address);
+ }
+
+ public static void Main()
+ {
+ Foo foo = new Foo();
+ MethodInvoker invoker = new MethodInvoker();
+ invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"};
+ invoker.AddNamedArgument("age", 29);
+ invoker.Prepare();
+ // at this point, the arguments that will be passed to the method invocation
+ // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}
+ string details = (string) invoker.Invoke();
+ Console.WriteLine (details);
+ // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa'
+ }
+ }
+
+
+ Colin Sampaleanu
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ The used to search for
+ the method to be invoked.
+
+
+
+
+ The value returned from the invocation of a method that returns void.
+
+
+
+
+ The method that will be invoked.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Prepare the specified method.
+
+
+
+ The method can be invoked any number of times afterwards.
+
+
+
+ If all required properties are not set, or a matching argument could not be found
+ for a named argument (typically down to a typo).
+
+
+ If the specified method could not be found.
+
+
+
+
+ Searches for and returns the method that is to be invoked.
+
+
+ The return value of this method call will subsequently be returned from the
+ .
+
+ The method that is to be invoked.
+
+ If no method could be found.
+
+
+ If more than one method was found.
+
+
+
+
+ Adds the named argument to this instances mapping of argument names to argument values.
+
+
+ The name of an argument on the method that is to be invoked.
+
+
+ The value of the named argument on the method that is to be invoked.
+
+
+
+
+ Returns the prepared object that
+ will be invoked.
+
+
+
+ A possible use case is to determine the return of the method.
+
+
+
+ The prepared object that
+ will be invoked.
+
+
+
+
+ Invoke the specified method.
+
+
+
+ The invoker needs to have been prepared beforehand (via a call to the
+ method).
+
+
+
+ The object returned by the method invocation, or
+ if the method returns void.
+
+
+ If at least one of the arguments passed to this
+ was incompatible with the signature of the invoked method.
+
+
+
+
+ The target on which to call the target method.
+
+
+
+ Only necessary when the target method is ;
+ else, a target object needs to be specified.
+
+
+
+
+
+ The target object on which to call the target method.
+
+
+
+ Only necessary when the target method is not ;
+ else, a target class is sufficient.
+
+
+
+
+
+ The name of the method to be invoked.
+
+
+
+ Refers to either a method
+ or a non- method, depending on
+ whether or not a target object has been set.
+
+
+
+
+
+
+ Arguments for the method invocation.
+
+
+
+ Ordering is significant... the order of the arguments in this
+ property must match the ordering of the various parameters on the target
+ method. There does however exist a small possibility for confusion when
+ the arguments in this property are supplied in addition to one or more named
+ arguments. In this case, each named argument is slotted into the index position
+ corresponding to the named argument... once once all named arguments have been
+ resolved, the arguments in this property are slotted into any remaining (empty)
+ slots in the method parameter list (see the example in the overview of the
+ class if this is not clear).
+
+
+ If this property is not set, or the value passed to the setter invocation
+ is or a zero-length array, a method with no (un-named) arguments is assumed.
+
+
+
+
+
+
+ The resolved arguments for the method invocation.
+
+
+
+ This property is not set until the target method has been resolved via a call to the
+ method). It is a combination of the
+ named and plain vanilla arguments properties, and it is this object array that
+ will actually be passed to the invocation of the target method.
+
+
+ Setting the value of this property to results in basically clearing out any
+ previously prepared arguments... another call to the
+ method will then be required to prepare the arguments again (or the prepared arguments
+ can be set explicitly if so desired).
+
+
+
+
+
+
+
+ Named arguments for the method invocation.
+
+
+
+ The keys of this dictionary are the () names of the
+ method arguments, and the () values are the actual
+ argument values themselves.
+
+
+ If this property is not set, or the value passed to the setter invocation
+ is a reference, a method with no named arguments is assumed.
+
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Prepare the specified method.
+
+
+
+ The method can be invoked any number of times afterwards.
+
+
+
+ If all required properties are not set.
+
+
+ If the specified method could not be found.
+
+
+
+
+ Register the given custom
+ for all properties of the given .
+
+
+ The of property.
+
+
+ The to register.
+
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+
+ Returns the return value of the method that is to be invoked.
+
+
+ Will return the same value each time if the
+
+ property value is .
+
+
+
+ An instance (possibly shared or independent) of the object managed by
+ this factory.
+
+
+
+
+
+ Prepares this method invoker.
+
+
+ If all required properties are not set.
+
+
+ If the specified method could not be found.
+
+
+
+
+
+ If a singleton should be created, or a new object on each request.
+ Defaults to .
+
+
+
+
+ Return the return value of the method
+ that this factory invokes, or if not
+ known in advance.
+
+
+
+ If the return value of the method that this factory is to invoke is
+ , then the
+ will be returned (in accordance with the
+ contract that
+ treats a value as a configuration error).
+
+
+
+
+
+
+ Holder for an with
+ name and aliases.
+
+
+
+ Recognized by
+
+ for inner object definitions. Registered by
+ ,
+ which also uses it as general holder for a parsed object definition.
+
+
+ Can also be used for programmatic registration of inner object
+ definitions. If you don't care about the functionality offered by the
+ interface and the like,
+ registering
+ or is good enough.
+
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The object definition to be held by this instance.
+
+
+ The name of the object definition.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The object definition to be held by this instance.
+
+ The name of the object.
+
+ Any aliases for the supplied
+
+
+
+
+ The held by this
+ instance.
+
+
+
+
+ The name of the object definition.
+
+
+
+
+ Any aliases for the object definition.
+
+
+
+ Guaranteed to never return ; if the associated
+
+ does not have any aliases associated with it, then an empty
+ array will be returned.
+
+
+
+
+
+ Visitor class for traversing objects, in particular
+ the property values and constructor arguments contained in them resolving
+ object metadata values.
+
+
+ Used by and
+ to parse all string values contained in a ObjectDefinition, resolving any placeholders found.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+ The handler to be called for resolving variables contained in a string.
+
+
+
+ Initializes a new instance of the class
+ for subclassing
+
+ Subclasses should override the ResolveStringValue method
+
+
+
+ Traverse the given ObjectDefinition object and the MutablePropertyValues
+ and ConstructorArgumentValues contained in them.
+
+ The object definition to traverse.
+
+
+
+ Visits the ObjectDefinition property ObjectTypeName, replacing string values using
+ the specified IVariableSource.
+
+ The object definition.
+
+
+
+ Visits the property values of the ObjectDefinition, replacing string values
+ using the specified IVariableSource.
+
+ The object definition.
+
+
+
+ Visits the indexed constructor argument values, replacing string values using the
+ specified IVariableSource.
+
+ The indexed argument values.
+
+
+
+ Visits the named constructor argument values, replacing string values using the
+ specified IVariableSource.
+
+ The named argument values.
+
+
+
+ Visits the generic constructor argument values, replacing string values using
+ the specified IVariableSource.
+
+ The genreic argument values.
+
+
+
+ Configures the constructor argument ValueHolder.
+
+ The vconstructor alue holder.
+
+
+
+ Resolves the given value taken from an object definition according to its type
+
+ the value to resolve
+ the resolved value
+
+
+
+ Visits the ManagedList property ElementTypeName and
+ calls for list element.
+
+
+
+
+ Visits the ManagedSet property ElementTypeName and
+ calls for list element.
+
+
+
+
+ Visits the ManagedSet properties KeyTypeName and ValueTypeName and
+ calls for dictionary's value element.
+
+
+
+
+ Visits the elements of a NameValueCollection and calls
+ for value of each element.
+
+
+
+
+ calls the to resolve any variables contained in the raw string.
+
+ the raw string value containing variable placeholders to be resolved
+ If no has been configured.
+ the resolved string, having variables being replaced, if any
+
+
+
+ Returns a value that is an
+ that
+ returns an object from an
+ .
+
+
+
+ The primary motivation of this class is to avoid having a client object
+ directly calling the
+
+ method to get a prototype object out of an
+ , which would be a
+ violation of the inversion of control principle. With the use of this
+ class, the client object can be fed an
+ as a property
+ that directly returns one target prototype object.
+
+
+ The object referred to by the value of the
+
+ property does not have to be a prototype object, but there is little
+ to no point in using this class in conjunction with a singleton object.
+
+
+
+
+ The following XML configuration snippet illustrates the use of this
+ class...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Colin Sampaleanu
+ Simon White (.NET)
+
+
+
+ Interface to be implemented by objects that wish to be aware of their owning
+ .
+
+
+
+ For example, objects can look up collaborating objects via the factory.
+
+
+ Note that most objects will choose to receive references to collaborating
+ objects via respective properties and / or an appropriate constructor.
+
+
+ For a list of all object lifecycle methods, see the
+ API documentation.
+
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Callback that supplies the owning factory to an object instance.
+
+
+ Owning
+ (may not be ). The object can immediately
+ call methods on the factory.
+
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+ In case of initialization errors.
+
+
+
+
+ Returns an instance of the object factory.
+
+ The object factory.
+
+
+
+ Invoked by an
+ after it has set all supplied object properties.
+
+
+ In the event of misconfiguration (such as failure to set an essential
+ property) or if initialization fails.
+
+
+
+
+
+ Sets the name of the target object.
+
+
+
+
+ The target factory that will be used to perform the lookup
+ of the object referred to by the
+ property.
+
+
+ The owning
+ (will never be ).
+
+
+ In case of initialization errors.
+
+
+
+
+
+ The of object created by this factory.
+
+
+
+
+ Interface defining a factory which can return an object instance
+ (possibly shared or independent) when invoked.
+
+
+ This interface is typically used to encapsulate a generic factory
+ which returns a new instance (prototype) on each invocation.
+ It is similar to the , but
+ implementations of the aforementioned interface are normally meant to be defined
+ as instances by the user in an ,
+ while implementations of this class are normally meant to be fed as a property to
+ other objects; as such, the
+ method
+ has different exception handling behavior.
+
+ Colin Sampaleanu
+ Simon White (.NET)
+
+
+
+ Return an instance (possibly shared or independent)
+ of the object managed by this factory.
+
+
+ An instance of the object (should never be ).
+
+
+
+
+ Creates a new instance of the GenericObjectFactory class.
+
+
+ The enclosing
+ .
+
+
+
+
+ Returns the object created by the enclosed object factory.
+
+ The created object.
+
+
+
+ An implementation
+ that exposes an arbitrary target object under a different name.
+
+
+
+ Usually, the target object will reside in a different object
+ definition file, using this
+ to link it in
+ and expose it under a different name. Effectively, this corresponds
+ to an alias for the target object.
+
+
+ For XML based object definition files, a <alias>
+ tag is available that effectively achieves the same.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ Initialize a new default instance
+
+
+
+
+ Initialize this instance with the predefined and .
+
+
+
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+ An instance (possibly shared or independent) of the object managed by
+ this factory.
+
+
+
+
+
+ The name of the target object.
+
+
+
+ The target object may potentially be defined in a different object
+ definition file.
+
+
+ The name of the target object.
+
+
+
+ Return the type of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+
+
+ Callback that supplies the owning factory to an object instance.
+
+
+ The owning
+ (may not be ). The object can immediately
+ call methods on the factory.
+
+
+ In case of initialization errors.
+
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined object.
+
+
+
+
+ Role hint indicating that a is a supporting
+ part of some larger configuration, typically an outer ComponentDefinition
+ SUPPORT objects are considered important enough to be aware
+ of when looking more closely at a particular ComponentDefinition,
+ but not when looking at the overall configuration of an application.
+
+
+
+
+ Role hint indicating that a is providing an
+ entirely background role and has no relevance to the end-user. This hint is
+ used when registering objects that are completely part of the internal workings
+ of a ComponentDefinition.
+
+
+
+
+ Implementation of that
+ resolves variable name against Java-style property file.
+
+
+ Aleksandar Seovic
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Resolves variable value for the specified variable name.
+
+
+ The name of the variable to resolve.
+
+
+ The variable value if able to resolve, null otherwise.
+
+
+
+
+ Initializes properties based on the specified
+ property file locations.
+
+
+
+
+ Gets or sets the locations of the property files
+ to read properties from.
+
+
+ The locations of the property files
+ to read properties from.
+
+
+
+
+ Convinience property. Gets or sets a single location
+ to read properties from.
+
+
+ A location to read properties from.
+
+
+
+
+ Sets a value indicating whether to ignore resource locations that do not exist. This will call
+ the Exists property.
+
+
+ true if one should ignore missing resources; otherwise, false.
+
+
+
+
+ Overrides default values in one or more object definitions.
+
+
+
+ Instances of this class override already existing values, and is
+ thus best suited to replacing defaults. If you need to replace
+ placeholder values, consider using the
+
+ class instead.
+
+
+ In contrast to the
+
+ class, the original object definition can have default
+ values or no values at all for such object properties. If an overriding
+ configuration file does not have an entry for a certain object property,
+ the default object value is left as is. Also note that it is not
+ immediately obvious to discern which object definitions will be mutated by
+ one or more
+ s
+ simply by looking at the object configuration.
+
+
+ Each line in a referenced configuration file is expected to take the
+ following form...
+
+
+
+
+
+ The name.property key refers to the object name and the
+ property that is to be overridden; and the value is the overridding
+ value that will be inserted into the appropriate object definition's
+ named property.
+
+
+ Please note that in the case of multiple
+ s
+ that define different values for the same object definition value, the
+ last overridden value will win (due to the fact that the values
+ supplied by previous
+ s
+ will be overridden).
+
+
+
+
+ The following XML context definition defines an object that has a number
+ of properties, all of which have default values...
+
+
+
+
+
+
+
+
+
+
+ What follows is a .NET config file snippet for the above example (assuming
+ the need to override one of the default values)...
+
+
+
+
+
+
+
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+
+
+
+ Allows for the configuration of individual object property values from
+ a .NET .config file.
+
+
+
+ Useful for custom .NET .config files targetted at system administrators
+ that override object properties configured in the application context.
+
+
+ Two concrete implementations are provided in the Spring.NET core library:
+
+
+
+
+ for <add key="placeholderKey" value="..."/> style
+ overriding (pushing values from a .NET .config file into object
+ definitions).
+
+
+
+
+
+ for replacing "${...}" placeholders (pulling values from a .NET .config
+ file into object definitions).
+
+
+
+
+
+ Please refer to the API documentation for the concrete implementations
+ listed above for example usage.
+
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+
+
+ The default configuration section name to use if none is explictly supplied.
+
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This is an class, and as such exposes no
+ public constructors.
+
+
+
+
+
+ Modify the application context's internal object factory after its
+ standard initialization.
+
+
+ The object factory used by the application context.
+
+
+ In case of errors.
+
+
+
+
+
+ Loads properties from the configuration sections
+ specified in into .
+
+ The instance to be filled with properties.
+
+
+
+ Apply the given properties to the supplied
+ .
+
+
+ The
+ used by the application context.
+
+ The properties to apply.
+
+ If an error occured.
+
+
+
+
+ Validates the supplied .
+
+
+
+ Basically, if external locations are specified, ensure that either
+ one or a like number of config sections are also specified.
+
+
+
+ The to be validated.
+
+
+
+
+ Simply initializes the supplied
+ collection with this instances default
+ (if any).
+
+
+ The collection to be so initialized.
+
+
+
+
+ The policy for resolving conflicting property overrides from
+ several resources.
+
+
+
+ When merging conflicting property overrides from several resources,
+ should append an override with the same key be appended to the
+ current value, or should the property override from the last resource
+ processed override previous values?
+
+
+ The default value is ; i.e. a property
+ override from the last resource to be processed overrides previous
+ values.
+
+
+
+ if the property override from the last resource
+ processed overrides previous values.
+
+
+
+
+ Return the order value of this object, where a higher value means greater in
+ terms of sorting.
+
+ The order value.
+
+
+
+
+ The default properties to be applied.
+
+
+
+ These are to be considered defaults, to be overridden by values
+ loaded from other resources.
+
+
+
+
+
+ The location of the .NET .config file that contains the property
+ overrides that are to be applied.
+
+
+
+
+ The locations of the .NET .config files containing the property
+ overrides that are to be applied.
+
+
+
+
+ The configuration sections to look for within the .config files.
+
+
+
+
+
+
+ Should a failure to find a .config file be ignored?
+
+
+
+ is only appropriate if the .config file is
+ completely optional. The default is .
+
+
+
+ if a failure to find a .config file is to be
+ ignored.
+
+
+
+
+ Apply the given properties to the supplied
+ .
+
+
+ The
+ used by the application context.
+
+ The properties to apply.
+
+ If an error occured.
+
+
+
+
+ Process the given key as 'name.property' entry.
+
+
+ The object factory containing the object definitions that are to be
+ processed.
+
+ The key.
+ The value.
+
+ If an error occurs.
+
+
+ If the property was not well formed (i.e. not in the format "name.property").
+
+
+
+
+ implementation that
+ evaluates a property path on a given target object.
+
+
+
+ The target object can be specified directly or via an object name (see
+ example below).
+
+
+ Please note that the
+ is an implementation, and as such has
+ to comply with the contract of the
+ interface; more specifically, this means that the end result of the property lookup path
+ evaluation cannot be (
+ implementations are not permitted to return ). If the resut of a
+ property lookup path evaluates to , an exception will be thrown.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+ An instance (possibly shared or independent) of the object managed by
+ this factory.
+
+
+
+
+
+ The target object that the property path lookup is to be applied to.
+
+
+
+ This would most likely be an inner object, but can of course be
+ any object reference.
+
+
+
+ The target object that the property path lookup is to be applied to.
+
+
+
+
+
+ The (object) name of the target object that the property path lookup
+ is to be applied to.
+
+
+
+ Please note that any leading or trailing whitespace will be
+ trimmed from this name prior to resolution. The implication of this is that
+ one cannot use the
+ class in conjunction with object names that start or end with whitespace.
+
+
+
+ The (object) name of the target object that the property path lookup
+ is to be applied to.
+
+
+
+
+
+ The property (lookup) path to be applied to the target object.
+
+
+
+ Please note that any leading or trailing whitespace will be
+ trimmed from this path prior to resolution. Whitespace is not a valid
+ identifier for property names (in part or whole) in CLS-based languages,
+ so this is a not unreasonable action. Please also note that whitespace
+ that is embedded within the property path will be left as-is (which may
+ or may not result in an error being thrown, depending on the context of
+ the whitespace).
+
+
+
+
+ Examples of such property lookup paths can be seen below; note that
+ property lookup paths can be nested to an arbitrary level.
+
+
+ name.length
+ accountManager.account['the key'].name
+ accounts[0].name
+
+
+
+ The property (lookup) path to be applied to the target object.
+
+
+
+
+ The 'expected' of the result from evaluating the
+ property path.
+
+
+
+ This is not necessary for directly specified target objects, or
+ singleton target objects, where the can
+ be determined via reflection. Just specify this in case of a
+ prototype target, provided that you need matching by type (for
+ example, for autowiring).
+
+
+ It is permissable to set the value of this property to
+ (which in any case is the default value).
+
+
+
+ The 'expected' of the result from evaluating the
+ property path.
+
+
+
+
+ Return the of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+
+
+ The object name of this
+
+ will be interpreted as "objectName.property" pattern, if neither the
+
+
+ have been supplied (set).
+
+
+ This allows for concise object definitions with just an id or name.
+
+
+
+ The name of the object in the factory.
+
+
+
+
+ Callback that supplies the owning factory to an object instance.
+
+
+ Owning
+ (may not be ). The object can immediately
+ call methods on the factory.
+
+
+ In case of initialization errors.
+
+
+
+
+ Resolves placeholder values in one or more object definitions.
+
+
+
+ The default placeholder syntax follows the NAnt style: ${...}.
+ Instances of this class can be configured in the same way as any other
+ object in a Spring.NET container, and so custom placeholder prefix
+ and suffix values can be set via the
+ and properties.
+
+
+
+ The following example XML context definition defines an object that has
+ a number of placeholders. The placeholders can easily be distinguished
+ by the presence of the ${} characters.
+
+
+
+
+
+
+
+
+
+
+ The associated XML configuration file for the above example containing the
+ values for the placeholders would contain a snippet such as ..
+
+
+
+
+
+
+
+
+
+
+ The preceding XML snippet listing the various property keys and their
+ associated values needs to be inserted into the .NET config file of
+ your application (or Web.config file for your ASP.NET web application,
+ as the case may be), like so...
+
+
+
+
+
+
+
+
+
+
+
+
+ checks simple property values, lists, dictionaries, sets, constructor
+ values, object type name, and object names in
+ runtime object references (
+ ).
+ Furthermore, placeholder values can also cross-reference other
+ placeholders, in the manner of the following example where the
+ rootPath property is cross-referenced by the subPath
+ property.
+
+
+
+
+
+
+
+
+
+
+ In contrast to the
+
+ class, this configurer only permits the replacement of explicit
+ placeholders in object definitions. Therefore, the original definition
+ cannot specify any default values for its object properties, and the
+ placeholder configuration file is expected to contain an entry for each
+ defined placeholder. That is, if an object definition contains a
+ placeholder ${foo}, there should be an associated
+ <add key="foo" value="..."/> entry in the
+ referenced placeholder configuration file. Default property values
+ can be defined via the inherited
+
+ collection to overcome any perceived limitation of this feature.
+
+
+ If a configurer cannot resolve a placeholder, and the value of the
+
+ property is currently set to , an
+
+ will be thrown. If you want to resolve properties from multiple configuration
+ resources, simply specify multiple resources via the
+
+ property. Finally, please note that you can also define multiple
+
+ instances, each with their own custom placeholder syntax.
+
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+
+
+
+ The default placeholder prefix.
+
+
+
+
+ The default placeholder suffix.
+
+
+
+
+ Initializes the new instance
+
+
+
+
+ Apply the given properties to the supplied
+ .
+
+
+ The
+ used by the application context.
+
+ The properties to apply.
+
+ If an error occured.
+
+
+
+
+ Parse values recursively to be able to resolve cross-references between
+ placeholder values.
+
+
+ The map of constructor arguments / property values.
+
+ The string to be resolved.
+ The placeholders that have already been visited
+ during the current resolution attempt (used to detect circular references
+ between placeholders). Only non-null if we're parsing a nested placeholder.
+
+ If an error occurs.
+
+ The resolved string.
+
+
+
+ Resolve the given placeholder using the given name value collection,
+ performing an environment variables check according to the given mode.
+
+
+
+ The default implementation delegates to
+
+ before/afer the environment variable check. Subclasses can override
+ this for custom resolution strategies, including customized points
+ for the environment properties check.
+
+
+ The placeholder to resolve
+
+ The merged name value collection of this configurer.
+
+ The environment variable mode.
+
+ The resolved value or if none.
+
+
+
+
+
+ Resolve the given placeholder using the given name value collection.
+
+
+
+ This (the default) implementation simply looks up the value of the
+ supplied key.
+
+
+ Subclasses can override this for customized placeholder-to-key
+ mappings or custom resolution strategies, possibly just using the
+ given name value collection as fallback.
+
+
+ The placeholder to resolve.
+
+ The merged name value collection of this configurer.
+
+ The resolved value.
+
+
+
+ The placeholder prefix (the default is ${).
+
+
+
+
+
+ The placeholder suffix (the default is })
+
+
+
+
+
+ Indicates whether unresolved placeholders should be ignored.
+
+
+
+
+ Controls how environment variables will be used to
+ replace property placeholders.
+
+
+
+ See the overview of the
+
+ enumeration for the available options.
+
+
+
+
+
+ implementation that
+ retrieves a or non-static public property value.
+
+
+
+ Typically used for retrieving public property values.
+
+
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Invoked by an
+ after it has set all object properties supplied
+ (and satisfied
+ and ApplicationContextAware).
+
+
+ In the event of misconfiguration (such as failure to set an essential
+ property) or if initialization fails.
+
+
+
+
+ Template method that subclasses must override to construct the object
+ returned by this factory.
+
+
+ If an exception occured during object creation.
+
+ The object returned by this factory.
+
+
+
+ The of the static property
+ to be retrieved.
+
+
+
+
+ Arguments for the property invocation.
+
+
+
+ If this property is not set, or the value passed to the setter invocation
+ is a null or zero-length array, a property with no arguments is assumed.
+
+
+
+
+
+ The name of the property the value of which is to be retrieved.
+
+
+
+ Refers to either a property or a non-static property,
+ depending on a target object being set.
+
+
+
+
+
+ The object instance on which the property is defined.
+
+
+
+
+ The on which the property is defined.
+
+
+
+
+ Return the type of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+ Implementation of that
+ resolves variable name against registry key.
+
+ Aleksandar Seovic
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Resolves variable value for the specified variable name.
+
+
+ The name of the variable to resolve.
+
+
+ This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value,
+ strings are concatenated to a comma-separated list following
+
+
+ The variable value if able to resolve, null otherwise.
+
+
+
+
+ Gets or sets the registry key to obtain variable values from.
+
+
+ The registry key to obtain variable values from.
+
+
+
+
+
+ implementation that allows for convenient registration of custom
+ IResource implementations.
+
+
+
+ Because the
+ class implements the
+
+ interface, instances of this class that have been exposed in the
+ scope of an
+ will
+ automatically be picked up by the application context and made
+ available to the IoC container whenever resolution of IResources is required.
+
+
+ Mark Pollack
+
+
+
+
+
+ Registers custom IResource implementations. The supplied
+ is not used since IResourse implementations
+ are registered with a global
+
+
+ The object factory.
+
+
+ In case of errors.
+
+
+
+
+ The IResource implementations, i.e. resource handlers, to register.
+
+
+
+ The has the
+ contains the resource protocol name as the key and type as the value.
+ The key name can either be a string or an object, in which case
+ ToString() will be used to obtain the string name.
+ The value can be the fully qualified name of the IResource
+ implementation, a string, or
+ an actual of the IResource class
+
+
+
+
+
+
+ A convenience class to create a
+ given the resource base
+ name and assembly name.
+
+
+
+ This is currently the preferred way of injecting resources into view
+ tier components (such as Windows Forms GUIs and ASP.NET ASPX pages).
+ A GUI component (typically a Windows Form) is injected with
+ an instance, and can
+ then proceed to use the various GetXxx() methods on the
+ to retrieve images,
+ strings, custom resources, etc.
+
+
+ Mark Pollack
+
+
+
+
+
+
+ Creates a .
+
+
+ If an exception occured during object creation.
+
+ The object returned by this factory.
+
+
+
+
+
+ Invoked by an
+ after it has set all object properties supplied
+ (and satisfied the
+
+ and
+ interfaces).
+
+
+ In the event of misconfiguration (such as failure to set an essential
+ property) or if initialization fails.
+
+
+
+
+
+ The root name of the resources.
+
+
+
+ For example, the root name for the resource file named
+ "MyResource.en-US.resources" is "MyResource".
+
+
+ The namespace is also prefixed before the resource file name.
+
+
+
+
+
+ The string representation of the assembly that contains the resource.
+
+
+
+
+ The .
+
+
+
+
+ Immutable placeholder class used for the value of a
+ object when it's a reference
+ to another object in this factory to be resolved at runtime.
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This does not mark this object as being a reference to
+ another object in any parent factory.
+
+
+ The name of the target object.
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This variant constructor allows a client to specifiy whether or not
+ this object is a reference to another object in a parent factory.
+
+
+ The name of the target object.
+
+ Whether this object is an explicit reference to an object in a
+ parent factory.
+
+
+
+
+ Returns a string representation of this instance.
+
+ A string representation of this instance.
+
+
+
+ Return the target object name.
+
+
+
+
+ Is this is an explicit reference to an object in the parent
+ factory?
+
+
+ if this is an explicit reference to an
+ object in the parent factory.
+
+
+
+
+ Simple factory object for shared instances.
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ Constructs a new instance of the target set.
+
+ The new instance.
+
+
+
+ Set the source .
+
+
+
+ This value will be used to populate the
+ returned by this factory.
+
+
+
+
+
+ Set the of the
+ implementation to use.
+
+
+
+ The default is the .
+
+
+
+
+
+ The of objects created by this factory.
+
+
+ Always returns the .
+
+
+
+
+ Configure all ISharedStateAware objects, delegating concrete handling to the list of .
+
+
+
+
+ Creates a new empty instance.
+
+
+
+
+ Creates a new preconfigured instance.
+
+
+ priority value affecting order of invocation of this processor. See interface.
+
+
+
+ Iterates over configured list of s until
+ the first provider is found that
+ a) true == provider.CanProvideState( instance, name )
+ b) null != provider.GetSharedState( instance, name )
+
+
+
+
+ A NoOp for this processor
+
+
+ The new object instance.
+
+
+ The name of the object.
+
+
+ the original .
+
+
+
+
+ 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.
+
+
+
+ Get/Set the (already ordererd!) list of instances.
+
+
+ If this list is not set, the containing object factory will automatically
+ be scanned for instances.
+
+
+
+
+ Implementation of that
+ resolves variable name against special folders (as defined by
+ enumeration).
+
+ Aleksandar Seovic
+
+
+
+ Before requesting a variable resolution, a client should
+ ask, whether the source can resolve a particular variable name.
+
+ the name of the variable to resolve
+ true if the variable can be resolved, false otherwise
+
+
+
+ Resolves specified special folder to its full path.
+
+
+ The name of the special folder to resolve. Should be one of the values
+ defined by the enumeration.
+
+
+ The folder path if able to resolve, null otherwise.
+
+
+
+
+
+ implementation that allows for convenient registration of custom
+ type aliases.
+
+
+ Type aliases can be used instead of fully qualified type names anywhere
+ a type name is expected in a Spring.NET configuration file.
+
+ Because the
+ class implements the
+
+ interface, instances of this class that have been exposed in the
+ scope of an
+ will
+ automatically be picked up by the application context and made
+ available to the IoC container whenever resolution of type aliases is required.
+
+
+ Mark Pollack
+
+
+
+
+
+ Registers any type aliases. The supplied
+ is not used since type aliases
+ are registered with a global
+
+
+ The object factory.
+
+
+ In case of errors.
+
+
+
+
+ The type aliases to register.
+
+
+
+ The has the
+ contains the alias name as the key and type as the value.
+ The key name can either be a string or an object, in which case
+ ToString() will be used to obtain the string name.
+ the value can be the fully qualified name of the type as a string or
+ an actual of the class that
+ being aliased.
+
+
+
+
+
+ Holder for a typed value.
+
+
+
+ Can be added to object definitions to explicitly specify
+ a target type for a value,
+ for example for collection
+ elements.
+
+
+ This holder just stores the value and the target
+ . The actual conversion will be performed by
+ the surrounding object factory.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+ Bruno Baia (.NET)
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The value.
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The value that is to be converted.
+
+
+ The to convert to.
+
+
+ If the supplied is
+ .
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The value that is to be converted.
+
+
+ The unresolved type to convert to.
+
+
+ If the supplied is a
+ or an empty string.
+
+
+
+
+ Determine the type to convert to, resolving it from a specified type name if necessary.
+
+ The resolved type to convert to.
+
+
+
+ The value that is to be converted.
+
+
+
+ Obviously if the
+
+ is the , no conversion
+ will actually be performed.
+
+
+
+
+
+ The to convert to.
+
+
+ If the setter is supplied with a value.
+
+
+
+
+ The unresolved type to convert to.
+
+
+ If the setter is supplied with a value or an empty string.
+
+
+
+
+ Gets a value indicating whether this instance has target type.
+
+
+ true if this instance has target type; otherwise, false.
+
+
+
+
+ Provides methods for type-safe accessing s.
+
+ Erich Eichinger
+
+
+
+ Initialize a new instance of an
+
+ The underlying to read values from.
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The expected format of the variable's value
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The expected format of the variable's value
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ A that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns an of 's type that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ An of 's type that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Returns an of 's type that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns null.
+
+ If false, suppresses exceptions if the result
+ of cannot be parsed
+ and returns instead.
+
+ An of 's type that contains the value of the specified variable
+ or , if cannot be parsed.
+
+
+
+
+ Returns a that contains the value of the specified variable.
+
+ The name of the variable to be read.
+ The value to be returned if returns or .
+
+ A that contains the value of the specified variable
+ or , if returns null.
+
+
+
+
+ Resolves placeholder values in one or more object definitions
+
+
+ The placeholder syntax follows the NAnt style: ${...}.
+ Placeholders values are resolved against a list of
+ s. In case of multiple definitions
+ for the same property placeholder name, the first one in the
+ list is used.
+ Variable substitution is performed on simple property values,
+ lists, dictionaries, sets, constructor
+ values, object type name, and object names in
+ runtime object references (
+ ).
+ Furthermore, placeholder values can also cross-reference other
+ placeholders, in the manner of the following example where the
+ rootPath property is cross-referenced by the subPath
+ property.
+
+
+
+
+
+
+
+
+
+ If a configurer cannot resolve a placeholder, and the value of the
+
+ property is currently set to , an
+
+ will be thrown.
+
+ Mark Pollack
+
+
+
+ The default placeholder prefix.
+
+
+
+
+ The default placeholder suffix.
+
+
+
+
+ Create a new instance without any variable sources
+
+
+
+
+ Create a new instance and initialize with the given variable source
+
+
+
+
+
+ Create a new instance and initialize with the given list of variable sources
+
+
+
+
+ Modify the application context's internal object factory after its
+ standard initialization.
+
+ The object factory used by the application context.
+
+
+ All object definitions will have been loaded, but no objects will have
+ been instantiated yet. This allows for overriding or adding properties
+ even to eager-initializing objects.
+
+
+
+ In case of errors.
+
+
+
+
+ Apply the property replacement using the specified s for all
+ object in the supplied
+ .
+
+
+ The
+ used by the application context.
+
+
+ If an error occured.
+
+
+
+
+ Sets the list of s that will be used to resolve placeholder names.
+
+ A list of s.
+
+
+
+ Sets that will be used to resolve placeholder names.
+
+ A instance.
+
+
+
+ The placeholder prefix (the default is ${).
+
+
+
+
+
+ The placeholder suffix (the default is })
+
+
+
+
+
+ Indicates whether unresolved placeholders should be ignored.
+
+
+
+
+ Return the order value of this object, where a higher value means greater in
+ terms of sorting.
+
+ The order value.
+
+
+
+
+ Initializes a new instance of the Location class.
+
+
+
+
+
+
+ Initializes a new instance of the Location class.
+
+
+
+
+
+ Thrown when an
+ encounters an internal error, and its definitions are invalid.
+
+
+
+ An example of a situation when this exception would be thrown is
+ in the case of an XML document containing object definitions being
+ malformed.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the ObjectDefinitionStoreException class.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionStoreException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionStoreException class.
+
+
+ The description of the resource that the object definition came from
+
+
+ The name of the object that triggered the exception.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The description of the resource that the object definition came from
+
+ The detail message (used as exception message as-is)
+ The root cause. (may be null
+
+
+
+ Creates a new instance of the ObjectDefinitionStoreException class.
+
+
+ The resource location (e.g. an XML object definition file) associated
+ with the offending object definition.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionStoreException class.
+
+
+ The resource location (e.g. an XML object definition file) associated
+ with the offending object definition.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionStoreException class.
+
+
+ The description of the resource that the object definition came from
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionStoreException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionStoreException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ The description of the resource associated with the object
+
+
+
+
+ The name of the object that trigger the exception.
+
+
+
+
+ The name of the object that triggered the exception (if any).
+
+
+
+
+ The description of the resource associated with the object (if any).
+
+
+
+
+ Initializes a new instance of the ObjectDefinitionParsingException class.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionParsingException class.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionParsingException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionParsingException class.
+
+
+ The description of the resource that the object definition came from
+
+
+ The name of the object that triggered the exception.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The description of the resource that the object definition came from
+
+ The detail message (used as exception message as-is)
+ The root cause. (may be null
+
+
+
+ Creates a new instance of the ObjectDefinitionParsingException class.
+
+
+ The resource location (e.g. an XML object definition file) associated
+ with the offending object definition.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionParsingException class.
+
+
+ The resource location (e.g. an XML object definition file) associated
+ with the offending object definition.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionParsingException class.
+
+
+ The description of the resource that the object definition came from
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionParsingException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message.
+ The location.
+
+
+
+ Initializes a new instance of the Problem class.
+
+
+
+
+
+
+
+ Context that gets passed along an object definition reading process,
+ encapsulating all relevant configuraiton as well as state.
+
+ Rob Harrop
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ The resource.
+
+
+
+ Gets the resource.
+
+ The resource.
+
+
+
+ Abstract superclass
+ that implements default object creation.
+
+
+
+ Provides object creation, initialization and wiring, supporting
+ autowiring and constructor resolution. Handles runtime object
+ references, managed collections, and object destruction.
+
+
+ The main template method to be implemented by subclasses is
+ ,
+ used for autowiring by type. Note that this class does not implement object
+ definition registry capabilities
+ (
+ does).
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Abstract superclass for
+ implementations.
+
+
+
+ This class provides singleton / prototype determination, singleton caching,
+ object definition aliasing,
+ handling, and object definition merging for child object definitions.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Marker object to be temporarily registered in the singleton cache,
+ while instantiating an object (in order to be able to detect circular references).
+
+
+
+
+ Used as value in hashtable that keeps track of singleton names currently in the
+ process of being created. Would not be necessary if we created a case insensitive implementation of
+ ISet.
+
+
+
+
+ The instance for this class.
+
+
+
+
+ Cache of singleton objects created by s: FactoryObject name -> product
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This constructor implicitly creates an
+
+ that treats the names of objects in this factory in a case-sensitive fashion.
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+ if the names of objects in this factory are to be treated in a
+ case-sensitive fashion.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+ if the names of objects in this factory are to be treated in a
+ case-sensitive fashion.
+
+
+ Any parent object factory; may be .
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+ The name of the object to return.
+
+ The the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a factory method. If there is no factory method and the
+ supplied array is not , then
+ match the argument values by type and call the object's constructor.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the object is not of the required type.
+
+
+ If the supplied is .
+
+
+
+
+
+ Apply the property values of the object definition with the supplied
+ to the supplied .
+
+
+
+ The object definition can either define a fully self-contained object,
+ reusing it's property values, or just property values meant to be used
+ for existing object instances.
+
+
+
+ The existing object that the property values for the named object will
+ be applied to.
+
+
+ The name of the object definition associated with the property values that are
+ to be applied.
+
+
+ In case of errors.
+
+
+
+
+ Apply the property values of the object definition with the supplied
+ to the supplied .
+
+
+
+ The object definition can either define a fully self-contained object,
+ reusing it's property values, or just property values meant to be used
+ for existing object instances.
+
+
+
+ The existing object that the property values for the named object will
+ be applied to.
+
+
+ The name of the object definition associated with the property values that are
+ to be applied.
+
+
+ An object definition that should be used to apply property values.
+
+
+ In case of errors.
+
+
+
+
+ Create an object instance for the given object definition.
+
+ The name of the object.
+
+ The object definition for the object that is to be instantiated.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a static factory method. It is invalid to use a non- arguments value
+ in any other case.
+
+
+ Whether eager caching of singletons is allowed... typically true for
+ singlton objects, but never true for inner object definitions.
+
+
+ Create instance only - suppress injecting dependencies yet.
+
+
+ A new instance of the object.
+
+
+ In case of errors.
+
+
+
+ The object definition will already have been merged with the parent
+ definition in case of a child definition.
+
+
+ All the other methods in this class invoke this method, although objects
+ may be cached after being instantiated by this method. All object
+ instantiation within this class is performed by this method.
+
+
+
+
+
+ Destroy the target object.
+
+
+
+ Must destroy objects that depend on the given object before the object itself,
+ nor throw an exception.
+
+
+
+ The name of the object.
+
+
+ The target object instance to destroyed.
+
+
+
+
+ Does this object factory contain an object definition with the
+ supplied ?
+
+
+
+ Does not consider any hierarchy this factory may participate in.
+ Invoked by
+
+ when no cached singleton instance is found.
+
+
+
+ The name of the object to look for.
+
+
+ if this object factory contains an object
+ definition with the supplied .
+
+
+
+
+ Adds the supplied (object) to this factory's
+ singleton cache.
+
+
+
+ To be called for eager registration of singletons, e.g. to be able to
+ resolve circular references.
+
+
+ If a singleton has already been registered under the same name as
+ the supplied , then the old singleton will
+ be replaced.
+
+
+ The name of the object.
+ The singleton object.
+
+ If the argument is
+ or consists wholly of whitespace characters; or if the
+ is .
+
+
+
+
+ Return the object name, stripping out the factory dereference prefix if
+ necessary, and resolving aliases to canonical names.
+
+
+ The transformed name of the object.
+
+
+
+
+ Ensures, that the given name is prefixed with
+ if it incidentially already starts with this prefix. This avoids troubles when dereferencing
+ the object name during
+
+
+
+
+ Determines whether the specified name is defined as an alias as opposed
+ to the name of an actual object definition.
+
+ The object name to check.
+
+ true if the specified name is alias; otherwise, false.
+
+
+
+
+ Return a ,
+ even by traversing parent if the parameter is a child definition.
+
+
+ The name of the object.
+
+
+ Are ancestors to be included in the merge?
+
+
+
+ Will ask the parent object factory if not found in this instance.
+
+
+
+ A merged
+ with overridden properties.
+
+
+
+
+ Return a ,
+ even by traversing parent if the parameter is a child definition.
+
+
+ A merged
+ with overridden properties.
+
+
+
+
+ Creates the root object definition.
+
+ The template definition to base root definition on.
+ Root object definition.
+
+
+
+ Register a new object definition with this registry.
+
+
+ The name of the object instance to register.
+
+
+ The definition of the object instance to register.
+
+
+ If the object definition is invalid.
+
+
+
+
+
+ Return the registered
+ for the
+ given object, allowing access to its property values and constructor
+ argument values.
+
+ The name of the object.
+
+ The registered
+ .
+
+
+ If there is no object with the given name.
+
+
+ In the case of errors.
+
+
+
+
+ Return the registered
+ for the
+ given object, allowing access to its property values and constructor
+ argument values.
+
+ The name of the object.
+ Whether to search parent object factories.
+
+ The registered
+ .
+
+
+ If there is no object with the given name.
+
+
+ In the case of errors.
+
+
+
+
+ Gets the type for the given FactoryObject.
+
+ The factory object instance to check.
+ the FactoryObject's object type
+
+
+
+ Gets the object type for the given FactoryObject definition, as far as possible.
+ Only called if there is no singleton instance registered for the target object already.
+
+
+ The default implementation creates the FactoryObject via GetObject
+ to call its ObjectType property. Subclasses are encouraged to optimize
+ this, typically by just instantiating the FactoryObject but not populating it yet,
+ trying whether its ObjectType property already returns a type.
+ If no type found, a full FactoryObject creation as performed by this implementation
+ should be used as fallback.
+
+ Name of the object.
+ The merged object definition for the object.
+ The type for the object if determinable, or null otherwise
+
+
+
+ Predict the eventual object type (of the processed object instance) for the
+ specified object.
+
+
+ Does not need to handle FactoryObjects specifically, since it is only
+ supposed to operate on the raw object type.
+ This implementation is simplistic in that it is not able to
+ handle factory methods and InstantiationAwareBeanPostProcessors.
+ It only predicts the object type correctly for a standard object.
+ To be overridden in subclasses, applying more sophisticated type detection.
+
+ Name of the object.
+ The merged object definition to determine the type for. May be null
+ The type of the object, or null if not predictable
+
+
+
+ Get the object for the given object instance, either the object
+ instance itself or its created object in case of an
+ .
+
+
+ The name that may include the factory dereference prefix.
+
+ The object instance.
+
+ The singleton instance of the object.
+
+
+
+
+ Get the object for the given object instance, either the object
+ instance itself or its created object in case of an
+ .
+
+ The object instance.
+
+ The name that may include the factory dereference prefix (=the requested name).
+
+
+ The canonical object name
+
+ the merged object definition
+
+ The singleton instance of the object.
+
+
+
+
+ Obtain an object to expose from the given IFactoryObject.
+
+ The IFactoryObject instance.
+ Name of the object.
+ The merged object definition.
+ The object obtained from the IFactoryObject
+ If IFactoryObject object creation failed.
+
+
+
+ Post-process the given object that has been obtained from the FactoryObject.
+ The resulting object will be exposed for object references.
+
+ The default implementation simply returns the given object
+ as-is. Subclasses may override this, for example, to apply
+ post-processors.
+ The instance obtained from the IFactoryObject.
+ Name of the object.
+ The object instance to expose
+ if any post-processing failed.
+
+
+
+ Convenience method to pull an
+ from this factory.
+
+
+ The name of the factory object to be retrieved. If this name is not a valid
+ name, it will be converted
+ into one.
+
+
+ The associated with the
+ supplied .
+
+
+
+
+ Is the supplied a factory object dereference?
+
+
+
+
+ Determines whether the type of the given object definition matches the
+ specified target type.
+
+ Allows for lazy load of the actual object type, provided that the
+ type match can be determined otherwise.
+ The default implementation simply delegates to the standard
+ ResolveObjectType method. Subclasses may override this to use
+ a differnt strategy.
+
+ Name of the object (for error handling purposes).
+ The merged object definition to determine the type for.
+ Type to match against (never null).
+
+ true if object definition matches tye specified target type; otherwise, false.
+
+ if we failed to load the type."
+
+
+
+ Resolves the type of the object for the specified object definition resolving
+ an object type name to a Type (if necessary) and storing the resolved Type
+ in the object definition for further use.
+
+ The merged object definition to dertermine the type for.
+ Name of the object (for error handling purposes).
+
+
+
+
+ Is the object (definition) with the supplied an
+ ?
+
+ The name of the object to be checked.
+
+ the object (definition) with the supplied
+ an ?
+
+
+
+
+ Remove the object identified by the supplied
+ from this factory's singleton cache.
+
+
+ The name of the object that is to be removed from the singleton
+ cache.
+
+
+ If the argument is or
+ consists wholly of whitespace characters.
+
+
+
+
+ Return the names of objects in the singleton cache that match the given
+ object type (including subclasses).
+
+
+ The class or interface to match, or for all object names.
+
+
+
+ Will not consider s
+ as the type of their created objects is not known before instantiation.
+
+
+ Does not consider any hierarchy this factory may participate in.
+
+
+
+ The names of objects in the singleton cache that match the given
+ object type (including subclasses), or an empty array if none.
+
+
+
+
+ Determines whether the object with the given name matches the specified type.
+
+ More specifically, check whether a GetObject call for the given name
+ would return an object that is assignable to the specified target type.
+ Translates aliases back to the corresponding canonical bean name.
+ Will ask the parent factory if the bean cannot be found in this factory instance.
+
+ The name of the object to query.
+ Type of the target to match against.
+
+ true if the object type matches; otherwise, false
+ if it doesn't match or cannot be determined yet.
+
+ Ff there is no object with the given name
+
+
+
+
+ Determines the of the object with the
+ supplied .
+
+
+
+ More specifically, checks the of object that
+ would return.
+ For an , returns the
+ of object that the
+ creates.
+
+
+ Please note that (prototype) objects created via a factory method or
+ objects are handled
+ slightly differently, in that we don't want to needlessly create
+ instances of such objects just to determine the
+ of object that they create.
+
+
+ The name of the object to query.
+
+ The of the object or
+ if not determinable.
+
+
+
+
+ Determines the of the object defined
+ by the supplied object .
+
+
+
+ This, the default, implementation returns
+ to indicate that the type cannot be determined. Subclasses are
+ encouraged to try to determine the actual return
+ here, matching their strategy of resolving
+ factory methods in the
+ Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject
+ implementation.
+
+
+
+ The name associated with the supplied object .
+
+
+ The
+ that the is to be determined for.
+
+
+ The of the object defined by the supplied
+ object ; or if the
+ cannot be determined.
+
+
+
+
+ Returns the names of the objects in the singleton cache.
+
+
+
+ Does not consider any hierarchy this factory may participate in.
+
+
+ The names of the objects in the singleton cache.
+
+
+
+ Returns the number of objects in the singleton cache.
+
+
+
+ Does not consider any hierarchy this factory may participate in.
+
+
+ The number of objects in the singleton cache.
+
+
+
+ Destroys the named singleton object.
+
+
+
+ Delegates to
+
+ if a corresponding singleton instance is found.
+
+
+
+ The name of the singleton object that is to be destroyed.
+
+
+
+
+
+ Check the supplied merged object definition for any possible
+ validation errors.
+
+
+ The object definition to be checked for validation errors.
+
+
+ The name of the object associated with the supplied object definition.
+
+
+ The the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a factory method. If there is no factory method and the
+ supplied array is not , then
+ match the argument values by type and call the object's constructor.
+
+
+ In the case of object validation errors.
+
+
+
+
+ Parent object factory, for object inheritance support
+
+
+
+
+ Dependency types to ignore on dependency check and autowire, as Set of
+ Type objects: for example, string. Default is none.
+
+
+
+
+ ObjectPostProcessors to apply in CreateObject
+
+
+
+
+ Indicates whether any IInstantiationAwareBeanPostProcessors have been registered
+
+
+
+
+ Indicates whether any IDestructionAwareBeanPostProcessors have been registered
+
+
+
+
+ Set of registered singletons, containing the bean names in registration order
+
+
+
+
+ Set that holds all inner objects created by this factory that implement the IDisposable
+ interface, to be destroyed on call to Dispose.
+
+
+
+
+ Determines whether the local object factory contains a bean of the given name,
+ ignoring object defined in ancestor contexts.
+ This is an alternative to ContainsObject, ignoring an object
+ of the given name from an ancestor object factory.
+
+ The name of the object to query.
+
+ true if objects with the specified name is defined in the local factory; otherwise, false.
+
+
+
+
+ Is this object a singleton?
+
+
+
+
+
+ Determines whether the specified object name is prototype. That is, will GetObject
+ always return independent instances?
+
+ The name of the object to query
+
+ true if the specified object name will always deliver independent instances; otherwise, false.
+
+ This method returning false does not clearly indicate a singleton object.
+ It indicated non-independent instances, which may correspond to a scoped object as
+ well. use the IsSingleton property to explicitly check for a shared
+ singleton instance.
+ Translates aliases back to the corresponding canonical object name. Will ask the
+ parent factory if the object can not be found in this factory instance.
+
+
+ if there is no object with the given name.
+
+
+
+ Does this object factory or one of its parent factories contain an object with the given name?
+
+
+ This method scans the object factory hierarchy starting with the current factory instance upwards.
+ Use if you want to explicitely check just this object factory instance.
+
+ .
+
+
+
+ Return the aliases for the given object name, if defined.
+
+ .
+
+
+
+ Return an unconfigured(!) instance (possibly shared or independent) of the given object name.
+
+
+
+ This method will only instantiate the requested object. It does NOT inject any dependencies!
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+ .
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+
+
+ This method allows an object factory to be used as a replacement for the
+ Singleton or Prototype design pattern.
+
+
+ Note that callers should retain references to returned objects. There is no
+ guarantee that this method will be implemented to be efficient. For example,
+ it may be synchronized, or may need to run an RDBMS query.
+
+
+ Will ask the parent factory if the object cannot be found in this factory
+ instance.
+
+
+ The name of the object to return.
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a static factory method. If there is no factory method and the
+ arguments are not null, then match the argument values by type and
+ call the object's constructor.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the supplied is .
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name,
+ optionally injecting dependencies.
+
+ The name of the object to return.
+
+ The the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a factory method. If there is no factory method and the
+ supplied array is not , then
+ match the argument values by type and call the object's constructor.
+
+ whether to inject dependencies or not.
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the object is not of the required type.
+
+
+ If the supplied is .
+
+
+
+
+
+
+ Checks, if the passed instance is of the required type.
+
+ the name of the object
+ the actual instance
+ the type contract the given instance must adhere.
+ the object instance passed in via (for more fluent usage)
+
+ if is null or not assignable to .
+
+
+
+
+ Creates a singleton instance for the specified object name and definition.
+
+
+ The object name (will be used as the key in the singleton cache key).
+
+ The object definition.
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a static factory method. If there is no factory method and the
+ arguments are not null, then match the argument values by type and
+ call the object's constructor.
+
+ The created object instance.
+
+
+
+ Injects dependencies into the supplied instance
+ using the named object definition.
+
+
+
+
+
+ Injects dependencies into the supplied instance
+ using the supplied .
+
+
+
+
+
+ Destroy all cached singletons in this factory.
+
+
+
+
+ Ignore the given dependency type for autowiring
+
+ .
+
+
+
+ Determines whether the specified object name is currently in creation..
+
+ Name of the object.
+
+ true if the specified object name is currently in creation; otherwise, false.
+
+
+
+
+ Add a new
+ that will get applied to objects created by this factory.
+
+
+ The
+ to register.
+
+ .
+
+
+
+ Given an object name, create an alias.
+
+ .
+
+
+
+ Register the given custom
+ for all properties of the given .
+
+ .
+
+
+
+ Register the given existing object as singleton in the object factory,
+ under the given object name.
+
+ .
+
+
+
+ Does this object factory contains a singleton instance with the
+ supplied ?
+
+
+
+
+
+ Tries to find a cached object for the specified name.
+
+ Teh object name to look for.
+ The cached object if found, otherwise.
+
+
+
+ Determines whether the given object name is already in use within this factory,
+ i.e. whether there is a local object or alias registered under this name or
+ an inner object created with this name.
+
+ Name of the object to check.
+
+ true if is object name in use; otherwise, false.
+
+
+
+
+ Gets the singleton lock for a given object name.
+
+ Name of the object.
+ lock object
+
+
+
+ Returns, whether this factory treats object names case sensitive or not.
+
+
+
+
+ Gets the of
+ s
+ that will be applied to objects created by this factory.
+
+
+
+
+ Gets the set of classes that will be ignored for autowiring.
+
+
+
+ The elements of this are
+ s.
+
+
+
+
+
+ Returns, whether this object factory instance contains objects.
+
+
+
+
+ Returns, whether this object factory instance contains objects.
+
+
+
+
+ Gets the temporary object that is placed
+ into the singleton cache during object resolution.
+
+
+
+
+ Set that holds all inner objects created by this factory that implement the IDisposable
+ interface, to be destroyed on call to Dispose.
+
+
+
+
+ The parent object factory, or if there is none.
+
+
+ The parent object factory, or if there is none.
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+ .
+
+
+
+ Returns the current number of registered
+ s.
+
+
+ The current number of registered
+ s.
+
+ .
+
+
+
+ Gets the names of singleton objects registered in this registry.
+
+ The list of names as String array (never null).
+
+
+ Only checks already instantiated singletons; does not return names
+ for singleton bean definitions which have not been instantiated yet.
+
+
+ The main purpose of this method is to check manually registered singletons
+ . Can also be used to check which
+ singletons defined by an object definition have already been created.
+
+
+
+
+
+
+
+
+ Gets the number of singleton beans registered in this registry.
+
+ The number of singleton objects.
+
+
+ Only checks already instantiated singletons; does not count
+ singleton object definitions which have not been instantiated yet.
+
+
+ The main purpose of this method is to check manually registered singletons
+ . Can also be used to count the number of
+ singletons defined by an object definition that have already been created.
+
+
+
+
+
+
+
+
+ Makes a distinction between sort order and object identity.
+ This is important when used with , since most
+ implementations assume Order == Identity
+
+
+
+
+ Handle the case when both objects have equal sort order priority. By default returns 0,
+ but may be overriden for handling special cases.
+
+ The first object to compare.
+ The second object to compare.
+
+ -1 if first object is less then second, 1 if it is greater, or 0 if they are equal.
+
+
+
+
+ The used during the invocation and
+ searching for of methods.
+
+
+
+
+ The instance for this class.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+ Flag specifying whether to make this object factory case sensitive or not.
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+ Flag specifying whether to make this object factory case sensitive or not.
+ The parent object factory, or if none.
+
+
+
+ Predict the eventual object type (of the processed object instance) for the
+ specified object.
+
+ Name of the object.
+ The merged object definition to determine the type for. May be null
+
+ The type of the object, or null if not predictable
+
+
+
+
+ Determines the of the object defined
+ by the supplied object .
+
+
+ The name associated with the supplied object .
+
+
+ The
+ that the is to be determined for.
+
+
+ The of the object defined by the supplied
+ object ; or if the
+ cannot be determined.
+
+
+
+
+ Apply the property values of the object definition with the supplied
+ to the supplied .
+
+
+ The existing object that the property values for the named object will
+ be applied to.
+
+
+ The name of the object definition associated with the property values that are
+ to be applied.
+
+
+
+
+ Apply the property values of the object definition with the supplied
+ to the supplied .
+
+
+ The existing object that the property values for the named object will
+ be applied to.
+
+
+ The name of the object definition associated with the property values that are
+ to be applied.
+
+
+ An object definition that should be used to apply property values.
+
+
+
+
+ Apply any
+ s.
+
+
+
+ The returned instance may be a wrapper around the original.
+
+
+
+ The of the object that is to be
+ instantiated.
+
+
+ The name of the object that is to be instantiated.
+
+
+ An instance to use in place of the original instance.
+
+
+ In case of errors.
+
+
+
+
+ Apply the given property values, resolving any runtime references
+ to other objects in this object factory.
+
+
+ The object name passed for better exception information.
+
+
+ The definition of the named object.
+
+
+ The wrapping the target object.
+
+
+ The new property values.
+
+
+
+ Must use deep copy, so that we don't permanently modify this property.
+
+
+
+
+
+ Create the value resolver strategy to use for resolving raw property values
+
+
+
+
+ Return an array of object-type property names that are unsatisfied.
+
+
+
+ These are probably unsatisfied references to other objects in the
+ factory. Does not include simple properties like primitives or
+ s.
+
+
+
+ An array of object-type property names that are unsatisfied.
+
+
+ The definition of the named object.
+
+
+ The wrapping the target object.
+
+
+
+
+ Destroy all cached singletons in this factory.
+
+
+
+ To be called on shutdown of a factory.
+
+
+
+
+
+ Populate the object instance in the given
+ with the property values from the
+ object definition.
+
+
+ The name of the object.
+
+
+ The definition of the named object.
+
+
+ The wrapping the target object.
+
+
+
+
+ Wires up any exposed events in the object instance in the given
+ with any event handler
+ values from the .
+
+
+ The name of the object.
+
+
+ The definition of the named object.
+
+
+ The wrapping the target object.
+
+
+
+
+ Fills in any missing property values with references to
+ other objects in this factory if autowire is set to
+ .
+
+
+ The object name to be autowired by .
+
+
+ The definition of the named object to update through autowiring.
+
+
+ The wrapping the target object (and
+ from which we can rip out information concerning the object).
+
+
+ The property values to register wired objects with.
+
+
+
+
+ Defines "autowire by type" (object properties by type) behavior.
+
+
+
+ This is like PicoContainer default, in which there must be exactly one object
+ of the property type in the object factory. This makes object factories simple
+ to configure for small namespaces, but doesn't work as well as standard Spring
+ behavior for bigger applications.
+
+
+
+ The object name to be autowired by .
+
+
+ The definition of the named object to update through autowiring.
+
+
+ The wrapping the target object (and
+ from which we can rip out information concerning the object).
+
+
+ The property values to register wired objects with.
+
+
+
+
+ Ignore the given dependency type for autowiring
+
+
+ This will typically be used by application contexts to register
+ dependencies that are resolved in other ways, like IOjbectFactory through
+ IObjectFactoryAware or IApplicationContext through IApplicationContextAware.
+ By default, IObjectFactoryAware and IObjectName interfaces are ignored.
+ For further types to ignore, invoke this method for each type.
+
+ .
+
+
+
+ Create an object instance for the given object definition.
+
+ The name of the object.
+
+ The object definition for the object that is to be instantiated.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a static factory method. It is invalid to use a non- arguments value
+ in any other case.
+
+
+ Whether eager caching of singletons is allowed... typically true for
+ singlton objects, but never true for inner object definitions.
+
+
+ Suppress injecting dependencies yet.
+
+
+ A new instance of the object.
+
+
+ In case of errors.
+
+
+
+ The object definition will already have been merged with the parent
+ definition in case of a child definition.
+
+
+ All the other methods in this class invoke this method, although objects
+ may be cached after being instantiated by this method. All object
+ instantiation within this class is performed by this method.
+
+
+
+
+
+ Add the created, but yet unpopulated singleton to the singleton cache
+ to be able to resolve circular references
+
+ the name of the object to add to the cache.
+ the definition used to create and populated the object.
+ the raw object instance.
+
+ Derived classes may override this method to select the right cache based on the object definition.
+
+
+
+
+ Remove the specified singleton from the singleton cache that has
+ been added before by a call to
+
+ the name of the object to remove from the cache.
+ the definition used to create and populated the object.
+
+ Derived classes may override this method to select the right cache based on the object definition.
+
+
+
+
+ Creates an instance from the passed in
+ using constructor
+
+ The name of the object to create - used for error messages.
+ The describing the object to be created.
+ optional arguments to pass to the constructor
+ An wrapping the already instantiated object
+
+
+
+ Instantiates the given object using its default constructor
+
+ Name of the object.
+ The definition.
+ IObjectWrapper for the new instance
+
+
+
+ Determines candidate constructors to use for the given object, checking all registered
+
+
+ Raw type of the object.
+ Name of the object.
+ the candidate constructors, or null if none specified
+ In case of errors
+
+
+
+
+ Instantiate an object instance using a named factory method.
+
+
+
+ The method may be static, if the
+ parameter specifies a class, rather than a
+ instance, or an
+ instance variable on a factory object itself configured using Dependency
+ Injection.
+
+
+ Implementation requires iterating over the static or instance methods
+ with the name specified in the supplied
+ (the method may be overloaded) and trying to match with the parameters.
+ We don't have the types attached to constructor args, so trial and error
+ is the only way to go here.
+
+
+
+ The name associated with the supplied .
+
+
+ The definition describing the instance that is to be instantiated.
+
+
+ Any arguments to the factory method that is to be invoked.
+
+
+ The result of the factory method invocation (the instance).
+
+
+
+
+ "autowire constructor" (with constructor arguments by type) behaviour.
+
+ The name of the object to autowire by type.
+ The object definition to update through autowiring.
+ The chosen candidate constructors.
+ The argument values passed in programmatically via the GetObject method,
+ or null if none (-> use constructor argument values from object definition)
+
+ An for the new instance.
+
+
+
+ Also applied if explicit constructor argument values are specified,
+ matching all remaining arguments with objects from the object factory.
+
+
+ This corresponds to constructor injection: in this mode, a Spring.NET
+ object factory is able to host components that expect constructor-based
+ dependency resolution.
+
+
+
+
+
+ Perform a dependency check that all properties exposed have been set, if desired.
+
+
+
+ Dependency checks can be objects (collaborating objects), simple (primitives
+ and ), or all (both).
+
+
+
+ The name of the object.
+
+
+ The definition of the named object.
+
+
+ The wrapping the target object.
+
+
+ The property values to be checked.
+
+
+ If all of the checked dependencies were not satisfied.
+
+
+
+
+ Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding
+ ignored dependency types.
+
+ The object wrapper the object was created with.
+ The filtered PropertyInfos
+
+
+
+ Determine whether the given bean property is excluded from dependency checks.
+ This implementation excludes properties whose type matches an ignored dependency type
+ or which are defined by an ignored dependency interface.
+
+
+
+ the of the object property
+ whether the object property is excluded
+
+
+
+ Give an object a chance to react now all its properties are set,
+ and a chance to know about its owning object factory (this object).
+
+
+
+ This means checking whether the object implements
+ and / or
+ , and invoking the
+ necessary callback(s) if it does.
+
+
+ Custom init methods are resolved in a case-insensitive manner.
+
+
+
+ The new object instance we may need to initialise.
+
+
+ The name the object has in the factory. Used for logging output.
+
+
+ The definition of the target object instance.
+
+
+
+
+ Invoke the specified custom destroy method on the given object.
+
+
+
+ This implementation invokes a no-arg method if found, else checking
+ for a method with a single boolean argument (passing in "true",
+ assuming a "force" parameter), else logging an error.
+
+
+ Can be overridden in subclasses for custom resolution of destroy
+ methods with arguments.
+
+
+ Custom destroy methods are resolved in a case-insensitive manner.
+
+
+
+
+
+ Destroy the target object.
+
+
+
+ Must destroy objects that depend on the given object before the object itself.
+ Should not throw any exceptions.
+
+
+
+ The name of the object.
+
+
+ The target object instance to destroyed.
+
+
+
+
+ Destroys all of the objects registered as dependant on the
+ object (definition) identified by the supplied .
+
+
+ The name of the root object (definition) that is itself being destroyed.
+
+
+
+
+ Resolve a reference to another object in the factory.
+
+
+ The name of the object that is having the value of one of its properties resolved.
+
+
+ The definition of the named object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The runtime reference containing the value of the property.
+
+ A reference to another object in the factory.
+
+
+
+ Find object instances that match the required .
+
+
+
+ Called by autowiring. If a subclass cannot obtain information about object
+ names by , a corresponding exception should be thrown.
+
+
+
+ The of the objects to look up.
+
+
+ An of object names and object
+ instances that match the required , or
+ if none are found.
+
+
+ In case of errors.
+
+
+
+
+ Return the names of the objects that depend on the given object.
+ Called by DestroyObject, to be able to destroy depending objects first.
+
+
+ The name of the object to find depending objects for.
+
+
+ The array of names of depending objects, or the empty string array if none.
+
+
+ In case of errors.
+
+
+
+
+ Injects dependencies into the supplied instance
+ using the named object definition.
+
+
+ The object instance that is to be so configured.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+
+
+
+ Injects dependencies into the supplied instance
+ using the supplied .
+
+
+ The object instance that is to be so configured.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+ An object definition that should be used to configure object.
+
+
+
+
+
+ Configures object instance by injecting dependencies, satisfying Spring lifecycle
+ interfaces and applying object post-processors.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+ An object definition that should be used to configure object.
+
+
+ A wrapped object instance that is to be so configured.
+
+
+
+
+
+ Applies the PostProcessAfterInitialization callback of all
+ registered IObjectPostProcessors, giving them a chance to post-process
+ the object obtained from IFactoryObjects (for example, to auto-proxy them)
+
+ The instance obtained from the IFactoryObject.
+ Name of the object.
+ The object instance to expose
+ if any post-processing failed.
+
+
+
+ Create a new object instance of the given class with the specified
+ autowire strategy.
+
+
+ The of the object to instantiate.
+
+
+ The desired autowiring mode.
+
+
+ Whether to perform a dependency check for objects (not applicable to
+ autowiring a constructor, thus ignored there).
+
+ The new object instance.
+
+ If the wiring fails.
+
+
+
+
+
+ Autowire the object properties of the given object instance by name or
+ .
+
+
+ The existing object instance.
+
+
+ The desired autowiring mode.
+
+
+ Whether to perform a dependency check for the object.
+
+
+ If the wiring fails.
+
+
+ If the supplied is not one of the
+ or
+
+ values.
+
+
+
+
+
+ Apply s
+ to the given existing object instance, invoking their
+
+ methods.
+
+
+ The existing object instance.
+
+
+ The name of the object.
+
+
+ The object instance to use, either the original or a wrapped one.
+
+
+ If any post-processing failed.
+
+
+
+
+
+ Apply s
+ to the given existing object instance, invoking their
+
+ methods.
+
+
+ The existing object instance.
+
+
+ The name of the object.
+
+
+ The object instance to use, either the original or a wrapped one.
+
+
+ If any post-processing failed.
+
+
+
+
+
+ Resolve the specified dependency against the objects defined in this factory.
+
+ The descriptor for the dependency.
+ Name of the object which declares the present dependency.
+ A list that all names of autowired object (used for
+ resolving the present dependency) are supposed to be added to.
+
+ the resolved object, or null if none found
+
+ if dependency resolution failed
+
+
+
+ Cache of filtered PropertyInfos: object Type -> PropertyInfo array
+
+
+
+
+ Dependency interfaces to ignore on dependency check and autowire, as Set of
+ Class objects. By default, only the IObjectFactoryAware and IObjectNameAware
+ interfaces are ignored.
+
+
+
+
+ The
+ implementation to be used to instantiate managed objects.
+
+
+
+
+ An
+ implementation that provides some convenience support for
+ derived classes.
+
+
+
+ This class is reserved for internal use within the framework; it is
+ not intended to be used by application developers using Spring.NET.
+
+
+ Rick Evans
+
+
+
+ Permits the (re)implementation of an arbitrary method on a Spring.NET
+ IoC container managed object.
+
+
+
+ Encapsulates the notion of the Method-Injection form of Dependency
+ Injection.
+
+
+ Methods that are dependency injected with implementations of this
+ interface may be (but need not be) , in which
+ case the container will create a concrete subclass of the
+ class prior to instantiation.
+
+
+ Do not use this mechanism as a means of AOP. See the reference
+ manual for examples of appropriate usages of this interface.
+
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Reimplement the supplied .
+
+
+ The instance whose is to be
+ (re)implemented.
+
+
+ The method that is to be (re)implemented.
+
+ The target method's arguments.
+
+ The result of the (re)implementation of the method call.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This is an class, and as such has no
+ publicly visible constructors.
+
+
+
+ The object definition that is the target of the method replacement.
+
+
+ The enclosing IoC container with which the above
+ is associated.
+
+
+ If either of the supplied arguments is .
+
+
+
+
+ Is ; derived classes must supply an implementation.
+
+
+ The instance whose is to be
+ (re)implemented.
+
+
+ The method that is to be (re)implemented.
+
+ The target method's arguments.
+ The result of the object lookup.
+
+
+
+ Helper method for subclasses to retrieve the appropriate
+ for the
+ supplied .
+
+
+ The to use to retrieve
+ the appropriate
+ .
+
+
+ The appropriate
+ .
+
+
+
+
+ Helper method for subclasses to lookup an object from an enclosing
+ IoC container.
+
+
+ The name of the object that is to be looked up.
+
+
+ The named object.
+
+
+
+
+ Common base class for object definitions, factoring out common
+ functionality from
+ and
+ .
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Describes a configurable object instance, which has property values,
+ constructor argument values, and further information supplied by concrete
+ implementations.
+
+ Rick Evans
+
+
+
+ Return the property values to be applied to a new instance of the object.
+
+
+
+
+ Return the constructor argument values for this object.
+
+
+
+
+ The method overrides (if any) for this object.
+
+
+ The method overrides (if any) for this object; may be an
+ empty collection but is guaranteed not to be
+ .
+
+
+
+
+ Return the event handlers for any events exposed by this object.
+
+
+
+
+ Get or set the role hint for this object definition
+
+
+
+
+ Return a description of the resource that this object definition
+ came from (for the purpose of showing context in case of errors).
+
+
+
+
+ Is this object definition "abstract", i.e. not meant to be instantiated
+ itself but rather just serving as parent for concrete child object
+ definitions.
+
+
+ if this object definition is "abstract".
+
+
+
+
+ Returns the of the object definition (if any).
+
+
+ A resolved object .
+
+
+ If the of the object definition is not a
+ resolved or .
+
+
+
+
+ Returns the of the
+ of the object definition (if any).
+
+
+
+
+ Return whether this a Singleton, with a single, shared instance
+ returned on all calls.
+
+
+
+ If , an object factory will apply the Prototype
+ design pattern, with each caller requesting an instance getting an
+ independent instance. How this is defined will depend on the
+ object factory implementation. Singletons are the commoner type.
+
+
+
+
+
+ Is this object lazily initialized?
+
+
+ Only applicable to a singleton object.
+
+
+ If , it will get instantiated on startup by object factories
+ that perform eager initialization of singletons.
+
+
+
+
+
+ The autowire mode as specified in the object definition.
+
+
+
+ This determines whether any automagical detection and setting of
+ object references will happen. Default is
+ ,
+ which means there's no autowire.
+
+
+
+
+
+ The dependency check code.
+
+
+
+
+ The object names that this object depends on.
+
+
+
+ The object factory will guarantee that these objects get initialized
+ before.
+
+
+ Note that dependencies are normally expressed through object properties
+ or constructor arguments. This property should just be necessary for
+ other kinds of dependencies like statics (*ugh*) or database
+ preparation on startup.
+
+
+
+
+
+ The name of the initializer method.
+
+
+
+ The default is , in which case there is no initializer method.
+
+
+
+
+
+ Return the name of the destroy method.
+
+
+
+ The default is , in which case there is no destroy method.
+
+
+
+
+
+ The name of the factory method to use (if any).
+
+
+
+ This method will be invoked with constructor arguments, or with no
+ arguments if none are specified. The static method will be invoked on
+ the specified .
+
+
+
+
+
+ The name of the factory object to use (if any).
+
+
+
+
+ Gets or sets a value indicating whether this instance a candidate for getting autowired into some other
+ object.
+
+
+ true if this instance is autowire candidate; otherwise, false.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This is an class, and as such exposes no
+ public constructors.
+
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This is an class, and as such exposes no
+ public constructors.
+
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The object definition used to initialise the member fields of this
+ instance.
+
+
+
+ This is an class, and as such exposes no
+ public constructors.
+
+
+
+
+
+ Resolves the type of the object, resolving it from a specified
+ object type name if necessary.
+
+
+ A resolved instance.
+
+
+ If the type cannot be resolved.
+
+
+
+
+ Validate this object definition.
+
+
+ In the case of a validation failure.
+
+
+
+
+ Validates all
+
+
+
+
+ Validate the supplied .
+
+
+ The
+ to be validated.
+
+
+
+
+ Override settings in this object definition from the supplied
+ object definition.
+
+
+ The object definition used to override the member fields of this instance.
+
+
+
+
+ Returns a that represents the current
+ .
+
+
+ A that represents the current
+ .
+
+
+
+
+ The name of the parent definition of this object definition, if any.
+
+
+
+
+ The property values that are to be applied to the object
+ upon creation.
+
+
+
+ Setting the value of this property to
+ will merely result in a new (and empty)
+
+ collection being assigned to the property value.
+
+
+
+ The property values (if any) for this object; may be an
+ empty collection but is guaranteed not to be
+ .
+
+
+
+
+ Does this definition have any
+ ?
+
+
+ if this definition has at least one
+ .
+
+
+
+
+ The constructor argument values for this object.
+
+
+
+ Setting the value of this property to
+ will merely result in a new (and empty)
+
+ collection being assigned.
+
+
+
+ The constructor argument values (if any) for this object; may be an
+ empty collection but is guaranteed not to be
+ .
+
+
+
+
+ The event handler values for this object.
+
+
+
+ Setting the value of this property to
+ will merely result in a new (and empty)
+
+ collection being assigned.
+
+
+
+ The event handler values (if any) for this object; may be an
+ empty collection but is guaranteed not to be
+ .
+
+
+
+
+ The method overrides (if any) for this object.
+
+
+
+ Setting the value of this property to
+ will merely result in a new (and empty)
+
+ collection being assigned to the property value.
+
+
+
+ The method overrides (if any) for this object; may be an
+ empty collection but is guaranteed not to be
+ .
+
+
+
+
+ The name of the target scope for the object.
+ Defaults to "singleton", ootb alternative is "prototype". Extended object factories
+ might support further scopes.
+
+
+
+
+ Get or set the role hint for this object definition
+
+
+
+
+ Is this definition a singleton, with
+ a single, shared instance returned on all calls to an enclosing
+ container (typically an
+ or
+ ).
+
+
+
+ If , an object factory will apply the
+ prototype design pattern, with each caller requesting an
+ instance getting an independent instance. How this is defined
+ will depend on the object factory implementation. singletons
+ are the commoner type.
+
+
+
+
+
+
+ Gets a value indicating whether this instance is prototype, with an independent instance
+ returned for each call.
+
+
+ true if this instance is prototype; otherwise, false.
+
+
+
+
+ Is this object lazily initialized?
+
+
+ Only applicable to a singleton object.
+
+
+ If , it will get instantiated on startup
+ by object factories that perform eager initialization of
+ singletons.
+
+
+
+
+
+ Is this object definition a "template", i.e. not meant to be instantiated
+ itself but rather just serving as an object definition for configuration
+ templates used by .
+
+
+ if this object definition is a "template".
+
+
+
+
+ Is this object definition "abstract", i.e. not meant to be
+ instantiated itself but rather just serving as a parent for concrete
+ child object definitions.
+
+
+ if this object definition is "abstract".
+
+
+
+
+ The of the object definition (if any).
+
+
+ A resolved object .
+
+
+ If the of the object definition is not a
+ resolved or .
+
+
+
+
+
+ Is the of the object definition a resolved
+ ?
+
+
+
+
+ Returns the of the
+ of the object definition (if any).
+
+
+
+
+ A description of the resource that this object definition
+ came from (for the purpose of showing context in case of errors).
+
+
+
+
+ The autowire mode as specified in the object definition.
+
+
+
+ This determines whether any automagical detection and setting of
+ object references will happen. The default is
+ ,
+ which means that no autowiring will be performed.
+
+
+
+
+
+ Gets the resolved autowire mode.
+
+
+
+ This resolves
+
+ to one of
+
+ or
+ .
+
+
+
+
+
+ The dependency checking mode.
+
+
+
+ The default is
+ .
+
+
+
+
+
+ The object names that this object depends on.
+
+
+
+ The object factory will guarantee that these objects get initialized
+ before this object definition.
+
+
+ Dependencies are normally expressed through object properties
+ or constructor arguments. This property should just be necessary for
+ other kinds of dependencies such as statics (*ugh*) or database
+ preparation on startup.
+
+
+
+
+
+ Gets or sets a value indicating whether this instance a candidate for getting autowired into some other
+ object.
+
+
+ true if this instance is autowire candidate; otherwise, false.
+
+
+
+
+ The name of the initializer method.
+
+
+
+ The default value is the constant,
+ in which case there is no initializer method.
+
+
+
+
+
+ Return the name of the destroy method.
+
+
+
+ The default value is the constant,
+ in which case there is no destroy method.
+
+
+
+
+
+ The name of the factory method to use (if any).
+
+
+
+ This method will be invoked with constructor arguments, or with no
+ arguments if none are specified. The
+ method will be invoked on the specified
+ .
+
+
+
+
+
+ The name of the factory object to use (if any).
+
+
+
+
+ Does this object definition have any constructor argument values?
+
+
+ if his object definition has at least one
+ element in it's
+
+ property.
+
+
+
+
+ Abstract base class for object definition readers.
+
+
+
+ Provides common properties like the object registry to work on.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Simple interface for object definition readers.
+
+ Juergen Hoeller
+ Rick Evans
+
+
+
+ Load object definitions from the supplied .
+
+
+ The resource for the object definitions that are to be loaded.
+
+
+ The number of object definitions found
+
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Load object definitions from the supplied .
+
+
+ The resources for the object definitions that are to be loaded.
+
+
+ The number of object definitions found
+
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Loads the object definitions from the specified resource location.
+
+ The resource location, to be loaded with the
+ IResourceLoader location .
+
+ The number of object definitions found
+
+
+
+
+ Loads the object definitions from the specified resource locations.
+
+ The the resource locations to be loaded with the
+ IResourceLoader of this object definition reader.
+
+ The number of object definitions found
+
+
+
+
+ Gets the
+
+ instance that this reader works on.
+
+
+
+
+ The against which any class names
+ will be resolved into instances.
+
+
+
+
+ The to use for anonymous
+ objects (wihtout explicit object name specified).
+
+
+
+
+ Gets the resource loader to use for resource locations.
+
+ There is also a method
+ available for loading object definitions from a resource location. This is
+ a convenience to avoid explicit ResourceLoader handling.
+ The resource loader.
+
+
+
+ The instance for this class (and derived classes).
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The
+ instance that this reader works on.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The
+ instance that this reader works on.
+
+
+ The against which any class names
+ will be resolved into instances.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+
+
+ Load object definitions from the supplied .
+
+
+ The resource for the object definitions that are to be loaded.
+
+
+ The number of object definitions that were loaded.
+
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Load object definitions from the supplied .
+
+
+ The resources for the object definitions that are to be loaded.
+
+
+ The number of object definitions found
+
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Loads the object definitions from the specified resource location.
+
+ The resource location, to be loaded with the
+ IResourceLoader location .
+
+ The number of object definitions found
+
+
+
+
+ Loads the object definitions from the specified resource locations.
+
+ The the resource locations to be loaded with the
+ IResourceLoader of this object definition reader.
+
+ The number of object definitions found
+
+
+
+
+ Gets the
+
+ instance that this reader works on.
+
+
+
+
+ The to use for anonymous
+ objects (wihtout explicit object name specified).
+
+
+
+
+
+ The against which any class names
+ will be resolved into instances.
+
+
+
+
+ Gets or sets the resource loader to use for resource locations.
+
+ The resource loader.
+
+
+
+ Utility class that contains various methods useful for the implementation of
+ autowire-capable object factories.
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the AutowireUtils class.
+
+
+
+ This is a utility class, and as such has no publicly
+ visible constructors.
+
+
+
+
+
+ Gets those s
+ that are applicable for autowiring the supplied .
+
+
+ The
+ (definition) that is being autowired by constructor.
+
+
+ The absolute minimum number of arguments that any returned constructor
+ must have. If this parameter is equal to zero (0), then all constructors
+ are valid (regardless of their argument count), including any default
+ constructor.
+
+
+ Those s
+ that are applicable for autowiring the supplied .
+
+
+
+
+ Determine a weight that represents the class hierarchy difference between types and
+ arguments.
+
+
+
+ A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase
+ the result - all direct matches means weight zero (0). A match between the argument type
+ and a MyInteger instance argument would increase the weight by
+ 1, due to the superclass () being one (1) steps up in the
+ class hierarchy being the last one that still matches the required type.
+
+
+ Therefore, with an argument of type , a
+ constructor taking a argument would be
+ preferred to a constructor taking an argument
+ which would be preferred to a constructor taking an
+ argument which would in turn be preferred
+ to a constructor taking an argument.
+
+
+ All argument weights get accumulated.
+
+
+
+ The argument s to match.
+
+ The arguments to match.
+ The accumulated weight for all arguments.
+
+
+
+ Algorithm that judges the match between the declared parameter types of a candidate method
+ and a specific list of arguments that this method is supposed to be invoked with.
+
+
+ Determines a weight that represents the class hierarchy difference between types and
+ arguments. The following a an example based on the Java class hierarchy for Integer.
+ A direct match, i.e. type Integer -> arg of class Integer, does not increase
+ the result - all direct matches means weight 0. A match between type Object and arg of
+ class Integer would increase the weight by 2, due to the superclass 2 steps up in the
+ hierarchy (i.e. Object) being the last one that still matches the required type Object.
+ Type Number and class Integer would increase the weight by 1 accordingly, due to the
+ superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number.
+ Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a
+ constructor (Number) which would in turn be preferred to a constructor (Object).
+ All argument weights get accumulated.
+
+ The param types.
+ The args.
+
+
+
+
+ Determines whether the given object property is excluded from dependency checks.
+
+ The PropertyInfo of the object property.
+
+ true if is excluded from dependency check; otherwise, false.
+
+
+
+
+ Sorts the supplied , preferring
+ public constructors and "greedy" ones (that have lots of arguments).
+
+
+
+ The result will contain public constructors first, with a decreasing number
+ of arguments, then non-public constructors, again with a decreasing number
+ of arguments.
+
+
+
+ The array to be sorted.
+
+
+
+
+ Determines whether the setter property is defined in any of the given interfaces.
+
+ The PropertyInfo of the object property
+ The ISet of interfaces.
+
+ true if setter property is defined in interface; otherwise, false.
+
+
+
+
+ Creates the autowire candidate resolver.
+
+ A SimpleAutowireCandidateResolver
+
+
+
+ Returns the list of that are not satisfied by .
+
+ the filtered list. Is never null
+
+
+
+ Object definition for definitions that inherit settings from their
+ parent (object definition).
+
+
+
+ Will use the
+ of the parent object definition if none is specified, but can also
+ override it. In the latter case, the child's
+
+ must be compatible with the parent, i.e. accept the parent's property values
+ and constructor argument values (if any).
+
+
+ A will
+ inherit all of the ,
+ , and
+ from it's parent
+ object definition, with the option to add new values. If the
+ ,
+ ,
+ and / or
+
+ properties are specified, they will override the corresponding parent settings.
+
+
+ The remaining settings will always be taken from the child definition:
+ ,
+ ,
+ ,
+ ,
+ and
+
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The name of the parent object.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The name of the parent object.
+
+
+ The additional property values (if any) of the child.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The name of the parent object.
+
+
+ The
+ to be applied to a new instance of the object.
+
+
+ The additional property values (if any) of the child.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The name of the parent object.
+
+
+ The class of the object to instantiate.
+
+
+ The
+ to be applied to a new instance of the object.
+
+
+ The additional property values (if any) of the child.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The name of the parent object.
+
+
+ The of the object to
+ instantiate.
+
+
+ The
+ to be applied to a new instance of the object.
+
+
+ The additional property values (if any) of the child.
+
+
+
+
+ Validate this object definition.
+
+
+
+ A common cause of validation failures is a missing value for the
+
+ property; by
+ their very nature require that the
+
+ be set.
+
+
+
+ In the case of a validation failure.
+
+
+
+
+ A that represents the current
+ .
+
+
+ A that represents the current
+ .
+
+
+
+
+ The name of the parent object definition.
+
+
+ This value is required.
+
+
+ The name of the parent object definition.
+
+
+
+
+ Helper class for resolving constructors and factory methods.
+ Performs constructor resolution through argument matching.
+
+
+ Operates on a and an .
+ Used by .
+
+ Juergen Hoeller
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class for the given factory
+ and instantiation strategy.
+
+ The object factory to work with.
+ The object factory as IAutowireCapableObjectFactory.
+ The instantiation strategy for creating objects.
+ the resolver to resolve property value placeholders if any
+
+
+
+ "autowire constructor" (with constructor arguments by type) behavior.
+ Also applied if explicit constructor argument values are specified,
+ matching all remaining arguments with objects from the object factory.
+
+
+ This corresponds to constructor injection: In this mode, a Spring
+ object factory is able to host components that expect constructor-based
+ dependency resolution.
+
+ Name of the object.
+ The merged object definition for the object.
+ The chosen chosen candidate constructors (or null if none).
+ The explicit argument values passed in programmatically via the getBean method,
+ or null if none (-> use constructor argument values from object definition)
+ An IObjectWrapper for the new instance
+
+
+
+ Gets the constructor instantiation info given the object definition.
+
+ Name of the object.
+ The RootObjectDefinition
+ The explicitly chosen ctors.
+ The explicit chose ctor args.
+ A ConstructorInstantiationInfo containg the specified constructor in the RootObjectDefinition or
+ one based on type matching.
+
+
+
+ Instantiate an object instance using a named factory method.
+
+
+
+ The method may be static, if the
+ parameter specifies a class, rather than a
+ instance, or an
+ instance variable on a factory object itself configured using Dependency
+ Injection.
+
+
+ Implementation requires iterating over the static or instance methods
+ with the name specified in the supplied
+ (the method may be overloaded) and trying to match with the parameters.
+ We don't have the types attached to constructor args, so trial and error
+ is the only way to go here.
+
+
+
+ The name associated with the supplied .
+
+
+ The definition describing the instance that is to be instantiated.
+
+
+ Any arguments to the factory method that is to be invoked.
+
+
+ The result of the factory method invocation (the instance).
+
+
+
+
+ Create an array of arguments to invoke a constructor or static factory method,
+ given the resolved constructor arguments values.
+
+ When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain
+ information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using
+ exceptions for flow control as in the original implementation.
+
+
+
+ Resolves the
+ of the supplied .
+
+ The name of the object that is being resolved by this factory.
+ The rod.
+ The wrapper.
+ The cargs.
+ Where the resolved constructor arguments will be placed.
+
+ The minimum number of arguments that any constructor for the supplied
+ must have.
+
+
+
+ 'Resolve' can be taken to mean that all of the s
+ constructor arguments is resolved into a concrete object that can be plugged
+ into one of the s constructors. Runtime object
+ references to other objects in this (or a parent) factory are resolved,
+ type conversion is performed, etc.
+
+
+ These resolved values are plugged into the supplied
+ object, because we wouldn't want to touch
+ the s constructor arguments in case it (or any of
+ its constructor arguments) is a prototype object definition.
+
+
+ This method is also used for handling invocations of static factory methods.
+
+
+
+
+
+ Returns an array of all of those
+ methods exposed on the
+ that match the supplied criteria.
+
+
+ Methods that have this name (can be in the form of a regular expression).
+
+
+ Methods that have exactly this many arguments.
+
+
+ Methods that are static / instance.
+
+
+ The on which the methods (if any) are to be found.
+
+
+ An array of all of those
+ methods exposed on the
+ that match the supplied criteria.
+
+
+
+
+ Concrete implementation of the
+ and
+
+ interfaces.
+
+
+
+ This class is a full-fledged object factory based on object definitions
+ that is usable straight out of the box.
+
+
+ Can be used as an object factory in and of itself, or as a superclass
+ for custom object factory implementations. Note that readers for
+ specific object definition formats are typically implemented separately
+ rather than as object factory subclasses.
+
+
+ For an alternative implementation of the
+ interface,
+ have a look at the
+
+ class, which manages existing object instances rather than creating new
+ ones based on object definitions.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+ Flag specifying whether to make this object factory case sensitive or not.
+
+
+
+ Creates a new instance of the
+ class.
+
+ The parent object factory.
+
+
+
+ Creates a new instance of the
+ class.
+
+ Flag specifying whether to make this object factory case sensitive or not.
+ The parent object factory.
+
+
+
+ Find object instances that match the .
+
+
+
+ Called by autowiring. If a subclass cannot obtain information about object
+ names by , a corresponding exception should be thrown.
+
+
+
+ The type of the objects to look up.
+
+
+ An of object names and object
+ instances that match the , or
+ if none is found.
+
+
+ In case of errors.
+
+
+
+
+ Return the names of the objects that depend on the given object.
+
+
+
+ Called by the
+
+ so that dependant objects are able to be disposed of first.
+
+
+
+ The name of the object to find depending objects for.
+
+
+ The array of names of depending objects, or the empty string array if none.
+
+
+ In case of errors.
+
+
+
+
+ Check whether the specified object matches the supplied .
+
+ The name of the object to check.
+
+ The to check for.
+
+
+ if the object matches the supplied ,
+ or if the supplied is .
+
+
+
+
+ The instance for this class.
+
+
+
+
+ Whether to allow re-registration of a different definition with the
+ same name.
+
+
+
+
+ The mapping of object definition objects, keyed by object name.
+
+
+
+
+ List of object definition names, in registration order.
+
+
+
+
+ Resolver to use for checking if an object definition is an autowire candidate
+
+
+
+
+ IDictionary from dependency type to corresponding autowired value
+
+
+
+
+ Check if this registry contains a object definition with the given
+ name.
+
+
+ The name of the object to look for.
+
+
+ if this object factory contains an object
+ definition with the given name.
+
+
+
+
+
+ Register a new object definition with this registry.
+
+
+ The name of the object instance to register.
+
+
+ The definition of the object instance to register.
+
+
+ If the object definition is invalid.
+
+
+
+
+
+ Ensure that all non-lazy-init singletons are instantiated, also
+ considering s.
+
+
+ If one of the singleton objects could not be created.
+
+
+
+
+
+ Register a special dependency type with corresponding autowired value.
+
+ Type of the dependency to register.
+ This will typically be a base interface such as IObjectFactory, with extensions of it resolved
+ as well if declared as an autowiring dependency (e.g. IListableBeanFactory),
+ as long as the given value actually implements the extended interface.
+ The autowired value. This may also be an
+ implementation o the interface,
+ which allows for lazy resolution of the actual target value.
+
+ This is intended for factory/context references that are supposed
+ to be autowirable but are not defined as objects in the factory:
+ e.g. a dependency of type ApplicationContext resolved to the
+ ApplicationContext instance that the object is living in.
+
+ Note there are no such default types registered in a plain IObjectFactory,
+ not even for the IObjectFactory interface itself.
+
+
+
+
+
+ Return the registered
+ for the
+ given object, allowing access to its property values and constructor
+ argument values.
+
+ The name of the object.
+
+ The registered ,
+ or null, if specified object definitions does not exist.
+
+
+ If is null or empty string.
+
+
+
+
+
+ Return the registered
+ for the
+ given object, allowing access to its property values and constructor
+ argument values.
+
+ The name of the object.
+ Whether to search parent object factories.
+
+ The registered ,
+ or null, if specified object definitions does not exist.
+
+
+ If is null or empty string.
+
+
+
+
+
+ Return the names of all objects defined in this factory.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+ Whether to include prototype objects too or just singletons (also applies to
+ s).
+
+
+ Whether to include s too
+ or just normal objects.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+
+ Return the object instances that match the given object
+ (including subclasses), judging from either object
+ definitions or the value of
+ in the case of
+ s.
+
+
+ The (class or interface) to match.
+
+
+ A of the matching objects,
+ containing the object names as keys and the corresponding object instances
+ as values.
+
+
+ If the objects could not be created.
+
+
+
+
+
+ Return the object instances that match the given object
+ (including subclasses).
+
+
+ The (class or interface) to match.
+
+
+ Whether to include prototype objects too or just singletons (also applies to
+ s).
+
+
+ Whether to include s too
+ or just normal objects.
+
+
+ An of the matching objects,
+ containing the object names as keys and the corresponding object instances
+ as values.
+
+
+ If any of the objects could not be created.
+
+
+
+
+
+ Return the object instances that match the given object
+ (including subclasses).
+
+
+ The (class or interface) to match.
+
+
+ Whether to include prototype objects too or just singletons (also applies to
+ s).
+
+
+ Whether to include s too
+ or just normal objects.
+
+
+ An of the matching objects,
+ containing the object names as keys and the corresponding object instances
+ as values.
+
+
+ If any of the objects could not be created.
+
+
+
+
+
+ Check whether the specified bean would need to be eagerly initialized
+ in order to determine its type.
+
+ a factory-bean reference that the bean definition defines a factory method for
+ whether eager initialization is necessary
+
+
+
+ Check whether the given bean is defined as a .
+
+ the name of the object
+ the corresponding object definition
+
+
+
+ Resolve the specified dependency against the objects defined in this factory.
+
+ The descriptor for the dependency.
+ Name of the object which declares the present dependency.
+ A list that all names of autowired object (used for
+ resolving the present dependency) are supposed to be added to.
+
+ the resolved object, or null if none found
+
+ if dependency resolution failed
+
+
+
+ Raises the no such object definition exception for an unresolvable dependency
+
+ The type.
+ The dependency description.
+ The descriptor.
+
+
+
+ Determines whether the specified object qualifies as an autowire candidate,
+ to be injected into other beans which declare a dependency of matching type.
+ This method checks ancestor factories as well.
+
+ Name of the object to check.
+ The descriptor of the dependency to resolve.
+
+ true if the object should be considered as an autowire candidate; otherwise, false.
+
+ if there is no object with the given name.
+
+
+
+ Determine whether the specified object definition qualifies as an autowire candidate,
+ to be injected into other beans which declare a dependency of matching type.
+
+ Name of the object definition to check.
+ The merged object definiton to check.
+ The descriptor of the dependency to resolve.
+
+ true if the object should be considered as an autowire candidate; otherwise, false.
+
+
+
+
+ Should object definitions registered under the same name as an
+ existing object definition be allowed?
+
+
+
+ If , then the new object definition will
+ replace (override) the existing object definition. If
+ , an exception will be thrown when
+ an attempt is made to register an object definition under the same
+ name as an already existing object definition.
+
+
+ The default is .
+
+
+
+ is the registration of an object definition
+ under the same name as an existing object definition is allowed.
+
+
+
+
+ Get or set custom autowire candidate resolver for this IObjectFactory to use
+ when deciding whether a bean definition should be considered as a
+ candidate for autowiring. Never null
+
+
+
+
+ Return the number of objects defined in this registry.
+
+
+ The number of objects defined in this registry.
+
+
+
+
+
+ Default implementation of the
+
+ interface.
+
+
+
+ Does not support per
+ loading.
+
+
+ Aleksandar Seovic
+
+
+
+ Central interface for factories that can create
+
+ instances.
+
+
+
+ Allows for replaceable object definition factories using the Strategy
+ pattern.
+
+
+ Aleksandar Seovic
+
+
+
+ Factory style method for getting concrete
+
+ instances.
+
+
+ The FullName of the of the defined object.
+
+ The name of the parent object definition (if any).
+
+ The against which any class names
+ will be resolved into instances. It can be null to register the
+ object class just by name.
+
+
+ An
+
+ instance.
+
+
+
+
+ Factory style method for getting concrete
+
+ instances.
+
+ /// If no parent is specified, a RootObjectDefinition is created, otherwise a
+ ChildObjectDefinition.
+ The of the defined object.
+ The name of the parent object definition (if any).
+ The against which any class names
+ will be resolved into instances.
+
+ An
+
+ instance.
+
+
+
+
+ Default implementation of the interface, deleagting to
+ 's GenerateObjectName.
+
+ Note that this implementation is only able to handle
+ subclasses such as
+ and
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Strategy interface for generating object names for object definitions
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Generates an object name for the given object definition.
+
+ The object definition to generate a name for.
+ The object definitions registry that the given definition is
+ supposed to be registerd with
+ the generated object name
+
+
+
+ Generates an object name for the given object definition.
+
+ The object definition to generate a name for.
+ The object definitions registry that the given definition is
+ supposed to be registerd with
+ the generated object name
+
+
+
+ An
+ implementation that delegates to an
+ that is
+ obtained as the result of a lookup in an associated IoC container.
+
+
+
+ This class is reserved for internal use within the framework; it is
+ not intended to be used by application developers using Spring.NET.
+
+
+ Rick Evans
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The object definition that is the target of the method replacement.
+
+
+ The enclosing IoC container with which the above
+ is associated.
+
+
+ If either of the supplied arguments is .
+
+
+
+
+ Reimplements the supplied by delegating to
+ another
+ looked up in an enclosing IoC container.
+
+
+ The instance whose is to be
+ (re)implemented.
+
+
+ The method that is to be (re)implemented.
+
+ The target method's arguments.
+
+ The result of the delegated call to the looked up
+ .
+
+
+
+
+ The various modes of dependency checking.
+
+ Rick Evans (.NET)
+
+
+
+ DO not do any dependency checking.
+
+
+
+
+ Check object references.
+
+
+
+
+ Just check primitive (string, int, etc) values.
+
+
+
+
+ Check everything.
+
+
+
+
+ GenericObjectDefinition is a one-stop shop for standard object definition purposes.
+ Like any object definition, it allows for specifying a class plus optionally
+ constructor argument values and property values. Additionally, deriving from a
+ parent bean definition can be flexibly configured through the "parentName" property.
+
+ In general, use this class for the purpose of
+ registering user-visible object definitions (which a post-processor might operate on,
+ potentially even reconfiguring the parent name).
+ Use /
+ where parent/child relationships happen to be pre-determined.
+
+
+
+ Juergen Hoeller
+ Erich Eichinger
+
+
+
+ Creates a new to be configured through its
+ object properties and configuration methods.
+
+
+
+
+ Creates a new as deep copy of the given
+ object definition.
+
+ the original object definition to copy from
+
+
+
+ Returns a representation of this
+ for debugging purposes.
+
+
+
+
+ The name of the parent object definition.
+
+
+ This value is required.
+
+
+ The name of the parent object definition.
+
+
+
+
+ Strategy interface for determining whether a specific object definition
+ qualifies as an autowire candidate for a specific dependency.
+
+ Mark Fisher
+ Juergen hoeller
+ Mark Pollack (.NET)
+
+
+
+ Determines whether the given object definition qualifies as an
+ autowire candidate for the given dependency.
+
+ The object definition including object name and aliases.
+ The descriptor for the target method parameter or field.
+
+ true if the object definition qualifies as autowire candidate; otherwise, false.
+
+
+
+
+ Responsible for creating instances corresponding to a
+ .
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied .
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the null
+ or zero length string if we're autowiring an object that doesn't belong
+ to the supplied .
+
+
+ The owning
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied .
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the null
+ or zero length string if we're autowiring an object that doesn't belong
+ to the supplied .
+
+
+ The owning
+
+
+ The to be used to instantiate
+ the object.
+
+
+ Any arguments to the supplied . May be null.
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied .
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the null
+ or zero length string if we're autowiring an object that doesn't belong
+ to the supplied .
+
+
+ The owning
+
+
+ The to be used to get the object.
+
+
+ Any arguments to the supplied . May be null.
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+ Represents an override of a method that looks up an object in the same IoC context.
+
+
+
+ Methods eligible for lookup override must not have arguments.
+
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Represents the override of a method on a managed object by the IoC container.
+
+
+
+ Note that the override mechanism is not intended as a generic means of
+ inserting crosscutting code: use AOP for that.
+
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is an class, and as such exposes no
+ public constructors.
+
+
+
+ The name of the method that is to be overridden.
+
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+
+
+
+ Does this
+ match the supplied ?
+
+
+
+ By 'match' one means does this particular
+
+ instance apply to the supplied ?
+
+
+ This allows for argument list checking as well as method name checking.
+
+
+ The method to be checked.
+
+ if this override matches the supplied
+ .
+
+
+
+
+ The name of the method that is to be overridden.
+
+
+
+
+ Is the method that is ot be injected
+ ()
+ to be considered as overloaded?
+
+
+
+ If (the default), then argument type matching
+ will be performed (because one would not want to override the wrong
+ method).
+
+
+ Setting the value of this property to can be used
+ to optimize runtime performance (ever so slightly).
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ Methods eligible for lookup override must not have arguments.
+
+
+
+ The name of the method that is to be overridden.
+
+
+ The name of the object in the current IoC context that the
+ dependency injected method must return.
+
+
+ If either of the supplied arguments is or
+ contains only whitespace character(s).
+
+
+
+
+ Does this
+ match the supplied ?
+
+ The method to be checked.
+
+ if this override matches the supplied .
+
+
+ If the supplied is .
+
+
+
+
+ A that represents the current
+ .
+
+
+ A that represents the current
+ .
+
+
+
+
+ The name of the object in the current IoC context that the
+ dependency injected method must return.
+
+
+
+
+ An
+ implementation that simply returns the result of a lookup in an
+ associated IoC container.
+
+
+
+ This class is Spring.NET's implementation of Dependency Lookup via
+ Method Injection.
+
+
+ This class is reserved for internal use within the framework; it is
+ not intended to be used by application developers using Spring.NET.
+
+
+ Rick Evans
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The object definition that is the target of the method replacement.
+
+
+ The enclosing IoC container with which the above
+ is associated.
+
+
+ If either of the supplied arguments is .
+
+
+
+
+ Reimplements the supplied by returning the
+ result of an object lookup in an enclosing IoC container.
+
+
+ The instance whose is to be
+ (re)implemented.
+
+
+ The method that is to be (re)implemented.
+
+ The target method's arguments.
+
+ The result of the object lookup.
+
+
+
+
+ An
+ implementation that supports method injection.
+
+
+
+ Classes that want to take advantage of method injection must meet some
+ stringent criteria. Every method that is to be method injected
+ must be defined as either or
+ . An
+ will be thrown if these criteria are not met.
+
+
+ Rick Evans
+
+
+
+ Simple object instantiation strategy for use in
+ implementations.
+
+
+
+ Does not support method injection, although it provides hooks for subclasses
+ to override to add method injection support, for example by overriding methods.
+
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+
+ The shared instance for this class (and derived classes).
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied .
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the null
+ or zero length string if we're autowiring an object that doesn't belong
+ to the supplied .
+
+
+ The owning
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+ Gets the zero arg ConstructorInfo object, if the type offers such functionality.
+
+ The type.
+ Zero argument ConstructorInfo
+
+ If the type does not have a zero-arg constructor.
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied .
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the null
+ or zero length string if we're autowiring an object that doesn't belong
+ to the supplied .
+
+
+ The owning
+
+
+ The to be used to instantiate
+ the object.
+
+
+ Any arguments to the supplied . May be null.
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied .
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the null
+ or zero length string if we're autowiring an object that doesn't belong
+ to the supplied .
+
+
+ The owning
+
+
+ The to be used to get the object.
+
+
+ Any arguments to the supplied . May be null.
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied ,
+ injecting methods as appropriate.
+
+
+
+ The default implementation of this method is to throw a
+ .
+
+
+ Derived classes can override this method if they can instantiate an object
+ with the Method Injection specified in the supplied
+ . Instantiation should use a no-arg constructor.
+
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be a
+ or zero length string if we're autowiring an object that
+ doesn't belong to the supplied .
+
+
+ The owning
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied ,
+ injecting methods as appropriate.
+
+
+
+ The default implementation of this method is to throw a
+ .
+
+
+ Derived classes can override this method if they can instantiate an object
+ with the Method Injection specified in the supplied
+ . Instantiation should use the supplied
+ and attendant .
+
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the null
+ or zero length string if we're autowiring an object that doesn't belong
+ to the supplied .
+
+
+ The owning
+
+
+ The to be used to instantiate
+ the object.
+
+
+ Any arguments to the supplied . May be null.
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+ The name of the dynamic assembly that holds dynamically created code
+
+
+
+
+ A cache of generated instances, keyed on
+ the object name for which the was generated.
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied ,
+ injecting methods as appropriate.
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the
+ or zero length string if we're autowiring an
+ object that doesn't belong to the supplied
+ .
+
+
+ The owning
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied ,
+ injecting methods as appropriate.
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the
+ or zero length string if we're autowiring an
+ object that doesn't belong to the supplied
+ .
+
+
+ The owning
+
+
+ The to be used to instantiate
+ the object.
+
+
+ Any arguments to the supplied . May be null.
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied ,
+ injecting methods as appropriate.
+
+
+
+ This method dynamically generates a subclass that supports method
+ injection for the supplied . It then
+ instantiates an new instance of said type using the constructor
+ identified by the supplied ,
+ passing the supplied to said
+ constructor. It then manually injects (generic) method replacement
+ and method lookup instances (of
+ ) into
+ the new instance: those methods that are 'method-injected' will
+ then delegate to the approriate
+
+ instance to effect the actual method injection.
+
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the
+ or zero length string if we're autowiring an
+ object that doesn't belong to the supplied
+ .
+
+
+ The owning
+
+
+ The parameter s to use to find the
+ appropriate constructor to invoke.
+
+
+ The aguments that are to be passed to the appropriate constructor
+ when the object is being instantiated.
+
+
+ A new instance of the defined by the
+ supplied .
+
+
+
+
+ A factory that generates subclasses of those
+ classes that have been configured for the Method-Injection form of
+ Dependency Injection.
+
+
+
+ This class is designed as for one-shot usage; i.e. it must
+ be used to generate exactly one method injected subclass and
+ then discarded (it maintains state in instance fields).
+
+
+
+
+
+ The name of the generated
+ property (for method replacement).
+
+
+
+ Exists so that clients of this class can use this name to set properties reflectively
+ on the dynamically generated subclass.
+
+
+
+
+
+ The name of the generated
+ property (for method lookup).
+
+
+
+ Exists so that clients of this class can use this name to set properties reflectively
+ on the dynamically generated subclass.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The in which
+ the generated is to be defined.
+
+
+ The object definition that is the target of the method injection.
+
+
+ If either of the supplied arguments is .
+
+
+
+
+ Builds a suitable for Method-Injection.
+
+
+ A suitable for Method-Injection.
+
+
+
+
+ Defines overrides for those methods that are configured with an appropriate
+ .
+
+
+ The overarching that is defining
+ the generated .
+
+
+
+
+ Override the supplied with the logic
+ encapsulated by the
+
+ defined by the supplied .
+
+
+ The builder for the subclass that is being generated.
+
+
+ The method on the superclass that is to be overridden.
+
+
+ The field defining the
+
+ that the overridden method will delegate to to do the 'actual'
+ method injection logic.
+
+
+
+
+ Generates the MSIL for actually returning a return value if the
+ supplied is not
+ .
+
+
+ The definition of the return value; if , it
+ means that no return value is to required (a void
+ return type).
+
+
+ The to emit
+ the MSIL to.
+
+
+
+
+ Generates the MSIL for a return value if the supplied
+ returns a value.
+
+
+ The method to be checked.
+
+
+ The to emit
+ the MSIL to.
+
+
+ The return value, or if the method does not
+ return a value (has a void return type).
+
+
+
+
+ Pushes (sets up) the arguments for a call to the
+
+ method of an appropriate
+ .
+
+
+ The parameters to the original method (will be bundled
+ up into a generic object[] and passed as the third
+ argument to the
+
+ invocation.
+
+
+ The to emit
+ the MSIL to.
+
+
+
+
+ Simply generates the IL for a write only property for the
+ .
+
+
+ The in which the property is defined.
+
+
+ The name of the (to be) generated property.
+
+
+ The (instance) field that the property is to 'set'.
+
+
+
+
+ A collection (with set semantics) of method overrides, determining which, if any,
+ methods on a managed object the Spring.NET IoC container will override at runtime.
+
+ Rod Johnson
+ Rick Evans
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ Deep copy constructoe.
+
+
+
+ The instance supplying initial overrides for this new instance.
+
+
+
+
+ Copy all given method overrides into this object.
+
+
+ The overrides to be copied into this object.
+
+
+
+
+ Adds the supplied to the overrides contained
+ within this instance.
+
+
+ The to be
+ added.
+
+
+
+
+ Adds the supplied to the overloaded method names
+ contained within this instance.
+
+
+ The overloaded method name to be added.
+
+
+
+
+ Returns true if the supplied is present within
+ the overloaded method names contained within this instance.
+
+
+ The overloaded method name to be checked.
+
+
+ True if the supplied is present within
+ the overloaded method names contained within this instance.
+
+
+
+
+ Return the override for the given method, if any.
+
+
+ The method to check for overrides for.
+
+
+ the override for the given method, if any.
+
+
+
+
+ Returns an that can iterate
+ through a collection.
+
+
+
+ The returned is the
+ exposed by the
+
+ property.
+
+
+
+ An that can iterate through a
+ collection.
+
+
+
+
+ The collection of method overrides.
+
+
+
+
+ Returns true if this instance contains no overrides.
+
+
+
+
+ Programmatic means of constructing a using the builder pattern. Intended primarily
+ for use when implementing custom namespace parsers.
+
+ Set methods are used instead of properties, so that chaining of methods can be used to create
+ 'one-liner'definitions that set multiple properties at one.
+ Rod Johnson
+ Rob Harrop
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class, private
+ to force use of factory methods.
+
+
+
+
+ Creates a new used to construct a .
+
+
+
+
+ Creates a new used to construct a .
+
+ the of the object that the definition is being created for
+
+
+
+ Creates a new used to construct a .
+
+ the name of the of the object that the definition is being created for
+
+
+
+ Create a new ObjectDefinitionBuilder used to construct a root object definition.
+
+ The object definition factory.
+ The type name of the object.
+ A new ObjectDefinitionBuilder instance.
+
+
+
+ Create a new ObjectDefinitionBuilder used to construct a root object definition.
+
+ The object definition factory.
+ Name of the object type.
+ Name of the factory method.
+ A new ObjectDefinitionBuilder instance.
+
+
+
+ Create a new ObjectDefinitionBuilder used to construct a root object definition.
+
+ The object definition factory.
+ Type of the object.
+ A new ObjectDefinitionBuilder instance.
+
+
+
+ Create a new ObjectDefinitionBuilder used to construct a root object definition.
+
+ The object definition factory.
+ Type of the object.
+ Name of the factory method.
+ A new ObjectDefinitionBuilder instance.
+
+
+
+ Create a new ObjectDefinitionBuilder used to construct a child object definition..
+
+ The object definition factory.
+ Name of the parent object.
+
+
+
+
+ Adds the property value under the given name.
+
+ The name.
+ The value.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Adds a reference to the specified object name under the property specified.
+
+ The name.
+ Name of the object.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Adds an index constructor arg value. The current index is tracked internally and all addtions are
+ at the present point
+
+ The constructor arg value.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Adds a reference to the named object as a constructor argument.
+
+ Name of the object.
+
+
+
+
+ Sets the name of the factory method to use for this definition.
+
+ The factory method.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Sets the name of the factory object to use for this definition.
+
+ The factory object.
+ The factory method.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Sets whether or not this definition describes a singleton object.
+
+ if set to true [singleton].
+ The current ObjectDefinitionBuilder.
+
+
+
+ Sets whether objects or not this definition is abstract.
+
+ if set to true [flag].
+ The current ObjectDefinitionBuilder.
+
+
+
+ Sets whether objects for this definition should be lazily initialized or not.
+
+ if set to true [lazy].
+ The current ObjectDefinitionBuilder.
+
+
+
+ Sets the autowire mode for this definition.
+
+ The autowire mode.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Sets the dependency check mode for this definition.
+
+ The dependency check.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Sets the name of the destroy method for this definition.
+
+ Name of the method.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Sets the name of the init method for this definition.
+
+ Name of the method.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Sets the resource description for this definition.
+
+ The resource description.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Adds the specified object name to the list of objects that this definition depends on.
+
+ Name of the object.
+ The current ObjectDefinitionBuilder.
+
+
+
+ Gets the current object definition in its raw (unvalidated) form.
+
+ The raw object definition.
+
+
+
+ Validate and gets the object definition.
+
+ The object definition.
+
+
+
+ Utility methods that are useful for
+
+ implementations.
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ The string used as a separator in the generation of synthetic id's
+ for those object definitions explicitly that aren't assigned one.
+
+
+
+ If a name or parent object definition
+ name is not unique, "#1", "#2" etc will be appended, until such
+ time that the name becomes unique.
+
+
+
+
+
+ Registers the supplied with the
+ supplied .
+
+
+
+ This is a convenience method that registers the
+
+ of the supplied under the
+
+ property value of said . If the
+ supplied has any
+ ,
+ then those aliases will also be registered with the supplied
+ .
+
+
+
+ The object definition holder containing the
+ that
+ is to be registered.
+
+
+ The registry that the supplied
+ is to be registered with.
+
+
+ If either of the supplied arguments is .
+
+
+ If the could not be registered
+ with the .
+
+
+
+
+ Generates an object definition name for the supplied
+ that is guaranteed to be unique
+ within the scope of the supplied .
+
+ The
+ that requires a generated name.
+ The
+
+ that the supplied is to be
+ registered with (needed so that the uniqueness of any generated
+ name can be guaranteed).
+ if set to true if the given object
+ definition will be registed as an inner object or as a top level objener objects
+ verses top level objects.
+
+ An object definition name for the supplied
+ that is guaranteed to be unique
+ within the scope of the supplied and
+ never .
+
+
+ If either of the or
+ arguments is .
+
+
+ If a unique name cannot be generated.
+
+
+
+
+ Generates the name of the object for a top-level object definition unique within the given object factory.
+
+ The object definition to generate an object name for.
+ The registry to check for existing names.
+ The generated object name
+ if no unique name can be generated for the given
+ object definition
+
+
+
+ Factory method for getting concrete
+ instances.
+
+
+ The name of the event handler method. This may be straight text, a regular
+ expression, , or empty.
+
+
+ The name of the event being wired. This too may be straight text, a regular
+ expression, , or empty.
+
+
+ A concrete
+ instance.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is a utility class, and as such exposes no public constructors.
+
+
+
+
+
+ Thrown when the validation of an object definition failed.
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+ The detail message.
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The detail message.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionValidationException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Helper class for use in object factory implementations,
+ resolving values contained in object definition objects
+ into the actual values applied to the target object instance.
+
+
+ Used by .
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ The object factory.
+
+
+
+ Given a property value, return a value, resolving any references to other
+ objects in the factory if necessary.
+
+
+
+ The value could be :
+
+
+
+ An ,
+ which leads to the creation of a corresponding new object instance.
+ Singleton flags and names of such "inner objects" are always ignored: inner objects
+ are anonymous prototypes.
+
+
+
+
+ A , which must
+ be resolved.
+
+
+
+
+ An . This is a
+ special placeholder collection that may contain
+ s or
+ collections that will need to be resolved.
+
+
+
+
+ An ordinary object or , in which case it's left alone.
+
+
+
+
+
+
+ The name of the object that is having the value of one of its properties resolved.
+
+
+ The definition of the named object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The value of the property that is being resolved.
+
+
+
+
+ TODO
+
+
+ The name of the object that is having the value of one of its properties resolved.
+
+
+ The definition of the named object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The value of the property that is being resolved.
+
+
+
+
+ Resolve the target type of the passed .
+
+ The who's target type is to be resolved
+ The resolved target type, if any. otherwise.
+
+
+
+ Resolves an inner object definition.
+
+
+ The name of the object that surrounds this inner object definition.
+
+
+ The name of the inner object definition... note: this is a synthetic
+ name assigned by the factory (since it makes no sense for inner object
+ definitions to have names).
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The definition of the inner object that is to be resolved.
+
+
+ if the owner of the property is a singleton.
+
+
+ The resolved object as defined by the inner object definition.
+
+
+
+
+ Checks the given bean name whether it is unique. If not already unique,
+ a counter is added, increasing the counter until the name is unique.
+
+ Original Name of the inner object.
+ The Adapted name for the inner object
+
+
+
+ Resolve a reference to another object in the factory.
+
+
+ The name of the object that is having the value of one of its properties resolved.
+
+
+ The definition of the named object.
+
+
+ The name of the property the value of which is being resolved.
+
+
+ The runtime reference containing the value of the property.
+
+ A reference to another object in the factory.
+
+
+
+ The possible object scope values.
+
+ Aleksandar Seovic
+
+
+
+
+
+
+
+
+ Application scope.
+
+
+
+
+ Session scope.
+
+
+
+
+ Request scope.
+
+
+
+
+
+
+
+
+
+ Default scope (currently
+ ).
+
+
+
+
+
+ Object definition reader for a simple properties format.
+
+
+ Provides object definition registration methods for
+ and
+ instances. Typically applied to a
+ .
+
+ Rod Johnson
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ Value of a T/F attribute that represents true.
+ Anything else represents false. Case seNsItive.
+
+
+
+
+ Separator between object name and property name.
+
+
+
+
+ Prefix for the class property of a root object definition.
+
+
+
+
+ Special string added to distinguish if the object will be
+ a singleton.
+
+
+
+ Default is true.
+
+
+
+
+ owner.(singleton)=true
+
+
+
+
+
+ Special string added to distinguish if the object will be
+ lazily initialised.
+
+
+
+ Default is false.
+
+
+
+
+ owner.(lazy-init)=true
+
+
+
+
+
+ Reserved "property" to indicate the parent of a child object definition.
+
+
+
+
+ Property suffix for references to other objects in the current
+ : e.g.
+ owner.dog(ref)=fido.
+
+
+
+ Whether this is a reference to a singleton or a prototype
+ will depend on the definition of the target object.
+
+
+
+
+
+ Prefix before values referencing other objects.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The
+ instance that this reader works on.
+
+
+
+
+ Load object definitions from the supplied .
+
+
+ The resource for the object definitions that are to be loaded.
+
+
+ The number of object definitions that were loaded.
+
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Load object definitions from the specified properties file.
+
+
+ The resource descriptor for the properties file.
+
+
+ The match or filter for object definition names, e.g. 'objects.'
+
+ in case of loading or parsing errors
+ the number of object definitions found
+
+
+
+ Register object definitions contained in a
+ , using all property keys (i.e.
+ not filtering by prefix).
+
+
+ The containing object definitions.
+
+
+ In case of loading or parsing errors.
+
+ The number of object definitions registered.
+
+
+
+ Register object definitions contained in a
+ .
+
+
+
+ Similar syntax as for an .
+ This method is useful to enable standard .NET internationalization support.
+
+
+
+ The containing object definitions.
+
+
+ The match or filter for object definition names, e.g. 'objects.'
+
+
+ In case of loading or parsing errors.
+
+ The number of object definitions registered.
+
+
+
+ Register object definitions contained in an
+ , using all property keys
+ (i.e. not filtering by prefix).
+
+
+ The containing object definitions.
+
+
+ In case of loading or parsing errors.
+
+ The number of object definitions registered.
+
+
+
+ Registers object definitions contained in an
+ using all property keys ( i.e. not filtering by prefix )
+
+ The containing
+ object definitions.
+
+
+ In case of loading or parsing errors.
+
+ The number of object definitions registered.
+
+
+
+ Register object definitions contained in a
+ .
+
+
+
+ Ignores ineligible properties.
+
+
+ IDictionary name -> property (String or Object). Property values
+ will be strings if coming from a Properties file etc. Property names
+ (keys) must be strings. Type keys must be strings.
+
+
+ The match or filter within the keys in the map: e.g. 'objects.'
+
+
+ In case of loading or parsing errors.
+
+ The number of object definitions found.
+
+
+
+ Register object definitions contained in a
+ .
+
+
+
+ Ignores ineligible properties.
+
+
+ IDictionary name -> property (String or Object). Property values
+ will be strings if coming from a Properties file etc. Property names
+ (keys) must be strings. Type keys must be strings.
+
+
+ The match or filter within the keys in the map: e.g. 'objects.'
+
+
+ The description of the resource that the
+ came from (for logging purposes).
+
+
+ In case of loading or parsing errors.
+
+ The number of object definitions found.
+
+
+
+ Get all property values, given a prefix (which will be stripped)
+ and add the object they define to the factory with the given name
+
+ The name of the object to define.
+
+ The containing string pairs.
+
+ The prefix of each entry, which will be stripped.
+
+ The description of the resource that the
+ came from (for logging purposes).
+
+
+ In case of loading or parsing errors.
+
+
+
+
+ Name of default parent object
+
+
+
+
+ Gets or sets object definition factory to use.
+
+
+
+
+ A plain-vanilla object definition.
+
+
+
+ This is the most common type of object definition;
+ instances
+ do not derive from a parent
+ , and usually
+ (but not always - see below) have an
+
+ and (optionally) some
+ and
+ .
+
+
+ Note that
+ instances do not have to specify an
+ :
+ This can be useful for deriving
+ instances
+ from such definitions, each with it's own
+ ,
+ inheriting common property values and other settings from the parent.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The of the object to instantiate.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The of the object to instantiate.
+
+
+ if this object definition defines a singleton object.
+
+
+
+
+ Creates a new instance of the
+ class
+ for a singleton, providing property values and constructor arguments.
+
+
+ The of the object to instantiate.
+
+
+ The
+ to be applied to a new instance of the object.
+
+
+ The to be applied to
+ a new instance of the object.
+
+
+
+
+ Creates a new instance of the
+ class
+ for a singleton using the supplied
+ .
+
+
+ The of the object to instantiate.
+
+
+ The autowiring mode.
+
+
+
+
+ Creates a new instance of the
+ class
+ for a singleton using the supplied
+ .
+
+
+ The of the object to instantiate.
+
+
+ The autowiring mode.
+
+
+ Whether to perform a dependency check for objects (not
+ applicable to autowiring a constructor, thus ignored there)
+
+
+
+
+ Creates a new instance of the
+ class
+ with the given singleton status, providing property values.
+
+
+ The of the object to instantiate.
+
+
+ The to be applied to
+ a new instance of the object.
+
+
+
+
+ Creates a new instance of the
+ class
+ with the given singleton status, providing property values.
+
+
+ The of the object to instantiate.
+
+
+ The to be applied to
+ a new instance of the object.
+
+
+ if this object definition defines a singleton object.
+
+
+
+
+ Creates a new instance of the
+ class
+ for a singleton, providing property values and constructor arguments.
+
+
+
+ Takes an object class name to avoid eager loading of the object class.
+
+
+
+ The assembly qualified of the object to instantiate.
+
+
+ The to be applied to
+ a new instance of the object.
+
+
+ The
+ to be applied to a new instance of the object.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ Deep copy constructor.
+
+
+
+ The definition that is to be copied.
+
+
+
+
+ Validate this object definition.
+
+
+ In the case of a validation failure.
+
+
+
+
+ A that represents the current
+ .
+
+
+ A that represents the current
+ .
+
+
+
+
+ Is always null for a .
+
+
+ It is safe to request this property's value. Setting any other value than null will
+ raise an .
+
+ Raised on any attempt to set a non-null value on this property.
+
+
+
+ A implementation to use that checks
+ the object definitions only (no attributes)
+
+ Mark Fisher
+ Mark Pollack (.NET)
+
+
+
+ Determines whether the given object definition qualifies as an
+ autowire candidate for the given dependency.
+
+ The object definition including object name and aliases.
+ The descriptor for the target method parameter or field.
+
+ true if the object definition qualifies as autowire candidate; otherwise, false.
+
+
+
+
+ Static factory that permits the registration of existing singleton instances.
+
+
+
+ Does not have support for prototype objects, aliases, and post startup object
+ configuration.
+
+
+ Serves as a simple example implementation of the
+ interface, that manages existing object instances as opposed to creating new ones
+ based on object definitions.
+
+
+ The
+ method is not supported by this class; this class deals exclusively with
+ existing singleton instances, thus the methods mentioned previously make little sense in this context.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ Map from object name to object instance.
+
+
+
+
+ This method is not supported by .
+
+
+
+
+
+ Return an instance of the given object name.
+
+ The name of the object to return.
+ The instance of the object.
+
+ is not currently supported.
+
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+
+
+ This method allows an object factory to be used as a replacement for the
+ Singleton or Prototype design pattern.
+
+
+ Note that callers should retain references to returned objects. There is no
+ guarantee that this method will be implemented to be efficient. For example,
+ it may be synchronized, or may need to run an RDBMS query.
+
+
+ Will ask the parent factory if the object cannot be found in this factory
+ instance.
+
+
+ The name of the object to return.
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a static factory method. If there is no factory method and the
+ arguments are not null, then match the argument values by type and
+ call the object's constructor.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the supplied is .
+
+
+
+
+ Return an instance (possibly shared or independent) of the given object name.
+
+ The name of the object to return.
+
+ The the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a factory method. If there is no factory method and the
+ supplied array is not , then
+ match the argument values by type and call the object's constructor.
+
+ The instance of the object.
+
+ If there's no such object definition.
+
+
+ If the object could not be created.
+
+
+ If the object is not of the required type.
+
+
+ If the supplied is .
+
+
+
+
+
+ Return an instance of the given object name.
+
+ The name of the object to return.
+
+ the object may match. Can be an interface or
+ superclass of the actual class. For example, if the value is the
+ class, this method will succeed whatever the
+ class of the returned instance.
+
+ The instance of the object.
+
+
+
+
+ Does this object factory contain an object with the given name?
+
+ The name of the object to query.
+ True if an object with the given name is defined.
+
+
+
+ Is this object a singleton?
+
+
+
+ That is, will
+ or
+ always return the same object?
+
+
+ The name of the object to query.
+ True if the named object is a singleton.
+
+ If there's no such object definition.
+
+
+
+
+ Determines whether the specified object name is prototype. That is, will GetObject
+ always return independent instances?
+
+ This method returning false does not clearly indicate a singleton object.
+ It indicated non-independent instances, which may correspond to a scoped object as
+ well. use the IsSingleton property to explicitly check for a shared
+ singleton instance.
+ Translates aliases back to the corresponding canonical object name. Will ask the
+ parent factory if the object can not be found in this factory instance.
+
+
+
+ The name of the object to query
+
+ true if the specified object name will always deliver independent instances; otherwise, false.
+
+ if there is no object with the given name.
+
+
+
+ Determine the type of the object with the given name.
+
+
+
+ More specifically, checks the type of object that
+ would return.
+ For an , returns the type
+ of object that the creates.
+
+
+ The name of the object to query.
+
+ The of the object or if
+ not determinable.
+
+
+
+
+ Determines whether the object with the given name matches the specified type.
+
+ The name of the object to query.
+ Type of the target to match against.
+
+ true if the object type matches; otherwise, false
+ if it doesn't match or cannot be determined yet.
+
+ Ff there is no object with the given name
+
+
+
+
+ Return the aliases for the given object name, if defined.
+
+ The object name to check for aliases.
+ The aliases, or an empty array if none.
+
+ If there's no such object definition.
+
+
+
+
+ Not supported.
+
+ The name of the object.
+
+ The registered
+ .
+
+
+ Always, as object definitions are not supported by this
+ implementation.
+
+
+
+
+ Return the registered
+ for the
+ given object, allowing access to its property values and constructor
+ argument values.
+
+ The name of the object.
+ Whether to search parent object factories.
+
+ The registered
+ .
+
+
+ If there is no object with the given name.
+
+
+ In the case of errors.
+
+
+
+
+ Return the names of all objects defined in this factory.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+
+ Will not consider s,
+ as the type of their created objects is not known before instantiation.
+
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+
+ Does consider objects created by s,
+ or rather it considers the type of objects created by
+ (which means that
+ s will be instantiated).
+
+
+ Does not consider any hierarchy this factory may participate in.
+
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+ Return the names of objects matching the given
+ (including subclasses), judging from the object definitions.
+
+
+
+ Since this implementation of the
+
+ interface does not support the notion of ptototype objects, the
+ parameter is ignored.
+
+
+
+ The (class or interface) to match, or
+ for all object names.
+
+
+ Whether to include prototype objects too or just singletons (also applies to
+ s). Ignored.
+
+
+ Whether to include s too
+ or just normal objects.
+
+
+ The names of all objects defined in this factory, or an empty array if none
+ are defined.
+
+
+
+
+
+ Tests whether this object factory contains an object definition for the
+ specified object name.
+
+ The object name to query.
+
+ True if an object defintion is contained within this object factory.
+
+
+
+
+ Return the object instances that match the given object
+ (including subclasses), judging from either object
+ definitions or the value of
+ in the case of
+ s.
+
+
+
+ This version of the
+ method matches all kinds of object definitions, be they singletons, prototypes, or
+ s. Typically, the results
+ of this method call will be the same as a call to
+ IListableObjectFactory.GetObjectsOfType(type,true,true) .
+
+
+
+ The (class or interface) to match.
+
+
+ A of the matching objects,
+ containing the object names as keys and the corresponding object instances
+ as values.
+
+
+ If the objects could not be created.
+
+
+
+
+ Return the object instances that match the given object
+ (including subclasses), judging from either object
+ definitions or the value of
+ in the case of
+ s.
+
+
+ The (class or interface) to match.
+
+
+ Whether to include prototype objects too or just singletons (also applies to
+ s).
+
+
+ Whether to include s too
+ or just normal objects.
+
+
+ A of the matching objects,
+ containing the object names as keys and the corresponding object instances
+ as values.
+
+
+ If the objects could not be created.
+
+
+
+
+ Add a new singleton object.
+
+
+ The name to be associated with the object name.
+
+ The singleton object.
+
+
+
+ Injects dependencies into the supplied instance
+ using the named object definition.
+
+
+ The object instance that is to be so configured.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+ This feature is not currently supported.
+
+
+
+
+
+ Injects dependencies into the supplied instance
+ using the supplied .
+
+
+ The object instance that is to be so configured.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+ An object definition that should be used to configure object.
+
+
+
+
+
+ Defines a method to release allocated unmanaged resources.
+
+
+
+
+ Determine whether this object factory treats object names case-sensitive or not.
+
+
+
+
+ Return the number of objects defined in the factory.
+
+
+ The number of objects defined in the factory.
+
+
+
+
+ Return an instance of the given object name.
+
+ The name of the object to return.
+ The instance of the object.
+
+
+
+
+ Abstract implementation providing
+ a number of convenience methods and a
+ template method
+ that subclasses must override to provide the actual parsing logic.
+
+
+ Use this implementation when you want
+ to parse some arbitrarily complex XML into one or more
+ ObjectDefinitions. If you just want to parse some
+ XML into a single IObjectDefinition, you may wish to consider
+ the simpler convenience extensions of this class, namely
+ and
+
+
+ Rob Harrop
+ Juergen Hoeller
+ Rick Evans
+ Mark Pollack (.NET)
+
+
+
+ Interface used to handle custom, top-level tags.
+
+ Implementations are free to turn the metadata in the custom tag into as
+ many as required.
+
+ Rob Harrop
+ Mark Pollack (.NET)
+
+
+
+ Parse the specified XmlElement and register the resulting
+ ObjectDefinitions with the IObjectDefinitionRegistry
+ embedded in the supplied
+
+
+
+ This method is never invoked if the parser is namespace aware
+ and was called to process the root node.
+
+
+
+ The element to be parsed.
+
+
+ TThe object encapsulating the current state of the parsing process.
+ Provides access to a IObjectDefinitionRegistry
+
+
+ The primary object definition.
+
+
+
+
+ Constant for the ID attribute
+
+
+
+
+ Parse the specified XmlElement and register the resulting
+ ObjectDefinitions with the IObjectDefinitionRegistry
+ embedded in the supplied
+
+ The element to be parsed.
+ TThe object encapsulating the current state of the parsing process.
+ Provides access to a IObjectDefinitionRegistry
+ The primary object definition.
+
+
+ This method is never invoked if the parser is namespace aware
+ and was called to process the root node.
+
+
+
+
+
+ Resolves the ID for the supplied .
+
+
+ When using generation, a name is generated automatically.
+ Otherwise, the ID is extracted from the "id" attribute, potentially with a
+ fallback to a generated id.
+
+ The element that the object definition has been built from.
+ The object definition to be registered.
+ The the object encapsulating the current state of the parsing process;
+ provides access to a
+ the resolved id
+
+ if no unique name could be generated for the given object definition
+
+
+
+
+ Registers the supplied with the supplied
+ .
+
+ Subclasses can override this method to control whether or not the supplied
+ is actually even registered, or to
+ register even more objects.
+
+ The default implementation registers the supplied
+ with the supplied only if the IsNested
+ parameter is false, because one typically does not want inner objects
+ to be registered as top level objects.
+
+
+
+ The object definition to be registered.
+ The registry that the bean is to be registered with.
+
+
+
+ Returns the value of the element's attribute or null, if the attribute is not specified.
+
+
+ This is a helper for bypassing the behavior of
+ to return if the attribute does not exist.
+
+
+
+
+ Returns the value of the element's attribute or ,
+ if the attribute is not specified.
+
+
+ This is a helper for bypassing the behavior of
+ to return if the attribute does not exist.
+
+
+
+
+ Central template method to actually parse the supplied XmlElement
+ into one or more IObjectDefinitions.
+
+ The element that is to be parsed into one or more s
+ The the object encapsulating the current state of the parsing process;
+ provides access to a
+ The primary IObjectDefinition resulting from the parsing of the supplied XmlElement
+
+
+
+ Gets a value indicating whether an ID should be generated instead of read
+ from the passed in XmlElement.
+
+ Note that this flag is about always generating an ID; the parser
+ won't even check for an "id" attribute in this case.
+
+ true if should generate id; otherwise, false.
+
+
+
+ Gets a value indicating whether an ID should be generated instead if the
+ passed in XmlElement does not specify an "id" attribute explicitly.
+
+ Disabled by default; subclasses can override this to enable ID generation
+ as fallback: The parser will first check for an "id" attribute in this case,
+ only falling back to a generated ID if no value was specified.
+
+ true if should generate id if no value was specified; otherwise, false.
+
+
+
+
+ Convenient base class for when there exists a one-to-one mapping
+ between attribute names on the element that is to be parsed and
+ the property names on the Type being configured.
+
+
+
+
+ Mark Pollack
+
+
+
+ Base Type for those implementations that
+ need to parse and define just a single IObjectDefinition.
+
+
+ Extend this parser Type when you want to create a single object definition
+ from an arbitrarily complex XML element. You may wish to consider extending
+ the when you want to create a
+ single Object definition from a relatively simple custom XML element.
+ The resulting ObjectDefinition will be automatically registered
+ with the ObjectDefinitionRegistry. Your job simply is to parse the
+ custom XML element into a single ObjectDefinition
+
+ Rob Harrop
+ Juergen Hoeller
+ Rick Evans
+ Mark Pollack (.NET)
+
+
+
+ Central template method to actually parse the supplied XmlElement
+ into one or more IObjectDefinitions.
+
+ The element that is to be parsed into one or more s
+ The the object encapsulating the current state of the parsing process;
+ provides access to a
+
+ The primary IObjectDefinition resulting from the parsing of the supplied XmlElement
+
+
+
+
+ Determine the name for the parent of the currently parsed object,
+ in case of the current object being defined as a child object.
+ The default implementation returns null
+ indicating a root object definition.
+
+
+ the name of the parent object for the currently parsed object.
+
+
+
+ Gets the type of the object corresponding to the supplied XmlElement.
+
+ Note that, for application classes, it is generally preferable to override
+ GetObjectTypeName instad, in order to avoid a direct
+ dependence on the object implementation class. The ObjectDefinitionParser
+ and its IXmlObjectDefinitionParser (namespace parser) can be used within an
+ IDE add-in then, even if the application classses are not available in the add-ins
+ AppDomain.
+
+ The element.
+ The Type of the class that is being defined via parsing the supplied
+ Element.
+
+
+
+ Gets the name of the object type name (FullName) corresponding to the supplied XmlElement.
+
+ The element.
+ The type name of the object that is being defined via parsing the supplied
+ XmlElement.
+
+
+
+ Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required.
+
+ The default implementation delegates to the DoParse version without
+ ParameterContext argument.
+ The element.
+ The parser context.
+ The builder used to define the IObjectDefinition.
+
+
+
+ Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required.
+
+ The default implementation does nothing.
+ The element.
+ The builder used to define the IObjectDefinition.
+
+
+
+ Default implementation of the interface.
+ Resolves namespace URIs to implementation types based on mappings.
+
+ Erich Eichinger
+
+
+
+
+
+ Used by to locate
+ implementations for a particular namespace URI.
+
+ TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now
+ Erich Eichinger
+
+
+
+
+
+
+ Lookup a for the given namespace URI.
+
+ the namespace URI
+ the located namespace handler or null
+
+
+
+ Resolve the namespace URI and return the corresponding
+ implementation.
+
+ the namespace URI to get the matching parser for.
+ the matching parser or null
+
+
+
+ XML resource reader.
+
+
+
+ Navigates through an XML resource and invokes parsers registered
+ with the .
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ SPI for parsing an XML document that contains Spring object definitions.
+ Used by for actually parsing a DOM
+ document.
+
+ Instantiated per document to parse: Implementations can hold state in
+ instance variables during the execution of the RegisterObjectDefinitions
+ method, for example global settings that are defined for all object definitions
+ in the document.
+
+ Juergen Hoeller
+ Rob Harrop
+ Mark Pollack (.NET)
+
+
+
+
+ Read object definitions from the given DOM element, and register
+ them with the given object registry.
+
+ The DOM element containing object definitions, usually the
+ root (document) element.
+ The current context of the reader. Includes
+ the resource being parsed
+
+ The number of object definitions that were loaded.
+
+
+ In case of parsing errors.
+
+
+
+
+ The shared instance for this class (and derived classes).
+
+
+
+
+ Creates a new instance of the DefaultObjectDefinitionDocumentReader class.
+
+
+
+
+ Read object definitions from the given DOM element, and register
+ them with the given object registry.
+
+ The DOM element containing object definitions, usually the
+ root (document) element.
+ The current context of the reader. Includes
+ the resource being parsed
+
+ The number of object definitions that were loaded.
+
+
+ In case of parsing errors.
+
+
+
+
+ Parses object definitions starting at the given
+ using the passed .
+
+ The root element to start parsing from.
+ The instance to use.
+
+ in case an error happens during parsing and registering object definitions
+
+
+
+
+ Process an alias element.
+
+
+
+
+ Process the object element
+
+
+
+
+ Loads external XML object definitions from the resource described by the supplied
+ .
+
+ The XML element describing the resource.
+
+ If the resource could not be imported.
+
+
+
+
+ Parses the given alias element, registering the alias with the registry.
+
+ The alias element.
+ The registry.
+
+
+
+ Parse an object definition and register it with the object factory..
+
+ The element containing the object definition.
+ The helper.
+
+
+
+
+
+ Allow the XML to be extensible by processing any custom element types last,
+ after we finished processing the objct definitions. This method is a natural
+ extension point for any other custom post-processing of the XML.
+
+ The default implementation is empty. Subclasses can override this method to
+ convert custom elements into standard Spring object definitions, for example.
+ Implementors have access to the parser's object definition reader and the
+ underlying XML resource, through the corresponding properties.
+
+
+ The root.
+
+
+
+ Allow the XML to be extensible by processing any custom element types first,
+ before we start to process the object definitions.
+
+ This method is a natural
+ extension point for any other custom pre-processing of the XML.
+
The default implementation is empty. Subclasses can override this method to
+ convert custom elements into standard Spring object definitions, for example.
+ Implementors have access to the parser's object definition reader and the
+ underlying XML resource, through the corresponding properties.
+
+
+ The root element of the XML document.
+
+
+
+ Creates an instance for the given and element.
+
+ the to create the
+ the root to start reading from
+ a new instance
+
+
+
+ Gets the reader context.
+
+ The reader context.
+
+
+
+ Simple class that holds the defaults specified at the <objects>
+ level in a standard Spring XML object definition document:
+ default-lazy-init, default-autowire, etc.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Gets or sets the autowire setting for the document that's currently parsed.
+
+ The autowire.
+
+
+
+ Gets or sets the dependency-check setting for the document that's currently parsed
+
+ The dependency check.
+
+
+
+ Gets or sets the lazy-init flag for the document that's currently parsed.
+
+ The lazy init.
+
+
+
+ Gets or sets the merge setting for the document that's currently parsed.
+
+ The merge.
+
+
+
+ Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface.
+
+
+
+ Used by
+ for actually parsing a DOM document or
+ fragment.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+ Sandu Turcan (.NET)
+
+
+
+ Invoked by after construction but before any
+ elements have been parsed.
+
+
+
+
+ Parse the specified element and register any resulting
+ IObjectDefinitions with the IObjectDefinitionRegistry that is
+ embedded in the supplied ParserContext.
+
+
+ Implementations should return the primary IObjectDefinition
+ that results from the parse phase if they wish to used nested
+ inside (for example) a <property> tag.
+ Implementations may return null if they will not
+ be used in a nested scenario.
+
+
+ The element to be parsed into one or more IObjectDefinitions
+ The object encapsulating the current state of the parsing
+ process.
+
+ The primary IObjectDefinition (can be null as explained above)
+
+
+
+
+ Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder,
+ returning the decorated definition.
+
+ The XmlNode may either be an XmlAttribute or an XmlElement, depending on
+ whether a custom attribute or element is being parsed.
+ Implementations may choose to return a completely new definition,
+ which will replace the original definition in the resulting IApplicationContext/IObjectFactory.
+
+ The supplied ParserContext can be used to register any additional objects needed to support
+ the main definition.
+
+ The source element or attribute that is to be parsed.
+ The current object definition.
+ The object encapsulating the current state of the parsing
+ process.
+ The decorated definition (to be registered in the IApplicationContext/IObjectFactory),
+ or simply the original object definition if no decoration is required. A null value is strickly
+ speaking invalid, but will leniently treated like the case where the original object definition
+ gets returned.
+
+
+
+ Attribute that should be used to specify the default namespace
+ and schema location for a custom namespace parser.
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of .
+
+
+
+
+ Gets or sets the default namespace for the configuration parser.
+
+
+ The default namespace for the configuration parser.
+
+
+
+
+ Gets or sets the default schema location for the configuration parser.
+
+
+ The default schema location for the configuration parser.
+
+
+ If the property is set, the will always resolve to an assembly-resource
+ and the set will be interpreted relative to this assembly.
+
+
+
+
+ Gets or sets a type from the assembly containing the schema
+
+
+ If this property is set, the will always resolve to an assembly-resource
+ and the will be interpreted relative to this assembly.
+
+
+
+
+ Provides a resolution mechanism for configuration parsers.
+
+
+
+ The uses this registry
+ class to find the parser handling a specific namespace.
+
+
+ Aleksandar Seovic
+
+
+
+ Name of the .Net config section that contains definitions
+ for custom config parsers.
+
+
+
+
+ Creates a new instance of the NamespaceParserRegistry class.
+
+
+
+
+ Reset the list of registered parsers to "factory"-setting
+
+ use for unit tests only
+
+
+
+ Registers the type for wellknown namespaces
+
+ true if the parser could be registered, false otherwise
+
+
+
+ Constructs a "assembly://..." qualified schemaLocation url using the given type
+ to obtain the assembly name.
+
+
+
+
+ Returns a parser for the given namespace.
+
+
+ The namespace for which to lookup the parser implementation.
+
+
+ A parser for a given , or
+ if no parser was found.
+
+
+
+
+ Returns a schema collection containing validation schemas for all registered parsers.
+
+
+ A schema collection containing validation schemas for all registered parsers.
+
+
+
+
+ Pegisters parser, using default namespace and schema location
+ as defined by the .
+
+
+ The of the parser that will be activated
+ when an element in its default namespace is encountered.
+
+
+ If is .
+
+
+
+
+ Associates a parser with a namespace.
+
+
+
+ Parsers registered with the same as that
+ of a parser that has previously been registered will overwrite the existing
+ parser.
+
+
+
+ The of the parser that will be activated
+ when the attendant is
+ encountered.
+
+
+ The namespace with which to associate instance of the parser.
+
+
+ The location of the XML schema that should be used for validation
+ of the XML elements that belong to the specified namespace
+ (can be any valid Spring.NET resource URI).
+
+
+ If the is not a
+ that implements the
+ interface.
+
+
+ If is .
+
+
+
+
+ Pegisters parser, using default namespace and schema location
+ as defined by the .
+
+
+ The parser instance.
+
+
+ If is .
+
+
+
+
+ Associates a parser with a namespace.
+
+
+
+ Parsers registered with the same as that
+ of a parser that has previously been registered will overwrite the existing
+ parser.
+
+
+
+ The namespace with which to associate instance of the parser.
+
+
+ The parser instance.
+
+
+ The location of the XML schema that should be used for validation
+ of the XML elements that belong to the specified namespace
+ (can be any valid Spring.NET resource URI).
+
+
+ If is , or if
+ is not specified and parser class
+ does not have default value defined using .
+
+
+
+
+ Register a schema as well-known
+
+
+
+
+
+
+ Returns default values for the parser namespace and schema location as
+ defined by the .
+
+
+ A type of the parser.
+
+
+ A instance containing
+ default values for the parser namsepace and schema location
+
+
+
+
+ Resolves xml entities by using the infrastructure.
+
+
+
+
+ Adapts the interface to .
+ Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0
+
+
+
+
+ Support class for implementing custom namespace parsers.
+
+ Parsing of individual elements is done via a ObjectDefintionParser.
+ Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser
+ to handle a specific element.
+ Rob Harrop
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Invoked by after construction but before any
+ elements have been parsed.
+
+
+
+
+ Parses an element under the root node, typically
+ an object definition or import statement.
+
+
+ The element to be parsed.
+
+
+ The parser context.
+
+
+ The number of object defintions created from this element.
+
+
+
+
+ Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder,
+ returning the decorated definition.
+
+ The XmlNode may either be an XmlAttribute or an XmlElement, depending on
+ whether a custom attribute or element is being parsed.
+ Implementations may choose to return a completely new definition,
+ which will replace the original definition in the resulting IApplicationContext/IObjectFactory.
+
+ The supplied ParserContext can be used to register any additional objects needed to support
+ the main definition.
+
+ The source element or attribute that is to be parsed.
+ The current object definition.
+ The object encapsulating the current state of the parsing
+ process.
+ The decorated definition (to be registered in the IApplicationContext/IObjectFactory),
+ or simply the original object definition if no decoration is required. A null value is strickly
+ speaking invalid, but will leniently treated like the case where the original object definition
+ gets returned.
+
+
+
+ Register the specified for the given
+
+
+
+
+ Constants defining the structure and values associated with the
+ Spring.NET XML object definition format.
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Value of a boolean attribute that represents
+ .
+
+
+
+ Anything else represents .
+
+
+
+
+
+ Signifies that a default value is to be applied.
+
+
+
+
+ Defines an external XML object definition resource.
+
+
+
+
+ Specifies the relative path to an external XML object definition
+ resource.
+
+
+
+
+ Defines an alias for an object definition.
+
+
+
+
+ Specifies the alias of an object definition.
+
+
+
+
+ Specifies the default lazy initialization mode.
+
+
+
+
+ Specifies the default dependency checking mode.
+
+
+
+
+ Specifies the default autowire mode.
+
+
+
+
+ Specifies the default collection merge mode.
+
+
+
+
+ Defines a single named object.
+
+
+
+
+ Element containing informative text describing the purpose of the
+ enclosing element.
+
+
+
+ Always optional.
+
+
+ Used primarily for user documentation of XML object definition
+ documents.
+
+
+
+
+
+ Specifies a .
+
+
+
+ Does not have to be fully assembly qualified, but it is recommended
+ that the names of one's objects are
+ specified explicitly.
+
+
+
+
+
+ The name or alias of the parent object definition that a child
+ object definition inherits from.
+
+
+
+
+ Objects can be identified by an id, to enable reference checking.
+
+
+
+ There are constraints on a valid XML id: if you want to reference
+ your object in .NET code using a name that's illegal as an XML id,
+ use the optional "name" attribute
+ ().
+ If neither given, the objects name is
+ used as id.
+
+
+
+
+
+ Can be used to create one or more aliases illegal in an id.
+
+
+
+ Multiple aliases can be separated by any number of spaces,
+ semicolons, or commas
+ ().
+
+
+ Always optional.
+
+
+
+
+
+ Is this object a "singleton" (one shared instance, which will
+ be returned by all calls to
+ with the id), or a
+ "prototype" (independent instance resulting from each call to
+ ).
+
+
+
+ Singletons are most commonly used, and are ideal for multi-threaded
+ service objects.
+
+
+
+
+
+
+ Controls object scope. Only applicable to ASP.NET web applications.
+
+
+
+ Scope can be defined as either application, session or request. It
+ defines when "singleton" instances are initialized, but has no
+ effect on prototype definitions.
+
+
+
+
+
+ The names of the objects that this object depends on being
+ initialized.
+
+
+
+ The object factory will guarantee that these objects
+ get initialized before this object definition.
+
+
+ Dependencies are normally expressed through object properties or
+ constructor arguments. This property should just be necessary for
+ other kinds of dependencies such as statics (*ugh*) or database
+ preparation on startup.
+
+
+
+
+
+ Optional attribute for the name of the custom initialization method
+ to invoke after setting object properties.
+
+
+
+ The method must have no arguments.
+
+
+
+
+
+ Optional attribute for the name of the custom destroy method to
+ invoke on object factory shutdown.
+
+
+
+ Valid destroy methods have either of the following signatures...
+
+ void MethodName()
+ void MethodName(bool force)
+
+
+
+ Only invoked on singleton objects!
+
+
+
+
+
+ A constructor argument : the constructor-arg tag can have an
+ optional type attribute, to specify the exact type of the
+ constructor argument
+
+
+
+ Only needed to avoid ambiguities, e.g. in case of 2 single
+ argument constructors that can both be converted from a
+ .
+
+
+
+
+
+ The constructor-arg tag can have an optional index attribute,
+ to specify the exact index in the constructor argument list.
+
+
+
+ Only needed to avoid ambiguities, e.g. in case of 2 arguments of
+ the same type.
+
+
+
+
+
+ The constructor-arg tag can have an optional named parameter
+ attribute, to specify a named parameter in the constructor
+ argument list.
+
+
+
+
+ Is this object "abstract", i.e. not meant to be instantiated itself
+ but rather just serving as parent for concrete child object
+ definitions?
+
+
+
+ Default is . Specify
+ to tell the object factory to not try to instantiate that
+ particular object in any case.
+
+
+
+
+
+ A property definition : object definitions can have zero or more
+ properties.
+
+
+
+ Spring.NET supports primitives, references to other objects in the
+ same or related factories, lists, dictionaries, and name value
+ collections.
+
+
+
+
+
+ A reference to another managed object or static
+ .
+
+
+
+
+ ID refs must specify a name of the target object.
+
+
+
+
+ A reference to the name of another managed object in the same
+ context.
+
+
+
+
+ A reference to the name of another managed object in the same
+ context.
+
+
+
+ Local references, using the "local" attribute, have to use object
+ ids; they can be checked by a parser, thus should be preferred for
+ references within the same object factory XML file.
+
+
+
+
+
+ Alternative to type attribute for factory-method usage.
+
+
+
+ If this is specified, no type attribute should be used. This should
+ be set to the name of an object in the current or ancestor
+ factories that contains the relevant factory method. This allows
+ the factory itself to be configured using Dependency Injection, and
+ an instance (rather than static) method to be used.
+
+
+
+
+
+ Optional attribute specifying the name of a factory method to use
+ to create this object.
+
+
+
+ Use constructor-arg elements to specify arguments to the factory
+ method, if it takes arguments. Autowiring does not apply to
+ factory methods.
+
+
+ If the "type" attribute is present, the factory method will be a
+ static method on the type specified by the "type" attribute on
+ this object definition. Often this will be the same type as that
+ of the constructed object - for example, when the factory method
+ is used as an alternative to a constructor. However, it may be on
+ a different type. In that case, the created object will *not* be
+ of the type specified in the "type" attribute. This is analogous
+ to behaviour.
+
+
+ If the "factory-object" attribute is present, the "type" attribute
+ is not used, and the factory method will be an instance method on
+ the object returned from a
+
+ call with the specified object name. The factory object may be
+ defined as a singleton or a prototype.
+
+
+ The factory method can have any number of arguments. Use indexed
+ constructor-arg elements in conjunction with the factory-method
+ attribute.
+
+
+ Setter Injection can be used in conjunction with a factory method.
+ Method Injection cannot, as the factory method returns an instance,
+ which will be used when the container creates the object.
+
+
+
+
+
+ A list can contain multiple inner object, ref, collection, or
+ value elements.
+
+
+
+ Lists are untyped, pending generics support, although references
+ will be strongly typed.
+
+
+ A list can also map to an array type. The necessary conversion is
+ automatically performed by the
+ .
+
+
+
+
+
+ A set can contain multiple inner object, ref, collection, or value
+ elements.
+
+
+
+ Sets are untyped, pending generics support, although references
+ will be strongly typed.
+
+
+
+
+
+ A Spring.NET map is a mapping from a string key to object (a .NET
+ ).
+
+
+
+ Dictionaries may be empty.
+
+
+
+
+
+ A lookup key (for a dictionary or name / value collection).
+
+
+
+
+ A lookup key (for a dictionary or name / value collection).
+
+
+
+
+ Contains a string representation of a value.
+
+
+
+ This is used by name-value, ctor argument, and property elements.
+
+
+
+
+
+ Contains delimiters that should be used to split delimited string values.
+
+
+
+ This is used by name-value element.
+
+
+
+
+
+ A reference to another objects.
+
+
+
+ Used as a convenience shortcut on property and constructor-arg
+ elements to refer to other objects.
+
+
+
+
+
+ Contains a string representation of an expression.
+
+
+
+ This is used by ctor argument and property elements.
+
+
+
+
+
+ A map entry can be an inner object, ref, collection, or value.
+
+
+
+ The name of the property is given by the "key" attribute.
+
+
+
+
+
+ Contains a string representation of a property value.
+
+
+
+ The property may be a string, or may be converted to the
+ required using the
+
+ machinery. This makes it possible for application developers to
+ write custom
+ implementations that can convert strings to objects.
+
+
+ This is recommended for simple objects only. Configure more complex
+ objects by setting properties to references to other objects.
+
+
+
+
+
+ Contains a string representation of an expression.
+
+
+
+
+ Denotes value.
+
+
+
+ Necessary because an empty "value" tag will resolve to an empty
+ , which will not be resolved to
+ value unless a special
+ does so.
+
+
+
+
+
+ 'name-values' elements differ from dictionary elements in that
+ values must be strings.
+
+
+
+ May be empty.
+
+
+
+
+
+ Element content is the string value of the property.
+
+
+
+ The "key" attribute is the name of the property.
+
+
+
+
+
+ The lazy initialization mode for an individual object definition.
+
+
+
+
+ The dependency checking mode for an individual object definition.
+
+
+
+
+ Defines a subscription to one or more events published by one or
+ more event sources.
+
+
+
+
+ The name of an event handling method.
+
+
+
+ Defaults to On${event}.
+ Note : this default will probably change before the first 1.0
+ release.
+
+
+
+
+
+ The name of an event.
+
+
+
+
+ The autowiring mode for an individual object definition.
+
+
+
+
+ Shortcut alternative to specifying a key element in a
+ dictionary entry element with <ref object="..."/>.
+
+
+
+
+ Shortcut alternative to specifying a value element in a
+ dictionary entry element with <ref object="..."/>.
+
+
+
+
+ Specify if the collection values should be merged with the parent.
+
+
+
+
+ The string of characters that delimit object names.
+
+
+
+
+ A lookup method causes the IoC container to override a given method and return
+ the object with the name given in the attendant object attribute.
+
+
+
+ This is a form of Method Injection.
+
+
+ It's particularly useful as an alternative to implementing the
+ interface,
+ in order to be able to make
+
+ calls for non-singleton instances at runtime. In this case, Method Injection
+ is a less invasive alternative.
+
+
+
+
+
+ The name of a lookup method. This method must take no arguments.
+
+
+
+
+ The name of the object in the IoC container that the lookup method
+ must resolve to.
+
+
+
+ Often this object will be a prototype, in which case the lookup method
+ will return a distinct instance on every invocation. This is useful
+ for single-threaded objects.
+
+
+
+
+
+ A replaced method causes the IoC container to override a given method
+ with an (arbitrary) implementation at runtime.
+
+
+
+ This (again) is a form of Method Injection.
+
+
+
+
+
+ Name of the method whose implementation should be replaced by the
+ IoC container.
+
+
+
+ If this method is not overloaded, there's no need to use arg-type
+ subelements.
+
+
+ If this method is overloaded, arg-type subelements must be
+ used for all override definitions for the method.
+
+
+
+
+
+ The object name of an implementation of the
+ interface.
+
+
+
+ This may be a singleton or prototype. If it's a prototype, a new
+ instance will be used for each method replacement. Singleton usage
+ is the norm.
+
+
+
+
+
+ Subelement of replaced-method identifying an argument for a
+ replaced method in the event of method overloading.
+
+
+
+
+
+ Specification of the of an overloaded method
+ argument as a .
+
+
+
+ For convenience, this may be a substring of the FQN. E.g. all the following would match
+ :
+
+
+
+
+ System.String
+
+
+ string
+
+
+ str
+
+
+
+
+
+
+
+
+ Check everything.
+
+
+
+
+ Just check primitive (string, int, etc) values.
+
+
+
+
+ Check object references.
+
+
+
+
+ Autowire by name.
+
+
+
+
+ Autowire by .
+
+
+
+
+ Autowiring by constructor.
+
+
+
+
+ The autowiring strategy is to be determined by introspection
+ of the object's .
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This is a utility class, and as such has no publicly visible
+ constructors.
+
+
+
+
+
+ Stateful class used to parse XML object definitions.
+
+ Not all parsing code has been refactored into this class. See
+ BeanDefinitionParserDelegate in Java for how this class should evolve.
+ Rob Harrop
+ Juergen Hoeller
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ The shared instance for this class (and derived classes).
+
+
+
+
+ Initializes a new instance of the class.
+
+ The reader context.
+
+
+
+ Initializes a new instance of the class.
+
+ The reader context.
+ The root element of the definition document to parse
+
+
+
+ Initialize the default lazy-init, dependency check, and autowire settings.
+
+ The root element
+
+
+
+ Determines whether the Spring object namespace is equal to the the specified namespace URI.
+
+ The namespace URI.
+
+ true if is the default Spring namespace; otherwise, false.
+
+
+
+
+ Decorates the object definition if required.
+
+ The element.
+ The holder.
+
+
+
+
+ Parse a standard object definition into a
+ ,
+ including object name and aliases.
+
+ The element containing the object definition.
+
+ The parsed object definition wrapped within an
+
+ instance.
+
+
+
+ Object elements specify their canonical name via the "id" attribute
+ and their aliases as a delimited "name" attribute.
+
+
+ If no "id" is specified, uses the first name in the "name" attribute
+ as the canonical name, registering all others as aliases.
+
+
+
+
+
+ Parse a standard object definition into a
+ ,
+ including object name and aliases.
+
+ The element containing the object definition.
+ The containing object definition if is a nested element.
+
+ The parsed object definition wrapped within an
+
+ instance.
+
+
+
+ Object elements specify their canonical name via the "id" attribute
+ and their aliases as a delimited "name" attribute.
+
+
+ If no "id" is specified, uses the first name in the "name" attribute
+ as the canonical name, registering all others as aliases.
+
+
+
+
+
+ Create an instance from the given and .
+
+
+ This method may be used as a last resort to post-process an object definition before it gets added to the registry.
+
+
+
+
+ Allows deriving classes to post process the name and aliases for the current element. By default
+ does nothing and returns the unmodified .
+
+
+ The list passed in may be modified by an implementation of this method to reflect special needs.
+
+ the object name obtained by the default algorithm from 'id' and 'name' attributes so far.
+ the object aliases obtained by the default algorithm from 'name' attribute so far.
+ the currently processed element.
+ the containing object definition, may be null
+ the new object name to be used.
+
+
+
+ Validate that the specified object name and aliases have not been used already.
+
+
+
+
+ Parses an element in a custom namespace.
+
+
+ the parsed object definition or null if not supported by the corresponding parser.
+
+
+
+ Parses an element in a custom namespace.
+
+
+ if a nested element, the containing object definition
+ the parsed object definition or null if not supported by the corresponding parser.
+
+
+
+ Given a string containing delimited object names, returns
+ a string array split on the object name delimeter.
+
+
+ The string containing delimited object names.
+
+
+ A string array split on the object name delimeter.
+
+
+
+
+
+ Determines whether the string represents a 'true' boolean value.
+
+ The value.
+
+ true if is 'true' string value; otherwise, false.
+
+
+
+
+ Convenience method to create a builder for a root object definition.
+
+ Name of the object type.
+ A builder for a root object definition.
+
+
+
+ Convenience method to create a builder for a root object definition.
+
+ Type of the object.
+ a builder for a root object definition
+
+
+
+ Returns the value of the element's attribute or null, if the attribute is not specified.
+
+
+ This is a helper for bypassing the behavior of
+ to return if the attribute does not exist.
+
+
+
+
+ Returns the value of the element's attribute or ,
+ if the attribute is not specified.
+
+
+ This is a helper for bypassing the behavior of
+ to return if the attribute does not exist.
+
+
+
+
+ Report a parser error.
+
+
+
+
+ Gets the defaults definition object, or null if the
+ default have not yet been initialized.
+
+ The defaults.
+
+
+
+ Gets the reader context.
+
+ The reader context.
+
+
+
+ Creates an instance
+ populated with the object definitions supplied in the configuration
+ section.
+
+
+
+ Applications will typically want to use an
+ , and instantiate it
+ via the use of the
+ class (which is similar in functionality to this class). This class is
+ provided for those times when only an
+ is required.
+
+ Creates an instance of the class XmlObjectFactory
+
+
+
+
+
+
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a
+ instance populated with the object definitions supplied in the
+ configuration section.
+
+
+ The configuration settings in a corresponding parent configuration
+ section.
+
+
+ The configuration context when called from the ASP.NET
+ configuration system. Otherwise, this parameter is reserved and
+ is .
+
+
+ The for the section.
+
+
+ A instance
+ populated with the object definitions supplied in the configuration
+ section.
+
+
+
+
+ Default implementation of the
+ interface.
+
+
+
+ Parses object definitions according to the standard Spring.NET schema.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ The namespace URI for the standard Spring.NET object definition schema.
+
+
+
+
+ The shared instance for this class (and derived classes).
+
+
+
+
+ Invoked by after construction but before any
+ elements have been parsed.
+
+ This is a NoOp
+
+
+
+ Parse the specified XmlElement and register the resulting
+ ObjectDefinitions with the IObjectDefinitionRegistry
+ embedded in the supplied
+
+ The element to be parsed.
+ TThe object encapsulating the current state of the parsing process.
+ Provides access to a IObjectDefinitionRegistry
+ The primary object definition.
+
+
+ This method is never invoked if the parser is namespace aware
+ and was called to process the root node.
+
+
+
+
+
+ Parse the specified element and register any resulting
+ IObjectDefinitions with the IObjectDefinitionRegistry that is
+ embedded in the supplied ParserContext.
+
+ The element to be parsed into one or more IObjectDefinitions
+ The object encapsulating the current state of the parsing
+ process.
+
+ The primary IObjectDefinition (can be null as explained above)
+
+
+ Implementations should return the primary IObjectDefinition
+ that results from the parse phase if they wish to used nested
+ inside (for example) a <property> tag.
+ Implementations may return null if they will not
+ be used in a nested scenario.
+
+
+
+
+
+ Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder,
+ returning the decorated definition.
+
+ The XmlNode may either be an XmlAttribute or an XmlElement, depending on
+ whether a custom attribute or element is being parsed.
+ Implementations may choose to return a completely new definition,
+ which will replace the original definition in the resulting IApplicationContext/IObjectFactory.
+
+ The supplied ParserContext can be used to register any additional objects needed to support
+ the main definition.
+
+ The source element or attribute that is to be parsed.
+ The current object definition.
+ The object encapsulating the current state of the parsing
+ process.
+ The decorated definition (to be registered in the IApplicationContext/IObjectFactory),
+ or simply the original object definition if no decoration is required. A null value is strickly
+ speaking invalid, but will leniently treated like the case where the original object definition
+ gets returned.
+
+
+
+ Loads external XML object definitions from the resource described by the supplied
+ .
+
+ The XML element describing the resource.
+ The parser context.
+
+ If the resource could not be imported.
+
+
+
+ Parses an event listener definition.
+
+ The name associated with the object that the event handler is being defined on.
+
+ The events being populated.
+
+ The element containing the event listener definition.
+
+
+ The namespace-aware parser.
+
+
+
+
+ Parse an object definition and register it with the object factory..
+
+ The element containing the object definition.
+ The parser context.
+
+
+
+
+ Parse an object definition and register it with the object factory..
+
+ The element containing the object definition.
+ The parser context.
+
+
+
+
+ Parse an object definition and register it with the object factory..
+
+ The element containing the object definition.
+ The parser context.
+
+
+
+
+ Parse a standard object definition into a
+ ,
+ including object name and aliases.
+
+ The element containing the object definition.
+ The parser context.
+ if set to true if we are processing an inner
+ object definition.
+
+ The object (definition) wrapped within an
+
+ instance.
+
+
+
+ Object elements specify their canonical name via the "id" attribute
+ and their aliases as a delimited "name" attribute.
+
+
+ If no "id" is specified, uses the first name in the "name" attribute
+ as the canonical name, registering all others as aliases.
+
+
+
+
+
+ Calculates an id for an object definition.
+
+
+
+ Called when an object definition has not been explicitly defined
+ with an id.
+
+
+
+ The element containing the object definition.
+
+
+ The list of names defined for the object; may be
+ or even empty.
+
+
+ A calculated object definition id.
+
+
+
+
+ Parse a standard object definition.
+
+ The element containing the object definition.
+ The id of the object definition.
+ parsing state holder
+ The object (definition).
+
+
+
+ Parse method override argument subelements of the given object element.
+
+
+
+
+ Parse element and add parsed element to
+
+
+
+
+ Parse element and add parsed element to
+
+
+
+
+ Parse constructor argument subelements of the given object element.
+
+
+
+
+ Parse event handler subelements of the given object element.
+
+
+
+
+ Parse property value subelements of the given object element.
+
+
+ The name of the object (definition) associated with the property element (s)
+
+
+ The element containing the top level object definition.
+
+
+ The namespace-aware parser.
+
+
+ The property (s) associated with the object (definition).
+
+
+
+
+ Parse a constructor-arg element.
+
+
+ The name of the object (definition) associated with the ctor arg.
+
+
+ The list of constructor args associated with the object (definition).
+
+
+ The name of the element containing the ctor arg definition.
+
+
+ The namespace-aware parser.
+
+
+
+
+ Parse a property element.
+
+
+ The name of the object (definition) associated with the property.
+
+
+ The list of properties associated with the object (definition).
+
+
+ The name of the element containing the property definition.
+
+
+ The namespace-aware parser.
+
+
+
+
+ Get the value of a property element (may be a list).
+
+
+ Please note that even though this method is named GetPropertyValue,
+ it is called by both the property and constructor argument element
+ handlers.
+
+
+ The property element.
+
+ The name of the object associated with the property.
+
+
+ The namespace-aware parser.
+
+
+
+
+ Parse a value, ref or collection subelement of a property element.
+
+
+ Subelement of property element; we don't know which yet.
+
+
+ The name of the object (definition) associated with the top level property.
+
+
+ The namespace-aware parser.
+
+
+
+
+ Gets a list definition.
+
+
+ The element describing the list definition.
+
+
+ The name of the object (definition) associated with the list definition.
+
+
+ The namespace-aware parser.
+
+ The list definition.
+
+
+
+ Gets a set definition.
+
+
+ The element describing the set definition.
+
+
+ The name of the object (definition) associated with the set definition.
+
+
+ The namespace-aware parser.
+
+ The set definition.
+
+
+
+ Gets a dictionary definition.
+
+ The element describing the dictionary definition.
+ The name of the object (definition) associated with the dictionary definition.
+ The namespace-aware parser.
+ The dictionary definition.
+
+
+
+ Selects sub-elements with a given
+ name.
+
+
+
+ Uses a namespace manager if necessary.
+
+
+
+ The element to be searched in.
+
+
+ The name of the child nodes to look for.
+
+
+ The child s of the supplied
+ with the supplied
+ .
+
+
+
+
+ Selects a single sub-element with a given
+ name.
+
+
+
+ Uses a namespace manager if necessary.
+
+
+
+ The element to be searched in.
+
+
+ The name of the child node to look for.
+
+
+ The first child of the supplied
+ with the supplied
+ .
+
+
+
+
+ Gets a name value collection mapping definition.
+
+
+ The element describing the name value collection mapping definition.
+
+
+ The name of the object (definition) associated with the
+ name value collection mapping definition.
+
+ the context carrying parsing state information
+ The name value collection definition.
+
+
+
+ Returns the text of the supplied ,
+ or the empty string value if said is empty.
+
+
+
+ If the supplied is ,
+ then the empty string value will be returned.
+
+
+
+
+
+ Strips the dependency check value out of the supplied string.
+
+
+
+ If the supplied is an invalid dependency
+ checking mode, the invalid value will be logged and this method will
+ return the value.
+ No exception will be raised.
+
+
+
+ The string containing the dependency check value.
+
+ The dependency check value.
+
+
+
+
+ Strips the autowiring mode out of the supplied string.
+
+
+
+ If the supplied is an invalid autowiring mode,
+ the invalid value will be logged and this method will return the
+ value. No exception will be raised.
+
+
+
+ The string containing the autowiring mode definition.
+
+ The autowiring mode.
+
+
+
+
+ Given a string containing delimited object names, returns
+ a string array split on the object name delimeter.
+
+
+ The string containing delimited object names.
+
+
+ A string array split on the object name delimeter.
+
+
+
+
+
+ Context that gets passed along an object definition parsing process, encapsulating
+ all relevant configuraiton as well as state.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The parser helper.
+
+
+
+ Initializes a new instance of the class.
+
+ The parser helper.
+ The containing object definition.
+
+
+
+ Initializes a new instance of the class.
+
+ The reader context.
+ The parser helper.
+
+
+
+ Initializes a new instance of the class.
+
+ The reader context.
+ The parser helper.
+ The containing object definition.
+
+
+
+ Gets the reader context.
+
+ The reader context.
+
+
+
+ Gets the registry.
+
+ The registry.
+
+
+
+ Gets the parser helper.
+
+ The parser helper.
+
+
+
+ Gets the containing object definition.
+
+ The containing object definition.
+
+
+
+ Gets a value indicating whether this instance is nested.
+
+ true if this instance is nested; otherwise, false.
+
+
+
+ Gets a value indicating whether this instance is default lazy init.
+
+
+ true if this instance is default lazy init; otherwise, false.
+
+
+
+
+ Represents the replacement of a method on a managed object by the IoC
+ container.
+
+
+
+ Note that this mechanism is not intended as a generic means of
+ inserting crosscutting code: use AOP for that.
+
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The name of the method that is to be overridden.
+
+
+ The object name of the
+ instance in the surrounding IoC container.
+
+
+ If either of the supplied arguments is or
+ contains only whitespace character(s).
+
+
+
+
+ Add a fragment of a instance's
+ such as 'Exception or System.Excep to identify an argument
+ for a dependency injected method.
+
+
+ A (sub) string of a instance's .
+
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+
+
+
+
+ Does this
+ match the supplied ?
+
+ The method to be checked.
+
+ if this override matches the supplied .
+
+
+ If the supplied is .
+
+
+
+
+ A that represents the current
+ .
+
+
+ A that represents the current
+ .
+
+
+
+
+ The object name of the
+ instance in the surrounding IoC container.
+
+
+
+
+ Object definition reader for Spring's default XML object definition format.
+
+
+
+ Typically applied to a
+ instance.
+
+
+ This class registers each object definition with the given object factory superclass,
+ and relies on the latter's implementation of the
+ interface.
+
+
+ It supports singletons, prototypes, and references to either of these kinds of object.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The
+ instance that this reader works on.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The
+ instance that this reader works on.
+
+
+ The to be used for parsing.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The
+ instance that this reader works on.
+
+
+ The to be used for parsing.
+
+ the to use for creating new s
+
+
+
+ Load object definitions from the supplied XML .
+
+
+ The XML resource for the object definitions that are to be loaded.
+
+
+ The number of object definitions that were loaded.
+
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Actually load object definitions from the specified XML file.
+
+ The input stream to read from.
+ The resource for the XML data.
+
+
+
+
+ Validation callback for a validating XML reader.
+
+ The source of the event.
+ Any data pertinent to the event.
+
+
+
+ Register the object definitions contained in the given DOM document.
+
+ The DOM document.
+
+ The original resource from where the
+ was read.
+
+
+ The number of object definitions that were registered.
+
+
+ In case of parsing errors.
+
+
+
+
+ Creates the to use for actually
+ reading object definitions from an XML document.
+
+ Default implementation instantiates the specified
+ or if no reader type is specified.
+
+
+
+
+ Creates the to be passed along
+ during the object definition reading process.
+
+ The underlying that is currently processed.
+ A new
+
+
+
+ Create a instance for handling custom namespaces.
+
+
+ TODO (EE): make protected virtual, see remarks on
+
+
+
+
+ The to be used for parsing.
+
+
+
+
+ Sets the IObjectDefinitionDocumentReader implementation to use, responsible for
+ the actual reading of the XML object definition document.stype of the document reader.
+
+ The type of the document reader.
+
+
+
+ Specify a to use. If none is specified a default
+ instance will be created by
+
+
+
+
+ Specify a for creating instances of .
+
+
+
+
+ For retrying the parse process
+
+
+
+
+ Convenience extension of
+
+ that reads object definitions from an XML document or element.
+
+
+
+ Delegates to
+
+ underneath; effectively equivalent to using a
+ for a
+ .
+
+
+ objects doesn't need to be the root element of
+ the XML document: this class will parse all object definition elements in the
+ XML stream.
+
+
+ This class registers each object definition with the
+
+ superclass, and relies on the latter's implementation of the
+ interface. It supports
+ singletons, prototypes and references to either of these kinds of object.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+
+ Creates a new instance of the class,
+ with the given resource, which must be parsable using DOM.
+
+
+ The XML resource to load object definitions from.
+
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Creates a new instance of the class,
+ with the given resource, which must be parsable using DOM.
+
+
+ The XML resource to load object definitions from.
+
+ Flag specifying whether to make this object factory case sensitive or not.
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Creates a new instance of the class,
+ with the given resource, which must be parsable using DOM, and the
+ given parent factory.
+
+
+ The XML resource to load object definitions from.
+
+ The parent object factory (may be ).
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Creates a new instance of the class,
+ with the given resource, which must be parsable using DOM, and the
+ given parent factory.
+
+
+ The XML resource to load object definitions from.
+
+ Flag specifying whether to make this object factory case sensitive or not.
+ The parent object factory (may be ).
+
+ In the case of loading or parsing errors.
+
+
+
+
+ Gets object definition reader to use.
+
+
+
+
+ Extension of specific to use with an XmlObjectDefinitionReader.
+ Provides access to configured in
+
+
+
+
+ The maximum length of any XML fragment displayed in the error message
+ reporting.
+
+
+
+ Hopefully this will display enough context so that a user
+ can pinpoint the cause of the error.
+
+
+
+
+
+ Initializes a new instance of the class.
+
+ The resource.
+ The reader.
+
+
+
+ Initializes a new instance of the class.
+
+ The resource.
+ The reader.
+ The factory to use for creating new instances.
+
+
+
+ Generates the name of the object.
+
+ The object definition.
+ the generated object name
+
+
+
+ Registers the name of the with generated.
+
+ The object definition.
+ the generated object name
+
+
+
+ Reports a parse error by loading a
+ with helpful contextual
+ information and throwing said exception.
+
+
+
+ Derived classes can of course override this method in order to implement
+ validators capable of displaying a full list of errors found in the
+ definition.
+
+
+
+ The node that triggered the parse error.
+
+
+ The name of the object that triggered the exception.
+
+
+ A message about the exception.
+
+
+ Always throws an instance of this exception class, that will
+ contain helpful contextual infomation about the parse error.
+
+
+
+
+
+ Reports a parse error by loading a
+ with helpful contextual
+ information and throwing said exception.
+
+
+
+ Derived classes can of course override this method in order to implement
+ validators capable of displaying a full list of errors found in the
+ definition.
+
+
+
+ The node that triggered the parse error.
+
+
+ The name of the object that triggered the exception.
+
+
+ A message about the error.
+
+
+ The root cause of the parse error (if any - may be ).
+
+
+ Always throws an instance of this exception class, that will
+ contain helpful contextual infomation about the parse error.
+
+
+
+
+ This method can be overwritten in order to implement validators
+ capable of displaying a full list of errors found in the definition.
+
+
+ The node that triggered the parse error.
+
+
+ A message about the exception.
+
+
+
+
+ Gets the reader.
+
+ The reader.
+
+
+
+ Gets the resource loader.
+
+ The resource loader.
+
+
+
+ Gets the registry.
+
+ The registry.
+
+
+
+ Gets or sets the object definition factory.
+
+ The object definition factory.
+
+
+
+ Get the instance to lookup parsers for custom namespaces.
+
+
+
+
+ Exception thrown if an
+ is not fully
+ initialized, for example if it is involved in a circular reference.
+
+
+
+ This is usually indicated by any of the variants of the
+
+ method returning .
+
+
+ A circular reference with an
+ cannot be solved by eagerly caching singleton instances (as is the
+ case with normal objects. The reason is that every
+ needs to be fully
+ initialized before it can return the created object, while only specific
+ normal objects need to be initialized - that is, if a collaborating object
+ actually invokes them on initialization instead of just storing the reference.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Thrown when an
+ encounters an error when attempting to create an object from an object
+ definition.
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates 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 name of the object that triggered the exception.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The description of the resource associated with the object.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The description of the resource associated with the object.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ The name of the object that triggered the exception (if any).
+
+
+
+
+ The description of the resource associated with the object (if any).
+
+
+
+
+ Describes the creation failure trace of this exception.
+
+
+
+
+ Creates a new instance of the
+ FactoryObjectNotInitializedException class.
+
+
+
+
+ Creates a new instance of the FactoryObjectNotInitializedException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the FactoryObjectNotInitializedException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ FactoryObjectCircularReferenceException class.
+
+
+ The name of the object that triggered the exception.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the FactoryObjectCircularReferenceException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Exception thrown when an
+ is asked for an object instance name for which it cannot find a definition.
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ Name of the missing object.
+
+
+ A further, detailed message describing the problem.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The required type of the object.
+ A description of the originating dependency.
+ A message describing the problem.
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The of the missing object.
+
+
+ A further, detailed message describing the problem.
+
+
+
+
+ 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.
+
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ Return the required of object, if it was a
+ lookup by that failed.
+
+
+
+
+ Return the name of the missing object, if it was a lookup by name that
+ failed.
+
+
+
+
+ Thrown in case of a reference to an object that is currently in creation.
+
+
+
+ Typically happens when constructor autowiring matches the currently
+ constructed object.
+
+
+ Juergen Hoeller
+ Rick Evans
+
+
+
+ The default error message text to be used, if none is specified.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The name of the object that triggered the exception.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The name of the object that triggered the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The description of the resource associated with the object.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The description of the resource associated with the object.
+
+
+ A message about the exception.
+
+
+ The name of the object that triggered the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectCurrentlyInCreationException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Exception thrown when an
+ encounters an error when attempting to parse an object
+ definition.
+
+ Federico Spinazzi (.NET)
+
+
+
+ Creates a new instance of the ObjectDefinitionException class.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectDefinitionException class.
+
+
+ The value of the xml class attribute thet can be resolved
+ as a type
+
+
+
+
+ Creates a new instance of the ObjectDefinitionException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ The message about the exception.
+
+
+
+
+ Convenience methods operating on object factories, returning object instances,
+ names, or counts.
+
+
+
+ The nesting hierarchy of an object factory is taken into account by the various methods
+ exposed by this class.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Used to dereference an
+ and distinguish it from managed objects created by the factory.
+
+
+
+ For example, if the managed object identified as foo is a
+ factory, getting &foo will return the factory, not the
+ instance returned by the factory.
+
+
+
+
+
+ The string used as a separator in the generation of synthetic id's
+ for those object definitions explicitly that aren't assigned one.
+
+
+
+ If a name or parent object definition
+ name is not unique, "#1", "#2" etc will be appended, until such
+ time that the name becomes unique.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is a utility class, and as such has no publicly visible
+ constructors.
+
+
+
+
+
+ Count all object definitions in any hierarchy in which this
+ factory participates.
+
+
+
+ Includes counts of ancestor object factories.
+
+
+ Objects that are "overridden" (specified in a descendant factory
+ with the same name) are counted only once.
+
+
+ The object factory.
+
+ The count of objects including those defined in ancestor factories.
+
+
+
+
+ Return all object names in the factory, including ancestor factories.
+
+ The object factory.
+ The array of object names, or an empty array if none.
+
+
+
+ Get all object names for the given type, including those defined in ancestor
+ factories.
+
+
+
+ Will return unique names in case of overridden object definitions.
+
+
+ Does consider objects created by s
+ if is set to true,
+ which means that s will get initialized.
+
+
+
+ If this isn't also an
+ ,
+ this method will return the same as it's own
+
+ method.
+
+
+ The that objects must match.
+
+
+ Whether to include prototype objects too or just singletons
+ (also applies to instances).
+
+
+ Whether to include instances
+ too or just normal objects.
+
+
+ The array of object names, or an empty array if none.
+
+
+
+
+ Get all object names for the given type, including those defined in ancestor
+ factories.
+
+
+
+ Will return unique names in case of overridden object definitions.
+
+
+ Does consider objects created by s,
+ or rather it considers the type of objects created by
+ (which means that
+ s will be instantiated).
+
+
+
+ If this isn't also an
+ ,
+ this method will return the same as it's own
+
+ method.
+
+
+ The that objects must match.
+
+
+ The array of object names, or an empty array if none.
+
+
+
+
+ Return all objects of the given type or subtypes, also picking up objects
+ defined in ancestor object factories if the current object factory is an
+ .
+
+
+
+ The return list will only contain objects of this type.
+ Useful convenience method when we don't care about object names.
+
+
+ The object factory.
+ The of object to match.
+
+ Whether to include prototype objects too or just singletons
+ (also applies to instances).
+
+
+ Whether to include instances
+ too or just normal objects.
+
+
+ If the objects could not be created.
+
+
+ The of object instances, or an
+ empty if none.
+
+
+
+
+ Return a single object of the given type or subtypes, also picking up objects defined
+ in ancestor object factories if the current object factory is an
+ .
+
+
+
+ Useful convenience method when we expect a single object and don't care
+ about the object name.
+
+
+ The object factory.
+ The of object to match.
+
+ Whether to include prototype objects too or just singletons
+ (also applies to instances).
+
+
+ Whether to include instances
+ too or just normal objects.
+
+
+ If the object could not be created.
+
+
+ If more than one instance of an object was found.
+
+
+ A single object of the given type or subtypes.
+
+
+
+
+ Return a single object of the given type or subtypes, not looking in
+ ancestor factories.
+
+
+
+ Useful convenience method when we expect a single object and don't care
+ about the object name.
+
+
+ The object factory.
+ The of object to match.
+
+ Whether to include prototype objects too or just singletons
+ (also applies to instances).
+
+
+ Whether to include instances
+ too or just normal objects.
+
+
+ If the object could not be created.
+
+
+ If not exactly one instance of an object was found.
+
+
+ A single object of the given type or subtypes.
+
+
+
+
+ Return a single object of the given type or subtypes, not looking in
+ ancestor factories.
+
+
+
+ Useful convenience method when we expect a single object and don't care
+ about the object name.
+ This version of ObjectOfType automatically includes prototypes and
+ instances.
+
+
+ The object factory.
+ The of object to match.
+
+ If the object could not be created.
+
+
+ If not exactly one instance of an object was found.
+
+
+ A single object of the given type or subtypes.
+
+
+
+
+ Return the object name, stripping out the factory dereference prefix if necessary.
+
+ The name of the object.
+ The object name sans any factory dereference prefix.
+
+
+
+ Given an (object) name, builds a corresponding factory object name such that
+ the return value can be used as a lookup name for a factory object.
+
+
+ The name to be used to build the resulting factory object name.
+
+
+ The transformed into its factory object name
+ equivalent.
+
+
+
+
+
+
+ Is the supplied a factory dereference?
+
+
+
+ That is, does the supplied begin with
+ the
+ ?
+
+
+ The name to check.
+
+ if the supplied is a
+ factory dereference; if not, or the
+ aupplied is or
+ consists solely of the
+
+ value.
+
+
+
+
+
+ Exception that an object implementation is suggested to throw if its own
+ factory-aware initialization code fails.
+ thrown by object factory methods
+ themselves should simply be propagated as-is.
+
+
+
+ Note that non-factory-aware initialization methods like AfterPropertiesSet ()
+ or a custom "init-method" can throw any exception.
+
+
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the ObjectInitializationException class.
+
+
+
+
+ Creates a new instance of the ObjectInitializationException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the ObjectInitializationException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectInitializationException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Thrown in response to an attempt to lookup a factory object, and
+ the object identified by the lookup key is not a factory.
+
+
+
+ An object is a factory if it implements (either directly or indirectly
+ via inheritance) the
+ interface.
+
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Thrown when an object doesn't match the required .
+
+ Rod Johnson
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the ObjectNotOfRequiredTypeException class.
+
+
+
+
+ Creates a new instance of the ObjectNotOfRequiredTypeException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the ObjectNotOfRequiredTypeException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ObjectNotOfRequiredTypeException class.
+
+
+ Name of the object requested.
+
+
+ The required of the actual object
+ instance that was retrieved.
+
+
+ The instance actually returned, whose class did not match the
+ expected .
+
+
+
+
+ Creates a new instance of the ObjectNotOfRequiredTypeException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ The actual of the actual object
+ instance that was retrieved.
+
+
+
+
+ The required of the actual object
+ instance that was retrieved.
+
+
+
+
+ The instance actually returned, whose class did not match the
+ expected .
+
+
+
+
+ The name of the object requested.
+
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The name of the object that was being retrieved from the factory.
+
+
+ The object instance that was retrieved.
+
+
+
+
+ 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.
+
+
+
+
+ Exception thrown when an object depends on other objects or simple properties
+ that were not specified in the object factory definition, although dependency
+ checking was enabled.
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ Creates a new instance of the UnsatisfiedDependencyException class.
+
+
+
+
+ Creates a new instance of the UnsatisfiedDependencyException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the UnsatisfiedDependencyException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the UnsatisfiedDependencyException class.
+
+
+ The description of the resource associated with the object.
+
+
+ The name of the object that has the unsatisfied dependency.
+
+
+ The constructor argument index at which the dependency is
+ unsatisfied.
+
+
+ The of the constructor argument at
+ which the dependency is unsatisfied.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the UnsatisfiedDependencyException class.
+
+
+ The description of the resource associated with the object.
+
+
+ The name of the object that has the unsatisfied dependency.
+
+
+ The name identifying the property on which the dependency is
+ unsatisfied.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the UnsatisfiedDependencyException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Base class implementation for classes that describe an event handler.
+
+ Rick Evans
+
+
+
+ Describes an event handler.
+
+ Rick Evans
+
+
+
+ Wires up the specified handler to the named event on the
+ supplied event source.
+
+
+ The object (an object instance, a , etc)
+ exposing the named event.
+
+
+ The handler for the event (an object instance, a
+ , etc).
+
+
+
+
+ The source of the event.
+
+
+
+
+ The name of the method that is going to handle the event.
+
+
+
+
+ The name of the event that is being wired up.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The object (possibly unresolved) that is exposing the event.
+
+
+ The name of the method on the handler that is going to handle the event.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+
+
+ Wires up the specified handler to the named event on the
+ supplied event source.
+
+
+ The object (an object instance, a , etc)
+ exposing the named event.
+
+
+ The handler for the event (an object instance, a
+ , etc).
+
+
+
+
+ Returns a stringified representation of this object.
+
+ A stringified representation of this object.
+
+
+
+ The source of the event (may be unresolved, as in the case
+ of a
+ value).
+
+
+
+
+ The name of the method that is going to handle the event.
+
+
+
+
+ The name of the event that is being wired up.
+
+
+
+
+ Convenience base class for implementations.
+
+
+
+
+ Abstracts the state sharing strategy used
+ by
+
+ Erich Eichinger
+
+
+
+ Indicate, whether the given instance can be served by this factory
+
+ the instance to serve state
+ the name of the instance
+
+ a boolean value indicating, whether state can
+ be served for the given instance or not.
+
+
+
+
+ Returns the shared state for the given instance.
+
+ the instance to obtain shared state for.
+ the name of this instance
+ a dictionary containing shared state for or null.
+
+
+
+ Gets a dictionary acc. to the type of .
+ If no dictionary is found, create it according to
+
+ the instance to obtain shared state for
+ the name of the instance.
+
+ A dictionary containing the 's state,
+ or null if no state can be served by this provider.
+
+
+
+
+ Creates a dictionary to hold the shared state identified by .
+
+ a key to create the dictionary for.
+ a dictionary according to and .
+
+
+
+ Indicate, whether the given instance will be served by this provider
+
+ the instance to serve state
+ the name of the instance
+
+ a boolean value indicating, whether state shall
+ be resolved for the given instance or not.
+
+
+
+
+ Create the key used for obtaining the state dictionary for .
+
+ the instance to create the key for
+ the name of the instance.
+
+ the key identifying the state dictionary to be used for
+ or null, if this state manager doesn't serve the given instance.
+
+
+
+ Implementations may choose to return null from this method to indicate,
+ that they won't serve state for the given instance.
+
+
+ Note:Keys returned by this method are always treated case-sensitive!
+
+
+
+
+
+ Create shared state dictionaries case-sensitive or case-insensitive?
+
+
+
+
+ A number indicating the priority of this ( for more).
+
+
+
+
+ Base class for all
+ implemenations that actually perform event wiring.
+
+ Rick Evans
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The object (possibly unresolved) that is exposing the event.
+
+
+ The name of the method on the handler that is going to handle the event.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+
+
+ Wires up the specified handler to the named event on the
+ supplied event source.
+
+
+ The object (an object instance, a , etc)
+ exposing the named event.
+
+
+ The handler for the event (an object instance, a
+ , etc).
+
+
+
+
+ Gets the event handler.
+
+
+ The instance that is registering for the event notification.
+
+
+ Event metadata about the event.
+
+
+ The event handler.
+
+
+
+
+ Resolves the method metadata that describes the method that is to be used
+ as the argument to a delegate constructor.
+
+
+ The exposing the method.
+
+
+ The of the delegate (e.g. System.EventHandler).
+
+
+ The custom binding flags to use when searching for the method.
+
+ The method metadata.
+
+ If the method could not be found.
+
+
+
+
+ Describes an implementation
+ that autowires events to handler methods.
+
+ Rick Evans
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Wires up the specified handler to the named event on the supplied event source.
+
+
+ The object (an object instance, a , etc)
+ exposing the named event.
+
+
+ The handler for the event (an object instance, a ,
+ etc).
+
+
+
+
+ The name of the method that is going to handle the event.
+
+
+
+
+ Performs the matching up of handler methods to one or more source events.
+
+
+
+ This class merely marshals the matching of handler methods to the events exposed
+ by an event source, and then delegates to a concrete
+ implementation (such as
+ or
+ ) to do the heavy lifting of
+ actually wiring a handler method to an event.
+
+
+ Note : the order in which handler's are wired up to events is non-deterministic.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The object exposing the event (s) being wired up.
+
+
+ The name of the event that is being wired up.
+
+
+ The object exposing the method (s) being wired to the event.
+
+
+ The name of the method that is going to handle the event.
+
+
+
+
+ Wires up events on the source to methods exposed on the handler.
+
+
+
+
+ Wires up the supplied event to any handler methods that match the event
+ signature.
+
+ The event being wired up.
+
+
+
+ Only replaces the first occurrence of the placeholder.
+
+ The event whose name is going to be used.
+
+ The method name customised for the name of the supplied event.
+
+
+
+
+ The object exposing the event (s) being wired up.
+
+
+
+
+ The object exposing the method (s) being wired to an event source.
+
+
+
+
+ The of the object that is handling any events.
+
+
+
+
+ The name of the method that is going to handle the event.
+
+
+
+
+ The name of the event that is being wired up.
+
+
+
+
+ Serves shared state on a by-type basis.
+
+
+
+
+ Creates a new instance matching all types by default.
+
+
+
+
+ Creates a new instance matching only specified list of types.
+
+ the list of types to serve.
+
+
+
+ Indicate, whether the given instance will be served by this provider
+
+ the instance to serve state
+ the name of the instance
+
+ a boolean value indicating, whether state shall
+ be resolved for the given instance or not.
+
+
+
+
+ Returns the for the given .
+
+ the instance to obtain the key for.
+ the name of the instance (ignored by this provider)
+ instance.GetType() if it matches the list. Null otherwise.
+
+ This method will only be called if returned true previously.
+
+
+
+
+ Limit object types to be served by this state manager.
+
+
+ Only objects assignable to one of the types in this list
+ will be served state by this manager.
+
+
+
+
+ Describes an event handler for an object instance.
+
+ Rick Evans
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The object (possibly unresolved) that is exposing the event.
+
+
+ The name of the method on the handler that is going to handle the event.
+
+
+
+
+ Gets the event handler.
+
+
+ The instance that is registering for the event notification.
+
+
+ Event metadata about the event.
+
+
+ The event handler.
+
+
+
+
+ Definition for sorting object instances by a property.
+
+ Juergen Hoeller
+ Simon White (.NET)
+
+
+
+ The name of the property to sort by.
+
+
+
+
+ Whether upper and lower case in string values should be ignored.
+
+
+ True if the sorting should be performed in a case-insensitive fashion.
+
+
+
+
+ If the sorting should be ascending or descending.
+
+
+ True if the sorting should be in the ascending order.
+
+
+
+
+ Mutable implementation of the
+ interface that
+ supports toggling the ascending value on setting the same property again.
+
+ Juergen Hoeller
+ Jean-Pierre Pawlak
+ Simon White (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class using
+ the specified .
+
+
+ The to use
+ as a source for initial property values.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The name of the property to sort by.
+
+
+ Whether upper and lower case in string values should be ignored.
+
+
+ Whether or not the sorting should be ascending or descending.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ Whether or not the
+
+ property should be toggled if the same name is set on the
+
+ property.
+
+
+
+
+ Overrides the default method
+
+
+ The object to test against this instance for equality.
+
+
+ True if the supplied is equal to this instance.
+
+
+
+
+ Overrides the default method.
+
+ The hashcode for this instance.
+
+
+
+ The name of the property to sort by.
+
+
+
+
+ Whether upper and lower case in string values should be ignored.
+
+
+ True if the sorting should be performed in a case-insensitive fashion.
+
+
+
+
+ If the sorting should be ascending or descending.
+
+
+ True if the sorting should be in the ascending order.
+
+
+
+
+ Performs a comparison of two objects, using the specified object property via
+ an .
+
+ Juergen Hoeller
+ Jean-Pierre Pawlak
+ Simon White (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The to use for any
+ sorting.
+
+
+ If the supplied is .
+
+
+
+
+ Compares two objects and returns a value indicating whether one is less
+ than, equal to or greater than the other.
+
+ The first object to compare.
+ The second object to compare.
+
+
+
+
+ Get the 's property
+ value for the given object.
+
+ The object to get the property value for.
+ The property value.
+
+
+
+ Sort the given according to the
+ given sort definition.
+
+
+ The to be sorted.
+
+ The parameters to sort by.
+
+ In the case of a missing property name.
+
+
+ If the supplied is .
+
+
+
+
+ Gets the to
+ use for any sorting.
+
+
+ The to use for
+ any sorting.
+
+
+
+
+ Describes an event handler for a static class method.
+
+ Rick Evans
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The object (possibly unresolved) that is exposing the event.
+
+
+ The name of the method on the handler that is going to handle the event.
+
+
+
+
+ Gets the event handler.
+
+
+ The instance that is registering for the event notification.
+
+
+ Event metadata about the event.
+
+
+ The event handler.
+
+
+
+
+ The central interface of Spring.NET's low-level object infrastructure.
+
+
+
+ Typically not directly used by application code but rather implicitly
+ via an .
+
+
+ Implementing classes have the ability to get and set property values
+ (individually or in bulk), get property descriptors and query the
+ readability and writability of properties.
+
+
+ This interface supports nested properties enabling the setting
+ of properties on subproperties to an unlimited depth.
+
+
+ If a property update causes an exception, a
+ will be thrown. Bulk
+ updates continue after exceptions are encountered, throwing an exception
+ wrapping all exceptions encountered during the update.
+
+
+ implementations can be used
+ repeatedly, with their "target" or wrapped object changed.
+
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+ Get the value of a property.
+
+ The name of the property to get the value of. May be nested.
+
+ The value of the property.
+
+ if the property isn't readable, or if the getting the value throws
+ an exception.
+
+
+
+
+ Get the for a particular
+ property.
+
+
+ The property to be retrieved.
+
+
+ The for the particular
+ property.
+
+
+
+
+ Get the for a particular property.
+
+
+ The property the of which is to be retrieved.
+
+
+ The for a particular property..
+
+
+
+
+ Get all of the instances for
+ all of the properties of the wrapped object.
+
+
+ An array of instances.
+
+
+
+
+ Set a property value.
+
+
+
+ This is the preferred way to update an individual property.
+
+
+ The new property value.
+
+
+
+ Set a property value.
+
+
+
+ This method is provided for convenience only. The
+
+ method is more powerful.
+
+
+
+ The name of the property to set value of.
+
+ The new property value.
+
+
+ Set a number of property values in bulk.
+
+
+ This is the preferred way to perform a bulk update.
+
+
+ Note that performing a bulk update differs from performing a single update,
+ in that an implementation of this class will continue to update properties
+ if a recoverable error (such as a vetoed property change or a type
+ mismatch, but not an invalid property name or the like) is
+ encountered, throwing a
+ containing
+ all the individual errors. This exception can be examined later to see all
+ binding errors. Properties that were successfully updated stay changed.
+
+
+ Does not allow the setting of unknown fields. Equivalent to
+
+ with an argument of false for the second parameter.
+
+
+
+ The collection of instances to
+ set on the wrapped object.
+
+
+
+
+ Set a number of property values in bulk with full control over behavior.
+
+
+
+ Note that performing a bulk update differs from performing a single update,
+ in that an implementation of this class will continue to update properties
+ if a recoverable error (such as a vetoed property change or a type
+ mismatch, but not an invalid property name or the like) is
+ encountered, throwing a
+ containing
+ all the individual errors. This exception can be examined later to see all
+ binding errors. Properties that were successfully updated stay changed.
+
+
Does not allow the setting of unknown fields.
+
+
+
+ The to set on the target object
+
+
+ Should we ignore unknown values (not found in the object!?)
+
+
+
+
+ The object wrapped by the wrapper (cannot be ).
+
+
+
+ Implementations are required to allow the type of the wrapped
+ object to change.
+
+
+ The object wrapped by this wrapper.
+
+
+
+ Convenience method to return the
+ of the wrapped object.
+
+ The of the wrapped object.
+
+
+
+ A collection style container for
+ instances.
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Return the instance with the
+ given name.
+
+ The name to search for.
+ the , or null if a
+ the with the supplied
+ did not exist in this collection.
+
+
+
+
+ Is there a instance for this
+ property name?
+
+ The name to search for.
+
+ True if there is a instance for
+ the supplied .
+
+
+
+
+ Return the difference (changes, additions, but not removals) of
+ property values between the supplied argument and the values
+ contained in the collection.
+
+
+
+ Subclasses should also override Equals.
+
+
+ The old property values.
+
+ An containing any changes, or
+ an empty instance if there were
+ no changes.
+
+
+
+
+ Return an array of the objects
+ held in this object.
+
+ An array of the objects held
+ in this object.
+
+
+
+
+ This interface should be implemented by classes that want to
+ have access to the shared state.
+
+
+
+ Shared state is very useful if you have data that needs to be shared by all instances
+ of e.g. the same webform (or other IHttpHandlers).
+
+
+ For example, Spring.Web.UI.Page class implements this interface, which allows
+ each page derived from it to cache localizalization resources and parsed data binding
+ expressions only once and then reuse the cached values, regardless of how many instances
+ of the page are created.
+
+
+
+
+
+ Gets or sets the that should be used
+ to store shared state for this instance.
+
+
+
+
+ Default implementation of the
+ interface.
+
+
+
+ Allows simple manipulation of properties, and provides constructors to
+ support deep copy and construction from a number of collection types such as
+ and
+ .
+
+
+ Rod Johnson
+ Mark Pollack (.NET)
+ Rick Evans (.NET)
+
+
+
+ The list of objects.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ The returned instance is initially empty...
+ s can be added with the various
+ overloaded ,
+ ,
+ ,
+ and
+ methods.
+
+
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ Deep copy constructor. Guarantees
+ references are independent, although it can't deep copy objects currently
+ referenced by individual objects.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The with property values
+ keyed by property name, which must be a .
+
+
+
+
+ Overloaded version of Add that takes a property name and a property value.
+
+
+ The name of the property.
+
+
+ The value of the property.
+
+
+
+
+ Add the supplied object,
+ replacing any existing one for the respective property.
+
+
+ The object to add.
+
+
+
+
+ Merges the value of the supplied 'new' with that of
+ the current if merging is supported and enabled.
+
+
+ The new pv.
+ The current pv.
+ The possibly merged PropertyValue
+
+
+
+ Add all property values from the given
+ .
+
+
+ The map of property values, the keys of which must be
+ s.
+
+
+
+
+ Add all property values from the given
+ .
+
+
+ The list of s to be added.
+
+
+
+
+ Remove the given , if contained.
+
+
+ The to remove.
+
+
+
+
+ Removes the named , if contained.
+
+
+ The name of the property.
+
+
+
+
+ Modify a object held in this object. Indexed from 0.
+
+
+
+
+ Return the property value given the name.
+
+
+ The property name is checked in a case-insensitive fashion.
+
+
+ The name of the property.
+
+
+ The property value.
+
+
+
+
+ Does the container of properties contain one of this name.
+
+ The name of the property to search for.
+
+ True if the property is contained in this collection, false otherwise.
+
+
+
+
+ Return the difference (changes, additions, but not removals) of
+ property values between the supplied argument and the values
+ contained in the collection.
+
+ Another property values collection.
+
+ The collection of property values that are different than the supplied one.
+
+
+
+
+ Returns an that can iterate
+ through a collection.
+
+
+
+ The returned is the
+ exposed by the
+
+ property.
+
+
+
+ An that can iterate through a
+ collection.
+
+
+
+
+ Convert the object to a string representation.
+
+
+ A string representation of the object.
+
+
+
+
+ Property to retrieve the array of property values.
+
+
+
+
+ Default implementation of the
+ interface that should be sufficient for all normal uses.
+
+
+
+ will convert
+ and array
+ values to the corresponding target arrays, if necessary. Custom
+ s that deal with
+ s or arrays can be written against a
+ comma delimited as
+ arrays are converted in such a format if the array itself is not assignable.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Jean-Pierre Pawlak
+ Mark Pollack (.NET)
+ Aleksandar Seovic(.NET)
+
+
+ The wrapped object.
+
+
+
+ The ILog instance for this class. We'll create a lot of these objects,
+ so we don't want a new instance every time.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+ The wrapped target instance will need to be set afterwards.
+
+
+
+
+
+
+ Creates a new instance of the class.
+
+
+ The object wrapped by this .
+
+
+ If the supplied is .
+
+
+
+
+ Creates a new instance of the class,
+ instantiating a new instance of the specified and using
+ it as the .
+
+
+
+ Please note that the passed as the
+ argument must have a no-argument constructor.
+ If it does not, an exception will be thrown when this class attempts
+ to instantiate the supplied using it's
+ (non-existent) constructor.
+
+
+
+ The to instantiate and wrap.
+
+
+ If the is , or if the
+ invocation of the s default (no-arg) constructor
+ fails (due to invalid arguments, insufficient permissions, etc).
+
+
+
+ Gets the value of a property.
+
+ The name of the property to get the value of.
+
+ The value of the property.
+
+ If there is no such property, if the property isn't readable, or
+ if getting the property value throws an exception.
+
+
+
+ Gets the value of a property.
+
+ The property expression that should be used to retrieve the property value.
+
+ The value of the property.
+
+ If there is no such property, if the property isn't readable, or
+ if getting the property value throws an exception.
+
+
+
+
+ Sets a property value.
+
+
+
+ This method is provided for convenience only. The
+
+ method is more powerful.
+
+
+
+ The name of the property to set value of.
+
+ The new value.
+
+
+
+ Sets a property value.
+
+
+ The property expression that should be used to set the property value.
+
+ The new value.
+
+
+
+ Sets a property value.
+
+
+
+ This is the preferred way to update an individual property.
+
+
+
+ The object containing new property value.
+
+
+
+ Set a number of property values in bulk.
+
+
+ Does not allow unknown fields. Equivalent to
+
+ with and for
+ arguments.
+
+
+
+ The to set on the target
+ object.
+
+
+ If an error is encountered while setting a property.
+
+
+ On a mismatch while setting a property, insufficient permissions, etc.
+
+
+
+
+
+ Perform a bulk update with full control over behavior.
+
+
+
+ This method may throw a reflection-based exception, if there is a critical
+ failure such as no matching field... less serious exceptions will be accumulated
+ and thrown as a single .
+
+
+
+ The s to set on the target object.
+
+
+ Should we ignore unknown values (not found in the object!?).
+
+
+ If an error is encountered while setting a property (only thrown if the
+ parameter is set to ).
+
+
+ On a mismatch while setting a property, insufficient permissions, etc.
+
+
+
+
+
+ Returns PropertyInfo for the specified property
+
+ The name of the property to search for.
+ The for the specified property.
+ If cannot be determined.
+
+
+
+ Get the for a particular property.
+
+
+ The property the of which is to be retrieved.
+
+
+ The for a particular property..
+
+
+
+
+ Returns MemberInfo for the specified property or field
+
+ The name of the property or field to search for.
+ The or for the specified property or field.
+ If does not resolve to a property or field.
+
+
+
+ Get the properties of the wrapped object.
+
+
+ An array of s.
+
+
+
+
+ This method is expensive! Only call for diagnostics and debugging reasons,
+ not in production.
+
+
+ A string describing the state of this object.
+
+
+
+
+ Attempts to parse property expression first and falls back to full expression
+ if that fails. Performance optimization.
+
+ Property expression to parse.
+ Parsed proeprty expression.
+
+
+
+ The object wrapped by this .
+
+
+ If the object cannot be changed; or an attempt is made to set the
+ value of this property to .
+
+
+
+
+ Convenience method to return the of the wrapped object.
+
+
+
+ Do not use this (convenience) method prior to setting the
+ property.
+
+
+
+ The of the wrapped object.
+
+
+ If the property
+ is .
+
+
+
+
+ Return the collection of property descriptors.
+
+
+
+
+ Combined exception, composed of individual binding
+ s.
+
+
+
+ An object of this class is created at the beginning of the binding
+ process, and errors added to it as necessary.
+
+
+ The binding process continues when it encounters application-level
+ s, applying those changes
+ that can be applied and storing rejected changes in an instance of this class.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the PropertyAccessExceptionsException class.
+
+
+
+
+ Creates a new instance of the PropertyAccessExceptionsException class.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the PropertyAccessExceptionsException class.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Create new empty PropertyAccessExceptionsException.
+ We'll add errors to it as we attempt to bind properties.
+
+
+
+
+ Creates a new instance of the PropertyAccessExceptionsException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Populates a with
+ the data needed to serialize the target object.
+
+
+ The to populate
+ with data.
+
+
+ The destination (see )
+ for this serialization.
+
+
+
+
+ The IObjectWrapper wrapping the target object at the root of the exception.
+
+
+
+ The list of PropertyAccessException objects.
+
+
+
+ Return the
+ for the supplied , or
+ if there isn't one.
+
+
+
+
+ Describe the number of exceptions contained in this container class.
+
+ A description of the instance contents.
+
+
+
+ Return the that generated
+ this exception.
+
+
+
+
+ Return the object we're binding to.
+
+
+
+
+ If this returns zero (0), no errors were encountered during binding.
+
+
+
+
+ Return an array of the s
+ stored in this object.
+
+
+
+ Will return the empty array (not ) if there were no errors.
+
+
+
+
+
+ Describe the group of exceptions.
+
+
+
+
+ Holds information and value for an individual property.
+
+
+
+ Using an object here, rather than just storing all properties in a
+ map keyed by property name, allows for more flexibility, and the
+ ability to handle indexed properties in a special way if necessary.
+
+
+ Note that the value doesn't need to be the final required
+ : an
+ implementation must
+ handle any necessary conversion, as this object doesn't know anything
+ about the objects it will be applied to.
+
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+ The name of the property.
+
+ The value of the property (possibly before type conversion).
+
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+
+
+
+ Creates a new instance of the
+ class.
+
+ The name of the property.
+
+ The value of the property (possibly before type conversion).
+
+ Pre-parsed property name.
+
+ If the supplied or
+ is , or if the name contains only whitespace characters.
+
+
+
+
+ Print a string representation of the property.
+
+ A string representation of the property.
+
+
+
+ Determines whether the supplied
+ is equal to the current .
+
+ The other instance.
+
+ if they are equal in content.
+
+
+
+
+ Serves as a hash function for a particular type, suitable for use
+ in hashing algorithms and data structures like a hash table.
+
+
+ A hash code for the current .
+
+
+
+ The name of the property.
+ The name of the property.
+
+
+
+ Parsed property expression.
+
+
+
+
+ Return the value of the property.
+
+
+
+ Note that type conversion will not have occurred here.
+ It is the responsibility of the
+ implementation to
+ perform type conversion.
+
+
+ The (possibly unresolved) value of the property.
+
+
+
+ A simple pool implementation
+
+
+
+ Based on the implementation found in Concurrent Programming in Java,
+ 2nd ed., by Doug Lea.
+
+
+ Doug Lea
+ Federico Spinazzi
+ Mark Pollack
+
+
+
+ A simple pooling interface for managing and monitoring a pool
+ of objects.
+
+
+
+ Based on the Jakarta Commons Pool API.
+
+
+ Federico Spinazzi
+
+
+
+
+ Obtain an instance from the pool.
+
+
+
+ By contract, clients must return the borrowed
+ instance using
+ or a related method as defined in an implementation or
+ sub-interface.
+
+
+ An instance from the pool.
+
+ In case the pool is unusable.
+
+
+
+
+
+ Return an instance to the pool.
+
+
+
+ By contract, the object must have been obtained using
+
+ or a related method as defined in an implementation or sub-interface.
+
+
+ The instance to be returned to the pool.
+
+
+
+
+ Create an object using the factory set by
+ the property
+ or other implementation dependent mechanism
+ and place it into the pool.
+
+
+
+ This is an optional operation. AddObject is useful for "pre-loading" a
+ pool with idle objects.
+
+
+
+ If the implementation does not support the operation.
+
+
+
+
+ Close the pool and free any resources associated with it.
+
+
+
+
+ Clear objects sitting idle in the pool, releasing any
+ associated resources.
+
+
+
+ This is an optional operation.
+
+
+
+ If the implementation does not support the operation.
+
+
+
+
+ Gets the number of instances currently borrowed from the pool.
+
+
+
+ This is an optional operation.
+
+
+
+ If the implementation does not support the operation.
+
+
+
+
+ Gets the number of instances currently idle in the pool.
+
+
+
+ This is an optional operation.
+
+
+ This may be considered an approximation of the number of objects
+ that can be borrowed without creating any new instances.
+
+
+
+ If the implementation does not support the operation.
+
+
+
+
+ Set the factory used to create new instances.
+
+
+
+ This is an optional operation.
+
+
+
+ If the implementation does not support the operation.
+
+
+
+
+ Set of permits
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The factory used to instantiate and manage the lifecycle of pooled objects.
+
+ The initial size of the pool.
+
+ If the supplied is .
+
+
+ If the supplied is less than or equal to zero.
+
+
+
+
+ Obtain an instance from the pool.
+
+
+ In case the pool is unusable.
+
+
+
+
+
+
+ Return an instance to the pool.
+
+ The instance to be returned to the pool.
+
+
+
+
+
+ Create an object using the factory set by
+ the property
+ or other implementation dependent mechanism
+ and place it into the pool.
+
+
+
+ This implementation always throws a
+ .
+
+
+
+ If the implementation does not support the operation.
+
+
+
+
+ Synchronized borrow logic.
+
+
+
+
+
+ Synchronized release logic.
+
+
+ The object to release to the pool.
+
+
+ if the object was not a busy one.
+
+
+
+
+ Instantiates the supplied number of instances and adds
+ them to the pool.
+
+
+ The initial number of objects to build.
+
+
+ If the supplied number of is
+ less than or equal to zero.
+
+
+
+
+ Close the pool and free any resources associated with it.
+
+
+
+
+ Clear objects sitting idle in the pool, releasing any
+ associated resources.
+
+
+
+ This implementation always throws a
+ .
+
+
+
+ If the implementation does not support the operation.
+
+
+
+
+ Change the state of the pool to unusable.
+
+
+
+
+ Gets the number of instances currently borrowed from the pool.
+
+
+ If the implementation does not support the operation.
+
+
+
+
+
+ Gets the number of instances currently idle in the pool.
+
+
+ If the implementation does not support the operation.
+
+
+
+
+
+ Set the factory used to create new instances.
+
+
+
+ This implementation always throws a
+ .
+
+
+
+ If the implementation does not support the operation.
+
+
+
+
+ Defines lifecycle methods for objects that are to be used in an
+ implementation.
+
+
+
+ The following methods summarize the contract between an
+ and an
+ an .
+
+
+
+
+ is called whenever a new instance is needed.
+
+
+
+ is invoked on every instance before it is returned from
+ the pool.
+
+
+
+ is invoked on every instance when it is returned to the pool.
+
+
+
+ is invoked on every instance when it is being dropped from the
+ pool (see
+
+
+
+
+ Based on the Jakarta Commons Pool API.
+
+
+ Federico Spinazzi
+
+
+
+
+ Creates an instance that can be returned by the pool.
+
+
+ An instance that can be returned by the pool.
+
+
+
+
+ Destroys an instance no longer needed by the pool.
+
+
+
+ Invoked on every instance when it is being "dropped"
+ from the pool (whether due to the return value from a call to the
+
+ method, or for reasons specific to the pool implementation.)
+
+
+ The instance to be destroyed.
+
+
+
+ Ensures that the instance is safe to be returned by the pool.
+ Returns false if this object should be destroyed.
+
+
+
+ Invoked in an implementation-specific fashion to determine if an
+ instance is still valid to be returned by the pool.
+ It will only be invoked on an "activated" instance.
+
+
+ The instance to validate.
+
+ if this object is not valid and
+ should be dropped from the pool, otherwise .
+
+
+
+
+ Reinitialize an instance to be returned by the pool.
+
+
+
+ Invoked on every instance before it is returned from the pool.
+
+
+ The instance to be activated.
+
+
+
+ Uninitialize an instance to be returned to the pool.
+
+
+
+ Invoked on every instance when it is returned to the pool.
+
+
+ The instance returned to the pool.
+
+
+
+ Base class for all pooling exceptions.
+
+ Federico Spinazzi
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Base class for method builders that contains common functionalities.
+
+ Bruno Baia
+
+
+
+ Defines interface that proxy method builders have to implement.
+
+ Aleksandar Seovic
+ Bruno Baia
+
+
+
+ Dynamically builds proxy method.
+
+ The method to proxy.
+
+ The interface definition of the method, if applicable.
+
+
+ The for the proxy method.
+
+
+
+
+ The type builder to use.
+
+
+
+
+ The implementation to use.
+
+
+
+
+ Indicates whether interfaces should be implemented explicitly.
+
+
+
+
+ Creates a new instance of the method builder.
+
+ The type builder to use.
+
+ The implementation to use.
+
+
+ if the interface is to be
+ implemented explicitly; otherwise .
+
+
+
+
+ Dynamically builds proxy method.
+
+ The method to proxy.
+
+ The interface definition of the method, if applicable.
+
+
+ The for the proxy method.
+
+
+
+
+ Generates the IL instructions that pushes
+ the proxy instance on stack.
+
+ The IL generator to use.
+
+
+
+ Generates the IL instructions that pushes
+ the target instance on which calls should be delegated to.
+
+ The IL generator to use.
+
+
+
+ Defines proxy method for the target object.
+
+ The method to proxy.
+
+ The interface definition of the method, if applicable.
+
+
+ if the supplied is to be
+ implemented explicitly; otherwise .
+
+
+ The for the proxy method.
+
+
+
+
+ Defines generic method parameters based on proxied method metadata.
+
+
+ The to use.
+
+ The method to proxy.
+
+
+
+ Generates the proxy method.
+
+ The IL generator to use.
+ The method to proxy.
+
+ The interface definition of the method, if applicable.
+
+
+
+
+ Calls target method directly.
+
+ The IL generator to use.
+ The method to invoke.
+
+
+
+ Emits code to ensure that target on stack understands the method and throw a sensible exception otherwise.
+
+ The IL generator to use.
+ The method to test for
+ the name of the target to be used in error messages
+
+
+
+ Calls base method directly.
+
+ The IL generator to use.
+ The method to proxy.
+
+
+
+ Replaces a raw reference with a reference to a proxy.
+
+
+
+ If the target object returns reference to itself -- 'this' --
+ we need to treat it as a special case and return a reference
+ to a proxy object instead.
+
+
+ The IL generator to use.
+ The location of the return value.
+
+
+
+ Generates code that throws .
+
+ IL generator to use.
+ the type of the exception to throw
+ Error message to use.
+
+
+
+ Base class for proxy builders that can be used
+ to create a proxy for any class.
+
+
+
+ This class provides a set of template
+ methods that derived classes can override to provide custom behaviour
+ appropriate to the type of proxy that is being generated (one of
+ inheritance or composition-based proxying).
+
+
+ Aleksandar Seovic
+ Bruno Baia
+
+
+
+ Describes the operations for a generic proxy type builder that can be
+ used to create a proxy type for any class.
+
+ Aleksandar Seovic
+
+
+
+ Creates the proxy type.
+
+ The generated proxy class.
+
+
+
+ The name of the proxy .
+
+ The name of the proxy .
+
+
+
+ The of the target object.
+
+
+
+
+ The of the class that the proxy must
+ inherit from.
+
+
+
+
+ Gets or sets the list of interfaces proxy should implement.
+
+
+
+
+ Should we proxy target attributes?
+
+
+ by default.
+ Target type attributes, method attributes, method's return type attributes
+ and method's parameter attributes are copied to the proxy.
+
+
+
+
+ The list of custom s that the proxy
+ class must be decorated with.
+
+
+
+ Note that the list is composed of instances of the actual
+ s that are to be applied, not the
+ s of the s.
+
+
+
+
+ The following code snippets show examples of how to decorate the
+ the proxied class with one or more s.
+
+
+ // get a concrete implementation of an IProxyTypeBuilder...
+ IProxyTypeBuilder builder = ... ;
+ builder.TargetType = typeof( ... );
+
+ IDictionary typeAtts = new Hashtable();
+ builder.TypeAttributes = typeAtts;
+
+ // applies a single Attribute to the proxied class...
+ typeAtts = new Attribute[] { new MyCustomAttribute() });
+
+ // applies a number of Attributes to the proxied class...
+ typeAtts = new Attribute[]
+ {
+ new MyCustomAttribute(),
+ new AnotherAttribute(),
+ });
+
+
+
+
+
+ The custom s that the proxy
+ members must be decorated with.
+
+
+
+ This dictionary must use simple s for keys
+ (denoting the member names that the attributes are to be applied to),
+ with the corresponding values being
+ s.
+
+
+ The key may be wildcarded using the '*' character... if so,
+ then those proxy members that match against the key will be
+ decorated with the attendant list of
+ s. This naturally implies that using
+ the '*' character as a key will result in the attendant list
+ of s being applied to every member of
+ the proxied class.
+
+
+
+
+ The following code snippets show examples of how to decorate the
+ members of a proxied class with one or more
+ s.
+
+
+ // get a concrete implementation of an IProxyTypeBuilder...
+ IProxyTypeBuilder builder = ... ;
+ builder.TargetType = typeof( ... );
+
+ IDictionary memAtts = new Hashtable();
+ builder.MemberAttributes = memAtts;
+
+ // applies a single Attribute to all members of the proxied class...
+ memAtts ["*"] = new Attribute[] { new MyCustomAttribute() });
+
+ // applies a number of Attributes to all members of the proxied class...
+ memAtts ["*"] = new Attribute[]
+ {
+ new MyCustomAttribute(),
+ new AnotherAttribute(),
+ });
+
+ // applies a single Attribute to those members of the proxied class
+ // that have identifiers starting with 'Do' ...
+ memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() });
+
+ // applies a number of Attributes to those members of the proxied class
+ // that have identifiers starting with 'Do' ...
+ memAtts ["Do*"] = new Attribute[]
+ {
+ new MyCustomAttribute(),
+ new AnotherAttribute(),
+ });
+
+
+
+
+
+ Describes the operations that generates IL instructions
+ used to build the proxy type.
+
+ Bruno Baia
+
+
+
+ Generates the IL instructions that pushes
+ the proxy instance on stack.
+
+ The IL generator to use.
+
+
+
+ Generates the IL instructions that pushes
+ the target instance on which calls should be delegated to.
+
+ The IL generator to use.
+
+
+
+ The shared instance for this class (and derived classes).
+
+
+
+
+ Creates the proxy type.
+
+ The generated proxy class.
+
+
+
+ Generates the IL instructions that pushes
+ the proxy instance on stack.
+
+ The IL generator to use.
+
+
+
+ Generates the IL instructions that pushes
+ the target instance on which calls should be delegated to.
+
+ The IL generator to use.
+
+
+
+ Creates an appropriate type builder.
+
+ The name to use for the proxy type name.
+ The type to extends if provided.
+ The type builder to use.
+
+
+
+ Applies attributes to the proxy class.
+
+ The type builder to use.
+ The proxied class.
+
+
+
+
+
+ Applies attributes to the proxied method.
+
+ The method builder to use.
+ The proxied method.
+
+
+
+
+
+ Applies attributes to the proxied method's return type.
+
+ The method builder to use.
+ The proxied method.
+
+
+
+
+ Applies attributes to proxied method's parameters.
+
+ The method builder to use.
+ The proxied method.
+
+
+
+
+ Calculates and returns the list of attributes that apply to the
+ specified type.
+
+ The type to find attributes for.
+
+ A list of custom attributes that should be applied to type.
+
+
+
+
+
+
+ Calculates and returns the list of attributes that apply to the
+ specified method.
+
+ The method to find attributes for.
+
+ A list of custom attributes that should be applied to method.
+
+
+
+
+
+
+ Calculates and returns the list of attributes that apply to the
+ specified method's return type.
+
+ The method to find attributes for.
+
+ A list of custom attributes that should be applied to method's return type.
+
+
+
+
+
+ Calculates and returns the list of attributes that apply to the
+ specified method's parameters.
+
+ The method to find attributes for.
+ The method's parameter to find attributes for.
+
+ A list of custom attributes that should be applied to the specified method's parameter.
+
+
+
+
+
+ Check that the specified object is matching the passed attribute type.
+
+
+
+ The specified object can be of different type :
+
+
+
+
+
+
+ System.Reflection.CustomAttributeData (Only with .NET 2.0)
+
+
+
+
+
+
+ The object instance to check.
+ The attribute type to test against.
+
+ if the object instance matches the attribute type;
+ otherwise .
+
+
+
+
+ Defines the types of the parameters for the specified constructor.
+
+ The constructor to use.
+ The types for constructor's parameters.
+
+
+
+ Implements constructors for the proxy class.
+
+
+ The builder to use.
+
+
+
+
+ Generates the proxy constructor.
+
+ The constructor builder to use.
+ The IL generator to use.
+ The constructor to use.
+
+
+
+ Implements an interface.
+
+
+ Generates proxy methods that belongs to the interface
+ using the specified .
+
+ The type builder to use.
+
+ The implementation to use
+
+ The interface to implement.
+
+ The of the target object.
+
+
+
+
+ Implements an interface.
+
+
+ Generates proxy methods that belongs to the interface
+ using the specified .
+
+ The type builder to use.
+
+ The implementation to use
+
+ The interface to implement.
+
+ The of the target object.
+
+
+ if target virtual methods should not be proxied;
+ otherwise .
+
+
+
+
+ Gets the mapping of the interface to proxy
+ into the actual methods on the target type
+ that does not need to implement that interface.
+
+
+
+ If the target type does not implement the interface,
+ we return the interfaces methods as the target methods for many reasons :
+
+
+ The target object can change for an object that implements the interface.
+ (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder'
+ implementation in the Spring AOP framework for an example)
+
+
+ Allow Transparent proxies to be proxied.
+ (See Spring Remoting framework for an example)
+
+
+ Allow null target to be proxied.
+ (See Spring AOP framework which avoid calls to the target object
+ by intercepting all methods. Think "dynamic mock")
+ (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example)
+
+
+
+
+
+ The of the target object.
+
+ The interface to implement.
+
+ An interface mapping for the interface to proxy.
+
+
+
+
+ Inherit from a type.
+
+
+ Generates proxy methods for base virtual methods
+ using the specified .
+
+
+ The builder to use for code generation.
+
+
+ The implementation to use to override base virtual methods.
+
+ The to inherit from.
+
+
+
+ Inherit from a type.
+
+
+ Generates proxy methods for base virtual methods
+ using the specified .
+
+
+ The builder to use for code generation.
+
+
+ The implementation to use to override base virtual methods.
+
+ The to inherit from.
+
+ if only members declared at the level
+ of the supplied 's hierarchy should be proxied;
+ otherwise .
+
+
+
+
+ Implements the specified .
+
+ The type builder to use.
+ The type the property is defined on.
+ The property to proxy.
+ The implemented methods map.
+
+
+
+ Implements the specified event.
+
+ The type builder to use.
+ The type the event is defined on.
+ The event to proxy.
+ The implemented methods map.
+
+
+
+ Returns an array of s that represent
+ the proxiable interfaces.
+
+
+ An interface is proxiable if it's not marked with the
+ .
+
+
+ The array of interfaces from which
+ we want to get the proxiable interfaces.
+
+
+ An array containing the interface s.
+
+
+
+
+ Checks if specified interface is of a special type
+ that should never be proxied (i.e. ISerializable).
+
+ Interface type to check.
+
+ true if it is, false otherwise.
+
+
+
+
+ The name of the proxy .
+
+ The name of the proxy .
+
+
+
+ The of the target object.
+
+
+
+
+ The of the class that the proxy must
+ inherit from.
+
+
+
+ The default value of this property is the
+ .
+
+
+
+
+
+ Gets or sets the list of interfaces proxy should implement.
+
+
+ The default value of this property is all the interfaces
+ implemented or inherited by the target type.
+
+
+
+
+ Should we proxy target attributes?
+
+
+
+
+
+ The list of custom s that the proxy
+ class must be decorated with.
+
+
+
+
+
+ The custom s that the proxy
+ members must be decorated with.
+
+
+
+
+
+ Implementation of IProxyMethodBuilder that delegates method calls to the base class.
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the method builder.
+
+ The type builder to use.
+
+ The implementation to use.
+
+
+ if the interface is to be
+ implemented explicitly; otherwise .
+
+
+
+
+ Generates the proxy method.
+
+ The IL generator to use.
+ The method to proxy.
+
+ The interface definition of the method, if applicable.
+
+
+
+
+ Builds a proxy type using composition.
+
+
+
+ In order for this builder to work, the target must implement
+ one or more interfaces.
+
+
+ Aleksandar Seovic
+ Bruno Baia
+
+
+
+ Target instance calls should be delegated to.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a proxy that delegates calls to an instance of the
+ target object.
+
+
+
+ Only interfaces can be proxied using composition, so the target
+ must implement one or more interfaces.
+
+
+ The generated proxy class.
+
+ If the
+ does not implement any interfaces.
+
+
+
+
+ Create an to create interface implementations
+
+
+
+
+ Allows subclasses to generate additional code
+
+
+
+
+ Generates the IL instructions that pushes
+ the target instance on which calls should be delegated to.
+
+ The IL generator to use.
+
+
+
+ Deaclares a field that holds the target object instance.
+
+
+ The builder to use for code generation.
+
+
+
+
+ Generates the proxy constructor.
+
+
+
+ This implementation creates instance of the target object for delegation
+ using constructor arguments.
+
+
+ The constructor builder to use.
+ The IL generator to use.
+ The constructor to delegate the creation to.
+
+
+
+ Gets or sets a value indicating whether interfaces should be implemented explicitly.
+
+
+ if they should be; otherwise, .
+
+
+
+
+ Allows easy access to existing and creation of new dynamic proxies.
+
+ Aleksandar Seovic
+ Bruno Baia
+
+
+
+ The name of the assembly that defines proxy types created.
+
+
+
+
+ The attributes of the proxy type to generate.
+
+
+
+
+ Creates an appropriate type builder.
+
+ The proxy type name.
+ The type to extends if provided.
+ The type builder to use.
+
+
+
+ Saves dynamically generated assembly to disk.
+ Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules.
+
+
+
+
+ Builds a proxy type using inheritance.
+
+
+
+ In order for this builder to work, target methods have to be either
+ , or belong to an interface.
+
+
+ Aleksandar Seovic
+ Bruno Baia
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a proxy that inherits the proxied object's class.
+
+
+
+ Only (non-final) methods can be proxied,
+ unless they are members of one of the interfaces that target class
+ implements. In that case, methods will be proxied using explicit
+ interface implementation, which means that client code will have
+ to cast the proxy to a specific interface in order to invoke the
+ methods.
+
+
+ The generated proxy class.
+
+
+
+ Generates the IL instructions that pushes
+ the target instance on which calls should be delegated to.
+
+ The IL generator to use.
+
+
+
+ Generates the proxy constructor.
+
+
+
+ This implementation delegates the call to a base class constructor.
+
+
+ The constructor builder to use.
+ The IL generator to use.
+
+ The base class constructor to delegate the call to.
+
+
+
+
+ Gets or sets a value indicating whether inherited members should be proxied.
+
+
+ if they should be; otherwise, .
+
+
+
+
+ This attribute can be used to mark interfaces that should not be proxied
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Implementation of IProxyMethodBuilder that delegates method calls to target object.
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the method builder.
+
+ The type builder to use.
+
+ The implementation to use.
+
+
+ if the interface is to be
+ implemented explicitly; otherwise .
+
+
+
+
+ Generates the proxy method.
+
+ The IL generator to use.
+ The method to proxy.
+
+ The interface definition of the method, if applicable.
+
+
+
+
+ Base class for dynamic members.
+
+ Aleksandar Seovic
+
+
+
+ Method attributes constant.
+
+
+
+
+ Sets up target instance for invocation.
+
+ IL generator to use.
+ Type of target instance.
+
+
+
+ Sets up invocation argument.
+
+ IL generator to use.
+ Argument type.
+ Argument position.
+
+
+
+ Generates method invocation code.
+
+ IL generator to use.
+ Flag specifying whether method is static.
+ Flag specifying whether method is on the value type.
+ Method to invoke.
+
+
+
+ Generates code to process return value if necessary.
+
+ IL generator to use.
+ Type of the return value.
+
+
+
+ Generates code that throws .
+
+ IL generator to use.
+ Error message to use.
+
+
+
+ Defines constructors that dynamic constructor class has to implement.
+
+
+
+
+ Invokes dynamic constructor.
+
+
+ Constructor arguments.
+
+
+ A constructor value.
+
+
+
+
+ Safe wrapper for the dynamic constructor.
+
+
+ will attempt to use dynamic
+ constructor if possible, but it will fall back to standard
+ reflection if necessary.
+
+
+
+
+ Obtains cached constructor info or creates a new entry, if none is found.
+
+
+
+
+ Creates a new instance of the safe constructor wrapper.
+
+ Constructor to wrap.
+
+
+
+ Invokes dynamic constructor.
+
+
+ Constructor arguments.
+
+
+ A constructor value.
+
+
+
+
+ Factory class for dynamic constructors.
+
+ Aleksandar Seovic
+
+
+
+ Creates dynamic constructor instance for the specified .
+
+ Constructor info to create dynamic constructor for.
+ Dynamic constructor for the specified .
+
+
+
+ Defines methods that dynamic field class has to implement.
+
+
+
+
+ Gets the value of the dynamic field for the specified target object.
+
+
+ Target object to get field value from.
+
+
+ A field value.
+
+
+
+
+ Gets the value of the dynamic field for the specified target object.
+
+
+ Target object to set field value on.
+
+
+ A new field value.
+
+
+
+
+ Safe wrapper for the dynamic field.
+
+
+ will attempt to use dynamic
+ field if possible, but it will fall back to standard
+ reflection if necessary.
+
+
+
+
+ Obtains cached fieldInfo or creates a new entry, if none is found.
+
+
+
+
+ Creates a new instance of the safe field wrapper.
+
+ Field to wrap.
+
+
+
+ Gets the value of the dynamic field for the specified target object.
+
+
+ Target object to get field value from.
+
+
+ A field value.
+
+
+
+
+ Gets the value of the dynamic field for the specified target object.
+
+
+ Target object to set field value on.
+
+
+ A new field value.
+
+
+
+
+ Holds cached Getter/Setter delegates for a Field
+
+
+
+
+ Factory class for dynamic fields.
+
+ Aleksandar Seovic
+
+
+
+ Creates dynamic field instance for the specified .
+
+ Field info to create dynamic field for.
+ Dynamic field for the specified .
+
+
+
+ Defines methods that dynamic indexer class has to implement.
+
+
+
+
+ Gets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to get the indexer value from.
+
+
+ Indexer argument.
+
+
+ A indexer value.
+
+
+
+
+ Gets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to get the indexer value from.
+
+
+ Indexer argument.
+
+
+ A indexer value.
+
+
+
+
+ Gets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to get the indexer value from.
+
+
+ Indexer arguments.
+
+
+ A indexer value.
+
+
+
+
+ Gets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to set the indexer value on.
+
+
+ Indexer argument.
+
+
+ A new indexer value.
+
+
+
+
+ Gets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to set the indexer value on.
+
+
+ Indexer argument.
+
+
+ A new indexer value.
+
+
+
+
+ Gets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to set the indexer value on.
+
+
+ Indexer arguments.
+
+
+ A new indexer value.
+
+
+
+
+ Safe wrapper for the dynamic indexer.
+
+
+ will attempt to use dynamic
+ indexer if possible, but it will fall back to standard
+ reflection if necessary.
+
+
+
+
+ Creates a new instance of the safe indexer wrapper.
+
+ Indexer to wrap.
+
+
+
+ Gets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to get indexer value from.
+
+
+ Indexer arguments.
+
+
+ A indexer value.
+
+
+
+
+ Gets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to get the indexer value from.
+
+
+ Indexer argument.
+
+
+ A indexer value.
+
+
+
+
+ Gets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to get indexer value from.
+
+
+ Indexer arguments.
+
+
+ A indexer value.
+
+
+
+
+ Sets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to set indexer value on.
+
+
+ Indexer arguments.
+
+
+ A new indexer value.
+
+
+
+
+ Sets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to set indexer value on.
+
+
+ Indexer arguments.
+
+
+ A new indexer value.
+
+
+
+
+ Sets the value of the dynamic indexer for the specified target object.
+
+
+ Target object to set indexer value on.
+
+
+ Indexer arguments.
+
+
+ A new indexer value.
+
+
+
+
+ Internal PropertyInfo accessor.
+
+
+
+
+ Factory class for dynamic indexers.
+
+ Aleksandar Seovic
+
+
+
+ Prevent instantiation
+
+
+
+
+ Creates dynamic indexer instance for the specified .
+
+ Indexer info to create dynamic indexer for.
+ Dynamic indexer for the specified .
+
+
+
+ Defines methods that dynamic method class has to implement.
+
+
+
+
+ Invokes dynamic method on the specified target object.
+
+
+ Target object to invoke method on.
+
+
+ Method arguments.
+
+
+ A method return value.
+
+
+
+
+ Safe wrapper for the dynamic method.
+
+
+ will attempt to use dynamic
+ method if possible, but it will fall back to standard
+ reflection if necessary.
+
+
+
+
+ Creates a new instance of the safe method wrapper.
+
+ Method to wrap.
+
+
+
+ Invokes dynamic method.
+
+
+ Target object to invoke method on.
+
+
+ Method arguments.
+
+
+ A method return value.
+
+
+
+
+ Gets the class, that declares this method
+
+
+
+
+ Factory class for dynamic methods.
+
+ Aleksandar Seovic
+
+
+
+ Creates dynamic method instance for the specified .
+
+ Method info to create dynamic method for.
+ Dynamic method for the specified .
+
+
+
+ Defines methods that dynamic property class has to implement.
+
+
+
+
+ Gets the value of the dynamic property for the specified target object.
+
+
+ Target object to get property value from.
+
+
+ A property value.
+
+
+
+
+ Gets the value of the dynamic property for the specified target object.
+
+
+ Target object to set property value on.
+
+
+ A new property value.
+
+
+
+
+ Gets the value of the dynamic property for the specified target object.
+
+
+ Target object to get property value from.
+
+ Optional index values for indexed properties. This value should be null reference for non-indexed properties.
+
+ A property value.
+
+
+
+
+ Gets the value of the dynamic property for the specified target object.
+
+
+ Target object to set property value on.
+
+
+ A new property value.
+
+ Optional index values for indexed properties. This value should be null reference for non-indexed properties.
+
+
+
+ Safe wrapper for the dynamic property.
+
+
+ will attempt to use dynamic
+ property if possible, but it will fall back to standard
+ reflection if necessary.
+
+
+
+
+ Obtains cached property info or creates a new entry, if none is found.
+
+
+
+
+ Creates a new instance of the safe property wrapper.
+
+ Property to wrap.
+
+
+
+ Gets the value of the dynamic property for the specified target object.
+
+
+ Target object to get property value from.
+
+
+ A property value.
+
+
+
+
+ Gets the value of the dynamic property for the specified target object.
+
+
+ Target object to get property value from.
+
+ Optional index values for indexed properties. This value should be null reference for non-indexed properties.
+
+ A property value.
+
+
+
+
+ Gets the value of the dynamic property for the specified target object.
+
+
+ Target object to set property value on.
+
+
+ A new property value.
+
+
+
+
+ Gets the value of the dynamic property for the specified target object.
+
+
+ Target object to set property value on.
+
+
+ A new property value.
+
+ Optional index values for indexed properties. This value should be null reference for non-indexed properties.
+
+
+
+ Internal PropertyInfo accessor.
+
+
+
+
+ Holds cached Getter/Setter delegates for a Property
+
+
+
+
+ Factory class for dynamic properties.
+
+ Aleksandar Seovic
+
+
+
+ Creates safe dynamic property instance for the specified .
+
+
+
This factory method will create a dynamic property with a "safe" wrapper.
+
Safe wrapper will attempt to use generated dynamic property if possible,
+ but it will fall back to standard reflection if necessary.
+
+ Property info to create dynamic property for.
+ Safe dynamic property for the specified .
+
+
+
+
+ Creates dynamic property instance for the specified .
+
+ Property info to create dynamic property for.
+ Dynamic property for the specified .
+
+
+
+ Represents a Get method
+
+ the target instance when calling an instance method
+ the value return by the Get method
+
+
+
+ Represents a Set method
+
+ the target instance when calling an instance method
+ the value to be set
+
+
+
+ Represents an Indexer Get method
+
+ the target instance when calling an instance method
+
+ the value return by the Get method
+
+
+
+ Represents a Set method
+
+ the target instance when calling an instance method
+ the value to be set
+
+
+
+
+ Represents a method
+
+ the target instance when calling an instance method
+ arguments to be passed to the method
+ the value return by the method. null when calling a void method
+
+
+
+ Represents a constructor
+
+ arguments to be passed to the method
+ the new object instance
+
+
+
+ Represents a callback method used to create an from a instance.
+
+
+
+
+ Represents a callback method used to create an from a instance.
+
+
+
+
+ Represents a callback method used to create an from a instance.
+
+
+
+
+ Represents a callback method used to create an from a instance.
+
+
+
+
+ Represents a callback method used to create an from a instance.
+
+
+
+
+ Allows easy access to existing and creation of new dynamic relection members.
+
+ Aleksandar Seovic
+
+
+
+ The name of the assembly that defines reflection types created.
+
+
+
+
+ The attributes of the reflection type to generate.
+
+
+
+
+ Cache for dynamic property types.
+
+
+
+
+ Cache for dynamic field types.
+
+
+
+
+ Cache for dynamic indexer types.
+
+
+
+
+ Cache for dynamic method types.
+
+
+
+
+ Cache for dynamic constructor types.
+
+
+
+
+ Creates an appropriate type builder.
+
+
+ The base name to use for the reflection type name.
+
+ The type builder to use.
+
+
+
+ Returns dynamic property if one exists.
+
+ Property to look up.
+ callback function that will be called to create the dynamic property
+ An for the given property info.
+
+
+
+ Returns dynamic field if one exists.
+
+ Field to look up.
+ callback function that will be called to create the dynamic field
+ An for the given field info.
+
+
+
+ Returns dynamic indexer if one exists.
+
+ Indexer to look up.
+ callback function that will be called to create the dynamic indexer
+ An for the given indexer.
+
+
+
+ Returns dynamic method if one exists.
+
+ Method to look up.
+ callback function that will be called to create the dynamic method
+ An for the given method.
+
+
+
+ Returns dynamic constructor if one exists.
+
+ Constructor to look up.
+ callback function that will be called to create the dynamic constructor
+ An for the given constructor.
+
+
+
+ Saves dynamically generated assembly to disk.
+ Can only be called in DEBUG mode, per ConditionalAttribute rules.
+
+
+
+
+ Create a new Get method delegate for the specified field using
+
+ the field to create the delegate for
+ a delegate that can be used to read the field
+
+
+
+ Create a new Set method delegate for the specified field using
+
+ the field to create the delegate for
+ a delegate that can be used to read the field.
+
+ If the field's returns true, the returned method
+ will throw an when called.
+
+
+
+
+ Create a new Get method delegate for the specified property using
+
+ the property to create the delegate for
+ a delegate that can be used to read the property.
+
+ If the property's returns false, the returned method
+ will throw an when called.
+
+
+
+
+ Create a new Set method delegate for the specified property using
+
+ the property to create the delegate for
+ a delegate that can be used to write the property.
+
+ If the property's returns false, the returned method
+ will throw an when called.
+
+
+
+
+ Create a new method delegate for the specified method using
+
+ the method to create the delegate for
+ a delegate that can be used to invoke the method.
+
+
+
+ Creates a new delegate for the specified constructor.
+
+ the constructor to create the delegate for
+ delegate that can be used to invoke the constructor.
+
+
+
+ Creates a instance with the highest possible code access security.
+
+
+ If allowed by security policy, associates the method with the s declaring type.
+ Otherwise associates the dynamic method with .
+
+
+
+
+ Delegates a Method(object target, params object[] args) call to the actual underlying method.
+
+
+
+
+ Generates code to process return value if necessary.
+
+ IL generator to use.
+ Type of the return value.
+
+
+
+ Converts to an instance of if necessary to
+ e.g. avoid e.g. double/int cast exceptions.
+
+
+
+ This method mimics the behavior of the compiler that
+ automatically performs casts like int to double in "Math.Sqrt(4)".
+ See about implicit, widening type conversions on MSDN - Type Conversion Tables
+
+
+ Note: is expected to be a value type!
+
+
+
+
+
+ Generates code that throws .
+
+ IL generator to use.
+ Error message to use.
+
+
+
+ Indicates that an annotated class is a "component".
+ Such classes are considered as candidates for future features such
+ as auto-detection when using attribute-based configuration and assembly scanning.
+
+ Other class-level annotations may be considered as identifying
+ a component as well, typically a special kind of component:
+ e.g. the Repository attribute.
+
+ Mark Fisher
+ Mark Pollack (.NET)
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name of the component.
+
+
+
+ Gets or sets the name of the component
+
+ The name of the component.
+
+
+
+ Indicates that an annotated class is a "Repository" (or "DAO").
+
+
+ A class with this attribute is eligible for Spring DataAccessException translation. A class
+ with the Repository attribute is also clarified as to its role in the overall application
+ architecture for the purpose of tools, aspects, etc.
+
+ This attribute also serves as a specialization of the ComponentAttribute, allowing implementation
+ classes to be autodetected in future releases through assembly scanning.
+
+
+ Rod Johnson
+ Jueren Hoeller
+ Mark Pollack (.NET)
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name of the repository.
+
+
+
+ Indicates that an annotated class is a "Service" (e.g. a business service facade).
+
+
+
+ This attribute also serves as a specialization of the ComponentAttribute, allowing implementation
+ classes to be autodetected in future releases through assembly scanning.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name.
+
+
+
+ Implements by using .
+
+ Erich Eichinger
+
+
+
+ Specifies the contract a strategy must be implement to store and
+ retrieve data that is specific to the executing thread.
+
+
+ All implementations of this interface must treat keys case-sensitive.
+
+ Erich Eichinger
+
+
+
+ Retrieves an object with the specified .
+
+ The name of the item.
+
+ The object in the current thread's context associated with the
+ specified or null if no object has been stored previously
+
+
+
+
+ Stores a given object and associates it with the specified .
+
+ The name with which to associate the new item.
+ The object to store in the current thread's context.
+
+
+
+ Empties a data slot with the specified name.
+
+
+ If the object with the specified is not found, the method does nothing.
+
+ The name of the object to remove.
+
+
+
+ Retrieves an object with the specified name.
+
+ The name of the item.
+ The object in the call context associated with the specified name or null if no object has been stored previously
+
+
+
+ Stores a given object and associates it with the specified name.
+
+ The name with which to associate the new item.
+ The object to store in the call context.
+
+
+
+ Empties a data slot with the specified name.
+
+ The name of the data slot to empty.
+
+
+
+ Acquire/Release protocol, base of many concurrency utilities.
+
+
+
+
objects isolate waiting and notification for particular logical
+ states, resource availability, events, and the like that are shared
+ across multiple threads.
+
+
Use of s sometimes (but by no means always) adds
+ flexibility and efficiency compared to the use of plain
+ .Net monitor methods and locking, and are sometimes (but by no means
+ always) simpler to program with.
+
+
Used for implementation of a
+
+
+ Doug Lea
+ Federico Spinazzi (.Net)
+
+
+ Wait (possibly forever) until successful passage.
+ Fail only upon interuption. Interruptions always result in
+ `clean' failures. On failure, you can be sure that it has not
+ been acquired, and that no
+ corresponding release should be performed. Conversely,
+ a normal return guarantees that the acquire was successful.
+
+
+
+
+ Potentially enable others to pass.
+
+ Because release does not raise exceptions,
+ it can be used in `finally' clauses without requiring extra
+ embedded try/catch blocks. But keep in mind that
+ as with any java method, implementations may
+ still throw unchecked exceptions such as Error or NullPointerException
+ when faced with uncontinuable errors. However, these should normally
+ only be caught by higher-level error handlers.
+
+
+
+
+
+ Wait at most msecs to pass; report whether passed.
+
+ The method has best-effort semantics:
+ The msecs bound cannot
+ be guaranteed to be a precise upper bound on wait time in Java.
+ Implementations generally can only attempt to return as soon as possible
+ after the specified bound. Also, timers in Java do not stop during garbage
+ collection, so timeouts can occur just because a GC intervened.
+ So, msecs arguments should be used in
+ a coarse-grained manner. Further,
+ implementations cannot always guarantee that this method
+ will return at all without blocking indefinitely when used in
+ unintended ways. For example, deadlocks may be encountered
+ when called in an unintended context.
+
+
+ the number of milleseconds to wait
+ An argument less than or equal to zero means not to wait at all.
+ However, this may still require
+ access to a synchronization lock, which can impose unbounded
+ delay if there is a lot of contention among threads.
+
+ true if acquired
+
+
+ A latch is a boolean condition that is set at most once, ever.
+ Once a single release is issued, all acquires will pass.
+
+ Sample usage. Here are a set of classes that use
+ a latch as a start signal for a group of worker threads that
+ are created and started beforehand, and then later enabled.
+
+
+ class Worker implements IRunnable {
+ private readonly Latch startSignal;
+ Worker(Latch l)
+ {
+ startSignal = l;
+ }
+
+ public void Run() {
+ startSignal.acquire();
+ DoWork();
+ }
+
+ void DoWork() { ... }
+ }
+
+ class Driver { // ...
+ void Main() {
+ Latch go = new Latch();
+ for (int i = 0; i < N; ++i) // make threads
+ new Thread(new ThreadStart(new Worker(go)).Start();
+ DoSomethingElse(); // don't let run yet
+ go.Release(); // let all threads proceed
+ }
+ }
+
+
+ Doug Lea
+ Federico Spinazzi (.Net)
+
+
+
+ can acquire ?
+
+
+
+
+ Method mainly used by clients who are trying to get the latch
+
+
+
+ Wait at most msecs millisconds for a permit
+
+
+
+ Enable all current and future acquires to pass
+
+
+
+
+ An abstraction to safely store "ThreadStatic" data.
+
+
+ By default, is used to store thread-specific data.
+ You may switch the storage strategy by calling .
+ NOTE: Access to the underlying storage is not synchronized for performance reasons.
+ You should call only once at application startup!
+
+ Erich Eichinger
+
+
+
+ Holds the current strategy.
+
+
+ Access to this variable is not synchronized on purpose for performance reasons.
+ Setting a different strategy should happen only once
+ at application startup.
+
+
+
+
+ Set the new strategy.
+
+
+
+
+ Retrieves an object with the specified name.
+
+ The name of the item.
+ The object in the context associated with the specified name or null if no object has been stored previously
+
+
+
+ Stores a given object and associates it with the specified name.
+
+ The name with which to associate the new item.
+ The object to store in the current thread's context.
+
+
+
+ Empties a data slot with the specified name.
+
+ The name of the data slot to empty.
+
+
+
+
Base class for counting semaphores based on Semaphore implementation
+ from Doug Lea.
+
+
+
+
Conceptually, a semaphore
+ maintains a set of permits. Each acquire() blocks if
+ necessary until a permit is available, and then takes it.
+
+
Each release adds a permit. However, no actual permit objects are used;
+ the Semaphore just keeps a count of the number available
+ and acts accordingly.
+
+
A semaphore initialized to 1 can serve as a mutual exclusion lock.
+
+ Used for implementation of a
+
+ Doug Lea
+ Federico Spinazzi (.Net)
+
+
+
+ current number of available permits
+
+
+
+
+
Create a Semaphore with the given initial number of permits.
+
Using a seed of 1 makes the semaphore act as a mutual
+ exclusion lock.
+
+
Negative seeds are also allowed,
+ in which case no acquires will proceed until the number of
+ releases has pushed the number of permits past 0.
+
+
+
+
+ Release a permit
+
+
+
+
+ Acquire a permit
+
+
+
+
+ Wait at most msecs millisconds for a permit
+
+ number of ms to wait
+ true if aquired
+
+
+ Release N permits. release(n) is
+ equivalent in effect to:
+
+ for (int i = 0; i < n; ++i) release();
+
+ But may be more efficient in some semaphore implementations.
+
+ if n is negative.
+
+
+
+
+ Return the current number of available permits.
+ Returns an accurate, but possibly unstable value,
+ that may change immediately after returning.
+
+
+
+
+ Utility class to use an with the
+ C# using () {} idiom
+
+
+
+
+ Creates a new trying to the given
+
+
+ the to be held
+
+
+
+ Creates a new trying to the given
+
+
+ the to be held
+ millisecond to try to acquire the lock
+
+
+
+ Releases the held
+
+
+
+
+ initializes and acquire access to the
+
+
+
+
+
+ Implements by using a hashtable.
+
+ Erich Eichinger
+
+
+
+ Retrieves an object with the specified name.
+
+ The name of the item.
+ The object in the call context associated with the specified name or null if no object has been stored previously
+
+
+
+ Stores a given object and associates it with the specified name.
+
+ The name with which to associate the new item.
+ The object to store in the call context.
+
+
+
+ Empties a data slot with the specified name.
+
+ The name of the data slot to empty.
+
+
+ Thrown by synchronization classes that report
+ timeouts via exceptions. The exception is treated
+ as a form (subclass) of InterruptedException. This both
+ simplifies handling, and conceptually reflects the fact that
+ timed-out operations are artificially interrupted by timers.
+
+
+
+
+ The approximate time that the operation lasted before
+ this timeout exception was thrown.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the
+ class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Override of GetObjectData to allow for private serialization
+
+ serialization info
+ streaming context
+
+
+ Constructs a TimeoutException with given duration value.
+
+
+
+
+ Constructs a TimeoutException with the
+ specified duration value and detail message.
+
+
+
+
+ Gets the approximate time that the operation lasted before
+ this timeout exception was thrown.
+
+
+
+ A TimeoutSync is an adaptor class that transforms all
+ calls to acquire to instead invoke attempt with a predetermined
+ timeout value.
+
+
+
+
+
+ the adapted sync
+
+
+
+
+ timeout value
+
+
+
+ Create a TimeoutSync using the given Sync object, and
+ using the given timeout value for all calls to acquire.
+
+
+
+
+ Try to acquire the sync before the timeout
+
+ In case a time out occurred
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Support to account for differences between java nad .NET:
+
+
+
+
+
+
+ .NET threads have not a method to check if they have been interrupted.
+ Moreover, differently from java threads, when entering locked
+ blocks, Monitor, Sleep, SpinWait and so on, a
+ will be raised by the runtime.
+ Spring.Threading classes usually call this method before entering a lock block, to mirror java code
+
Usually this is non issue because the same exception will be raised entering the monitor
+ associated with the lock ()
+
+
+ if the thread has been interrupted
+
+
+
+ Normalize the given so that
+ is is comparable with .
+
+ Date.
+
+
+
+
+
+
+
+
+ the difference between millisecodns of the first and second date
+
+
+
+ Returns the number of nanoseconds for the current value of
+
+ Current number of nanoseconds
+
+
+
+ Returns the number of nano seconds represented by the
+
+ to use
+ Number of nano seconds for
+
+
+
+ Returns a representing the number of nanoseconds passed in via .
+
+ Number of nanoseconds.
+ representing the number of nanoseconds passed in.
+
+
+
+ Placeholder for java.lang.System.currentTimeMillis
+
+ The current machine time in milliseconds
+
+
+
+ Has been interrupted this thread
+
+
+
+
+ Miscellaneous generic collection utility methods.
+
+
+ Mainly for internal use within the framework.
+
+ Mark Pollack (.NET)
+
+
+
+ Determine whether a given collection only contains
+ a single unique object
+
+
+
+
+
+
+ Determines whether the contains the specified .
+
+ The collection to check.
+ The object to locate in the collection.
+ if the element is in the collection, otherwise.
+
+
+
+ Determines whether the collection contains all the elements in the specified collection.
+
+ The collection to check.
+ Collection whose elements would be checked for containment.
+ true if the target collection contains all the elements of the specified collection.
+
+
+
+ Removes all the elements from the target collection that are contained in the source collection.
+
+ Collection where the elements will be removed.
+ Elements to remove from the target collection.
+
+
+
+ Various utility methods relating to the manipulation of arrays.
+
+ Aleksandar Seovic
+
+
+
+ Checks if the given array or collection has elements and none of the elements is null.
+
+ the collection to be checked.
+ true if the collection has a length and contains only non-null elements.
+
+
+
+ Use this sort method instead of to overcome
+ bugs in Mono.
+
+
+
+
+ Checks if the given array or collection is null or has no elements.
+
+
+
+
+
+
+ Tests equality of two single-dimensional arrays by checking each element
+ for equality.
+
+ The first array to be checked.
+ The second array to be checked.
+ True if arrays are the same, false otherwise.
+
+
+
+ Returns hash code for an array that is generated based on the elements.
+
+
+ Hash code returned by this method is guaranteed to be the same for
+ arrays with equal elements.
+
+
+ Array to calculate hash code for.
+
+
+ A hash code for the specified array.
+
+
+
+
+ Returns string representation of an array.
+
+
+ Array to return as a string.
+
+
+ String representation of the specified .
+
+
+
+
+ Concatenates 2 arrays of compatible element types
+
+
+ If either of the arguments is null, the other array is returned as the result.
+ The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type.
+
+
+
+
+ Assertion utility methods that simplify things such as argument checks.
+
+
+
+ Not intended to be used directly by applications.
+
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ Checks, whether may be invoked on .
+ Supports testing transparent proxies.
+
+ the target instance or null
+ the name of the target to be used in error messages
+ the method to test for
+
+ if is null
+
+
+ if it is not possible to invoke on
+
+
+
+
+ checks, whether supports the methods of .
+ Supports testing transparent proxies.
+
+ the target instance or null
+ the name of the target to be used in error messages
+ the type to test for
+
+ if is null
+
+
+ if it is not possible to invoke methods of
+ type on
+
+
+
+
+ Checks the value of the supplied and throws an
+ if it is .
+
+ The object to check.
+ The argument name.
+
+ If the supplied is .
+
+
+
+
+ Checks the value of the supplied and throws an
+ if it is .
+
+ The object to check.
+ The argument name.
+
+ An arbitrary message that will be passed to any thrown
+ .
+
+
+ If the supplied is .
+
+
+
+
+ Checks the value of the supplied string and throws an
+ if it is or
+ contains only whitespace character(s).
+
+ The string to check.
+ The argument name.
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+
+
+
+ Checks the value of the supplied string and throws an
+ if it is or
+ contains only whitespace character(s).
+
+ The string to check.
+ The argument name.
+
+ An arbitrary message that will be passed to any thrown
+ .
+
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+
+
+
+ Checks the value of the supplied and throws
+ an if it is or contains no elements.
+
+ The array or collection to check.
+ The argument name.
+
+ If the supplied is or
+ contains no elements.
+
+
+
+
+ Checks the value of the supplied and throws
+ an if it is or contains no elements.
+
+ The array or collection to check.
+ The argument name.
+ An arbitrary message that will be passed to any thrown .
+
+ If the supplied is or
+ contains no elements.
+
+
+
+
+ Checks the value of the supplied and throws
+ an if it is , contains no elements or only null elements.
+
+ The array or collection to check.
+ The argument name.
+
+ If the supplied is ,
+ contains no elements or only null elements.
+
+
+
+
+ Checks whether the specified can be cast
+ into the .
+
+
+ The argument to check.
+
+
+ The name of the argument to check.
+
+
+ The required type for the argument.
+
+
+ An arbitrary message that will be passed to any thrown
+ .
+
+
+
+
+ Assert a boolean expression, throwing ArgumentException
+ if the test result is false.
+
+ a boolean expression.
+ The exception message to use if the assertion fails.
+
+ if expression is false
+
+
+
+
+ Assert a boolean expression, throwing ArgumentException
+ if the test result is false.
+
+ a boolean expression.
+
+ if expression is false
+
+
+
+
+ Assert a bool expression, throwing InvalidOperationException
+ if the expression is false.
+
+ a boolean expression.
+ The exception message to use if the assertion fails
+ if expression is false
+
+
+
+ Creates a new instance of the class.
+
+
+
+ This is a utility class, and as such exposes no public constructors.
+
+
+
+
+
+ General utility methods for working with annotations
+
+
+
+
+ Find a single Attribute of the type 'attributeType' from the supplied class,
+ traversing it interfaces and super classes if no attribute can be found on the
+ class iteslf.
+
+
+ This method explicitly handles class-level attributes which are not declared as
+ inherited as well as attributes on interfaces.
+
+ The class to look for attributes on .
+ Type of the attribibute to look for.
+ the attribute of the given type found, or null
+
+
+
+ Miscellaneous collection utility methods.
+
+
+ Mainly for internal use within the framework.
+
+ Mark Pollack (.NET)
+
+
+
+ Checks if the given array or collection has elements and none of the elements is null.
+
+ the collection to be checked.
+ true if the collection has a length and contains only non-null elements.
+
+
+
+ Checks if the given array or collection is null or has no elements.
+
+
+
+
+
+
+ Determine whether a given collection only contains
+ a single unique object
+
+
+
+
+
+
+ Determines whether the contains the specified .
+
+ The collection to check.
+ The object to locate in the collection.
+ if the element is in the collection, otherwise.
+
+
+
+ Adds the specified to the specified .
+
+ The collection to add the element to.
+ The object to add to the collection.
+
+
+
+ Adds the specified to the specified .
+
+ The enumerable to add the element to.
+ The object to add to the collection.
+
+
+
+ Determines whether the collection contains all the elements in the specified collection.
+
+ The collection to check.
+ Collection whose elements would be checked for containment.
+ true if the target collection contains all the elements of the specified collection.
+
+
+
+ Removes all the elements from the target collection that are contained in the source collection.
+
+ Collection where the elements will be removed.
+ Elements to remove from the target collection.
+
+
+
+ Converts an instance to an instance.
+
+ The instance to be converted.
+ An instance in which its elements are the elements of the instance.
+ if the is null.
+
+
+
+ Copies the elements of the to a
+ new array of the specified element type.
+
+ The instance to be converted.
+ The element of the destination array to create and copy elements to
+ An array of the specified element type containing copies of the elements of the .
+
+
+
+ Returns the first element contained in both, and .
+
+ The implementation assumes that <<<
+ the source enumerable. may be null
+ the list of candidates to match against elements. may be null
+ the first element found in both enumerables or null
+
+
+
+ Finds a value of the given type in the given collection.
+
+ The collection to search.
+ The type to look for.
+ a value of the given type found, or null if none.
+ If more than one value of the given type is found
+
+
+
+ Finds a value of the given type in the given collection.
+
+ The collection to search.
+ The type to look for.
+ a collection of matching values of the given type found, empty if none found, or null if the input collection was null.
+
+
+
+ Find a value of one of the given types in the given Collection,
+ searching the Collection for a value of the first type, then
+ searching for a value of the second type, etc.
+
+ The collection to search.
+ The types to look for, in prioritized order.
+ a value of the given types found, or null if none
+ If more than one value of the given type is found
+
+
+
+ Determines whether the specified collection is null or empty.
+
+ The collection to check.
+
+ true if the specified collection is empty or null; otherwise, false.
+
+
+
+
+ Determines whether the specified collection is null or empty.
+
+ The collection to check.
+
+ true if the specified collection is empty or null; otherwise, false.
+
+
+
+
+ Determines whether the specified dictionary is null empty.
+
+ The dictionary to check.
+
+ true if the specified dictionary is empty or null; otherwise, false.
+
+
+
+
+ A simple stable sorting routine - far from being efficient, only for small collections.
+
+
+
+
+
+
+
+ A simple stable sorting routine - far from being efficient, only for small collections.
+
+
+ Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned.
+
+ input collection of items to sort
+ the for comparing 2 items in .
+ a new collection of stable sorted items.
+
+
+
+ A simple stable sorting routine - far from being efficient, only for small collections.
+
+
+ Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned.
+
+ input collection of items to sort
+ the for comparing 2 items in .
+ a new collection of stable sorted items.
+
+
+
+ A simple stable sorting routine - far from being efficient, only for small collections.
+
+
+ Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned.
+
+ input collection of items to sort
+ the for comparing 2 items in .
+ a new collection of stable sorted items.
+
+
+
+ A callback method used for comparing to items.
+
+
+
+ the first object to compare
+ the second object to compare
+ Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y.
+
+
+
+
+
+ Utility class containing helper methods for object comparison.
+
+ Aleksandar Seovic
+
+
+ Compares two objects.
+ First object.
+ Second object.
+
+ 0, if objects are equal;
+ less than zero, if the first object is smaller than the second one;
+ greater than zero, if the first object is greater than the second one.
+
+
+
+ Utility class for .NET configuration files management.
+
+ Aleksandar Seovic
+
+
+
+ Avoid BeforeFieldInit pitfall
+
+
+
+
+ Parses the configuration section.
+
+
+
+ Primary purpose of this method is to allow us to parse and
+ load configuration sections using the same API regardless
+ of the .NET framework version.
+
+
+ If Microsoft paid a bit more attention to preserving backwards
+ compatibility we would not even need it, but... :(
+
+
+ Name of the configuration section.
+ Object created by a corresponding .
+
+
+
+ Refresh the configuration section.
+
+
+
+ Primary purpose of this method is to allow us to parse and
+ load configuration sections using the same API regardless
+ of the .NET framework version.
+
+
+ If Microsoft paid a bit more attention to preserving backwards
+ compatibility we would not even need it, but... :(
+
+
+ Name of the configuration section.
+
+
+
+ Creates the configuration exception.
+
+ The message to display to the client when the exception is thrown.
+ The inner exception.
+ Name of the configuration file.
+ The line where exception occured.
+ Configuration exception.
+
+
+
+ Creates the configuration exception.
+
+ The message to display to the client when the exception is thrown.
+ Name of the configuration file.
+ The line where exception occured.
+ Configuration exception.
+
+
+
+ Creates the configuration exception.
+
+ The message to display to the client when the exception is thrown.
+ The inner exception.
+ XML node where exception occured.
+ Configuration exception.
+
+
+
+ Creates the configuration exception.
+
+ The message to display to the client when the exception is thrown.
+ XML node where exception occured.
+ Configuration exception.
+
+
+
+ Creates the configuration exception.
+
+ The message to display to the client when the exception is thrown.
+ The inner exception.
+ Configuration exception.
+
+
+
+ Creates the configuration exception.
+
+ The message to display to the client when the exception is thrown.
+ Configuration exception.
+
+
+
+ Creates the configuration exception.
+
+ Configuration exception.
+
+
+
+ Determines whether the specified exception is configuration exception.
+
+ The exception to check.
+
+ true if the specified exception is configuration exception; otherwise, false.
+
+
+
+
+ Returns the line number of the specified node.
+
+ Node to get the line number for.
+ The line number of the specified node.
+
+
+
+ Returns the name of the file specified node is defined in.
+
+ Node to get the file name for.
+ The name of the file specified node is defined in.
+
+
+
+ Sets the current to be used by .
+
+
+ Ãf implements , this method invokes
+ on the new configSystem to chain them.
+ Note, that this method requires reflection on internals of
+
+ the configuration system to set
+ bypasses the check if the current system has already been initialized
+ the previous config system, if any
+
+
+
+ Resets the global configuration system instance. Use for unit testing only!
+
+
+
+
+ An holding information about its original text source location.
+
+ Erich Eichinger
+
+
+
+ Holds text position information for e.g. error reporting purposes.
+
+
+
+
+
+
+ Gets a string specifying the file/resource name related to the configuration details.
+
+
+
+
+ Gets an integer specifying the line number related to the configuration details.
+
+
+
+
+ Gets an integer specifying the line position related to the configuration details.
+
+
+
+
+ Creates a new instance of , storing a copy of the passed
+ .
+
+
+
+
+ Creates a duplicate of this node.
+
+ true to recursively clone the subtree under the specified node; false to clone only the node itself
+
+
+
+ The name of the resource this element was read from
+
+
+
+
+ The line number within the resource this element was read from
+
+
+
+
+ The line position within the resource this element was read from.
+
+
+
+
+ An implementation, who's elements retain information
+ about their location in the original XML text document the were read from.
+
+
+ When loading a document, the used must implement .
+ Typical XmlReader implementations like support this interface.
+
+ Erich Eichinger
+
+
+
+ Overridden to create a retaining the current
+ text position information.
+
+
+
+
+ Overridden to create a retaining the current
+ text position information.
+
+
+
+
+ Load the document from the given .
+ Child nodes will store as their property.
+
+ the name of the resource
+ The XML source
+
+
+
+ Load the document from the given .
+
+ The XML source
+
+
+
+ Load the document from the given .
+ Child nodes will store as their property.
+
+ the name of the resource
+ The XML source
+
+
+
+ Load the document from the given .
+ Child nodes will store as their property.
+
+ the name of the resource
+ The XML source
+
+
+
+ Load the document from the given .
+ Child nodes will store as their property.
+
+ the name of the resource
+ The XML source
+
+
+
+ Load the document from the given .
+ Child nodes will store as their property.
+
+ the name of the resource
+ The XML source
+
+
+
+ Load the document from the given .
+ Child nodes will store null as their property.
+
+ The XML source
+
+
+
+ Creates an object based on the information in the . The reader must be positioned on a node or attribute.
+ Child nodes will store as their property.
+
+
+ The new XmlNode or null if no more nodes exist.
+
+ the name of the resource
+ The XML source
+ The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity).
+
+
+
+ Creates an object based on the information in the . The reader must be positioned on a node or attribute.
+ Child nodes will store null as their property.
+
+
+ The new XmlNode or null if no more nodes exist.
+
+ The XML source
+ The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity).
+
+
+
+ Get info about the current text position during loading a document.
+ Outside loading a document, the properties of
+ will always be null.
+
+
+
+
+ Holds the current text position during loading a document
+
+
+
+
+ An holding information about its original text source location.
+
+ Erich Eichinger
+
+
+
+ Creates a new instance of , storing a copy of the passed
+ .
+
+
+
+
+ Creates a duplicate of this node.
+
+ true to recursively clone the subtree under the specified node; false to clone only the node itself
+
+
+
+ The name of the resource this element was read from
+
+
+
+
+ The line number within the resource this element was read from
+
+
+
+
+ The line position within the resource this element was read from.
+
+
+
+
+ Collects information on the constructor to use to create the instance and the argument instances to pass into the
+ constructor.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The constructor info.
+ The arg instances.
+
+
+
+ Gets the constructor info.
+
+ The constructor info.
+
+
+
+ Gets the arg instances.
+
+ The arg instances.
+
+
+
+ Discovers the attributes of a
+ and provides access to the
+ s metadata.
+
+ Rick Evans
+
+
+
+ The method name associated with a delegate invocation.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The event used to extract the delegate
+ from.
+
+
+ if the supplied is
+ .
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The delegate .
+
+
+ If the supplied is not a subclass of the
+ class, or is .
+
+
+
+
+ Checks to see if the method encapsulated by the supplied method
+ metadata is compatible with the method signature associated with
+ this delegate type.
+
+ The method to be checked.
+
+ if the method signature is compatible with
+ the signature of this delegate; if not, or
+ if the supplied parameter is
+ .
+
+
+
+
+ Gets the s of the parameters of the
+ method signature associated with this delegate type.
+
+
+
+ This method will never return ; the returned
+ array may be empty, but it most certainly
+ will not be .
+
+
+
+ A array of the parameter
+ s; or the
+ array if the method signature has no parameters.
+
+
+
+
+ Gets the return of the
+ method signature associated with this delegate type.
+
+ The return .
+
+
+
+ Gets the metadata about the method signature associated
+ with this delegate type.
+
+
+ The metadata about the method signature associated
+ with this delegate type.
+
+
+
+
+ Determines whether the supplied
+ is a type.
+
+
+ The to be checked.
+
+
+ if the supplied
+ is a ;
+ if not or the supplied
+ is .
+
+
+
+
+ Checks if the signature of the supplied
+ is compatible with the signature expected by the supplied
+ .
+
+ The event to be checked against.
+
+ The method signature to check for compatibility.
+
+
+ if the signature of the supplied
+ is compatible with the signature
+ expected by the supplied ;
+ if not or either of the supplied
+ parameters is .
+
+
+
+
+
+ The of the delegate.
+
+
+
+
+ Use this class for obtaining instances for dynamic code generation.
+
+
+
+ The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies.
+
+
+ Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used.
+
+
+
+
The following excerpt from demonstrates usage:
+
+ public class DynamicProxyManager
+ {
+ public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy";
+
+ public static TypeBuilder CreateTypeBuilder(string name, Type baseType)
+ {
+ // Generates type name
+ string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N"));
+ ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME);
+ return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES);
+ }
+ }
+
+
+ Erich Eichinger
+
+
+
+
+
+
+ prevent instantiation
+
+
+
+
+ Returns the for the dynamic module within the specified assembly.
+
+
+ If the assembly does not exist yet, it will be created.
+ This factory caches any dynamic assembly it creates - calling GetModule() twice with
+ the same name will *not* create 2 distinct modules!
+
+ The assembly-name of the module to be returned
+ the that can be used to define new types within the specified assembly
+
+
+
+ Persists the specified dynamic assembly to the file-system
+
+ the name of the dynamic assembly to persist
+
+ Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules.
+
+
+
+
+ Removes all registered s.
+
+
+
+
+ A utility class for raising events in a generic and consistent fashion.
+
+ Rick Evans
+
+
+
+ Create a new EventRaiser instance
+
+
+
+
+ Raises the event encapsulated by the supplied
+ , passing the supplied
+ to the event.
+
+ The event to be raised.
+ The arguments to the event.
+ a map of sink/exception entries that occurred during event raising
+
+
+
+ Invokes the supplied , passing the supplied
+ to the sink.
+
+ The sink to be invoked.
+ The arguments to the sink.
+ the map of sink/exception entries to add any exception to
+
+
+
+ Raises events defensively.
+
+
+
+ Raising events defensively means that as the raised event is passed to each handler,
+ any thrown by a handler will be caught and silently
+ ignored.
+
+
+ Rick Evans
+
+
+
+ Defensively invokes the supplied , passing the
+ supplied to the sink.
+
+ The sink to be invoked.
+ The arguments to the sink.
+ the map of sink/exception entries to add any exception to
+
+
+
+ Implement this interface to create your own, delegating
+ and set them using
+
+
+
+
+
+
+
+
+
+
+ A strategy for handling errors. This is especially useful for handling
+ errors that occur during asynchronous execution as in such cases it may not be
+ possible to throw the error to the original caller.
+
+ Mark Fisher
+ Mark Pollack (.NET)
+
+
+
+ Handles the error.
+
+ The exception.
+
+
+
+ Utility methods for IO handling
+
+
+
+
+ Copies one stream into another.
+ (Don't forget to call on the destination stream!)
+
+
+ Does not close the input stream!
+
+
+
+
+ Reads a stream into a byte array.
+
+
+ Does not close the input stream!
+
+
+
+
+ Various utility methods relating to numbers.
+
+
+
+ Mainly for internal use within the framework.
+
+
+ Aleksandar Seovic
+
+
+
+ Determines whether the supplied is an integer.
+
+ The object to check.
+
+ if the supplied is an integer.
+
+
+
+
+ Determines whether the supplied is a decimal number.
+
+ The object to check.
+
+ if the supplied is a decimal number.
+
+
+
+
+ Determines whether the supplied is of numeric type.
+
+ The object to check.
+
+ true if the specified object is of numeric type; otherwise, false.
+
+
+
+
+ Determines whether the supplied can be converted to an integer.
+
+ The object to check.
+
+ if the supplied can be converted to an integer.
+
+
+
+
+ Determines whether the supplied can be converted to an integer.
+
+ The object to check.
+
+ if the supplied can be converted to an integer.
+
+
+
+
+ Determines whether the supplied can be converted to a number.
+
+ The object to check.
+
+ true if the specified object is decimal number; otherwise, false.
+
+
+
+
+ Is the supplied equal to zero (0)?
+
+ The number to check.
+
+ id the supplied is equal to zero (0).
+
+
+
+
+ Negates the supplied .
+
+ The number to negate.
+ The supplied negated.
+
+ If the supplied is not a supported numeric type.
+
+
+
+
+ Returns the bitwise not (~) of the supplied .
+
+ The number.
+ The value of ~.
+
+ If the supplied is not a supported numeric type.
+
+
+
+
+ Bitwise ANDs (&) the specified integral values.
+
+ The first number.
+ The second number.
+
+ If one of the supplied arguments is not a supported integral types.
+
+
+
+
+ Bitwise ORs (|) the specified integral values.
+
+ The first number.
+ The second number.
+
+ If one of the supplied arguments is not a supported integral types.
+
+
+
+
+ Bitwise XORs (^) the specified integral values.
+
+ The first number.
+ The second number.
+
+ If one of the supplied arguments is not a supported integral types.
+
+
+
+
+ Adds the specified numbers.
+
+ The first number.
+ The second number.
+
+
+
+ Subtracts the specified numbers.
+
+ The first number.
+ The second number.
+
+
+
+ Multiplies the specified numbers.
+
+ The first number.
+ The second number.
+
+
+
+ Divides the specified numbers.
+
+ The first number.
+ The second number.
+
+
+
+ Calculates remainder for the specified numbers.
+
+ The first number (dividend).
+ The second number (divisor).
+
+
+
+ Raises first number to the power of the second one.
+
+ The first number.
+ The second number.
+
+
+
+ Coerces the types so they can be compared.
+
+ The right.
+ The left.
+
+
+
+ Creates a new instance of the class.
+
+
+
+ This is a utility class, and as such exposes no public constructors.
+
+
+
+
+
+ Helper methods with regard to objects, types, properties, etc.
+
+
+
+ Not intended to be used directly by applications.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans (.NET)
+
+
+
+ The instance for this class.
+
+
+
+
+ An empty object array.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+ This is a utility class, and as such exposes no public constructors.
+
+
+
+
+
+ Instantiates the type using the assembly specified to load the type.
+
+ This is a convenience in the case of needing to instantiate a type but not
+ wanting to specify in the string the version, culture and public key token.
+ The assembly.
+ Name of the type.
+
+
+ If the or is
+
+
+ If cannot load the type from the assembly or the call to InstantiateType(Type) fails.
+
+
+
+
+ Convenience method to instantiate a using
+ its no-arg constructor.
+
+
+
+ As this method doesn't try to instantiate s
+ by name, it should avoid loading issues.
+
+
+
+ The to instantiate*
+
+ A new instance of the .
+
+ If the is
+
+
+ If the is an abstract class, an interface,
+ an open generic type or does not have a public no-argument constructor.
+
+
+
+
+ Gets the zero arg ConstructorInfo object, if the type offers such functionality.
+
+ The type.
+ Zero argument ConstructorInfo
+
+ If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor.
+
+
+
+
+ Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains
+ open generic type parameters.
+
+ The type.
+
+
+
+ Convenience method to instantiate a using
+ the given constructor.
+
+
+
+ As this method doesn't try to instantiate s
+ by name, it should avoid loading issues.
+
+
+
+ The constructor to use for the instantiation.
+
+
+ The arguments to be passed to the constructor.
+
+ A new instance.
+
+ If the is
+
+
+ If the 's declaring type is an abstract class,
+ an interface, an open generic type or does not have a public no-argument constructor.
+
+
+
+
+ Checks whether the supplied is not a transparent proxy and is
+ assignable to the supplied .
+
+
+
+ Neccessary when dealing with server-activated remote objects, because the
+ object is of the type TransparentProxy and regular is testing for assignable
+ types does not work.
+
+
+ Transparent proxy instances always return when tested
+ with the 'is' operator (C#). This method only checks if the object
+ is assignable to the type if it is not a transparent proxy.
+
+
+ The target to be checked.
+ The value that should be assigned to the type.
+
+ if the supplied is not a
+ transparent proxy and is assignable to the supplied .
+
+
+
+
+ Determine if the given is assignable from the
+ given value, assuming setting by reflection and taking care of transparent proxies.
+
+
+
+ Considers primitive wrapper classes as assignable to the
+ corresponding primitive types.
+
+
+ For example used in an object factory's constructor resolution.
+
+
+ The target .
+ The value that should be assigned to the type.
+ True if the type is assignable from the value.
+
+
+
+ Check if the given represents a
+ "simple" property,
+ i.e. a primitive, a , a
+ , or a corresponding array.
+
+
+
+ Used to determine properties to check for a "simple" dependency-check.
+
+
+
+ The to check.
+
+
+
+
+ Check if the given class represents a primitive array,
+ i.e. boolean, byte, char, short, int, long, float, or double.
+
+
+
+
+ Determines whether the specified array is null or empty.
+
+ The array to check.
+
+ true if the specified array is null empty; otherwise, false.
+
+
+
+
+ Determine if the given objects are equal, returning
+ if both are respectively
+ if only one is .
+
+ The first object to compare.
+ The second object to compare.
+
+ if the given objects are equal.
+
+
+
+
+ Returns the first element in the supplied .
+
+
+ The to use to enumerate
+ elements.
+
+
+ The first element in the supplied .
+
+
+ If the supplied did not have any elements.
+
+
+
+
+ Returns the first element in the supplied .
+
+
+ The to use to enumerate
+ elements.
+
+
+ The first element in the supplied .
+
+
+ If the supplied did not have any elements.
+
+
+ If the supplied is .
+
+
+
+
+ Returns the element at the specified index using the supplied
+ .
+
+
+ The to use to enumerate
+ elements until the supplied is reached.
+
+
+ The index of the element in the enumeration to return.
+
+
+ The element at the specified index using the supplied
+ .
+
+
+ If the supplied was less than zero, or the
+ supplied did not contain enough elements
+ to be able to reach the supplied .
+
+
+
+
+ Returns the element at the specified index using the supplied
+ .
+
+
+ The to use to enumerate
+ elements until the supplied is reached.
+
+
+ The index of the element in the enumeration to return.
+
+
+ The element at the specified index using the supplied
+ .
+
+
+ If the supplied was less than zero, or the
+ supplied did not contain enough elements
+ to be able to reach the supplied .
+
+
+ If the supplied is .
+
+
+
+
+ Gets the qualified name of the given method, consisting of
+ fully qualified interface/class name + "." method name.
+
+ The method.
+ qualified name of the method.
+
+
+
+ Return a String representation of an object's overall identity.
+
+ The object (may be null).
+ The object's identity as String representation,
+ or an empty String if the object was null
+
+
+
+
+ Gets a hex String form of an object's identity hash code.
+
+ The obj.
+ The object's identity code in hex notation
+
+
+
+ Support matching of file system paths in a manner similar to that of the
+ NAntFileSet.
+
+
+
+ Any (back)slashes are converted to forward slashes.
+
+
+
+
+ // true
+ PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat");
+ PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat");
+ PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat");
+ // false
+ PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat");
+
+
+ Federico Spinazzi
+
+
+
+ Determines if a given path matches a NAnt-like pattern.
+
+
+ A forward or back-slashed fileset-like pattern.
+
+ A forward or back-slashed full path.
+ should the match consider the case
+
+ if the path is matched by the pattern;
+ otherwise .
+
+
+
+
+ Determines if a given path matches a NAnt-like pattern.
+
+
+ A forward or back-slashed fileset-like pattern.
+
+ A forward or back-slashed full path.
+
+ if the path is matched by the pattern;
+ otherwise .
+
+
+
+
+ Replaces back(slashes) with forward slashes.
+
+
+ The path or the pattern to modify.
+
+ A forward-slashed string.
+
+
+
+ Helper method to convert a NAnt-like pattern into the
+ appropriate pattern for a regular expression.
+
+ The NAnt-like pattern.
+ A regex-compatible pattern.
+
+
+
+ Creates a new instance of the class.
+
+
+
+ This is a utility class, and as such exposes no public constructors.
+
+
+
+
+ Utility methods for simple pattern matching, in particular for
+ Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles.
+
+ Juergen Hoeller
+ Mark Pollack
+
+
+ Match a String against the given pattern, supporting the following simple
+ pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.
+
+ the pattern to match against
+
+ the String to match
+
+ whether the String matches the given pattern
+
+
+
+ Match a String against the given patterns, supporting the following simple
+ pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality.
+
+ the patterns to match against
+
+ the String to match
+
+ whether the String matches any of the given patterns
+
+
+
+
+ An implementation of the Java Properties class.
+
+
+ For the complete syntax see java.util.Properties JavaDoc.
+ This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null.
+
+
+ key1 = value
+ key2:
+ key3
+
+ will result in the name/value pairs:
+
+ key1:="value"
+ key2:=string.Empty
+ key3:=<null>
+
+ note, that to specify a null value, the key must not be followed by any character except newline.
+
+
+ Simon White
+
+
+
+ Creates an empty property list with no default values.
+
+
+
+
+ Creates a property list with the specified initial properties.
+
+ The initial properties.
+
+
+
+ Reads a property list (key and element pairs) from the input stream.
+
+ The stream to load from.
+
+
+
+ Reads a property list (key and element pairs) from a text reader.
+
+ The text reader to load from.
+
+
+
+ Reads a property list (key and element pairs) from the input stream.
+
+ the dictionary to put it in
+ The stream to load from.
+
+
+
+ Reads a property list (key and element pairs) from a text reader.
+
+ the dictionary to put it in
+ The text reader to load from.
+
+
+
+ Strips whitespace from the front of the specified string.
+
+ The string.
+ The string with all leading whitespace removed.
+
+
+
+ Splits the specified string into a key / value pair.
+
+ The line to split.
+ An array containing the key / value pair.
+
+
+
+ Searches for the property with the specified key in this property list.
+
+ The key.
+ The property, or null if the key was not found.
+
+
+
+ Searches for the property with the specified key in this property list.
+
+ The key.
+
+ The default value to be returned if the key is not found.
+
+ The property, or the default value.
+
+
+
+ Writes this property list out to the specified stream.
+
+ The stream to write to.
+
+
+
+ Sets the specified property key / value pair.
+
+ The key.
+ The value.
+
+
+
+ Writes the properties in this instance out to the supplied stream.
+
+ The stream to write to.
+ Arbitrary header information.
+
+
+
+ Removes the key / value pair identified by the supplied key.
+
+
+ The key identifying the key / value pair to be removed.
+
+
+
+
+ Adds the specified key / object pair to this collection.
+
+ The key.
+ The value.
+
+
+
+ Adds the specified key / object pair to this collection.
+
+
+
+
+ Various reflection related methods that are missing from the standard library.
+
+ Rod Johnson
+ Juergen Hoeller
+ Aleksandar Seovic (.NET)
+ Stan Dvoychenko (.NET)
+ Bruno Baia (.NET)
+
+
+
+ Convenience value that will
+ match all private and public, static and instance members on a class
+ in a case inSenSItivE fashion.
+
+
+
+
+ Avoid BeforeFieldInit problem
+
+
+
+
+ Checks, if the specified type is a nullable
+
+
+
+
+ Returns signature for the specified , method name and argument
+ s.
+
+ The the method is in.
+ The method name.
+
+ The argument s.
+
+ The method signature.
+
+
+
+ Returns method for the specified , method
+ name and argument
+ s.
+
+
+ Searches with BindingFlags
+ When dealing with interface methods, you probable want to 'normalize' method references by calling
+ .
+
+
+
+ The target to find the method on.
+
+ The method to find.
+
+ The argument s. May be
+ if the method has no arguments.
+
+ The target method.
+
+
+
+
+ Resolves a given to the representing the actual implementation.
+
+
+ see article How To Get an Explicit Interface Implementation Method.
+
+ a
+ the type to lookup
+ the representing the actual implementation method of the specified
+
+
+
+ Returns an array of parameter s for the specified method
+ or constructor.
+
+ The method (or constructor).
+ An array containing the parameter s.
+
+ If is .
+
+
+
+
+ Returns an array of parameter s for the
+ specified parameter info array.
+
+ The parameter info array.
+ An array containing parameter s.
+
+ If is or any of the
+ elements is .
+
+
+
+
+ Returns an array of s that represent
+ the names of the generic type parameter.
+
+ The method.
+ An array containing the parameter names.
+
+ If is .
+
+
+
+
+ Returns an array of s that represent
+ the names of the generic type parameter.
+
+ The parameter info array.
+ An array containing parameter names.
+
+ If is or any of the
+ elements is .
+
+
+
+
+ From a given list of methods, selects the method having an exact match on the given ' types.
+
+ the list of methods to choose from
+ the arguments to the method
+ the method matching exactly the passed ' types
+
+ If more than 1 matching methods are found in the list.
+
+
+
+
+ From a given list of methods, selects the method having an exact match on the given ' types.
+
+ the type of method (used for exception reporting only)
+ the list of methods to choose from
+ the arguments to the method
+ the method matching exactly the passed ' types
+
+ If more than 1 matching methods are found in the list.
+
+
+
+
+ From a given list of constructors, selects the constructor having an exact match on the given ' types.
+
+ the list of constructors to choose from
+ the arguments to the method
+ the constructor matching exactly the passed ' types
+
+ If more than 1 matching methods are found in the list.
+
+
+
+
+ Packages arguments into argument list containing parameter array as a last argument.
+
+ Argument vaklues to package.
+ Total number of oarameters.
+ Type of the param array element.
+ Packaged arguments.
+
+
+
+ Convenience method to convert an interface
+ to a array that contains
+ all the interfaces inherited and the specified interface.
+
+ The interface to convert.
+ An array of interface s.
+
+ If the specified is not an interface.
+
+
+ If is .
+
+
+
+
+ Is the supplied the default indexer for the
+ supplied ?
+
+
+ The name of the property on the supplied to be checked.
+
+
+ The to be checked.
+
+
+ if the supplied is the
+ default indexer for the supplied .
+
+
+ If the supplied is .
+
+
+
+
+ Is the supplied declared on one of these interfaces?
+
+ The method to check.
+ The array of interfaces we want to check.
+
+ if the method is declared on one of these interfaces.
+
+
+ If any of the s specified is not an interface.
+
+
+ If or any of the specified interfaces is
+ .
+
+
+
+
+ Returns the default value for the specified
+
+
+
+ Follows the standard .NET conventions for default values where
+ relevant; for example, all numeric types default to the value
+ 0.
+
+
+
+ The to return default value for.
+
+
+ The default value for the specified .
+
+
+ If the supplied is an enumerated type that
+ has no values.
+
+
+
+
+ Returns an array consisting of the default values for the supplied
+ .
+
+
+ The array of s to return default values for.
+
+
+ An array consisting of the default values for the supplied
+ .
+
+
+ If any of the elements in the supplied
+ array is an enumerated type that has no values.
+
+
+
+
+
+ Checks that the parameter s of the
+ supplied match the parameter
+ s of the supplied
+ .
+
+ The method to be checked.
+
+ The array of parameter s to check against.
+
+
+ if the parameter s
+ match.
+
+
+
+
+ Returns an array containing the s of the
+ objects in the supplied array.
+
+
+ The objects array for which the corresponding s
+ are needed.
+
+
+ An array containing the s of the objects
+ in the supplied array; this array will be empty (but not
+ if the supplied
+ is null or has no elements.
+
+
+
+ [C#]
+ Given an array containing the following objects,
+ [83, "Foo", new object ()], the
+ array returned from this method call would consist of the following
+ elements...
+ [Int32, String, Object].
+
+
+
+
+
+ Given the return its representation as
+ it would appear in the source code files.
+
+
+ Largely intended to handle generic types where .ToString() will typically return:
+ "System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2[System.String,System.Int32]]"
+ and this method will instead return:
+ "System.Collections.Generic.List<System.Collections.Generic.Dictionary<string,int>>"
+
+ The type.
+ Friendly string representing the Type
+
+
+
+ Does the given and/or it's superclasses
+ have at least one or more methods with the given name (with any
+ argument types)?
+
+
+
+ Includes non-public methods in the methods searched.
+
+
+
+ The to be checked.
+
+
+ The name of the method to be searched for. Case inSenSItivE.
+
+
+ if the given or / and it's
+ superclasses have at least one or more methods (with any argument types);
+ if not, or either of the parameters is .
+
+
+
+
+ Within , counts the number of overloads for the method with the given (case-insensitive!)
+
+ The type to be searched
+ the name of the method for which overloads shall be counted
+ The number of overloads for method within type
+
+
+
+ Creates a .
+
+
+
+ Note that if a non-
+ is supplied, any read write properties exposed by the
+ will be used to overwrite values that may have been passed in via the
+ . That is, the will be used
+ to initialize the custom attribute, and then any read-write properties on the
+ will be plugged in.
+
+
+
+ The desired .
+
+
+ Any constructor arguments for the attribute (may be
+ in the case of no arguments).
+
+
+ Source attribute to copy properties from (may be ).
+
+ A custom attribute builder.
+
+ If the parameter is .
+
+
+ If the parameter is not a
+ that derives from the class.
+
+
+
+
+
+ Creates a .
+
+
+ The desired .
+
+
+ Source attribute to copy properties from (may be ).
+
+ A custom attribute builder.
+
+
+
+ Creates a .
+
+
+ The source attribute to copy properties from.
+
+ A custom attribute builder.
+
+ If the supplied is
+ .
+
+
+
+
+ Creates a .
+
+
+ The desired .
+
+ A custom attribute builder.
+
+
+
+ Creates a .
+
+
+ The desired .
+
+
+ Any constructor arguments for the attribute (may be
+ in the case of no arguments).
+
+ A custom attribute builder.
+
+
+
+ Creates a .
+
+
+ The to create
+ the custom attribute builder from.
+
+ A custom attribute builder.
+
+
+
+ Calculates and returns the list of attributes that apply to the
+ specified type or method.
+
+ The type or method to find attributes for.
+
+ A list of custom attributes (CustomAttributeData or Attribute instances)
+ that should be applied to type or method.
+
+
+
+
+ Tries to find matching methods in the specified
+ for each method in the supplied list.
+
+
+ The to look for matching methods in.
+
+ The methods to match.
+
+ A flag that specifies whether to throw an exception if a matching
+ method is not found.
+
+ A list of the matched methods.
+
+ If either of the or
+ parameters are .
+
+
+
+
+ Returns the of the supplied
+ .
+
+
+
+ If the is a
+ instance, the return value of this method call with be the
+ parameter cast to a
+ . If the is
+ anything other than a , the return value
+ will be the result of invoking the 's
+ method.
+
+
+
+ A or instance.
+
+
+ The argument if it is a
+ or the result of invoking
+ on the argument if it
+ is an .
+
+
+ If the is .
+
+
+
+
+ Unwraps the supplied
+ and returns the inner exception preserving the stack trace.
+
+
+ The to unwrap.
+
+ The unwrapped exception.
+
+
+
+ Is the supplied can be accessed outside the assembly ?
+
+ The type to check.
+
+ if the type can be accessed outside the assembly;
+ Otherwise .
+
+
+
+
+ Determines whether the specified type is nullable.
+
+ The type.
+
+ true if the specified type is ullable]; otherwise, false.
+
+
+
+
+ Is the supplied can be accessed
+ from the supplied friendly assembly ?
+
+ The type to check.
+ The friendly assembly name.
+
+ if the type can be accessed
+ from the supplied friendly assembly; Otherwise .
+
+
+
+
+ Gets all of the interfaces implemented by
+ the specified .
+
+
+ The object to get the interfaces of.
+
+
+ All of the interfaces implemented by the
+ .
+
+
+
+
+ Returns the explicit that is the root cause of an exception.
+
+
+ If the InnerException property of the current exception is a null reference
+ or a , returns the current exception.
+
+ The last exception thrown.
+
+ The first explicit exception thrown in a chain of exceptions.
+
+
+
+
+ Copies all fields from one object to another.
+
+
+ The types of both objects must be related. This means, that either of the following is true:
+
+ fromObject.GetType() == toObject.GetType()
+ fromObject.GetType() is derived from toObject.GetType()
+ toObject.GetType() is derived from fromObject.GetType()
+
+
+ The source object
+ The object, who's fields will be populated with values from the source object
+ If the object's types are not related
+
+
+
+ Convenience method that uses reflection to return the value of a non-public field of a given object.
+
+ Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing.
+ The instance of the object from which to retrieve the field value.
+ Name of the field on the object from which to retrieve the value.
+
+
+
+
+ Convenience method that uses reflection to set the value of a non-public field of a given object.
+
+ Useful in certain instances during testing to avoid the need to add protected properties, etc. to a class just to facilitate testing.
+ The instance of the object from which to set the field value.
+ Name of the field on the object to which to set the value.
+ The field value to set.
+
+
+
+ Creates a .
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the
+ class.
+
+ The custom attribute type.
+
+
+
+ Creates a new instance of the
+ class.
+
+ The custom attribute type.
+ The custom attribute constructor arguments.
+
+
+
+ Adds the specified values to the constructor argument list
+ used to create the custom attribute.
+
+ An array of argument values.
+
+
+
+ Adds a property value to the custom attribute.
+
+ The property name.
+ The property value.
+
+
+
+ Creates the .
+
+ The created .
+
+
+
+ Utility class to be used from within this assembly for executing security critical code
+ NEVER EVER MAKE THIS PUBLIC!
+
+ Erich Eichinger
+
+
+
+ Miscellaneous utility methods.
+
+
+
+ Mainly for internal use within the framework.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Keith Donald
+ Aleksandar Seovic (.NET)
+ Mark Pollack (.NET)
+ Rick Evans (.NET)
+ Erich Eichinger (.NET)
+
+
+
+ The string that signals the start of an Ant-style expression.
+
+
+
+
+ The string that signals the end of an Ant-style expression.
+
+
+
+
+ An empty array of instances.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+ This is a utility class, and as such exposes no public constructors.
+
+
+
+
+
+ Tokenize the given into a
+ array.
+
+
+
+ If is , returns an empty
+ array.
+
+
+ If is or the empty
+ , returns a array with one
+ element: itself.
+
+
+ The to tokenize.
+
+ The delimiter characters, assembled as a .
+
+
+ Trim the tokens via .
+
+
+ Omit empty tokens from the result array.
+ An array of the tokens.
+
+
+
+ Tokenize the given into a
+ array.
+
+
+
+ If is , returns an empty
+ array.
+
+
+ If is or the empty
+ , returns a array with one
+ element: itself.
+
+
+ The to tokenize.
+
+ The delimiter characters, assembled as a .
+
+
+ Trim the tokens via .
+
+
+ Omit empty tokens from the result array.
+
+
+ Pairs of quote characters. within a pair of quotes are ignored
+
+ An array of the tokens.
+
+
+
+ Convert a CSV list into an array of s.
+
+
+ Values may also be quoted using doublequotes.
+
+ A CSV list.
+
+ An array of s, or the empty array
+ if is .
+
+
+
+
+ Take a which is a delimited list
+ and convert it to a array.
+
+
+
+ If the supplied is a
+ or zero-length string, then a single element
+ array composed of the supplied
+ will be
+ eturned. If the supplied
+ is , then an empty,
+ zero-length array will be returned.
+
+
+
+ The to be parsed.
+
+
+ The delimeter (this will not be returned). Note that only the first
+ character of the supplied is used.
+
+
+ An array of the tokens in the list.
+
+
+
+
+ Convenience method to return an
+ as a delimited
+ (e.g. CSV) .
+
+
+ The to parse.
+
+
+ The delimiter to use (probably a ',').
+
+ The delimited string representation.
+
+
+
+ Convenience method to return an
+ as a CSV
+ .
+
+
+ The to display.
+
+ The delimited string representation.
+
+
+
+ Convenience method to return an array as a CSV
+ .
+
+
+ The array to parse. Elements may be of any type (
+ will be called on each
+ element).
+
+
+
+
+ Convenience method to return a
+ array as a delimited (e.g. CSV) .
+
+
+ The array to parse. Elements may be of any type (
+ will be called on each
+ element).
+
+
+ The delimiter to use (probably a ',').
+
+
+
+ Checks if a string has length.
+
+ The string to check, may be .
+
+
+ if the string has length and is not
+ .
+
+
+
+ StringUtils.HasLength(null) = false
+ StringUtils.HasLength("") = false
+ StringUtils.HasLength(" ") = true
+ StringUtils.HasLength("Hello") = true
+
+
+
+
+
+ Checks if a has text.
+
+
+
+ More specifically, returns if the string is
+ not , it's is >
+ zero (0), and it has at least one non-whitespace character.
+
+
+
+ The string to check, may be .
+
+
+ if the is not
+ ,
+ > zero (0), and does not consist
+ solely of whitespace.
+
+
+
+ StringUtils.HasText(null) = false
+ StringUtils.HasText("") = false
+ StringUtils.HasText(" ") = false
+ StringUtils.HasText("12345") = true
+ StringUtils.HasText(" 12345 ") = true
+
+
+
+
+
+ Checks if a is
+ or an empty string.
+
+
+
+ More specifically, returns if the string is
+ , it's is equal
+ to zero (0), or it is composed entirely of whitespace
+ characters.
+
+
+
+ The string to check, may (obviously) be .
+
+
+ if the is
+ , has a length equal to zero (0), or
+ is composed entirely of whitespace characters.
+
+
+
+ StringUtils.IsNullOrEmpty(null) = true
+ StringUtils.IsNullOrEmpty("") = true
+ StringUtils.IsNullOrEmpty(" ") = true
+ StringUtils.IsNullOrEmpty("12345") = false
+ StringUtils.IsNullOrEmpty(" 12345 ") = false
+
+
+
+
+
+ Returns , if it contains non-whitespaces. null otherwise.
+
+
+
+
+ Strips first and last character off the string.
+
+ The string to strip.
+ The stripped string.
+
+
+
+ Returns a list of Ant-style expressions from the specified text.
+
+ The text to inspect.
+
+ A list of expressions that exist in the specified text.
+
+
+ If any of the expressions in the supplied
+ is empty (${}).
+
+
+
+
+ Replaces Ant-style expression placeholder with expression value.
+
+
+
+
+
+
+ The string to set the value in.
+ The name of the expression to set.
+ The expression value.
+
+ A new string with the expression value set; the
+ value if the supplied
+ is , has a length
+ equal to zero (0), or is composed entirely of whitespace
+ characters.
+
+
+
+
+ Surrounds (prepends and appends) the string value of the supplied
+ to the supplied .
+
+
+
+ The return value of this method call is always guaranteed to be non
+ . If every value passed as a parameter to this method is
+ , the string will be returned.
+
+
+
+ The prefix and suffix that respectively will be prepended and
+ appended to the target . If this value
+ is not a value, it's attendant
+ value will be used.
+
+
+ The target that is to be surrounded. If this value is not a
+ value, it's attendant
+ value will be used.
+
+ The surrounded string.
+
+
+
+ Surrounds (prepends and appends) the string values of the supplied
+ and to the supplied
+ .
+
+
+
+ The return value of this method call is always guaranteed to be non
+ . If every value passed as a parameter to this method is
+ , the string will be returned.
+
+
+
+ The value that will be prepended to the . If this value
+ is not a value, it's attendant
+ value will be used.
+
+
+ The target that is to be surrounded. If this value is not a
+ value, it's attendant
+ value will be used.
+
+
+ The value that will be appended to the . If this value
+ is not a value, it's attendant
+ value will be used.
+
+ The surrounded string.
+
+
+
+ Converts escaped characters (for example "\t") within a string
+ to their real character.
+
+ The string to convert.
+ The converted string.
+
+
+
+ Utility class containing miscellaneous system-level functionality.
+
+ Aleksandar Seovic
+
+
+
+ Registers assembly resolver that iterates over the
+ assemblies loaded into the current
+ in order to find an assembly that cannot be resolved.
+
+
+ This method has to be called if you need to serialize dynamically
+ generated types in transient assemblies, such as Spring AOP proxies,
+ because standard .NET serialization engine always tries to load
+ assembly from the disk.
+
+
+
+
+ Returns true if running on Mono
+
+ Tests for the presence of the type Mono.Runtime
+
+
+
+ Returns true if running on CLR 4.0 under InProc SxS mode
+
+
+
+
+ Gets the thread id for the current thread. Use thread name is available,
+ otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and
+ CurrentThread.ManagedThreadId otherwise.
+
+ The thread id.
+
+
+
+ Holds text position information for e.g. error reporting purposes.
+
+
+
+
+
+
+ Creates a new TextPositionInfo instance.
+
+
+
+
+ Creates a new TextPositionInfo instance, copying values from another instance.
+
+
+
+
+ The filename related to this text position
+
+
+
+
+ The line number related to this text position
+
+
+
+
+ The line position related to this text position
+
+
+
+
+ UniqueKey allows for generating keys unique to a type or particular instance and a partial name,
+ that can e.g. be used as keys in .
+
+
+ // shows usage type-scoped keys
+ UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey");
+ UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey");
+
+ HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'");
+ object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ];
+ Assert.AreEqual( "some value unique for class A having key 'myKey'", value);
+
+ HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'");
+ object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ];
+ Assert.AreEqual( "some value unique for class B having key 'myKey'", value);
+
+
+
+
+ Initialize a new instance of from its string representation.
+ See and See for details.
+
+ The string representation of the new instance.
+
+
+
+ Compares this instance to another.
+
+
+
+
+ Compares this instance to another.
+
+
+
+
+ Returns the hash code for this key.
+
+
+
+
+
+ Returns a string representation of this key.
+
+
+
+
+ Creates a new key instance unique to the given instance.
+
+ The instance the key shall be unique to
+ The partial key to be made unique
+
+
+ If is of type
+
+
+
+ Creates a new key instance unique to the given type.
+
+ The type the key shall be unique to
+ The partial key to be made unique
+
+
+
+ Returns a key unique for the given instance.
+
+ The instance the key shall be unique to
+ The partial key to be made unique
+ A key formatted as typename[instance-id].partialkey
+
+
+
+ Returns a key unique for the given type.
+
+ The type the key shall be unique to
+ The partial key to be made unique
+ A key formatted as typename.partialkey
+
+
+
+ XML utility methods.
+
+ Aleksandar Seovic
+
+
+
+ Gets an appropriate implementation
+ for the supplied .
+
+ The XML that is going to be read.
+ XML schemas that should be used for validation.
+ Validation event handler.
+
+ A validating implementation.
+
+
+
+
+ Gets an appropriate implementation
+ for the supplied .
+
+ The XML that is going to be read.
+ to be used for resolving external references
+ XML schemas that should be used for validation.
+ Validation event handler.
+
+ A validating implementation.
+
+
+
+
+ Gets an appropriate implementation
+ for the supplied .
+
+ The XML that is going to be read.
+
+ A non-validating implementation.
+
+
+
+
+ Implementation of that adds error message
+ to the validation errors container.
+
+ Aleksandar Seovic
+
+
+
+ Abstract base class that should be extended by all
+ validation actions.
+
+
+
+ This class implements template Execute method
+ and defines OnValid and OnInvalid methods that
+ can be overriden
+ by specific validation actions.
+
+
+ Aleksandar Seovic
+
+
+
+ An action that should be executed after validator is evaluated.
+
+
+
+ This interface allows us to define the actions that should be executed
+ after validation in a generic fashion.
+
+
+ For example, addition of error messages to validation errors collection
+ is performed by one specific implementation of this interface, .
+
+
+ Aleksandar Seovic
+
+
+
+ Executes the action.
+
+ Whether associated validator is valid or not.
+ Validation context.
+ Additional context parameters.
+ Validation errors container.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Executes the action.
+
+ Whether associated validator is valid or not.
+ Validation context.
+ Additional context parameters.
+ Validation errors container.
+
+
+
+ Called when associated validator is valid.
+
+ Validation context.
+ Additional context parameters.
+ Validation errors container.
+
+
+
+ Called when associated validator is not valid.
+
+ Validation context.
+ Additional context parameters.
+ Validation errors container.
+
+
+
+ Evaluates 'when' expression.
+
+ Root context to use for expression evaluation.
+ Additional context parameters.
+ True if the condition is true, False otherwise.
+
+
+
+ Gets or sets the expression that determines if this validator should be evaluated.
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Initializes a new instance of the class.
+
+ Error message resource identifier.
+ Names of the error providers this message should be added to.
+
+
+
+ Called when associated validator is invalid.
+
+ Validation context.
+ Additional context parameters.
+ Validation errors container.
+
+
+
+ Resolves the error message.
+
+ Validation context to resolve message parameters against.
+ Additional context parameters.
+ Resolved error message
+
+
+
+ Resolves the message parameters.
+
+ List of parameters to resolve.
+ Validation context to resolve parameters against.
+ Additional context parameters.
+ Resolved message parameters.
+
+
+
+ Sets the expressions that should be resolved to error message parameters.
+
+ The expressions that should be resolved to error message parameters.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Expression that defines the exception to throw when the validator is not valid.
+
+
+
+ Initializes a new instance of the class with an expression
+ that defines the exception to throw.
+
+
+
+
+ Called when associated validator is invalid.
+
+ Validation context.
+ Additional context parameters.
+ Validation errors container.
+
+
+
+ Gets or sets the exception to throw
+
+ The throws.
+
+
+
+ Implementation of that allows you
+ to define Spring.NET expressions that should be evaluated after
+ validation.
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Expression to execute when validator is valid.
+ Expression to execute when validator is not valid.
+
+
+
+ Initializes a new instance of the class.
+
+ Expression to execute when validator is valid.
+ Expression to execute when validator is not valid.
+
+
+
+ Called when associated validator is valid.
+
+ Validation context.
+ Additional context parameters.
+ Validation errors container.
+
+
+
+ Called when associated validator is invalid.
+
+ Validation context.
+ Additional context parameters.
+ Validation errors container.
+
+
+
+ Gets or sets the expression to execute when validator is valid.
+
+ The expression to execute when validator is valid.
+
+
+
+ Gets or sets the expression to execute when validator is not valid.
+
+ The expression to execute when validator is not valid.
+
+
+
+ Implementation of the custom configuration parser for validator definitions.
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Parse the specified element and register any resulting
+ IObjectDefinitions with the IObjectDefinitionRegistry that is
+ embedded in the supplied ParserContext.
+
+ The element to be parsed into one or more IObjectDefinitions
+ The object encapsulating the current state of the parsing
+ process.
+
+ The primary IObjectDefinition (can be null as explained above)
+
+
+ Implementations should return the primary IObjectDefinition
+ that results from the parse phase if they wish to used nested
+ inside (for example) a <property> tag.
+ Implementations may return null if they will not
+ be used in a nested scenario.
+
+
+
+
+
+ Parses the validator definition.
+
+ Validator's identifier.
+ The element to parse.
+ The parser helper.
+ Validator object definition.
+
+
+
+ Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with
+ the parsed value.
+
+
+
+
+ Parses and potentially registers a validator.
+
+
+ Only validators that have id attribute specified are registered
+ as separate object definitions within application context.
+
+ Validator XML element.
+ The parser helper.
+ Validator object definition.
+
+
+
+ Gets the name of the object type for the specified element.
+
+ The element.
+ The name of the object type.
+
+
+
+ Creates an error message action based on the specified message element.
+
+ The message element.
+ The parser helper.
+ The error message action definition.
+
+
+
+ Creates a generic action based on the specified element.
+
+ The action definition element.
+ The parser helper.
+ Generic validation action definition.
+
+
+
+ Creates object definition for the validator reference.
+
+ The action definition element.
+ The parser helper.
+ Generic validation action definition.
+
+
+
+ Evaluates validator test using condition evaluator.
+
+ Aleksandar Seovic
+
+
+
+ Base class that defines common properties for all single validators.
+
+
+
+ Custom single validators should always extend this class instead of
+ simply implementing interface, in
+ order to inherit common validator functionality.
+
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ Base class that defines common properties for all validators.
+
+
+
+ Custom validators should always extend this class instead of
+ simply implementing interface, in
+ order to inherit common validator functionality.
+
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ An object that can validate application-specific objects.
+
+
+
+ The primary motivation for this interface is to enable validation to be
+ decoupled from the (user) interface and placed in business objects.
+
+
+ Application developers writing their own custom
+ implementations will
+ typically not implement this interface directly. In most cases, custom
+ validators woud be better served deriving from the
+ class, with the
+ custom validation ligic being implemented in an override of the
+
+
+ template method.
+
+
+ Aleksandar Seovic
+
+
+
+
+ Validates the specified object.
+
+ The object to validate.
+
+ The instance to add any error
+ messages to in the case of validation failure.
+
+
+ if validation was successful.
+
+
+
+
+ Validates the specified object.
+
+ The object to validate.
+ Additional context parameters.
+
+ The instance to add any error
+ messages to in the case of validation failure.
+
+
+ if validation was successful.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Creates a new instance of the class.
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Creates a new instance of the class.
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Validates the specified object.
+
+ The object to validate.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Validates the specified object.
+
+ The object to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Evaluates when expression.
+
+ Root context to use for expression evaluation.
+ Additional context parameters.
+ True if the condition is true, False otherwise.
+
+
+
+ Processes the error messages.
+
+ Whether validator is valid or not.
+ Validation context.
+ Additional context parameters.
+ Validation errors container.
+
+
+
+ Gets or sets the expression that determines if this validator should be evaluated.
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Gets or sets the validation actions.
+
+ The actions that should be executed after validation.
+
+
+
+ Creates a new instance of the validator without any
+ and criteria
+
+
+
+
+ Creates a new instance of the class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Creates a new instance of the class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Validates the specified object.
+
+ The object to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Validates test object.
+
+ Object to validate.
+ True if specified object is valid, False otherwise.
+
+
+
+ Evaluates test expression.
+
+ Root context to use for expression evaluation.
+ Additional context parameters.
+ Result of the test expression evaluation, or validation context if test is null.
+
+
+
+ Gets or sets the test expression.
+
+ The test expression.
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Creates a new instance of the class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Creates a new instance of the class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Evaluates the test using condition evaluator.
+
+
+
+ Test can be any logical expression that is supported by the Spring.NET logical
+ expression evaluation engine, and can use any variables that can be resolved
+ by the variable resolver used by the validation engine.
+
+
+ The object to validate.
+
+ if the supplied is valid.
+
+
+
+
+ Perform credit card validations.
+
+
+ By default, all supported card types are allowed. You can specify
+ which credit card type validator should be used by setting
+ the value of property to a concrete
+ instance.
+
+
+
+
+ Creates a new instance of the UrlValidator class.
+
+
+
+
+ Creates a new instance of the UrlValidator class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+ Credit Card type validator to use.
+
+
+
+ Creates a new instance of the UrlValidator class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+ Credit Card type validator to use.
+
+
+
+ Validates the supplied .
+
+
+ In the case of the class,
+ the test should be a string variable that will be evaluated and the object
+ obtained as a result of this evaluation will be checked if it is
+ a valid credit card number.
+
+ The object to validate.
+
+ if the supplied is valid
+ credit card number.
+
+
+
+
+ Checks if the is a valid credit card number.
+
+
+ The card number to validate.
+
+
+ true if the card number is valid.
+
+
+
+
+ Validates card number with the specified validator.
+
+
+ Credit card number to validate.
+
+
+ true if credit card number is a valid number of credit card type specified.
+
+
+
+
+ Checks for a valid credit card number.
+
+
+ Credit Card Number.
+
+
+ true if the card number passes the LuhnCheck.
+
+
+
+
+ Credit card type validator to use.
+
+
+ Can be concrete implementations of
+ interface. The following are available implementations:
+ , , ,
+ .
+
+
+
+
+ CreditCardType interface defines how validation is performed
+ for one type/brand of credit card.
+
+
+
+
+ Returns true if the card number matches this type of
+ credit card.
+
+
+ The card number, never null.
+
+
+ true if the number matches.
+
+
+
+
+ Visa credit card type validation support.
+
+
+
+
+ Indicates, wheter the given credit card number matches a visa number.
+
+
+
+
+ American Express credit card type validation support.
+
+
+
+
+ Indicates, wheter the given credit card number matches an amex number.
+
+
+
+
+ Discover credit card type validation support.
+
+
+
+
+ Indicates, wheter the given credit card number matches a discover number.
+
+
+
+
+ Mastercard credit card type validation support.
+
+
+
+
+ Indicates, wheter the given credit card number matches a mastercard number.
+
+
+
+
+ Perform email validations.
+
+
+
+ This implementation is not guaranteed to catch all possible errors in an
+ email address. For example, an address like nobody@noplace.nowhere will
+ pass validator, even though there is no TLD "nowhere".
+
+ Goran Milosavljevic
+
+
+
+ Creates a new instance of the EmailValidator class.
+
+
+
+
+ Creates a new instance of the EmailValidator class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Creates a new instance of the EmailValidator class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Validates the supplied .
+
+
+ In the case of the class,
+ the test should be a string variable that will be evaluated and the object
+ obtained as a result of this evaluation will be checked if it is
+ a valid e-mail address.
+
+ The object to validate.
+
+ if the supplied is valid
+ e-mail address.
+
+
+
+
+ Regular expression used for validation of object passed to this .
+
+
+
+
+ Validates that the object is valid ISBN-10 or ISBN-13 value.
+
+ Goran Milosavljevic
+
+
+
+ Creates a new instance of the ISBNValidator class.
+
+
+
+
+ Creates a new instance of the ISBNValidator class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Creates a new instance of the ISBNValidator class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Validates the supplied .
+
+
+ In the case of the class,
+ the test should be a string variable that will be evaluated and the object
+ obtained as a result of this evaluation will be tested using the ISBN-10 or
+ ISBN-13 validation rules.
+
+ The object to validate.
+
+ if the supplied is valid ISBN.
+
+
+
+
+ Validates against ISBN-10 or ISBN-13 validation
+ rules.
+
+
+ ISBN string to validate.
+
+
+ true if is a valid ISBN-10 or ISBN-13 code.
+
+
+
+
+ ISBN-10 consists of 4 groups of numbers separated by either
+ dashes (-) or spaces.
+
+
+ The first group is 1-5 characters, second 1-7, third 1-6,
+ and fourth is 1 digit or an X.
+
+
+
+
+ ISBN-13 consists of 5 groups of numbers separated by either
+ dashes (-) or spaces.
+
+
+ The first group is 978 or 979, the second group is
+ 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit.
+
+
+
+
+ Validates that object matches specified regular expression.
+
+
+
+ The test expression must evaluate to a ;
+ otherwise, an exception is thrown.
+
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Creates a new instance of the class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+ The regular expression to match against.
+
+
+
+ Creates a new instance of the class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+ The regular expression to match against.
+
+
+
+ Validates an object.
+
+ Object to validate.
+
+ if the supplied
+ object is valid.
+
+
+ If the supplied is not a
+
+
+
+
+
+ The regular expression text to match against.
+
+ The regular expression text.
+
+
+
+ Gets or sets a value indicating whether to do a partial match instead of a full match.
+ Default is false.
+
+
+
+
+ The for the regular expression evaluation.
+
+ The regular expression evaluation options.
+
+
+
+
+ Validates that required value is not empty.
+
+
+
+ This validator uses following rules to determine if target value is valid:
+
+
+
Target
+
Valid Value
+
+
+
A .
+
Not or an empty string.
+
+
+
A .
+
Not and not .
+
+
+
One of the number types.
+
Not zero.
+
+
+
A .
+
Not or whitespace.
+
+
+
Any reference type other than .
+
Not .
+
+
+
+
+ You cannot use this validator to validate any value types other than the ones
+ specified in the table above.
+
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Creates a new instance of the class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Creates a new instance of the class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Validates the supplied .
+
+
+ In the case of the class,
+ the test should be a variable expression that will be evaluated and the object
+ obtained as a result of this evaluation will be tested using the rules described
+ in the class overview of the
+ class.
+
+ The object to validate.
+
+ if the supplied is valid.
+
+
+
+
+ Validates that the value is valid URL.
+
+ Goran Milosavljevic
+
+
+
+ Creates a new instance of the UrlValidator class.
+
+
+
+
+ Creates a new instance of the UrlValidator class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Creates a new instance of the UrlValidator class.
+
+ The expression to validate.
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Validates the supplied .
+
+
+ In the case of the class,
+ the test should be a string variable that will be evaluated and the object
+ obtained as a result of this evaluation will be tested using the URL validation rules.
+
+ The object to validate.
+
+ if the supplied is valid.
+
+
+
+
+ Regular expression used for validation of object passed to this .
+
+
+
+
+ implementation that supports grouping of validators.
+
+
+
+ This validator will be valid when one or more of the validators in the Validators
+ collection are valid.
+
+
+ ValidationErrors property will return a union of all validation error messages
+ for the contained validators, but only if this validator is not valid (meaning, when none
+ of the contained validators are valid).
+
+
Note, that defaults to true for this validator type!
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ Base class for composite validators
+
+
+
+
+ Initializes a new instance
+
+
+
+
+ Initializes a new instance
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Initializes a new instance
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Validates the specified object.
+
+ The object to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Actual implementation how to validate the specified object.
+
+ The object to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Gets or sets the child validators.
+
+ The validators.
+
+
+
+ When set true, shortcircuits evaluation.
+
+
+ Setting this property true causes the evaluation process to prematurely abort
+ if the end result is known. Any remaining child validators will not be considered then.
+ Setting this value false causes implementations to evaluate all child validators, regardless
+ of the potentially already known result.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Initializes a new instance of the class.
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Validates the specified object.
+
+ The object to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ implementation that supports validating collections.
+
+
+
+ This validator will be valid only when all of the validators in the Validators
+ collection are valid for all of the objects in the specified collection.
+
+
+ You can specify if you want to validate all of the collection elements regardless of the errors by
+ setting the property to false.
+
+
Note, that defaults to true for this validator type!
+
+ If you set the IncludeElementErrors property to true,
+ ValidationErrors collection will contain a union of all validation error messages
+ for the contained validators;
+ Otherwise it will contain only error messages that were set for this Validator.
+
+
+ Damjan Tomic
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The bool that determines if all elements of the collection should be evaluated.
+ regardless of the Errors
+
+ The bool that determines whether Validate method should collect
+ all error messages returned by the item validators
+
+
+
+ Initializes a new instance of the class.
+
+ The expression that determines if this validator should be evaluated.
+ The bool that determines if this all elements of the collection should be evaluated.
+ regardless of the Errors
+
+ The bool that determines whether Validate method should collect
+ all error messages returned by the item validators
+
+
+
+ Initializes a new instance of the class.
+
+ The expression that determines if this validator should be evaluated.
+ The bool that determines if this all elements of the collection should be evaluated.
+ regardless of the Errors
+
+ The bool that determines whether Validate method should collect
+ all error messages returned by the item validators
+
+
+
+ Validates the specified collection of objects.
+ If the IncludeElementErrors property was set to true,
+ collection will contain a union of all validation error messages
+ for the contained validators;
+ Otherwise it will contain only error messages that were set for this Validator.
+
+ The collection to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Actual implementation how to validate the specified object.
+
+ The object to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Gets or sets the value that indicates whether to validate all elements of the collection
+ regardless of the errors.
+
+ This is just an alias for property
+
+
+
+ Gets or sets the value that indicates whether to capture all the errors of the specific
+ elements of the collection
+
+
+
+
+ Gets or sets the expression that should be used to narrow validation context.
+
+ The expression that should be used to narrow validation context.
+
+
+
+ implementation that supports grouping of validators.
+
+
+
+ This validator will be valid when one and only one of the validators in the Validators collection are valid
+
+
+ ValidationErrors property will return a union of all validation error messages
+ for the contained validators, but only if this validator is not valid (meaning, when none
+ of the contained validators are valid).
+
+
+ By default, this validator group uses == true semantics.
+
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Initializes a new instance of the class.
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Actual implementation how to validate the specified object.
+
+ The object to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ An interface that validation errors containers have to implement.
+
+ Aleksandar Seovic
+
+
+
+ Adds the supplied to this
+ instance's collection of errors.
+
+
+ The provider that should be used for message grouping; can't be
+ .
+
+ The error message to add.
+
+ If the supplied or is .
+
+
+
+
+ Merges another instance of into this one.
+
+
+
+ If the supplied is ,
+ then no errors will be added to this instance, and this method will
+ (silently) return.
+
+
+
+ The validation errors to merge; can be .
+
+
+
+
+ Gets the list of errors for the supplied error .
+
+
+
+ If there are no errors for the supplied ,
+ an empty will be returned.
+
+
+ Error key that was used to group messages.
+
+ A list of all s for the supplied lookup .
+
+
+
+
+ Gets the list of resolved error messages for the supplied lookup .
+
+
+
+ If there are no errors for the supplied lookup ,
+ an empty will be returned.
+
+
+ Error key that was used to group messages.
+ to resolve messages against.
+
+ A list of resolved error messages for the supplied lookup .
+
+
+
+
+ Does this instance contain any validation errors?
+
+
+
+ If this returns , this means that it (obviously)
+ contains no validation errors.
+
+
+ if this instance is empty.
+
+
+
+ Gets the list of all error providers.
+
+
+
+
+ Allows developers to specify which validator should be used
+ to validate method argument.
+
+ Damjan Tomic
+ Aleksandar Seovic
+
+
+
+ Creates an attribute instance.
+
+
+ The name of the validator to use (must be defined within
+ Spring application context).
+
+
+
+
+ Gets the name of the validator to use.
+
+ The name of the validator to use.
+
+
+
+ A container for validation errors.
+
+
+
+ This class groups validation errors by validator names and allows
+ access to both the complete errors collection and to the errors for a
+ certain validator.
+
+
+ Aleksandar Seovic
+ Goran Milosavljevic
+
+
+
+ Default constructor.
+
+
+
+
+ This property is reserved, apply the
+
+ to the class instead.
+
+
+ An that describes the
+ XML representation of the object that is produced by
+ the
+ method and consumed by the
+
+ method.
+
+
+
+
+ Generates an object from its XML representation.
+
+
+ The stream
+ from which the object is deserialized.
+
+
+
+
+ Converts an object into its XML representation.
+
+
+ The stream
+ to which the object is serialized.
+
+
+
+
+ Adds the supplied to this
+ instance's collection of errors.
+
+
+ The provider that should be used for message grouping; can't be
+ .
+
+ The error message to add.
+
+ If the supplied or is .
+
+
+
+
+ Merges another instance of into this one.
+
+
+
+ If the supplied is ,
+ then no errors will be added to this instance, and this method will
+ (silently) return.
+
+
+
+ The validation errors to merge; can be .
+
+
+
+
+ Gets the list of errors for the supplied lookup .
+
+
+
+ If there are no errors for the supplied lookup ,
+ an empty will be returned.
+
+
+ Error key that was used to group messages.
+
+ A list of all s for the supplied lookup .
+
+
+
+
+ Gets the list of resolved error messages for the supplied lookup .
+
+
+
+ If there are no errors for the supplied lookup ,
+ an empty will be returned.
+
+
+ Error key that was used to group messages.
+ to resolve messages against.
+
+ A list of resolved error messages for the supplied lookup .
+
+
+
+
+ Does this instance contain any validation errors?
+
+
+
+ If this returns , this means that it (obviously)
+ contains no validation errors.
+
+
+ if this instance is empty.
+
+
+
+ Gets the list of all providers.
+
+
+
+
+ Thrown by the validation advice if the method parameters validation fails.
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the ValidationException class.
+
+
+
+
+ Creates a new instance of the ValidationException class with
+ specified validation errors.
+
+
+ Validation errors.
+
+
+
+
+ Creates a new instance of the ValidationException class with the
+ specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the ValidationException class with the
+ specified message and validation errors.
+
+
+ A message about the exception.
+
+
+ Validation errors.
+
+
+
+
+ Creates a new instance of the ValidationException class with the
+ specified message and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the ValidationException class with the
+ specified message, root cause and validation errors.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+ Validation errors.
+
+
+
+
+ Creates a new instance of the ValidationException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Implements object serialization.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Gets validation errors.
+
+ Validation errors.
+
+
+
+ implementation that supports grouping of validators.
+
+
+
+ This validator will be valid only when all of the validators in the Validators
+ collection are valid.
+
+
+ ValidationErrors property will return a union of all validation error messages
+ for the contained validators.
+
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ Initializes a new instance
+
+
+
+
+ Initializes a new instance
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Initializes a new instance
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Actual implementation how to validate the specified object.
+
+ The object to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Represents a reference to an externally defined validator object
+
+
+
+ This class allows validation groups to reference validators that
+ are defined outside of the group itself.
+
+
+ It also allows users to narrow the context for the referenced validator
+ by specifying value for the Context property.
+
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Creates a new instance of the class.
+
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+
+ Creates a new instance of the class.
+
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+
+ Validates the specified object.
+
+ The object to validate.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Validates the specified object.
+
+ The object to validate.
+ Additional context parameters.
+ instance to add error messages to.
+ True if validation was successful, False otherwise.
+
+
+
+ Gets or sets the name of the referenced validator.
+
+ The name of the referenced validator.
+
+
+
+ Gets or sets the expression that should be used to narrow validation context.
+
+ The expression that should be used to narrow validation context.
+
+
+
+ Gets or sets the expression that determines if this validator should be evaluated.
+
+ The expression that determines if this validator should be evaluated.
+
+
+
+ Callback that supplies the owning factory to an object instance.
+
+
+ Owning
+ (may not be ). The object can immediately
+ call methods on the factory.
+
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+ In case of initialization errors.
+
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate20.dll b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate20.dll
new file mode 100644
index 00000000..26b751ed
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate20.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate20.pdb b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate20.pdb
new file mode 100644
index 00000000..3c781aaa
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate20.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate20.xml b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate20.xml
new file mode 100644
index 00000000..7ee37713
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate20.xml
@@ -0,0 +1,6095 @@
+
+
+
+ Spring.Data.NHibernate20
+
+
+
+
+ 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:
+
+ 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.
+
+
+
+
+ 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 message.
+
+
+
+ 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 HibernateObjectRetrievalFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Initializes a new instance of the class.
+
+ The StaleStateException.
+
+
+
+ Creates a new instance of the HibernateOptimisticLockingFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ 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 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
+
+
+
+
+ Setting the Application Context determines were resources are loaded from
+
+
+
+
+ Gets or sets the to use for loading mapping assemblies etc.
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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
+
+
+
+ Holds the references and configuration settings for a instance.
+ References are resolved by looking up the given object names in the root obtained by .
+
+
+
+
+ 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.
+
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ 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!
+
+
+
+
+ Initializes a new instance of the class. Creates a SessionScope,
+ but does not yet associate a session with a thread, that is left 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 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 HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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 InvalidDataAccessResourceUsageException,
+ thrown on invalid HQL query syntax.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Creates a new instance of the HibernateQueryException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+ 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 message.
+
+
+
+ Creates a new instance of the HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ In case of Hibernate errors
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+ Converts a Hibernate ADOException to a Spring DataAccessExcption, extracting the underlying error code from
+ ADO.NET. Will extract the ADOException Message and SqlString properties and pass them to the translate method
+ of the provided IAdoExceptionTranslator.
+
+ The IAdoExceptionTranslator, may be a user provided implementation as configured on
+ HibernateTemplate.
+
+ The ADOException throw
+ The translated DataAccessException or UncategorizedAdoException in case of an error in translation
+ itself.
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate21.dll b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate21.dll
new file mode 100644
index 00000000..a8bebbbc
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate21.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate21.pdb b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate21.pdb
new file mode 100644
index 00000000..995ad94c
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate21.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate21.xml b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate21.xml
new file mode 100644
index 00000000..fab25108
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate21.xml
@@ -0,0 +1,6711 @@
+
+
+
+ Spring.Data.NHibernate21
+
+
+
+
+ The Spring for .NET-backed ByteCodeprovider for NHibernate
+
+ Fabio Maulo
+
+
+
+ Creates a new bytecode Provider instance using the specified object factory
+
+
+
+
+
+ Retrieve the delegate for this provider
+ capable of generating reflection optimization components.
+
+ The class to be reflected upon.All property getters to be accessed via reflection.All property setters to be accessed via reflection.
+ The reflection optimization delegate.
+
+
+
+ The specific factory for this provider capable of
+ generating run-time proxies for lazy-loading purposes.
+
+
+
+
+ NHibernate's object instaciator.
+
+
+ For entities and its implementations.
+
+
+
+
+ Instanciator of NHibernate's collections default types.
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Implement this method to perform extra treatments before and after
+ the call to the supplied .
+
+
+
+ Polite implementations would certainly like to invoke
+ .
+
+
+
+ The method invocation that is being intercepted.
+
+
+ The result of the call to the
+ method of
+ the supplied ; this return value may
+ well have been intercepted by the interceptor.
+
+
+ If any of the interceptors in the chain or the target object itself
+ throws an exception.
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+ Creates an instance of the specified type.
+
+ The type of object to create.
+ A reference to the created object.
+
+
+
+ Creates an instance of the specified type.
+
+ The type of object to create.true if a public or nonpublic default constructor can match; false if only a public default constructor can match.
+ A reference to the created object
+
+
+
+ Creates an instance of the specified type using the constructor that best matches the specified parameters.
+
+ The type of object to create.An array of constructor arguments.
+ A reference to the created object.
+
+
+
+ A Spring for .NET backed implementation for creating
+ NHibernate proxies.
+
+
+ Erich Eichinger
+
+
+
+ Creates a new proxy.
+
+ The id value for the proxy to be generated.
+ The session to which the generated proxy will be associated.
+ The generated proxy.
+ Indicates problems generating requested proxy.
+
+
+
+ Creates a Spring for .NET backed instance.
+
+ Erich Eichinger
+
+
+
+ Build a proxy factory specifically for handling runtime lazy loading.
+
+ The lazy-load proxy factory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+
+
+
+ Perform instantiation of an instance of the underlying class.
+
+ The new instance.
+
+
+
+
+
+
+
+
+
+ Delegates to an implementation of ISessionFactory that can select among multiple instances based on
+ thread local storage.
+
+
+
+
+ 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)
+
+
+
+ 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
+
+
+
+
+ Setting the Application Context determines were resources are loaded from
+
+
+
+
+ Gets or sets the to use for loading mapping assemblies etc.
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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.
+
+
+
+ Sets custom byte code provider implementation to be used. This corresponds to setting
+ the property before NHibernate session factory
+ configuration.
+
+
+
+
+ Return the type or subclass.
+
+ The type created by this factory
+
+
+
+ Returns true
+
+ true
+
+
+
+ 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.
+
+
+
+ PostProcessConfiguration
+
+
+
+
+
+ DelegatingSessionFactory class
+
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope commit.
+
+ The status.
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope rollback.
+
+ The status.
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope set rollback only.
+
+ The status.
+
+
+
+ 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.
+
+
+
+ SimpleDelegatingSessionFactory class
+
+
+
+
+ Connection string config element name
+
+
+
+
+ public Constructor
+
+
+
+
+
+ TargetSessionFactory
+
+
+
+
+ Holds the references and configuration settings for a instance.
+ References are resolved by looking up the given object names in the root obtained by .
+
+
+
+
+ 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.
+
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ 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!
+
+
+
+
+ Initializes a new instance of the class. Creates a SessionScope,
+ but does not yet associate a session with a thread, that is left 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 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 HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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 InvalidDataAccessResourceUsageException,
+ thrown on invalid HQL query syntax.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Creates a new instance of the HibernateQueryException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+ 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 message.
+
+
+
+ Creates a new instance of the HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ In case of Hibernate errors
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+ Converts a Hibernate ADOException to a Spring DataAccessExcption, extracting the underlying error code from
+ ADO.NET. Will extract the ADOException Message and SqlString properties and pass them to the translate method
+ of the provided IAdoExceptionTranslator.
+
+ The IAdoExceptionTranslator, may be a user provided implementation as configured on
+ HibernateTemplate.
+
+ The ADOException throw
+ The translated DataAccessException or UncategorizedAdoException in case of an error in translation
+ itself.
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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:
+
+ 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.
+
+
+
+
+ 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 message.
+
+
+
+ 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 HibernateObjectRetrievalFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Initializes a new instance of the class.
+
+ The StaleStateException.
+
+
+
+ Creates a new instance of the HibernateOptimisticLockingFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate30.dll b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate30.dll
new file mode 100644
index 00000000..c9e4dfab
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate30.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate30.pdb b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate30.pdb
new file mode 100644
index 00000000..d6ce2d8c
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate30.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate30.xml b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate30.xml
new file mode 100644
index 00000000..23e2e704
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate30.xml
@@ -0,0 +1,6711 @@
+
+
+
+ Spring.Data.NHibernate30
+
+
+
+
+ Holds the references and configuration settings for a instance.
+ References are resolved by looking up the given object names in the root obtained by .
+
+
+
+
+ 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.
+
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ 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!
+
+
+
+
+ Initializes a new instance of the class. Creates a SessionScope,
+ but does not yet associate a session with a thread, that is left 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 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 HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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 InvalidDataAccessResourceUsageException,
+ thrown on invalid HQL query syntax.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Creates a new instance of the HibernateQueryException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+ 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 message.
+
+
+
+ Creates a new instance of the HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ In case of Hibernate errors
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+ Converts a Hibernate ADOException to a Spring DataAccessExcption, extracting the underlying error code from
+ ADO.NET. Will extract the ADOException Message and SqlString properties and pass them to the translate method
+ of the provided IAdoExceptionTranslator.
+
+ The IAdoExceptionTranslator, may be a user provided implementation as configured on
+ HibernateTemplate.
+
+ The ADOException throw
+ The translated DataAccessException or UncategorizedAdoException in case of an error in translation
+ itself.
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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:
+
+ 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.
+
+
+
+
+ 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 message.
+
+
+
+ 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 HibernateObjectRetrievalFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Initializes a new instance of the class.
+
+ The StaleStateException.
+
+
+
+ Creates a new instance of the HibernateOptimisticLockingFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ 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
+
+
+
+
+ Setting the Application Context determines were resources are loaded from
+
+
+
+
+ Gets or sets the to use for loading mapping assemblies etc.
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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.
+
+
+
+ Sets custom byte code provider implementation to be used. This corresponds to setting
+ the property before NHibernate session factory
+ configuration.
+
+
+
+
+ Return the type or subclass.
+
+ The type created by this factory
+
+
+
+ Returns true
+
+ true
+
+
+
+ The Spring for .NET-backed ByteCodeprovider for NHibernate
+
+ Fabio Maulo
+
+
+
+ Creates a new bytecode Provider instance using the specified object factory
+
+
+
+
+
+ Retrieve the delegate for this provider
+ capable of generating reflection optimization components.
+
+ The class to be reflected upon.All property getters to be accessed via reflection.All property setters to be accessed via reflection.
+ The reflection optimization delegate.
+
+
+
+ The specific factory for this provider capable of
+ generating run-time proxies for lazy-loading purposes.
+
+
+
+
+ NHibernate's object instaciator.
+
+
+ For entities and its implementations.
+
+
+
+
+ Instanciator of NHibernate's collections default types.
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Implement this method to perform extra treatments before and after
+ the call to the supplied .
+
+
+
+ Polite implementations would certainly like to invoke
+ .
+
+
+
+ The method invocation that is being intercepted.
+
+
+ The result of the call to the
+ method of
+ the supplied ; this return value may
+ well have been intercepted by the interceptor.
+
+
+ If any of the interceptors in the chain or the target object itself
+ throws an exception.
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+ Creates an instance of the specified type.
+
+ The type of object to create.
+ A reference to the created object.
+
+
+
+ Creates an instance of the specified type.
+
+ The type of object to create.true if a public or nonpublic default constructor can match; false if only a public default constructor can match.
+ A reference to the created object
+
+
+
+ Creates an instance of the specified type using the constructor that best matches the specified parameters.
+
+ The type of object to create.An array of constructor arguments.
+ A reference to the created object.
+
+
+
+ A Spring for .NET backed implementation for creating
+ NHibernate proxies.
+
+
+ Erich Eichinger
+
+
+
+ Creates a new proxy.
+
+ The id value for the proxy to be generated.
+ The session to which the generated proxy will be associated.
+ The generated proxy.
+ Indicates problems generating requested proxy.
+
+
+
+ Creates a Spring for .NET backed instance.
+
+ Erich Eichinger
+
+
+
+ Build a proxy factory specifically for handling runtime lazy loading.
+
+ The lazy-load proxy factory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+
+
+
+ Perform instantiation of an instance of the underlying class.
+
+ The new instance.
+
+
+
+
+
+
+
+
+
+ Delegates to an implementation of ISessionFactory that can select among multiple instances based on
+ thread local storage.
+
+
+
+
+ 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.
+
+
+
+ PostProcessConfiguration
+
+
+
+
+
+ DelegatingSessionFactory class
+
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope commit.
+
+ The status.
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope rollback.
+
+ The status.
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope set rollback only.
+
+ The status.
+
+
+
+ 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.
+
+
+
+ SimpleDelegatingSessionFactory class
+
+
+
+
+ Connection string config element name
+
+
+
+
+ public Constructor
+
+
+
+
+
+ TargetSessionFactory
+
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate31.dll b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate31.dll
new file mode 100644
index 00000000..13703fe0
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate31.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate31.pdb b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate31.pdb
new file mode 100644
index 00000000..2b5e34c8
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate31.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate31.xml b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate31.xml
new file mode 100644
index 00000000..53b56aea
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate31.xml
@@ -0,0 +1,6711 @@
+
+
+
+ Spring.Data.NHibernate31
+
+
+
+
+ Holds the references and configuration settings for a instance.
+ References are resolved by looking up the given object names in the root obtained by .
+
+
+
+
+ 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.
+
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ 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!
+
+
+
+
+ Initializes a new instance of the class. Creates a SessionScope,
+ but does not yet associate a session with a thread, that is left 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 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 HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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 InvalidDataAccessResourceUsageException,
+ thrown on invalid HQL query syntax.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Creates a new instance of the HibernateQueryException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+ 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 message.
+
+
+
+ Creates a new instance of the HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ In case of Hibernate errors
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+ Converts a Hibernate ADOException to a Spring DataAccessExcption, extracting the underlying error code from
+ ADO.NET. Will extract the ADOException Message and SqlString properties and pass them to the translate method
+ of the provided IAdoExceptionTranslator.
+
+ The IAdoExceptionTranslator, may be a user provided implementation as configured on
+ HibernateTemplate.
+
+ The ADOException throw
+ The translated DataAccessException or UncategorizedAdoException in case of an error in translation
+ itself.
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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:
+
+ 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.
+
+
+
+
+ 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 message.
+
+
+
+ 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 HibernateObjectRetrievalFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Initializes a new instance of the class.
+
+ The StaleStateException.
+
+
+
+ Creates a new instance of the HibernateOptimisticLockingFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ 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
+
+
+
+
+ Setting the Application Context determines were resources are loaded from
+
+
+
+
+ Gets or sets the to use for loading mapping assemblies etc.
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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.
+
+
+
+ Sets custom byte code provider implementation to be used. This corresponds to setting
+ the property before NHibernate session factory
+ configuration.
+
+
+
+
+ Return the type or subclass.
+
+ The type created by this factory
+
+
+
+ Returns true
+
+ true
+
+
+
+ The Spring for .NET-backed ByteCodeprovider for NHibernate
+
+ Fabio Maulo
+
+
+
+ Creates a new bytecode Provider instance using the specified object factory
+
+
+
+
+
+ Retrieve the delegate for this provider
+ capable of generating reflection optimization components.
+
+ The class to be reflected upon.All property getters to be accessed via reflection.All property setters to be accessed via reflection.
+ The reflection optimization delegate.
+
+
+
+ The specific factory for this provider capable of
+ generating run-time proxies for lazy-loading purposes.
+
+
+
+
+ NHibernate's object instaciator.
+
+
+ For entities and its implementations.
+
+
+
+
+ Instanciator of NHibernate's collections default types.
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Implement this method to perform extra treatments before and after
+ the call to the supplied .
+
+
+
+ Polite implementations would certainly like to invoke
+ .
+
+
+
+ The method invocation that is being intercepted.
+
+
+ The result of the call to the
+ method of
+ the supplied ; this return value may
+ well have been intercepted by the interceptor.
+
+
+ If any of the interceptors in the chain or the target object itself
+ throws an exception.
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+ Creates an instance of the specified type.
+
+ The type of object to create.
+ A reference to the created object.
+
+
+
+ Creates an instance of the specified type.
+
+ The type of object to create.true if a public or nonpublic default constructor can match; false if only a public default constructor can match.
+ A reference to the created object
+
+
+
+ Creates an instance of the specified type using the constructor that best matches the specified parameters.
+
+ The type of object to create.An array of constructor arguments.
+ A reference to the created object.
+
+
+
+ A Spring for .NET backed implementation for creating
+ NHibernate proxies.
+
+
+ Erich Eichinger
+
+
+
+ Creates a new proxy.
+
+ The id value for the proxy to be generated.
+ The session to which the generated proxy will be associated.
+ The generated proxy.
+ Indicates problems generating requested proxy.
+
+
+
+ Creates a Spring for .NET backed instance.
+
+ Erich Eichinger
+
+
+
+ Build a proxy factory specifically for handling runtime lazy loading.
+
+ The lazy-load proxy factory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+
+
+
+ Perform instantiation of an instance of the underlying class.
+
+ The new instance.
+
+
+
+
+
+
+
+
+
+ Delegates to an implementation of ISessionFactory that can select among multiple instances based on
+ thread local storage.
+
+
+
+
+ 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.
+
+
+
+ PostProcessConfiguration
+
+
+
+
+
+ DelegatingSessionFactory class
+
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope commit.
+
+ The status.
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope rollback.
+
+ The status.
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope set rollback only.
+
+ The status.
+
+
+
+ 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.
+
+
+
+ SimpleDelegatingSessionFactory class
+
+
+
+
+ Connection string config element name
+
+
+
+
+ public Constructor
+
+
+
+
+
+ TargetSessionFactory
+
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate32.dll b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate32.dll
new file mode 100644
index 00000000..e8e235c7
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate32.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate32.pdb b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate32.pdb
new file mode 100644
index 00000000..b11f1039
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate32.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.NHibernate32.xml b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate32.xml
new file mode 100644
index 00000000..e51ea37b
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Data.NHibernate32.xml
@@ -0,0 +1,6711 @@
+
+
+
+ Spring.Data.NHibernate32
+
+
+
+
+ Holds the references and configuration settings for a instance.
+ References are resolved by looking up the given object names in the root obtained by .
+
+
+
+
+ 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.
+
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ 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!
+
+
+
+
+ Initializes a new instance of the class. Creates a SessionScope,
+ but does not yet associate a session with a thread, that is left 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 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 HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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 InvalidDataAccessResourceUsageException,
+ thrown on invalid HQL query syntax.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Creates a new instance of the HibernateQueryException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+ 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 message.
+
+
+
+ Creates a new instance of the HibernateSystemException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ In case of Hibernate errors
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+
+
+ 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)
+
+
+
+ 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.
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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)
+
+
+
+ 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
+
+
+
+ Copy the state of the given object onto the persistent object with the same identifier.
+ If there is no persistent instance currently associated with the session, it will be loaded.
+ Return the persistent instance. If the given instance is unsaved,
+ save a copy of and return it as a newly persistent instance.
+ The given instance does not become associated with the session.
+ This operation cascades to associated instances if the association is mapped with cascade="merge".
+ The semantics of this method are defined by JSR-220.
+
+ The persistent object to merge.
+ (not necessarily to be associated with the Hibernate Session)
+
+ An updated persistent instance
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+
+ Converts a Hibernate ADOException to a Spring DataAccessExcption, extracting the underlying error code from
+ ADO.NET. Will extract the ADOException Message and SqlString properties and pass them to the translate method
+ of the provided IAdoExceptionTranslator.
+
+ The IAdoExceptionTranslator, may be a user provided implementation as configured on
+ HibernateTemplate.
+
+ The ADOException throw
+ The translated DataAccessException or UncategorizedAdoException in case of an error in translation
+ itself.
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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:
+
+ 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.
+
+
+
+
+ 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 message.
+
+
+
+ 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 HibernateObjectRetrievalFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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 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.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The ex.
+
+
+
+ Initializes a new instance of the class.
+
+ The StaleStateException.
+
+
+
+ Creates a new instance of the HibernateOptimisticLockingFailureException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ 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
+
+
+
+
+ Setting the Application Context determines were resources are loaded from
+
+
+
+
+ Gets or sets the to use for loading mapping assemblies etc.
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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.
+
+
+
+
+
+
+ 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.
+
+
+
+ Sets custom byte code provider implementation to be used. This corresponds to setting
+ the property before NHibernate session factory
+ configuration.
+
+
+
+
+ Return the type or subclass.
+
+ The type created by this factory
+
+
+
+ Returns true
+
+ true
+
+
+
+ The Spring for .NET-backed ByteCodeprovider for NHibernate
+
+ Fabio Maulo
+
+
+
+ Creates a new bytecode Provider instance using the specified object factory
+
+
+
+
+
+ Retrieve the delegate for this provider
+ capable of generating reflection optimization components.
+
+ The class to be reflected upon.All property getters to be accessed via reflection.All property setters to be accessed via reflection.
+ The reflection optimization delegate.
+
+
+
+ The specific factory for this provider capable of
+ generating run-time proxies for lazy-loading purposes.
+
+
+
+
+ NHibernate's object instaciator.
+
+
+ For entities and its implementations.
+
+
+
+
+ Instanciator of NHibernate's collections default types.
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Implement this method to perform extra treatments before and after
+ the call to the supplied .
+
+
+
+ Polite implementations would certainly like to invoke
+ .
+
+
+
+ The method invocation that is being intercepted.
+
+
+ The result of the call to the
+ method of
+ the supplied ; this return value may
+ well have been intercepted by the interceptor.
+
+
+ If any of the interceptors in the chain or the target object itself
+ throws an exception.
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+ Creates an instance of the specified type.
+
+ The type of object to create.
+ A reference to the created object.
+
+
+
+ Creates an instance of the specified type.
+
+ The type of object to create.true if a public or nonpublic default constructor can match; false if only a public default constructor can match.
+ A reference to the created object
+
+
+
+ Creates an instance of the specified type using the constructor that best matches the specified parameters.
+
+ The type of object to create.An array of constructor arguments.
+ A reference to the created object.
+
+
+
+ A Spring for .NET backed implementation for creating
+ NHibernate proxies.
+
+
+ Erich Eichinger
+
+
+
+ Creates a new proxy.
+
+ The id value for the proxy to be generated.
+ The session to which the generated proxy will be associated.
+ The generated proxy.
+ Indicates problems generating requested proxy.
+
+
+
+ Creates a Spring for .NET backed instance.
+
+ Erich Eichinger
+
+
+
+ Build a proxy factory specifically for handling runtime lazy loading.
+
+ The lazy-load proxy factory.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fabio Maulo
+
+
+
+
+
+
+
+
+
+
+
+ Perform instantiation of an instance of the underlying class.
+
+ The new instance.
+
+
+
+
+
+
+
+
+
+ Delegates to an implementation of ISessionFactory that can select among multiple instances based on
+ thread local storage.
+
+
+
+
+ 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.
+
+
+
+ PostProcessConfiguration
+
+
+
+
+
+ DelegatingSessionFactory class
+
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope commit.
+
+ The status.
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope rollback.
+
+ The status.
+
+
+
+ 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.
+
+
+
+
+ Does the tx scope set rollback only.
+
+ The status.
+
+
+
+ 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.
+
+
+
+ SimpleDelegatingSessionFactory class
+
+
+
+
+ Connection string config element name
+
+
+
+
+ public Constructor
+
+
+
+
+
+ TargetSessionFactory
+
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.dll b/Resources/Libraries/Spring.NET/Spring.Data.dll
new file mode 100644
index 00000000..6606df30
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.pdb b/Resources/Libraries/Spring.NET/Spring.Data.pdb
new file mode 100644
index 00000000..388bf919
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Data.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Data.xml b/Resources/Libraries/Spring.NET/Spring.Data.xml
new file mode 100644
index 00000000..0c8cbe15
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Data.xml
@@ -0,0 +1,11693 @@
+
+
+
+ Spring.Data
+
+
+
+
+ Spring AOP exception translation aspect for use at Repository or DAO layer level.
+ Translates native persistence exceptions into Spring's DataAccessException hierarchy,
+ based on a given PersistenceExceptionTranslator.
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ The persistence exception translator to use.
+ Type of the repository attribute to check for.
+
+
+
+ Initializes a new instance of the class.
+
+ The object factory to obtain all IPersistenceExceptionTranslators from.
+ Type of the repository attribute to check for.
+
+
+
+ Return the advice part of this aspect.
+
+
+
+
+ An advice may be an interceptor, a throws advice, before advice,
+ introduction etc.
+
+
+
+ The advice that should apply if the pointcut matches.
+
+
+
+
+ The that drives this advisor.
+
+
+
+
+
+ Object post-processor that automatically applies persistence exception
+ translation to any bean that carries the
+ attribute, adding a corresponding
+ to the exposed proxy (either an existing AOP proxy or a newly generated
+ proxy that implements all of the target's interfaces).
+
+
+ Translates native resource exceptions to Spring's
+ hierarchy. Autodetects object that implement the
+ interface, which are subsequently asked to translate candidate exceptions.
+
+ All of Spring's applicable resource factories implement the
+ IPersistenceExceptionTranslator interface out of the box.
+ As a consequence, all that is usually needed to enable automatic exception
+ translation is marking all affected objects (such as DAOs) with the
+ Repository annotation, along with defining this post-processor
+ in the application context.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+
+
+
+
+ Just return the passed in object instance
+
+ The new object instance.
+ The name of the object.
+
+ The passed in object instance
+
+
+ In case of errors.
+
+
+
+
+ Add PersistenceExceptionTranslationAdvice to candidate object if it is a match.
+ Create AOP proxy if necessary or add advice to existing advice chain.
+
+ The new object instance.
+ The name of the object.
+
+ The object instance to use, wrapped with either the original or a wrapped one.
+
+
+ In case of errors.
+
+
+
+
+ Sets the type of the repository attribute. The default required attribute type is the
+ attirbute. This setter property exists so that developers
+ can provide their own (non-Spring-specific) attribute type to indicate that a class has a
+ repository role.
+
+ The desitred type of the repository attribute.
+
+
+
+ Callback that supplies the owning factory to an object instance.
+
+
+
+
+ Miscellaneous utility methods for DAO implementations.
+ Useful with any data access technology.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Implementation of PersistenceExceptionTranslator that supports chaining,
+ allowing the addition of PersistenceExceptionTranslator instances in order.
+ Returns non-null on the first (if any) match.
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Interface implemented by Spring integrations with data access technologies
+ that throw exceptions.
+
+
+ This allows consistent usage of combined exception translation functionality,
+ without forcing a single translator to understand every single possible type
+ of exception.
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Translate the given exception thrown by a persistence framework to a
+ corresponding exception from Spring's generic DataAccessException hierarchy,
+ if possible.
+
+
+
+ Do not translate exceptions that are not understand by this translator:
+ for example, if coming from another persistence framework, or resulting
+ from user code and unrelated to persistence.
+
+
+ Of particular importance is the correct translation to
+ for example on constraint violation. Implementations may use Spring ADO.NET Framework's
+ sophisticated exception translation to provide further information in the event of SQLException as a root cause.
+
+
+ The exception thrown.
+ the corresponding DataAccessException (or null if the
+ exception could not be translated, as in this case it may result from
+ user code rather than an actual persistence problem)
+
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Adds the translator to the translator list.
+
+ The translator.
+
+
+
+ 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, as in this case it may result from
+ user code rather than an actual persistence problem)
+
+
+
+ Do not translate exceptions that are not understand by this translator:
+ for example, if coming from another persistence framework, or resulting
+ from user code and unrelated to persistence.
+
+
+ Of particular importance is the correct translation to
+ for example on constraint violation. Implementations may use Spring ADO.NET Framework's
+ sophisticated exception translation to provide further information in the event of SQLException as a root cause.
+
+
+
+
+
+
+
+ Gets all registered IPersistenceExceptionTranslator as an array.
+
+ The IPersistenceExceptionTranslators.
+
+
+
+ Generic base class for DAOs, defining template methods for DAO initialization.
+
+
+ Extended by Spring's specific DAO support classes, such as:
+ AdoDaoSupport, HibernateDaoSupport, etc.
+
+ Mark Pollack (.NET)
+
+
+
+ The shared instance for this class (and derived classes).
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Abstract subclasses must override this to check their configuration.
+
+
+
Implementors should be marked as sealed, to make it clear that
+ concrete subclasses are not supposed to override this template method themselves.
+
+
+
+
+
+ Concrete subclasses can override this for custom initialization behavior.
+
+
+ Gets called after population of this instance's object properties.
+ Exception thrown if InitDao fails will be rethrown as
+ a ObjectInitializationException.
+
+
+
+
+ Miscellaneous utility methods for DAO implementations.
+ Useful with any data access technology.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Return a translated exception if this is appropriate, or null if the exception could
+ not be translated.
+
+ The raw exception we may wish to translate.
+ The PersistenceExceptionTranslator to use to perform the translation.
+ A translated exception if translation is possible, or or null if the exception could
+ not be translated.
+
+
+
+ AOP MethodInterceptor that provides persistence exception translation
+ based on a given PersistenceExceptionTranslator.
+
+
+ Delegates to the given to translate
+ an Exception thrown into Spring's DataAccessException hierarchy
+ (if appropriate).
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+ Needs to be configured with a PersistenceExceptionTranslator afterwards.
+
+
+
+
+ Initializes a new instance of the class for the
+ given IPersistenceExceptionTranslator
+
+ The persistence exception translator to use.
+
+
+
+ Initializes a new instance of the class, autodetecting
+ IPersistenceExceptionTranslators in the given object factory.
+
+ The object factory to obtain all IPersistenceExceptionTranslators from.
+
+
+
+ Ensures that the property PersistenceExceptionTranslator has been set.
+ Invoked by an
+ after it has injected all of an object's dependencies.
+
+
+ In the event of misconfiguration (such as the failure to set a
+ required property) or if initialization fails.
+
+
+
+
+ Detects the petsistence exception translators in the given object factory.
+
+ The object factory for obtaining all IPersistenceExceptionTranslators.
+ A chained IPersistenceExceptionTranslator, combining all PersistenceExceptionTranslators found in the factory
+
+
+
+
+
+ Return a translated exception if this is appropriate, otherwise rethrow the original exception.
+
+
+
+
+
+
+ Sets the persistence exception translator. The default is to autodetect all IPersistenceExceptionTranslators
+ in the containing object factory, using them in a chain.
+
+ The persistence exception translator.
+
+
+
+ Callback that supplies the owning factory to an object instance.
+
+
+ Owning
+ (may not be ). The object can immediately
+ call methods on the factory.
+
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+ In case of initialization errors.
+
+
+
+
+ Exception thrown on failure to aquire a lock during an update i.e a select for
+ update statement.
+
+
+
+ This exception will be thrown either by O/R mapping tools or by custom DAO
+ implementations.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Exception thrown on a pessimistic locking violation.
+
+
+ Serves as a superclass for more specific exceptions, like
+ CannotAcquireLockException and DeadlockLoserDataAccessException
+
+
+ This exception will be thrown either by O/R mapping tools or by custom DAO
+ implementations.
+
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Exception thrown on concurrency failure. This exception should be
+ sublassed to indicate the type of failure - optimistic locking,
+ failure to acquire lock, etc.
+
+
+
+ This exception will be thrown either by O/R mapping tools or by custom DAO
+ implementations.
+
+
+ Thomas Risberg
+ Griffin Caprio (.NET)
+
+
+
+ Root of the hierarchy of data access exception that are considered transient -
+ where a previously failed operation might be able to succeed when the operation
+ is retried without any intervention by application-level functionality.
+
+ Thomas Risberg
+ Mark Pollack (.NET)
+
+
+
+ Root of the hierarchy of data access exceptions
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Exception thrown on failure to complete a transaction in serialized mode due to
+ update conflicts.
+
+
+
+ This exception will be thrown either by O/R mapping tools or by custom DAO
+ implementations.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Exception thrown when we couldn't cleanup after a data access operation,
+ but the actual operation went OK.
+
+
+
+ For example, this exception or a subclass might be thrown if an ADO.NET
+ connection couldn't be closed after it had been used successfully.
+
+
+ Note that data access code might perform resource cleanup in a
+ finally block and therefore log cleanup failure rather than rethrow it,
+ to keep the original data access exception, if any.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Root of the hierarchy of data access exception that are considered non-transient -
+ where a retry of the same operation would fail unless the cause of the Exception is
+ corrected.
+
+ Thomas Risberg
+ Mark Pollack (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Data access exception thrown when a resource fails completely:
+ for example, if we can't connect to a database using ADO.NET.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Exception thrown when an attempt to insert or update data
+ results in violation of an integrity constraint.
+
+
+
+ Note that this is not purely a relational concept; unique primary keys are
+ required by most database types.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Exception thrown if certain expected data could not be retrieved, e.g.
+ when looking up specific data via a known identifier.
+
+
+
+ This exception will be thrown either by O/R mapping tools or by custom DAO
+ implementations.
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Generic exception thrown when the current process was
+ a deadlock loser, and its transaction rolled back.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Data access exception thrown when a result was not of the expected size,
+ for example when expecting a single row but getting 0 or more than 1 rows.
+
+ Mark Pollack (.NET)
+ Juergen Hoeller
+
+
+
+ Data access exception thrown when a result was not of the expected size,
+ for example when expecting a single row but getting 0 or more than 1 rows.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Exception thrown on incorrect usage of the API, such as failing to "compile" a query
+ object that needed compilation before execution.
+
+
+
+ This represents a problem in our data access framework, not the underlying data access
+ infrastructure.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Creates 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, such as ADO.NET).
+
+
+
+
+ Creates a new instance of the
+ class.
+
+ The expected result size.
+ The actual result size (or -1 if unknown).
+
+
+
+ Creates a new instance of the
+ class.
+ >
+
+ A message about the exception.
+
+ The expected result size.
+ The actual result size (or -1 if unknown).
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception
+ The expected result size.
+
+
+
+ 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.
+
+
+
+
+ Override of
+ to allow for private serialization.
+
+
+ The
+ that holds the serialized object data about the exception.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+ Return the expected result size.
+
+
+ Return the actual result size (or -1 if unknown).
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message.
+
+
+
+ Initializes a new instance of the class.
+
+ The message.
+ The inner exception.
+
+
+
+ Creates a new instance of the
+ class.
+
+ The expected size.
+
+
+
+ Creates a new instance of the
+ class.
+
+ A message about the exception.
+ The expected size.
+
+
+
+ Initializes 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.
+ The parameter is .
+ The class name is or is zero (0).
+
+
+
+ Data access exception thrown when something unintended appears to have
+ happened with an update, but the transaction hasn't already been rolled back.
+
+
+
+ Thrown, for example, when we wanted to update 1 row in an RDBMS but actually
+ updated 3.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Root for exceptions thrown when we use a data access resource incorrectly.
+
+
+
+ Thrown for example on specifying bad SQL when using a RDBMS.
+ Resource-specific subclasses will probably be supplied by data access packages.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Creates 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, such as 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.
+
+
+
+ Return whether or not data was updated.
+
+ True if data was updated (as opposed to being incorrectly
+ updated). If this property returns false, there's nothing to roll back.
+
+
+
+
+ Data access exception thrown when a resource fails completely and the failure is permanent.
+
+ Thomas Risberg
+ Mark Pollack (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Exception thrown on an optimistic locking violation for a mapped object.
+ Provides information about the persistent class and the identifier.
+
+ Mark Pollack (.NET)
+
+
+
+ Exception thrown on an optimistic locking violation.
+
+
+
+ This exception will be thrown either by O/R mapping tools or by custom DAO
+ implementations.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes 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
+
+
+
+
+ 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.
+
+
+
+
+ When overridden in a derived class, sets the
+ with information about the exception.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is a null reference ( in Visual Basic).
+
+
+
+ Exception thrown if a mapped object could not be retrieved via its identifier.
+ Provides information about the persistent class and the identifier.
+
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Initializes 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
+
+
+
+
+ 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.
+
+
+
+
+ When overridden in a derived class, sets the
+ with information about the exception.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is a null reference ( in Visual Basic).
+
+
+
+ Exception thrown when the underlyingresource denied a permission to
+ access a specific element, such as a specific database table.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ RDta access exception thrown when a resource fails temporarily and the operation can be
+ retried.
+
+ Thomas Risberg
+ Mark Pollack (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Exception thrown on mismatch between CLS type and database type:
+ for example on an attempt to set an object of the wrong type
+ in an RDBMS column.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Normal superclass when we can't distinguish anything more specific
+ than "something went wrong with the underlying resource": for example,
+ a SQLException from Sql Server that we can't pinpoint more precisely.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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, such as 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.
+
+
+
+
+ Provides database metdata information.
+
+ Mark Pollack (.NET)
+
+
+
+ Provides minimal database metadata information to support the
+ functionality in Spring.NET ADO.NET Framework.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Gets a descriptive name of the product.
+
+ Example: Microsoft SQL Server, provider V2.0.0.0 in framework .NET V2.0
+ The name of the product.
+
+
+
+ Gets the type of the connection. The fully qualified type name is given since some providers,
+ notably for SqlServerCe, do not use the same namespace for all data access types.
+
+ Example: System.Data.SqlClient.SqlCommand, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the connection.
+
+
+
+ Gets the type of the command.
+
+ Example: System.Data.SqlClient.SqlCommand, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the command.
+
+
+
+ Gets the type of the parameter.
+
+ Example: System.Data.SqlClient.SqlParameter, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the parameter.
+
+
+
+ Gets the type of the data adapter.
+
+ Example: System.Data.SqlClient.SqlDataAdapter, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the data adapter.
+
+
+
+ Gets the type of the command builder.
+
+ Example: System.Data.SqlClient.SqlCommandBuilder, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the command builder.
+
+
+
+ Gets the type of the exception.
+
+ Example: System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the exception.
+
+
+
+ Gets the error code exception expression.
+
+ Example Errors[0].Number.ToString() for Sql Server
+ The error code exception expression.
+
+
+
+ Gets the command builder derive parameters method.
+
+ If the value 'not supported' is specified then this method will throw an ArgumentException
+ Example: DeriveParameters
+ The command builder derive parameters method.
+
+
+
+ Provide the prefix used to indentify named parameters in SQL text.
+
+ @ for Sql Server
+
+
+
+ Does the driver require the use of the parameter prefix when
+ specifying the name of the parameter in the Command's
+ Parameter collection.
+
+ If true, then commamd.Parameters["@parameterName"] is
+ used, otherwise, command.Parameters["parameterName"].
+
+
+
+
+ Gets a value indicating whether the Provider requires
+ the use of a named prefix in the SQL string.
+
+
+ The OLE DB/ODBC .NET Provider does not support named parameters for
+ passing parameters to an SQL Statement or a stored procedure called
+ by an IDbCommand when CommandType is set to Text.
+
+
+ true if use parameter prefix in SQL; otherwise, false.
+
+
+
+
+ For providers that allow you to choose between binding parameters
+ to a command by name (true) or by position (false).
+
+
+
+
+ Gets the type of the parameter db.
+
+ Example: System.Data.SqlDbType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the parameter db.
+
+
+
+ Gets the parameter db type property.
+
+ Example: SqlDbType for SqlServer
+ The parameter db type property.
+
+
+
+ Gets the parameter is nullable property.
+
+ Example: IsNullable for Sql Server
+ The parameter is nullable property.
+
+
+
+ Gets or sets the error codes.
+
+ The collection of error codes to map error code integer values to Spring's DAO exception hierarchy
+ The error codes.
+
+
+
+ Initializes a new instance of the class.
+
+ Name of the product.
+ Name of the assembly.
+ Type of the connection.
+ Type of the command.
+ Type of the parameter.
+ Type of the data adapter.
+ Type of the command builder.
+ The command builder derive parameters method.
+ Type of the parameter db.
+ The parameter db type property.
+ The parameter is nullable property.
+ The parameter name prefix.
+ Type of the exception.
+ if set to true [use parameter name prefix in parameter collection].
+ if set to true [use parameter prefix in SQL].
+ if set to true [bind by name].
+ The error code exception expression.
+
+
+
+ Gets a value indicating whether to use param name prefix in parameter collection.
+
+
+ true if should use param name prefix in parameter collection; otherwise, false.
+
+
+
+
+ Gets the name of the assembly.
+
+ Example: System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The name of the assembly.
+
+
+
+ Gets a descriptive name of the product.
+
+ Example: Microsoft SQL Server, provider V2.0.0.0 in framework .NET V2.0
+ The name of the product.
+
+
+
+ Gets the type of the connection. The fully qualified type name is given since some providers,
+ notably for SqlServerCe, do not use the same namespace for all data access types.
+
+ Example: System.Data.SqlClient.SqlCommand, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the connection.
+
+
+
+ Gets the type of the command.
+
+ Example: System.Data.SqlClient.SqlCommand, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the command.
+
+
+
+ Gets the type of the parameter.
+
+ Example: System.Data.SqlClient.SqlParameter, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the parameter.
+
+
+
+ Gets the type of the data adapter.
+
+ Example: System.Data.SqlClient.SqlDataAdapter, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the data adapter.
+
+
+
+ Gets the type of the command builder.
+
+ Example: System.Data.SqlClient.SqlCommandBuilder, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the command builder.
+
+
+
+ Gets the command builder derive parameters method.
+
+ If the value 'not supported' is specified then this method will throw an ArgumentException
+ Example: DeriveParameters
+ The command builder derive parameters method.
+
+
+
+ Provide the prefix used to indentify named parameters in SQL text.
+
+ @ for Sql Server
+
+
+
+ Gets the type of the exception.
+
+ Example: System.Data.SqlClient.SqlException, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the exception.
+
+
+
+ Does the driver require the use of the parameter prefix when
+ specifying the name of the parameter in the Command's
+ Parameter collection.
+
+
+ If true, then commamd.Parameters["@parameterName"] is
+ used, otherwise, command.Parameters["parameterName"].
+
+
+
+
+ Gets a value indicating whether the Provider requires
+ the use of a named prefix in the SQL string.
+
+
+ true if use parameter prefix in SQL; otherwise, false.
+
+
+ The OLE DB/ODBC .NET Provider does not support named parameters for
+ passing parameters to an SQL Statement or a stored procedure called
+ by an IDbCommand when CommandType is set to Text.
+
+
+
+
+ For providers that allow you to choose between binding parameters
+ to a command by name (true) or by position (false).
+
+
+
+
+
+ Gets the type of the parameter db.
+
+ Example: System.Data.SqlDbType, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ The type of the parameter db.
+
+
+
+ Gets the parameter db type property.
+
+ Example: SqlDbType for SqlServer
+ The parameter db type property.
+
+
+
+ Gets the parameter is nullable property.
+
+ Example: IsNullable for Sql Server
+ The parameter is nullable property.
+
+
+
+ Gets or sets the error codes.
+
+ The collection of error codes to map error code integer values to Spring's DAO exception hierarchy
+ The error codes.
+
+
+
+ Gets the error code exception expression.
+
+ Example Errors[0].Number.ToString() for Sql Server
+ The error code exception expression.
+
+
+
+ A parameter class used by
+
+ Mark Pollack (.NET)
+
+
+
+ A parameter interface used by
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+ Sets the SourceVersion to be Default and the ParameterDirection to be Input.
+
+
+
+
+ A more portable means to create a collection of ADO.NET
+ parameters.
+
+ Mark Pollack (.NET)
+
+
+
+ Determines whether this collection contains the specified parameter name.
+
+ Name of the parameter.
+
+ true if contains the specified parameter name; otherwise, false.
+
+
+
+
+ Add an instance of .
+
+
+
+
+
+ Add a parameter specifying the all the individual properties of a
+ IDbDataParameter.
+
+
+
+
+
+
+
+
+
+
+
+ The newly created parameter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The newly created parameter
+
+
+
+ Adds a value to the parameter collection
+
+ This method can not be used with stored procedures for
+ providers that require named parameters. However, it is of
+ great convenience for other cases.
+ The value of the parameter.
+ Index of added parameter.
+
+
+
+ Adds a range of vlaues to the parameter collection.
+
+ This method can not be used with stored procedures for
+ providers that require named parameters. However, it is of
+ great convenience for other cases.
+
+
+
+
+ Gets the underlying standard ADO.NET for the specified parameter name.
+
+
+
+
+ Gets the underlying standard ADO.NET for the specified index.
+
+
+
+
+ Returns the underlying standard ADO.NET parameters collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Assists in creating a collection of parameters by keeping track of all
+ IDbParameters its creates. After creating a number of parameters ask for the collection
+ with the GetParameters methods.
+
+ This builder is stateful, you must create a new one for each collection
+ of parameters you would like to create.
+ Mark Pollack (.NET)
+
+
+
+ A builder to create a collection of ADO.NET parameters.
+
+ The chaining of IDbParameter methods does the
+ building of the parameter details while the builder class
+ itself keeps track of the collection.
+
+ Mark Pollack (.NET)
+
+
+
+ Creates a IDbParameter object and adds it to an internal collection for
+ later retrieval via the GetParameters method.
+
+
+
+
+
+ Gets all the parameters created and configured via the Create method.
+
+ An instance of IDbParameters
+
+
+
+ The shared log instance for this class (and derived classes).
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Implemenation of of DbProvider that uses metadata to create provider specific ADO.NET objects.
+
+
+
+
+ Factory interface to create provider specific ADO.NET objects.
+
+
+
+
+ Returns a new command object for executing SQL statments/Stored Procedures
+ against the database.
+
+ An new
+
+
+
+ Returns a new instance of the providers CommandBuilder class.
+
+ In .NET 1.1 there was no common base class or interface
+ for command builders, hence the return signature is object to
+ be portable (but more loosely typed) across .NET 1.1/2.0
+ A new Command Builder
+
+
+
+ Returns a new connection object to communicate with the database.
+
+ A new
+
+
+
+ Returns a new adapter objects for use with offline DataSets.
+
+ A new
+
+
+
+ Returns a new parameter object for binding values to parameter
+ placeholders in SQL statements or Stored Procedure variables.
+
+ A new
+
+
+
+ Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText.
+
+ In most cases this adds the parameter prefix to the name passed into this method.
+ The unformatted name of the parameter.
+ The parameter name formatted foran IDbCommand.CommandText.
+
+
+
+ Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be
+ part of a IDataParameterCollection.
+
+ The unformatted name of the parameter.
+ The parameter name formatted for an IDataParameter
+
+
+
+ Extracts the provider specific error code as a string.
+
+ The data access exception.
+ The provider specific error code
+
+
+
+ Determines whether the provided exception is in fact related
+ to database access. This can be provider dependent in .NET 1.1 since
+ there isn't a common base class for ADO.NET exceptions.
+
+ The exception thrown when performing data access
+ operations.
+
+ true if is a valid data access exception for the specified
+ exception; otherwise, false.
+
+
+
+
+ Return metadata information about the database provider
+
+
+
+
+ Connection string used to create connections.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The db metadata.
+
+
+
+ Returns a new command object for executing SQL statments/Stored Procedures
+ against the database.
+
+ An new
+
+
+
+ Returns a new instance of the providers CommandBuilder class.
+
+ A new Command Builder
+ In .NET 1.1 there was no common base class or interface
+ for command builders, hence the return signature is object to
+ be portable (but more loosely typed) across .NET 1.1/2.0
+
+
+
+ Returns a new connection object to communicate with the database.
+
+ A new
+
+
+
+ Returns a new adapter objects for use with offline DataSets.
+
+ A new
+
+
+
+ Returns a new parameter object for binding values to parameter
+ placeholders in SQL statements or Stored Procedure variables.
+
+ A new
+
+
+
+ Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText.
+
+ The unformatted name of the parameter.
+
+ The parameter name formatted foran IDbCommand.CommandText.
+
+ In most cases this adds the parameter prefix to the name passed into this method.
+
+
+
+ Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be
+ part of a IDataParameterCollection.
+
+ The unformatted name of the parameter.
+
+ The parameter name formatted for an IDataParameter
+
+
+
+
+ Extracts the provider specific error code as a string.
+
+ The data access exception.
+ The provider specific error code
+
+
+
+ Determines whether the provided exception is in fact related
+ to database access. This can be provider dependent in .NET 1.1 since
+ there isn't a common base class for ADO.NET exceptions.
+
+ The exception thrown when performing data access
+ operations.
+
+ true if is a valid data access exception for the specified
+ exception; otherwise, false.
+
+
+
+
+ Determines whether is data access exception in .NET 1.1 for the specified exception.
+
+ The candidate exception.
+
+ true if is data access exception in .NET 1.1 for the specified exception; otherwise, false.
+
+
+
+
+ Return metadata information about the database provider
+
+
+
+
+
+ Connection string used to create connections.
+
+
+
+
+
+
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Modify the application context's internal object factory after its
+ standard initialization.
+
+ The object factory used by the application context.
+
+
+ All object definitions will have been loaded, but no objects will have
+ been instantiated yet. This allows for overriding or adding properties
+ even to eager-initializing objects.
+
+
+
+ In case of errors.
+
+
+
+
+ Gets or sets the provider resource which contains additional IDbProvider definitions.
+
+ The provider resource.
+
+
+
+ Create DbProviders based on configuration information in assembly resource
+ dbproviders.xml
+
+
+
+
+ TODO: Provide over-ride resource location.
+ TODO: Add error codes to provider.
+
+ Mark Pollack (.NET)
+
+
+
+ The shared log instance for this class (and derived classes).
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets the DbProvider given an identifying name.
+
+
+ Familiar names for the .NET 2.0 provider model are supported, i.e.
+ System.Data.SqlClient. Refer to the documentation for a complete
+ listing of supported DbProviders and their names. You may
+ also use the method GetDbProviderClasses or obtain the
+ underlying IApplicationContext to progammatically obtain information
+ about supported providers.
+
+ Name of the provider invariant.
+
+
+
+
+ Gets the application context that contains the definitions of the
+ various providers.
+
+ This method should rarely, if ever, be used in
+ application code. It is used by the framework itself
+ to map other data access products abstractions for a 'DbProvider/DataSource'
+ onto Spring's model.
+ The application context.
+
+
+
+ A implementation that
+ creates instances of the class.
+
+ Typically used as a convenience for retrieving shared
+ in a Spring XML configuration file as compared to
+ using explict factory method support.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Return an instance of and IDbProvider as configured by this factory
+ managed by this factory.
+
+
+ The same (singleton) instance of the IDbProvider managed by
+ this factory.
+
+
+
+ If this method is being called in the context of an enclosing IoC container and
+ returns , the IoC container will consider this factory
+ object as not being fully initialized and throw a corresponding (and most
+ probably fatal) exception.
+
+
+
+
+
+ Create the actual provider instance as specified by this factory's configuration properties.
+
+ the fully configured provider
+
+
+
+ Validates that the provider name is specified.
+
+
+ Invoked by an
+ after it has injected all of an object's dependencies.
+
+
+ In the event of not setting the ProviderName.
+
+
+
+
+ Validates the properties.
+
+
+
+
+ Gets or sets the name of the database provider.
+
+ The name of the database provider.
+
+
+
+ Gets or sets the connection string.
+
+ The connection string.
+
+
+
+ Return the type of
+
+
+
+
+ Returns true, as the the object managed by this factory is a singleton.
+
+
+
+
+
+ IDbProvider implementation that delegates all calls to a given target
+ IDbProvider
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The target db provider.
+
+
+
+ Returns a new command object for executing SQL statments/Stored Procedures
+ against the database.
+
+ An new
+
+
+
+ Returns a new instance of the providers CommandBuilder class.
+
+ In .NET 1.1 there was no common base class or interface
+ for command builders, hence the return signature is object to
+ be portable (but more loosely typed) across .NET 1.1/2.0
+ A new Command Builder
+
+
+
+ Returns a new connection object to communicate with the database.
+
+ A new
+
+
+
+ Returns a new adapter objects for use with offline DataSets.
+
+ A new
+
+
+
+ Returns a new parameter object for binding values to parameter
+ placeholders in SQL statements or Stored Procedure variables.
+
+ A new
+
+
+
+ Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText.
+
+ In most cases this adds the parameter prefix to the name passed into this method.
+ The unformatted name of the parameter.
+ The parameter name formatted foran IDbCommand.CommandText.
+
+
+
+ Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be
+ part of a IDataParameterCollection.
+
+ The unformatted name of the parameter.
+ The parameter name formatted for an IDataParameter
+
+
+
+ Extracts the provider specific error code as a string.
+
+ The data access exception.
+ The provider specific error code
+
+
+
+ Determines whether the provided exception is in fact related
+ to database access. This can be provider dependent in .NET 1.1 since
+ there isn't a common base class for ADO.NET exceptions.
+
+ The exception thrown when performing data access
+ operations.
+
+ true if is a valid data access exception for the specified
+ exception; otherwise, false.
+
+
+
+
+ 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 target IDbProvider that this IDbProvider should delegate to
+
+ The target db provider.
+
+
+
+ Return metadata information about the database provider
+
+
+
+
+ Connection string used to create connections.
+
+
+
+
+ Holds ADO.NET error codes for a particular provider.
+
+
+ Used by ErrorCodeExceptionTranslator. The embedded resource
+ "dbProviders.xml" in Spring.Data.Common contains default
+ ErrorCodes instances for various providers.
+
+ Mark Pollack (.NET)
+
+
+
+ The shared log instance for this class (and derived classes).
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ A wrapper implementation for IDbProvider such that multiple DbProvider instances can be
+ selected at runtime, say based on web request criteria.
+
+
+ The name of which DbProvider to use, as provided to the IDictionary property TargetDbProviders
+ is "dbProviderName". Once the target dbprovider name is known, set the name via a call to
+ LogicalThreadContext.SetData(MultiDelegatingDbProvider.CURRENT_DBPROVIDER_SLOTNAME, "database1ProviderName"). The value
+ "database1ProviderName" must match a key in the provided TargetDbProviders dictionary.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The target db providers.
+
+
+
+ Ensures that the there are values in the TargetDbProviders dictionary and that the
+ key is of the type string and value is of the type IDbProvider.
+
+ If the above conditions are not met.
+
+
+
+ Returns a new command object for executing SQL statments/Stored Procedures
+ against the database.
+
+ An new
+
+
+
+ Returns a new connection object to communicate with the database.
+
+ A new
+
+
+
+ Returns a new parameter object for binding values to parameter
+ placeholders in SQL statements or Stored Procedure variables.
+
+ A new
+
+
+
+ Returns a new adapter objects for use with offline DataSets.
+
+ A new
+
+
+
+ Returns a new instance of the providers CommandBuilder class.
+
+ A new Command Builder
+ In .NET 1.1 there was no common base class or interface
+ for command builders, hence the return signature is object to
+ be portable (but more loosely typed) across .NET 1.1/2.0
+
+
+
+ Creates the name of the parameter in the format appropriate to use inside IDbCommand.CommandText.
+
+ The unformatted name of the parameter.
+
+ The parameter name formatted foran IDbCommand.CommandText.
+
+ In most cases this adds the parameter prefix to the name passed into this method.
+
+
+
+ Creates the name ofthe parameter in the format appropriate for an IDataParameter, i.e. to be
+ part of a IDataParameterCollection.
+
+ The unformatted name of the parameter.
+
+ The parameter name formatted for an IDataParameter
+
+
+
+
+ Extracts the provider specific error code as a string.
+
+ The data access exception.
+ The provider specific error code
+
+
+
+ Determines whether the provided exception is in fact related
+ to database access. This can be provider dependent in .NET 1.1 since
+ there isn't a common base class for ADO.NET exceptions.
+
+ The exception thrown when performing data access
+ operations.
+
+ true if is a valid data access exception for the specified
+ exception; otherwise, false.
+
+
+
+
+ Determines whether is data access exception in .NET 1.1 for the specified exception.
+
+ The candidate exception.
+
+ true if is data access exception in .NET 1.1 for the specified exception; otherwise, false.
+
+
+
+
+ Gets the target provider based on the thread local name "dbProviderName"
+
+ The corresonding IDbProvider.
+
+
+
+ Sets the default IDbProvider. This will be returned if no DbProvider is found in thread local storage.
+
+ The default db provider.
+
+
+
+ Sets the target db providers.
+
+ The target db providers.
+
+
+
+ Return metadata information about the database provider
+
+
+
+
+
+ Connection string used to create connections.
+
+
+
+
+
+ Convenience method to sets the name of the DbProvider that will be used for the
+ the current thread's procesing.
+
+ The name of the DbProvider to use for the current threads processing.
+
+
+
+ An adapter for a target IDbProvider, applying the specified user credentials
+ to the connection string for every GetConnection call.
+
+
+
+
+ Sets the user credentials for current thread. The given username and password
+ strings will be added to the connection string for all subsequent GetConnection
+ requests. This will override any statically specified user credentials, that is,
+ set by the properties Username nad Password.
+
+ The username part of the connection string.
+ The password part of the connection string.
+
+
+
+ Removes the user credentials from current thread. Use statically specified
+ credentials afterwards.
+
+
+
+
+ Returns a new connection object to communicate with the database.
+ Determine if there are currently thread-bound credentials, using them if
+ available, falling back to the statically specified username and password
+ (i.e. values of the properties 'Username' and 'Password') otherwise.
+ The username and password will be concatenated on the connection string
+ using string in the Separator property
+
+ A new
+
+
+
+ Sets the username string that will be appended to the connection string.
+
+ The username.
+
+
+
+ Sets the password string that will be appended to the connection string.
+
+ The password.
+
+
+
+ Sets the separator used to separate elements of the connection string. Default is ';'.
+
+
+ The separator used to separate elements in the connection string.
+
+
+
+ Implementation of the custom configuration parser for database definitions.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Parse the specified element and register any resulting
+ IObjectDefinitions with the IObjectDefinitionRegistry that is
+ embedded in the supplied ParserContext.
+
+ The element to be parsed into one or more IObjectDefinitions
+ The object encapsulating the current state of the parsing
+ process.
+
+ The primary IObjectDefinition (can be null as explained above)
+
+
+ Implementations should return the primary IObjectDefinition
+ that results from the parse phase if they wish to used nested
+ inside (for example) a <property> tag.
+ Implementations may return null if they will not
+ be used in a nested scenario.
+
+
+
+
+
+ Parses database provider definitions.
+
+ Validator XML element.
+ The name of the object definition.
+ The parser context.
+ A database provider object definition.
+
+
+
+ Gets the name of the object type for the specified element.
+
+ The element.
+ The name of the object type.
+
+
+
+ Base class for AdoTemplate and other ADO.NET DAO helper classes defining
+ common properties like DbProvider.
+
+ Mark Pollack (.NET)
+ Juergen Hoeller
+
+
+
+ Prepare the command setting the transaction timeout.
+
+
+
+
+
+ Dispose the command, if any
+
+
+
+
+ Dispose the command, if any
+
+
+
+
+ Extract the command text from the given , if any.
+
+
+
+
+ Obtain a connection/transaction pair
+
+
+
+
+ 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.
+
+
+
+
+ Creates the data reader wrapper for use in AdoTemplate callback methods.
+
+ The reader to wrap.
+ The data reader used in AdoTemplate callbacks
+
+
+
+ Creates the a db parameters collection, adding to the collection a parameter created from
+ the method parameters.
+
+ The name of the parameter
+ The type of the parameter.
+ The size of the parameter, for use in defining lengths of string values. Use
+ 0 if not applicable.
+ The parameter value.
+ A collection of db parameters with a single parameter in the collection based
+ on the method parameters
+
+
+
+ Creates a new instance of
+
+ a new instance of
+
+
+
+ Derives the parameters of a stored procedure, not including the return parameter.
+
+ Name of the procedure.
+ The stored procedure parameters.
+
+
+
+ Derives the parameters of a stored procedure including the return parameter
+
+ Name of the procedure.
+ if set to true to include return parameter.
+ The stored procedure parameters
+
+
+
+ An instance of a DbProvider implementation.
+
+
+
+
+ Gets or sets a value indicating whether to lazily initialize the
+ IAdoExceptionTranslator for this accessor, on first encounter of a
+ exception from the data provider. Default is "true"; can be switched to
+ "false" for initialization on startup.
+
+ true if to lazy initialize the IAdoExceptionTranslator;
+ otherwise, false.
+
+
+
+ Gets or sets the exception translator. If no custom translator is provided, a default
+ is used.
+
+ The exception translator.
+
+
+
+ Gets or set the System.Type to use to create an instance of IDataReaderWrapper
+ for the purpose of having defaults values to use in case of DBNull values read
+ from IDataReader.
+
+ The type of the data reader wrapper.
+
+
+
+ Gets or sets the command timeout for IDbCommands that this AdoTemplate executes.
+
+ Default is 0, indicating to use the database provider's default.
+ Any timeout specified here will be overridden by the remaining
+ transaction timeout when executing within a transaction that has a
+ timeout specified at the transaction level.
+
+ The command timeout.
+
+
+
+ Convenient super class for ADO.NET data access objects.
+
+
+ Requires a IDBProvider to be set, providing a
+ AdoTemplate based on it to subclasses.
+ This base class is mainly intended for AdoTemplate usage.
+
+
+
+
+ Create a AdoTemplate for a given DbProvider
+ Only invoked if populating the DAO with a DbProvider reference.
+
+
+ Can be overriden in subclasses to provide AdoTemplate instances
+ with a different configuration, or a cusotm AdoTemplate subclass.
+
+ The DbProvider to create a AdoTemplate for
+
+
+
+ Convenience method to create a parameters builder.
+
+ Virtual for sublcasses to override with custom
+ implementation.
+ A new DbParameterBuilder
+
+
+
+ The DbProvider instance used by this DAO
+
+
+
+
+ Set the AdoTemplate for this DAO explicity, as
+ an alternative to specifying a IDbProvider
+
+
+
+
+ ADO.NET based implementation of the
+ interface.
+
+ Mark Pollack (.NET)
+
+
+
+ Abstract base class that allows for easy implementation of concrete platform transaction managers.
+
+
+
Provides the following workflow handling:
+
+
Determines if there is an existing transaction
+
Applies the appropriate propagation behavior
+
Suspends and resumes transactions if necessary
+
Checks the rollback-only flag on commit
+
Applies the appropriate modification on rollback (actual rollback or setting rollback-only)
+
Triggers registered synchronization callbacks (if transaction synchronization is active)
+
+
+
+ Transaction synchronization is a generic mechanism for registering
+ callbacks that get invoked at transaction completion time. The same mechanism
+ can also be used for custom synchronization efforts.
+
+
+ The state of this class is serializable. It's up to subclasses if
+ they wish to make their state to be serializable.
+ They should implement if they need
+ to restore any transient state.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+ Griffin Caprio (.NET)
+
+
+
+ This is the central interface in Spring.NET's transaction support.
+
+
+
+ Applications can use this directly, but it is not primarily meant as an API.
+ Typically, applications will work with either
+ or the AOP transaction
+ interceptor.
+
+
+ For implementers,
+ is a good starting point.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Return a currently active transaction or create a new one.
+
+
+
+ Note that parameters like isolation level or timeout will only be applied
+ to new transactions, and thus be ignored when participating in active ones.
+ Furthermore, they aren't supported by every transaction manager:
+ a proper implementation should throw an exception when custom values
+ that it doesn't support are specified.
+
+
+
+ instance (can be null for
+ defaults), describing propagation behavior, isolation level, timeout etc.
+
+
+ In case of lookup, creation, or system errors.
+
+
+ A representing the new or current transaction.
+
+
+
+
+ Commit the given transaction, with regard to its status.
+
+
+
+ If the transaction has been marked rollback-only programmatically,
+ perform a rollback.
+
+
+ If the transaction wasn't a new one, omit the commit to take part
+ in the surrounding transaction properly.
+
+
+
+ The instance returned by the
+ () method.
+
+
+ In case of commit or system errors
+
+
+
+
+ Roll back the given transaction, with regard to its status.
+
+
+
+ If the transaction wasn't a new one, just set it rollback-only
+ to take part in the surrounding transaction properly.
+
+
+
+ The instance returned by the
+ () method.
+
+
+ In case of system errors.
+
+
+
+
+ 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 transaction
+ (that is, a transaction which has already started).
+
+
+ The result will be evaluated according to the specified propagation
+ behavior for the new transaction. An existing transaction might get
+ suspended (in case of PROPAGATION_REQUIRES_NEW), or the new transaction
+ might participate in the existing one (in case of PROPAGATION_REQUIRED).
+ Default implementation returns false, assuming that detection of or
+ participating in existing transactions is generally not supported.
+ Subclasses are of course encouraged to provide such support.
+
+ 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.
+
+
+ Does not have to care about applying the propagation behavior,
+ as this has already been handled by this abstract manager.
+
+
+ Transaction object returned by
+ .
+
+
+ instance, describing
+ propagation behavior, isolation level, timeout etc.
+
+
+ In the case of creation or system errors.
+
+
+
+
+ Suspend the resources of the current transaction.
+
+
+ Transaction synchronization will already have been suspended.
+
+ Default implementation throws a TransactionSuspensionNotSupportedException,
+ assuming that transaction suspension is generally not supported.
+
+
+
+ Transaction object returned by
+ .
+
+
+ An object that holds suspended resources (will be kept unexamined for passing it into
+ .)
+
+
+ If suspending is not supported by the transaction manager implementation.
+
+
+ in case of system errors.
+
+
+
+
+ Resume the resources of the current transaction.
+
+ Transaction synchronization will be resumed afterwards.
+
+ Default implementation throws a TransactionSuspensionNotSupportedException,
+ assuming that transaction suspension is generally not supported.
+
+
+
+ Transaction object returned by
+ .
+
+
+ The object that holds suspended resources as returned by
+ .
+
+
+ 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.
+
+ Default implementation throws an IllegalTransactionStateException,
+ assuming that participating in existing transactions is generally not
+ supported. Subclasses are of course encouraged to provide such support.
+
+ The status representation of the transaction.
+
+ In the case of system errors.
+
+
+
+
+ Return whether to use a savepoint for a nested transaction. Default is true,
+ which causes delegation to
+ for holding a savepoint.
+
+
+
+
+ Subclasses can override this to return false, causing a further
+ invocation of
+
+ despite an already existing transaction.
+
+
+
+
+
+ Register the given list of transaction synchronizations with the existing transaction.
+
+
+ Invoked when the control of the Spring transaction manager and thus all Spring
+ transaction synchronizations end, without the transaction being completed yet. This
+ is for example the case when participating in an existing System.Transactions or
+ EnterpriseServices transaction invoked via their APIs.
+
+ The default implementation simply invokes the AfterCompletion methods
+ immediately, passing in TransactionSynchronizationStatus.Unknown.
+ This is the best we can do if there's no chance to determine the actual
+ outcome of the outer transaction.
+
+
+ The transaction transaction object returned by DoGetTransaction.
+ The lList of TransactionSynchronization objects.
+ In case of errors
+
+
+
+
+
+
+ Cleanup resources after transaction completion.
+
+
+ Transaction object returned by
+ .
+
+
+
+ Called after
+ and
+
+ execution on any outcome.
+
+
+ Should not throw any exceptions but just issue warnings on errors.
+
+
+ Default implementation does nothing.
+
+
+
+
+
+ Return a currently active transaction or create a new one.
+
+
+
+ This implementation handles propagation behavior.
+
+
+ Delegates to
+ ,
+ ,
+ and
+ .
+
+
+ Note that parameters like isolation level or timeout will only be applied
+ to new transactions, and thus be ignored when participating in active ones.
+ Furthermore, they aren't supported by every transaction manager:
+ a proper implementation should throw an exception when custom values
+ that it doesn't support are specified.
+
+
+
+ instance (can be null for
+ defaults), describing propagation behavior, isolation level, timeout etc.
+
+
+ In case of lookup, creation, or system errors.
+
+
+ representing the new or current transaction.
+
+
+
+
+ This implementation of commit handles participating in existing transactions
+ and programmatic rollback requests.
+
+
+
+
+ ITransactionStatus object returned by the
+ () method.
+
+
+ In case of commit or system errors.
+
+
+
+
+ Roll back the given transaction, with regard to its status.
+
+
+
+ This implementation handles participating in existing transactions.
+
+
+ Delegates to
+ ,
+ and
+ .
+
+
+ If the transaction wasn't a new one, just set it rollback-only
+ to take part in the surrounding transaction properly.
+
+
+
+ ITransactionStatusObject returned by the
+ () method.
+
+
+ In case of system errors.
+
+
+
+
+ Determines the timeout to use for the given definition. Will fall back to this manager's default
+ timeout if the transaction definition doesn't specify a non-default value.
+
+ The transaction definition.
+ the actual timeout to use.
+
+
+
+ Suspend the given transaction. Suspends transaction synchronization first,
+ then delegates to the doSuspend template method.
+
+ the current transaction object
+ an object that holds suspended resources
+
+
+
+ Resume the given transaction. Delegates to the doResume template method
+ first, then resuming transaction synchronization.
+
+ the current transaction object
+ the object that holds suspended resources, as returned by suspend
+
+
+
+ Invoke doRollback, handling rollback exceptions properly.
+
+ object representing the transaction
+ the thrown application exception or error
+
+ in case of a rollback error
+
+
+
+
+ Trigger beforeCommit callback.
+
+ object representing the transaction
+
+
+
+ Trigger beforeCompletion callback.
+
+ object representing the transaction
+
+
+
+ Trigger afterCompletion callback, handling exceptions properly.
+
+ object representing the transaction
+
+ Completion status according to
+
+
+
+
+ Clean up after completion, clearing synchronization if necessary,
+ and invoking doCleanupAfterCompletion.
+
+ object representing the transaction
+
+
+
+ Sets and gets when this transaction manager should activate the thread-bound
+ transaction synchronization support. Default is "always".
+
+
+
+ Note that transaction synchronization isn't supported for
+ multiple concurrent transactions by different transaction managers.
+ Only one transaction manager is allowed to activate it at any time.
+
+
+
+
+
+
+ Sets and gets whether nested transactions are allowed. Default is false.
+
+
+
+ Typically initialized with an appropriate default by the
+ concrete transaction manager subclass.
+
+
+
+
+
+ Sets and gets a flag that determines whether or not the
+
+ method must be invoked if a call to the
+
+ method fails. Default is false.
+
+
+ Typically not necessary and thus to be avoided as it can override the
+ commit exception with a subsequent rollback exception.
+
+
+
+
+ Gets or sets a value indicating whether to fail early in case of the transaction being
+ globally marked as rollback-only.
+
+
+ Default is "false", only causing an UnexpectedRollbackException at the
+ outermost transaction boundary. Switch this flag on to cause an
+ UnexpectedRollbackException as early as the global rollback-only marker
+ has been first detected, even from within an inner transaction boundary.
+
+
+ true if fail early on global rollback; otherwise, false.
+
+
+
+
+ Gets or sets the default timeout that this transaction manager should apply if there
+ is no timeout specified at the transaction level, in seconds.
+
+ Returns DefaultTransactionDefinition.TIMEOUT_DEFAULT to indicate the
+ underlying transaction infrastructure's default timeout.
+ The default timeout.
+
+
+
+ Extension of the
+ interface, indicating a native resource transaction manager, operating on a single
+ target resource. Such transaction managers differ from DTC based transaction managers in
+ that they do not use transaction enlistment for an open number of resources but
+ rather focus on leveraging the native power and simplicity of a single target resource.
+
+
+ This interface is mainly used for abstract introspection of a transaction manager,
+ giving clients a hint on what kind of transaction manager they have been given
+ and on what concrete resource the transaction manager is operating on.
+
+ Juergen Hoeller
+ Mark Pollack
+
+
+
+ Gets the resource factory that this transaction manager operates on,
+ e.g. a IDbProvider or a Hibernate ISessionFactory.
+
+ The resource 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.
+
+
+
+
+ Invoked by an
+ after it has injected all of an object's dependencies.
+
+
+ If DbProvider is null.
+
+
+
+
+ Gets the resource factory that this transaction manager operates on,
+ For the AdoPlatformTransactionManager this is the DbProvider
+
+ The DbProvider.
+
+
+
+ DbProvider transaction (state) object, representing a ConnectionHolder.
+ Used as a transaction object by AdoPlatformTransactionManager
+
+ Derives from AdoTransactionObjectSupport to inherit the capability
+ to manage Savepoints.
+
+
+
+
+
+ Convenient base class for ADO.NET transaction aware objects.
+
+
+ Can contain a ConnectionHolder object.
+
+ Mark Pollack (.NET)
+
+
+
+ Interface that specifies means to programmatically manage
+ transaction savepoints in a generic fashion.
+
+
+
+ Note that savepoints can only work within an active transaction.
+ Just use this programmatic savepoint handling for advanced needs;
+ else, a subtransaction with a value
+ of is preferable.
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Create a new savepoint.
+
+
+ The name of the savepoint to create.
+
+
+ You can roll back to a specific savepoint
+ via ,
+ and explicitly release a savepoint that you don't need anymore via
+ .
+
+ Note that most transaction managers will automatically release
+ savepoints at transaction completion.
+
+
+
+ If the savepoint could not be created,
+ either because the backend does not support it or because the
+ transaction is not in an appropriate state.
+
+
+ A savepoint object, to be passed into
+
+ or .
+
+
+
+
+ Roll back to the given savepoint.
+
+
+ The savepoint will be automatically released afterwards.
+
+ The savepoint to roll back to.
+
+ If the rollback failed.
+
+
+
+
+ Explicitly release the given savepoint.
+
+
+
+ Note that most transaction managers will automatically release
+ savepoints at transaction completion.
+
+
+ Implementations should fail as silently as possible if
+ proper resource cleanup will still happen at transaction completion.
+
+
+ The savepoint to release.
+
+ If the release failed.
+
+
+
+
+ Interface to be implemented by transaction objects that are able to
+ return an internal rollback-only marker, typically from a another
+ transaction that has participated and marked it as rollback-only.
+
+
+
+ Autodetected by ,
+ to always return a current rollbackOnly flag even if not resulting from the current
+ .
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Return whether the transaction is internally marked as rollback-only.
+
+ True of the transaction is marked as rollback-only.
+
+
+
+ The shared log instance for this class (and derived classes).
+
+
+
+
+ Create a new savepoint.
+
+
+ The name of the savepoint to create.
+
+
+ You can roll back to a specific savepoint
+ via ,
+ and explicitly release a savepoint that you don't need anymore via
+ .
+
+ Note that most transaction managers will automatically release
+ savepoints at transaction completion.
+
+
+
+ If the savepoint could not be created,
+ either because the backend does not support it or because the
+ transaction is not in an appropriate state.
+
+
+ A savepoint object, to be passed into
+
+ or .
+
+
+
+
+ Roll back to the given savepoint.
+
+
+ The savepoint will be automatically released afterwards.
+
+ The savepoint to roll back to.
+
+ If the rollback failed.
+
+
+
+
+ Explicitly release the given savepoint.
+
+
+
+ Note that most transaction managers will automatically release
+ savepoints at transaction completion.
+
+
+ Implementations should fail as silently as possible if
+ proper resource cleanup will still happen at transaction completion.
+
+
+ The savepoint to release.
+
+ If the release failed.
+
+
+
+
+ Return whether the transaction is internally marked as rollback-only.
+
+
+ True of the transaction is marked as rollback-only.
+
+
+
+ Sets the rollback only.
+
+
+
+
+ Return whether the transaction is internally marked as rollback-only.
+
+
+ True of the transaction is marked as rollback-only.
+
+
+
+ This is the central class in the Spring.Data namespace.
+ It simplifies the use of ADO.NET and helps to avoid commons errors.
+
+ Mark Pollack (.NET)
+
+
+
+ Interface that defines ADO.NET related database operations.
+
+ Mark Pollack (.NET)
+
+
+
+ Execute the query with the specified command text returning a scalar result
+
+ No parameters are used. As with
+ IDbCommand.ExecuteScalar, it returns the first column of the first row in the resultset
+ returned by the query. Extra columns or row are ignored.
+ The command type
+ The command text to execute.
+ The first column of the first row in the result set.
+
+
+
+ Execute the query with the specified command text and parameter returning a scalar result
+
+ The command type
+ The command text to execute.
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with the specified command text and parameters returning a scalar result
+
+ The command type
+ The command text to execute.
+ The parameter collection to map.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with the specified command text and parameters set via the
+ command setter, returning a scalar result
+
+ The command type
+ The command text to execute.
+ The command setter.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with a command created via IDbCommandCreator and
+ parameters
+
+ Output parameters can be retrieved via the returned
+ dictionary.
+
+ More commonly used as a lower level support method within the framework,
+ for example StoredProcedure/AdoScalar.
+
+
+ The callback to create a IDbCommand.
+ A dictionary containing output parameters, if any
+
+
+
+ Executes a non query returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The number of rows affected.
+
+
+
+ Executes a non query returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+ The number of rows affected.
+
+
+
+ Executes a non query returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The parameter collection to map.
+ The number of rows affected.
+
+
+
+ Executes a non query with parameters set via the
+ command setter, returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The command setter.
+ The number of rows affected.
+
+
+
+ Executes a non query with a command created via IDbCommandCreator and
+ parameters.
+
+ Output parameters can be retrieved via the returned
+ dictionary.
+
+ More commonly used as a lower level support method within the framework,
+ for example StoredProcedure/AdoScalar.
+
+
+ The callback to create a IDbCommand.
+ The number of rows affected.
+
+
+
+ Execute a query given IDbCommand's type and text, reading a
+ single result set on a per-row basis with a .
+
+ The type of command.
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+
+
+
+
+ Execute a query given IDbCommand's type and text and provided parameter
+ information, reading a
+ single result set on a per-row basis with a .
+
+ The type of command
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+
+
+
+ Execute a query given IDbCommand's type and text and provided IDbParameters,
+ reading a single result set on a per-row basis with a .
+
+ Type of the command.
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+ The parameter collection to map.
+
+
+
+ Execute a query given IDbCommand's type and text by
+ passing the created IDbCommand to a ICommandSetter implementation
+ that knows how to bind values to the IDbCommand, reading a
+ single result set on a per-row basis with a .
+
+ The type of command
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+
+ The command setter.
+
+
+
+ Execute a ADO.NET operation on a command object using a delegate callback.
+
+ This allows for implementing arbitrary data access operations
+ on a single command within Spring's managed ADO.NET environment.
+ The delegate called with a command object.
+ A result object returned by the action or null
+
+
+
+ Execute a ADO.NET operation on a command object using an interface based callback.
+
+ the callback to execute
+ object returned from callback
+
+
+
+ Executes ADO.NET operations on a command object, created by the provided IDbCommandCreator,
+ using the interface based callback IDbCommandCallback.
+
+ The command creator.
+ The callback to execute based on IDbCommand
+ A result object returned by the action or null
+
+
+
+ Execute ADO.NET operations on a IDbDataAdapter object using an interface based callback.
+
+ This allows for implementing abritrary data access operations
+ on a single DataAdapter within Spring's managed ADO.NET environment.
+
+ The data adapter callback.
+ A result object returned by the callback or null
+
+
+
+ Execute a query given IDbCommand's type and text, processing a
+ single result set with an instance of IResultSetExtractor
+
+ The type of command
+ The text of the query.
+ Object that will extract all rows of a result set
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query given the CommandType and text with parameters set
+ via the command setter, processing a
+ single result set with an instance of IResultSetExtractor
+
+ The command type.
+ The command text to execute.
+ The result set extractor.
+ The command setter.
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query given the CommandType and text specifying a single parameter and process a single result set with an
+ instance of IResultSetExtractor.
+
+ Convention is to use 0 For the size if it does not make sense for the given data type
+
+ The command type.
+ The command text to execute.
+ The result set extractor.
+ The name of the parameters
+ The enumeration of the parameter type
+ The size of the parmeter - e.g. string length. Use 0 if not relevant for specific data type
+ The value of the parameters
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query given the CommandType and text specifying a collection of parameters and process a single result set with an
+ instance of IResultSetExtractor.
+
+ The command type.
+ The command text to execute.
+ The result set extractor.
+ The query parameters
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query given static SQL/Stored Procedure name
+ and process a single result set with an instance of ResultSetExtractorDelegate
+
+ The type of command.
+ The command text.
+ Delegate that will process all rows of a result set
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query given the CommandType and text with parameters set
+ via the command setter, processing a
+ single result set with an instance of IResultSetExtractor
+
+ The command type.
+ The command text to execute.
+ Delegate that will process all rows of a result set
+ The command setter.
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query given the CommandType and text specifying a single parameter and process a single result set with an
+ instance of IResultSetExtractor.
+
+ Convention is to use 0 For the size if it does not make sense for the given data type
+
+ The command type.
+ The command text to execute.
+ Delegate that will process all rows of a result set
+ The name of the parameters
+ The enumeration of the parameter type
+ The size of the parmeter - e.g. string length. Use 0 if not relevant for specific data type
+ The value of the parameters
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query given the CommandType and text specifying a collection of parameters and process a single result set with an
+ instance of IResultSetExtractor.
+
+ The command type.
+ The command text to execute.
+ Delegate that will process all rows of a result set
+ The query parameters
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query given static SQL, mapping each row to a .NET object
+ via a RowMapper
+
+ The type of command
+ SQL query to execute
+ delegate/lambda that will map one object per row
+ The result list containing mapped objects
+
+
+
+ Execute a query given static SQL, mapping each row to a .NET object
+ via a RowMapper
+
+ The type of command
+ SQL query to execute
+ object that will map one object per row
+ the result list containing mapped objects
+
+
+
+ Execute a query with the specified command text, mapping a single result
+ row to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ object that will map one object per row
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameters set via the
+ command setter, mapping a single result row to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ object that will map one object per row
+ The command setter.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameters, mapping a single result row
+ to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ object that will map one object per row
+ The parameter collection to use in the query.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameter, mapping a single result row
+ to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ object that will map one object per row
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text, mapping a single result
+ row to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ delegate that will map one object per row
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameters set via the
+ command setter, mapping a single result row to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ delegate that will map one object per row
+ The command setter.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameters, mapping a single result row
+ to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ delegate that will map one object per row
+ The parameter collection to use in the query.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameter, mapping a single result row
+ to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ delegate that will map one object per row
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+
+
+
+
+ Fill a based on a select command that requires no parameters.
+
+ The to populate
+ The type of command
+ SQL query to execute
+ The number of rows successfully added to or refreshed in the
+
+
+
+ Fill a based on a select command that requires no parameters.
+
+ The to populate
+ The type of command
+ SQL query to execute
+ The number of rows successfully added to or refreshed in the
+
+
+
+ Fill a based on a select command that requires no parameters
+ that returns one or more result sets that are added as
+ s to the
+
+ The to populate
+ The type of command
+ SQL query to execute
+ The mapping of table names for each
+ created
+
+
+
+
+ Note that output parameters are marked input/output after derivation....
+ (TODO - double check....)
+
+
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The database provider.
+
+
+
+ Initializes a new instance of the class.
+
+ The database provider.
+ if set to false
+ lazily initialize the ErrorCodeExceptionTranslator.
+
+
+
+ Execute a ADO.NET operation on a command object using a delegate callback.
+
+ The delegate called with a command object.
+
+ A result object returned by the action or null
+
+ This allows for implementing arbitrary data access operations
+ on a single command within Spring's managed ADO.NET environment.
+
+
+
+ Callback to execute a IDbCommand.
+
+ the callback to execute
+ object returned from callback
+
+
+
+ Executes ADO.NET operations on a command object, created by the provided IDbCommandCreator,
+ using the interface based callback IDbCommandCallback.
+
+ The command creator.
+ The callback to execute based on IDbCommand
+ A result object returned by the action or null
+
+
+
+ Execute ADO.NET operations on a IDbDataAdapter object using an interface based callback.
+
+ This allows for implementing abritrary data access operations
+ on a single DataAdapter within Spring's managed ADO.NET environment.
+
+ The data adapter callback.
+ A result object returned by the callback or null
+
+
+
+ Executes a non query returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The number of rows affected.
+
+
+
+ Executes a non query returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+ The number of rows affected.
+
+
+
+ Executes a non query returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The parameter collection to map.
+ The number of rows affected.
+
+
+
+ Executes a non query with parameters set via the
+ command setter, returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The command setter.
+ The number of rows affected.
+
+
+
+ Executes a non query with a command created via IDbCommandCreator and
+ parameters.
+
+ Output parameters can be retrieved via the returned
+ dictionary.
+
+ More commonly used as a lower level support method within the framework,
+ for example StoredProcedure/AdoScalar.
+
+
+ The callback to create a IDbCommand.
+ The number of rows affected.
+
+
+
+ Execute the query with the specified command text.
+
+ No parameters are used. As with
+ IDbCommand.ExecuteScalar, it returns the first column of the first row in the resultset
+ returned by the query. Extra columns or row are ignored.
+ The command type
+ The command text to execute.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with the specified command text and parameter returning a scalar result
+
+ The command type
+ The command text to execute.
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with the specified command text and parameters returning a scalar result
+
+ The command type
+ The command text to execute.
+ The parameter collection to map.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with the specified command text and parameters set via the
+ command setter, returning a scalar result
+
+ The command type
+ The command text to execute.
+ The command setter.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with a command created via IDbCommandCreator and
+ parameters
+
+ Output parameters can be retrieved via the returned
+ dictionary.
+
+ More commonly used as a lower level support method within the framework,
+ for example for StoredProcedure/AdoScalar.
+
+ The callback to create a IDbCommand.
+ A dictionary containing output parameters, if any
+
+
+
+ Execute a query given IDbCommand's type and text, reading a
+ single result set on a per-row basis with a .
+
+ The type of command
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+
+
+
+
+ Execute a query given IDbCommand's type and text by
+ passing the created IDbCommand to a ICommandSetter implementation
+ that knows how to bind values to the IDbCommand, reading a
+ single result set on a per-row basis with a .
+
+ The type of command
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+
+ The command setter.
+
+
+
+ Execute a query given IDbCommand's type and text and provided parameter
+ information, reading a
+ single result set on a per-row basis with a .
+
+ The type of command
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+
+
+
+ Execute a query given static SQL/Stored Procedure name
+ and process a single result set with an instance of IResultSetExtractor
+
+ The type of command.
+ The SQL/Stored Procedure to execute
+ Object that will extract all rows of a result set
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+
+
+ Execute a query given static SQL/Stored Procedure name
+ and process a single result set with an instance of IResultSetExtractor
+
+ The type of command.
+ The SQL/Stored Procedure to execute
+ Delegate that will extract all rows of a result set
+ An arbitrary result object, as returned by the IResultSetExtractor
+
+
+
+ Execute a query with the specified command text, mapping a single result
+ row to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ object that will map one object per row
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameters set via the
+ command setter, mapping a single result row to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ object that will map one object per row
+ The command setter.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameters, mapping a single result row
+ to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ object that will map one object per row
+ The parameter collection to use in the query.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameter, mapping a single result row
+ to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ object that will map one object per row
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text, mapping a single result
+ row to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ delegate that will map one object per row
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameters set via the
+ command setter, mapping a single result row to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ delegate that will map one object per row
+ The command setter.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameters, mapping a single result row
+ to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ delegate that will map one object per row
+ The parameter collection to use in the query.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Execute a query with the specified command text and parameter, mapping a single result row
+ to an object via a RowMapper.
+
+ The command type.
+ The command text to execute.
+ delegate that will map one object per row
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+ The single mapped object.
+
+ If the query does not return exactly one row.
+
+
+ If there is any problem executing the query.
+
+
+
+
+ Fill a based on a select command that requires no parameters.
+
+ The to populate
+ The type of command
+ SQL query to execute
+ The number of rows successfully added to or refreshed in the
+
+
+
+ Creates the data reader wrapper for use in AdoTemplate callback methods.
+
+ The reader to wrap.
+ The data reader used in AdoTemplate callbacks
+
+
+
+ An instance of a DbProvider implementation.
+
+
+
+
+ Gets or sets a value indicating whether to lazily initialize the
+ IAdoExceptionTranslator for this accessor, on first encounter of a
+ exception from the data provider. Default is "true"; can be switched to
+ "false" for initialization on startup.
+
+ true if to lazy initialize the IAdoExceptionTranslator;
+ otherwise, false.
+
+
+
+ Gets or sets the exception translator. If no custom translator is provided, a default
+ is used.
+
+ The exception translator.
+
+
+
+ Gets or set the System.Type to use to create an instance of IDataReaderWrapper
+ for the purpose of having defaults values to use in case of DBNull values read
+ from IDataReader.
+
+ The type of the data reader wrapper.
+
+
+
+ Generic callback interface for code that operates on a
+ IDbDataAdapter.
+
+
+
Allows you to execute any number of operations
+ on a IDbDataAdapter, for example to Fill a DataSet
+ or other more advanced operations such as the transfering
+ data between two different DataSets.
+
+
Note that the passed in IDbDataAdapter
+ has been created by the framework and its SelectCommand
+ will be populated with values for CommandType and Text properties
+ along with Connection/Transaction properties based on the
+ calling transaction context.
+
+ Execute(IDataAdapterCallback dataAdapterCallback)
+ method.
+
+ Mark Pollack (.NET)
+
+
+
+ Called by AdoTemplate.Execute with an preconfigured
+ ADO.NET IDbDataAdapter instance with its SelectCommand
+ property populated with CommandType and Text values
+ along with Connection/Transaction properties based on the
+ calling transaction context.
+
+ An active IDbDataAdapter instance
+ The result object
+
+
+
+ Generic callback interface for code that operates on a
+ IDbCommand.
+
+
+
Allows you to execute any number of operations
+ on a single IDbCommand, for example a single ExecuteScalar
+ call or repeated execute calls with varying parameters.
+
+
Used internally by AdoTemplate, but also useful for
+ application code. Note that the passed in IDbCommand
+ has been created by the framework.
+
+ Mark Pollack
+
+
+
+ Called by AdoTemplate.Execute with an active ADO.NET IDbCommand.
+ The calling code does not need to care about closing the
+ command or the connection, or
+ about handling transactions: this will all be handled by
+ Spring's AdoTemplate
+
+ An active IDbCommand instance
+ The result object
+
+
+
+ Interface to be implemented by objects that can provide SQL strings
+
+ Typically implemented by IDbCommandCreator and
+ ICommandCallbacks that want to expose the CommandText they
+ use to create their ADO.NET commands, to allow for better
+ contextual information in case of exceptions
+ Mark Pollack(.NET)
+ Juergen Hoeller
+
+
+
+ Adapter implementation of the ResultSetExtractor interface that delegates
+ to a RowMapper which is supposed to create an object for each row.
+ Each object is added to the results List of this ResultSetExtractor.
+
+
+ Useful for the typical case of one object per row in the database table.
+ The number of entries in the results list will match the number of rows.
+
+ Note that a RowMapper object is typically stateless and thus reusable;
+ just the RowMapperResultSetExtractor adapter is stateful.
+
+
+ As an alternative consider subclassing MappingAdoQuery from the
+ Spring.Data.Objects namespace: Instead of working with separate
+ AdoTemplate and IRowMapper objects you can have executable
+ query objects (containing row-mapping logic) there.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Callback interface to process all result sets and rows in
+ an AdoTemplate query method.
+
+ Implementations of this interface perform the work
+ of extracting results but don't need worry about managing
+ ADO.NET resources, such as closing the reader or transaction management.
+
+ This interface is mainly used within the ADO.NET
+ framework. An IResultSetExtractor is usually a simpler choice
+ for result set (DataReader) processing, in particular a
+ RowMapperResultSetExtractor in combination with a IRowMapper.
+
+ Note: in contracts to a IRowCallbackHandler, a ResultSetExtractor
+ is usually stateless and thus reusable, as long as it doesn't access
+ stateful resources or keep result state within the object.
+
+
+
+
+
+
+ Implementations must implement this method to process all
+ result set and rows in the IDataReader.
+
+ The IDataReader to extract data from.
+ Implementations should not close this: it will be closed
+ by the AdoTemplate.
+ An arbitrary result object or null if none. The
+ extractor will typically be stateful in the latter case.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Transaction Manager that uses EnterpriseServices to access the
+ MS-DTC. It requires the support of 'Services without Components'
+ functionality which is available on Win 2003 and Win XP SP2.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ This is indented only for unit testing purposes and should not be
+ called by production application code.
+ The tx adapter.
+
+
+
+ Gets or sets a value indicating whether tracking is enabled.
+
+ true if tracking is enabled; otherwise, false.
+
+
+
+ Gets or sets a text string that corresponds to the application ID under which tracker information is reported.
+ The default value is 'Spring.NET'
+
+ The name of the tracking app.
+
+
+
+ Gets or sets a text string that corresponds to the context name under which tracker information is reported.
+
+ The name of the tracking component.
+
+
+
+ TransactionManager that uses TransactionScope provided by System.Transactions.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ This is indented only for unit testing purposes and should not be
+ called by production application code.
+ The tx adapter.
+
+
+
+ No-op initialization
+
+
+
+
+ The transaction resource object that encapsulates the state and functionality
+ contained in TransactionScope and Transaction.Current via the ITransactionScopeAdapter
+ property.
+
+
+
+
+ Initializes a new instance of the class.
+ Will create an instance of .
+
+
+
+
+ Gets or sets the transaction scope adapter.
+
+ The transaction scope adapter.
+
+
+
+ Return whether the transaction is internally marked as rollback-only.
+
+
+ True of the transaction is marked as rollback-only.
+
+
+
+ Convenient super class for ADO.NET data access objects using generics.
+
+
+ Requires a IDBProvider to be set, providing a
+ AdoTemplate based on it to subclasses.
+ This base class is mainly intended for AdoTemplate usage.
+
+
+
+
+ Create a AdoTemplate for a given DbProvider
+ Only invoked if populating the DAO with a DbProvider reference.
+
+
+ Can be overriden in subclasses to provide AdoTemplate instances
+ with a different configuration, or a cusotm AdoTemplate subclass.
+
+ The DbProvider to create a AdoTemplate for
+
+
+
+ Convenience method to create a parameters builder.
+
+ Virtual for sublcasses to override with custom
+ implementation.
+ A new DbParameterBuilder
+
+
+
+ The DbProvider instance used by this DAO
+
+
+
+
+ Set the AdoTemplate for this DAO explicity, as
+ an alternative to specifying a IDbProvider
+
+
+
+
+ This is the central class in the Spring.Data.Generic namespace.
+ It simplifies the use of ADO.NET and helps to avoid commons errors.
+
+ Mark Pollack (.NET)
+
+
+
+ Interface that defines ADO.NET related database operations using generics
+
+ Mark Pollack (.NET)
+
+
+
+ Execute a ADO.NET operation on a command object using a generic interface based callback.
+
+ The type of object returned from the callback.
+ the callback to execute based on DbCommand
+ An object returned from callback
+
+
+
+ Execute a ADO.NET operation on a command object using a generic interface based callback.
+
+ The type of object returned from the callback.
+ The callback to execute based on IDbCommand
+ An object returned from callback
+
+
+
+ Execute a ADO.NET operation on a command object using a generic delegate callback.
+
+ The type of object returned from the callback.
+ This allows for implementing arbitrary data access operations
+ on a single command within Spring's managed ADO.NET environment.
+ The delegate called with a DbCommand object.
+ A result object returned by the action or null
+
+
+
+ Execute a ADO.NET operation on a command object using a generic delegate callback.
+
+ The type of object returned from the callback.
+ This allows for implementing arbitrary data access operations
+ on a single command within Spring's managed ADO.NET environment.
+ The delegate called with a IDbCommand object.
+ A result object returned by the action or null
+
+
+
+ Executes ADO.NET operations on a command object, created by the provided IDbCommandCreator,
+ using the interface based callback IDbCommandCallback.
+
+ The type of object returned from the callback.
+ The command creator.
+ The callback to execute based on IDbCommand
+ A result object returned by the action or null
+
+
+
+ Execute ADO.NET operations on a IDbDataAdapter object using an interface based callback.
+
+ This allows for implementing abritrary data access operations
+ on a single DataAdapter within Spring's managed ADO.NET environment.
+
+ The type of object returned from the callback.
+ The data adapter callback.
+ A result object returned by the callback or null
+
+
+
+ Execute ADO.NET operations on a IDbDataAdapter object using an delgate based callback.
+
+ This allows for implementing abritrary data access operations
+ on a single DataAdapter within Spring's managed ADO.NET environment.
+
+ The type of object returned from the callback.
+ The delegate called with a IDbDataAdapter object.
+ A result object returned by the callback or null
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The provider.
+
+
+
+ Initializes a new instance of the class.
+
+ The database provider.
+ if set to false
+ lazily initialize the ErrorCodeExceptionTranslator.
+
+
+
+ Initializes a new instance of the class.
+
+ Useful if you have a subclass of Spring.Data.Core.AdoTemplate.
+ The classic ADO template.
+
+
+
+ Execute a ADO.NET operation on a command object using a interface based callback.
+
+ the callback to execute
+ object returned from callback
+
+
+
+ Execute a ADO.NET operation on a command object using a delegate callback.
+
+ This allows for implementing arbitrary data access operations
+ on a single command within Spring's managed ADO.NET environment.
+ The delegate called with a command object.
+ A result object returned by the action or null
+
+
+
+ Execute a ADO.NET operation on a command object using a interface based callback.
+
+ the callback to execute
+ object returned from callback
+
+
+
+ Execute a ADO.NET operation on a command object using a delegate callback.
+
+ This allows for implementing arbitrary data access operations
+ on a single command within Spring's managed ADO.NET environment.
+ The delegate called with a command object.
+ A result object returned by the action or null
+
+
+
+ Executes ADO.NET operations on a command object, created by the provided IDbCommandCreator,
+ using the interface based callback IDbCommandCallback.
+
+ The type of object returned from the callback.
+ The command creator.
+ The callback to execute based on IDbCommand
+
+ A result object returned by the action or null
+
+
+
+
+ Execute ADO.NET operations on a IDbDataAdapter object using an interface based callback.
+
+ The type of object returned from the callback.
+ The data adapter callback.
+
+ A result object returned by the callback or null
+
+ This allows for implementing abritrary data access operations
+ on a single DataAdapter within Spring's managed ADO.NET environment.
+
+
+
+
+ Execute ADO.NET operations on a IDbDataAdapter object using an delgate based callback.
+
+ This allows for implementing abritrary data access operations
+ on a single DataAdapter within Spring's managed ADO.NET environment.
+
+ The type of object returned from the callback.
+ The delegate called with a IDbDataAdapter object.
+ A result object returned by the callback or null
+
+
+
+ Executes a non query returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The number of rows affected.
+
+
+
+ Executes a non query returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+ The number of rows affected.
+
+
+
+ Executes a non query returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The parameter collection to map.
+ The number of rows affected.
+
+
+
+ Executes a non query with parameters set via the
+ command setter, returning the number of rows affected.
+
+ The command type.
+ The command text to execute.
+ The command setter.
+ The number of rows affected.
+
+
+
+ Executes a non query with a command created via IDbCommandCreator and
+ parameters.
+
+ Output parameters can be retrieved via the returned
+ dictionary.
+
+ More commonly used as a lower level support method within the framework,
+ for example StoredProcedure/AdoScalar.
+
+
+ The callback to create a IDbCommand.
+ The number of rows affected.
+
+
+
+ Execute the query with the specified command text.
+
+ No parameters are used. As with
+ IDbCommand.ExecuteScalar, it returns the first column of the first row in the result set
+ returned by the query. Extra columns or row are ignored.
+ The command type
+ The command text to execute.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with the specified command text and parameter returning a scalar result
+
+ The command type
+ The command text to execute.
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with the specified command text and parameters returning a scalar result
+
+ The command type
+ The command text to execute.
+ The parameter collection to map.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with the specified command text and parameters set via the
+ command setter, returning a scalar result
+
+ The command type
+ The command text to execute.
+ The command setter.
+ The first column of the first row in the result set
+
+
+
+ Execute the query with a command created via IDbCommandCreator and
+ parameters
+
+ Output parameters can be retrieved via the returned
+ dictionary.
+
+ More commonly used as a lower level support method within the framework,
+ for example for StoredProcedure/AdoScalar.
+
+ The callback to create a IDbCommand.
+ A dictionary containing output parameters, if any
+
+
+
+ Execute a query given IDbCommand's type and text by
+ passing the created IDbCommand to a ICommandSetter implementation
+ that knows how to bind values to the IDbCommand, reading a
+ single result set on a per-row basis with a .
+
+ The type of command
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+
+ The command setter.
+
+
+
+ Execute a query given IDbCommand's type and text, reading a
+ single result set on a per-row basis with a .
+
+ The type of command
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+
+
+
+
+ Execute a query given IDbCommand's type and text and provided parameter
+ information, reading a
+ single result set on a per-row basis with a .
+
+ The type of command
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+
+ The name of the parameter to map.
+ One of the database parameter type enumerations.
+ The length of the parameter. 0 if not applicable to parameter type.
+ The parameter value.
+
+
+
+ Execute a query given IDbCommand's type and text and provided IDbParameters,
+ reading a single result set on a per-row basis with a .
+
+ Type of the command.
+ The text of the query.
+ callback that will extract results
+ one row at a time.
+ The parameter collection to map.
+
+
+
+ Checks if DbProvider is not null and creates ExceptionTranslator if not LazyInit.
+
+
+
+
+ Creates the data reader wrapper for use in AdoTemplate callback methods.
+
+ The reader to wrap.
+ The data reader used in AdoTemplate callbacks
+
+
+
+ Derives the parameters of a stored procedure including the return parameter
+
+ Name of the procedure.
+ if set to true to include return parameter.
+ The stored procedure parameters
+
+
+
+ An instance of a DbProvider implementation.
+
+
+
+
+ Gets or sets a value indicating whether to lazily initialize the
+ IAdoExceptionTranslator for this accessor, on first encounter of a
+ exception from the data provider. Default is "true"; can be switched to
+ "false" for initialization on startup.
+
+ true if to lazy initialize the IAdoExceptionTranslator;
+ otherwise, false.
+
+
+
+ Gets or sets the exception translator. If no custom translator is provided, a default
+ is used.
+
+ The exception translator.
+
+
+
+ Gets or set the System.Type to use to create an instance of IDataReaderWrapper
+ for the purpose of having defaults values to use in case of DBNull values read
+ from IDataReader.
+
+ The type of the data reader wrapper.
+
+
+
+ Gets the 'Classic' AdoTemplate in Spring.Data
+
+
+ Useful to access methods that return non-generic collections.
+
+ The 'Classic; AdoTemplate in Spring.Data.
+
+
+
+ Gets or sets the command timeout for IDbCommands that this AdoTemplate executes. It also
+ sets the value of the contained 'ClassicAdoTemplate'.
+
+ The command timeout.
+ Default is 0, indicating to use the database provider's default.
+ Any timeout specified here will be overridden by the remaining
+ transaction timeout when executing within a transaction that has a
+ timeout specified at the transaction level.
+
+
+
+
+ Generic callback interface for code that operates on a
+ IDbCommand.
+
+ The return type from executing the
+ callback
+
+
Allows you to execute any number of operations
+ on a single IDbCommand, for example a single ExecuteScalar
+ call or repeated execute calls with varying parameters.
+
+
Used internally by AdoTemplate, but also useful for
+ application code. Note that the passed in IDbCommand
+ has been created by the framework and will have its
+ Connection property set and the Transaction property
+ set based on the transaction context.
+
As an alternative to using this interface you can use
+ the delegate version which is particularly nice when using
+ anonymous delegates for writing more terse code and having
+ easy access to the variables in the calling class.
+
See for a version that has the
+ base class DbCommand as the callback argument.
+
+ Mark Pollack
+
+
+
+ Called by AdoTemplate.Execute with an active ADO.NET IDbCommand.
+ The calling code does not need to care about closing the
+ command or the connection, or
+ about handling transactions: this will all be handled by
+ Spring's AdoTemplate
+
+ An active IDbCommand instance
+ The result object
+
+
+
+ Generic callback delegate for code that operates on a DbCommand.
+
+
+
Allows you to execute any number of operations
+ on a single DbCommand, for example a single ExecuteScalar
+ call or repeated execute calls with varying parameters.
+
+
Used internally by AdoTemplate, but also useful for
+ application code. Note that the passed in DbCommand
+ has been created by the framework and will have its
+ Connection property set and the Transaction property
+ set based on the transaction context.
+
+ The return type from executing the
+ callback
+ The ADO.NET DbCommand object
+ The object returned from processing with the
+ provided DbCommand
+ Mark Pollack
+
+
+
+ Called by AdoTemplate.Execute with an preconfigured
+ ADO.NET IDbDataAdapter instance with its SelectCommand
+ property populated with CommandType and Text values
+ along with Connection/Transaction properties based on the
+ calling transaction context.
+
+ An active IDbDataAdapter instance
+ The result object
+
+
+
+ Generic callback interface for code that operates on a
+ DbCommand.
+
+ The return type from executing the
+ callback
+
+
Allows you to execute any number of operations
+ on a single DbCommand, for example a single ExecuteScalar
+ call or repeated execute calls with varying parameters.
+
+
Used internally by AdoTemplate, but also useful for
+ application code. Note that the passed in DbCommand
+ has been created by the framework and will have its
+ Connection property set and the Transaction property
+ set based on the transaction context.
+
+ Mark Pollack
+
+
+
+ Called by AdoTemplate.Execute with an active ADO.NET IDbCommand.
+ The calling code does not need to care about closing the
+ command or the connection, or
+ about handling transactions: this will all be handled by
+ Spring's AdoTemplate
+
+ An active IDbCommand instance
+ The result object
+
+
+
+ Generic callback interface for code that operates on a
+ IDbDataAdapter.
+
+
+
Allows you to execute any number of operations
+ on a IDbDataAdapter, for example to Fill a DataSet
+ or other more advanced operations such as the transfering
+ data between two different DataSets.
+
+
Note that the passed in IDbDataAdapter
+ has been created by the framework and its SelectCommand
+ will be populated with values for CommandType and Text properties
+ along with Connection/Transaction properties based on the
+ calling transaction context.
+
+ Execute(IDataAdapterCallback dataAdapterCallback)
+ method.
+
+ Mark Pollack (.NET)
+
+
+
+ Called by AdoTemplate.Execute with an preconfigured
+ ADO.NET IDbDataAdapter instance with its SelectCommand
+ property populated with CommandType and Text values
+ along with Connection/Transaction properties based on the
+ calling transaction context.
+
+ An active IDbDataAdapter instance
+ The result object
+
+
+
+ Generic callback delegate for code that operates on a IDbCommand.
+
+
+
Allows you to execute any number of operations
+ on a single IDbCommand, for example a single ExecuteScalar
+ call or repeated execute calls with varying parameters.
+
+
Used internally by AdoTemplate, but also useful for
+ application code. Note that the passed in DbCommand
+ has been created by the framework and will have its
+ Connection property set and the Transaction property
+ set based on the transaction context.
+
+ The return type from executing the
+ callback
+ The ADO.NET DbCommand object
+ The object returned from processing with the
+ provided DbCommand
+ Mark Pollack
+
+
+
+ Callback interface to process all results sets and rows in
+ an AdoTemplate query method.
+
+ Implementations of this interface perform the work
+ of extracting results but don't need worry about managing
+ ADO.NET resources, such as closing the reader.
+
+ This interface is mainly used within the ADO.NET
+ framework. An IResultSetExtractor is usually a simpler choice
+ for result set (DataReader) processing, in particular a
+ RowMapperResultSetExtractor in combination with a IRowMapper.
+
+ Note: in contracts to a IRowCallbackHandler, a ResultSetExtractor
+ is usually stateless and thus reusable, as long as it doesn't access
+ stateful resources or keep result state within the object.
+
+
+
+
+
+
+ Implementations must implement this method to process all
+ result set and rows in the IDataReader.
+
+ The IDataReader to extract data from.
+ Implementations should not close this: it will be closed
+ by the AdoTemplate.
+ An arbitrary result object or null if none. The
+ extractor will typically be stateful in the latter case.
+
+
+
+ Generic callback to process each row of data in a result set to an object.
+
+ Implementations of this interface perform the actual work
+ of mapping rows, but don't need worry about managing
+ ADO.NET resources, such as closing the reader.
+
+ Typically used for AdoTemplate's query methods (with RowMapperResultSetExtractor
+ adapters). RowMapper objects are typically stateless and thus
+ reusable; they are ideal choices for implementing row-mapping logic in a single
+ place.
+
+
Alternatively, consider subclassing MappingSqlQuery from the Spring.Data.Object
+ namespace: Instead of working with separate AdoTemplate and RowMapper objects,
+ you can have executable query objects (containing row-mapping logic) there.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Implementations must implement this method to map each row of data in the
+ result set (DataReader). This method should not call Next() on the
+ DataReader; it should only extract the values of the current row.
+
+ The IDataReader to map (pre-initialized to the current row)
+ The number of the current row..
+ The specific typed result object for the current row.
+
+
+
+ Provides a name to a ResultSetProcessor for use with AdoOperation subclasses
+ such as StoredProcedure.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class with a
+ IRowCallback instance
+
+ The name of the associated row callback for use with output
+ result set mappers.
+ A row callback instance.
+
+
+
+ Initializes a new instance of the class with a
+ IRowMapper instance
+
+ The name of the associated row mapper.
+ A IRowMapper instance.
+
+
+
+ Initializes a new instance of the class with a
+ IResultSetExtractor instance
+
+ The name of the associated result set extractor.
+ A IResultSetExtractor instance.
+
+
+
+ Callback delegate to process all result sets and row in an
+ AdoTemplate query method.
+
+ The type returned from the result set mapping.
+ The IDataReader to extract data from.
+ Implementations should not close this: it will be closed
+ by the AdoTemplate.
+ An arbitrary result object or null if none.
+
+
+
+ Callback delegate to process each row of data in a result set to an object.
+
+ The type of the object returned from the mapping operation.
+ The IDataReader to map
+ the number of the current row.
+ An abrirary object, typically derived from data
+ in the result set.
+
+
+
+ Adapter implementation of the ResultSetExtractor interface that delegates
+ to a RowMapper which is supposed to create an object for each row.
+ Each object is added to the results List of this ResultSetExtractor.
+
+
+ Useful for the typical case of one object per row in the database table.
+ The number of entries in the results list will match the number of rows.
+
+ Note that a RowMapper object is typically stateless and thus reusable;
+ just the RowMapperResultSetExtractor adapter is stateful.
+
+
+ As an alternative consider subclassing MappingAdoQuery from the
+ Spring.Data.Objects namespace: Instead of working with separate
+ AdoTemplate and IRowMapper objects you can have executable
+ query objects (containing row-mapping logic) there.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The row mapper.
+ The rows expected.
+
+
+
+ A "AdoOperation" is a thread-safe, reusable object representing
+ an ADO Query, "NonQuery" (Create, Update, Delete), stored procedure
+ or DataSet manipualtions.
+
+
+ Subclasses should set Command Text and add parameters before invoking
+ Compile(). The order in which parameters are added is generally
+ significant when using providers or functionality that do not use
+ named parameters.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Abstract base class providing common functionality for generic and non
+ generic implementations of "AdoOperation" subclasses.
+
+ Mark Pollack (.NET)
+
+
+
+ Has this operation been compiled? Compilation means at
+ least checking that a IDbProvider and sql have been provided,
+ but subclasses may also implement their own custom validation.
+
+
+
+
+ Object enabling us to create IDbCommands
+ efficiently, based on this class's declared parameters.
+
+
+
+
+ Ensures compilation if used in an IApplicationContext
+
+
+
+
+ Compiles this operation. Ignores subsequent attempts to compile.
+
+
+
+
+ Check whether this operation has been compiled already;
+ lazily compile it if not already compiled.
+
+ Automatically called by ValidateParameters and ValidateNamedParameters
+
+
+
+ Validates the named parameters passed to an AdoTemplate ExecuteXXX method based on
+ declared parameters.
+
+
+ Subclasses should invoke this method very every ExecuteXXX method.
+
+ The parameter dictionary supplied. May by null.
+
+
+
+ Subclasses must implement to perform their own compilation.
+ Invoked after this class's compilation is complete.
+ Subclasses can assume that SQL has been supplied and that
+ a IDbProvider has been supplied.
+
+
+
+
+ Hook method that subclasses may override to react to compilation.
+ This implementation does nothing.
+
+
+
+
+ Gets or sets the type of the command.
+
+ The type of the command.
+
+
+
+ Gets or sets the db provider.
+
+ The db provider.
+
+
+
+ Gets or sets the SQL to execute
+
+ The SQL.
+
+
+
+ Gets or sets the declared parameters.
+
+ The declared parameters.
+
+
+
+ Gets a value indicating whether this is compiled.
+
+ Compilation means that the operation is fully configured,
+ and ready to use. The exact meaning of compilation will vary between subclasses.
+ true if compiled; otherwise, false.
+
+
+
+ Sets the command timeout for IDbCommands that this AdoTemplate executes.
+
+ Default is 0, indicating to use the database provider's default.
+ Any timeout specified here will be overridden by the remaining
+ transaction timeout when executing within a transaction that has a
+ timeout specified at the transaction level.
+
+ The command timeout.
+
+
+
+ Initializes a new instance of the class.
+
+ A DbProvider, SQL and any parameters must be supplied
+ before invoking the compile method and using this object.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A DbProvider, SQL and any parameters must be supplied
+ before invoking the compile method and using this object.
+
+ Database provider to use.
+
+
+
+ Initializes a new instance of the class.
+
+ A DbProvider, SQL and any parameters must be supplied
+ before invoking the compile method and using this object.
+
+ Database provider to use.
+ SQL query or stored procedure name.
+
+
+
+ Compiles this operation. Ignores subsequent attempts to compile.
+
+
+
+
+ Gets or sets the ADO template.
+
+ The ADO template.
+
+
+
+ Gets or sets the db provider.
+
+ The db provider.
+
+
+
+ Sets the command timeout for IDbCommands that this AdoTemplate executes.
+
+ Default is 0, indicating to use the database provider's default.
+ Any timeout specified here will be overridden by the remaining
+ transaction timeout when executing within a transaction that has a
+ timeout specified at the transaction level.
+
+ The command timeout.
+
+
+
+ Place together the mapping logic to a plain .NET object
+ for one result set within the same class.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The database provider.
+ The SQL to execute
+
+
+
+ Convenient method to execute query without parameters or calling context.
+
+ The type parameter for the returned collection
+ List of mapped objects
+
+
+
+ Convenient method to execute query with parameters but without calling context.
+
+ The type parameter for the returned collection
+ The parameters for the query.
+
+
+
+
+ Convenient method to execute query with parameters and access to output parameter values.
+
+ The type parameter for the returned collection
+ The parameters for the query.
+ The returned output parameters.
+
+
+
+
+ Central execution method. All named parameter execution goes through this method.
+
+ the type parameter for the returned collection
+ The in params.
+ The out params.
+ The calling context.
+
+
+
+
+ Reusable query in which concrete subclasses must implement the
+ MapRow method to map each row of a single result set into an
+ object.
+
+
+ Simplifies MappingSqlQueryWithContext API by dropping parameters and
+ context. Most subclasses won't care about parameters. If you don't use
+ contextual information, subclass this instead of MappingSqlQueryWithContext.
+
+ Mark Pollack (.NET)
+
+
+
+ Reusable query in which concrete subclasses must implement the
+ abstract MapRow method to map each row of a single result set into an
+ object.
+
+ The MapRow method is also passed the input parameters and
+ a dictionary to provide the method with calling context information
+ (if necessary). If you do not need these additional parameters, use
+ the subclass MappingAdoQuery.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ A superclass for object based abstractions of RDBMS stored procedures.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Execute the stored procedure using 'ExecuteScalar'
+
+ Value of input parameters.
+ Dictionary with any named output parameters and the value of the
+ scalar under the key "scalar".
+
+
+
+ Encapsulate Command.ExecuteNonQuery operations within a reusable class.
+
+ Mark Pollack (.NET)
+ The default CommandType is CommandType.Text
+
+
+
+ A "AdoOperation" is a thread-safe, reusable object representing
+ an ADO Query, "NonQuery" (Create, Update, Delete), stored procedure
+ or DataSet manipualtions.
+
+
+ Subclasses should set Command Text and add parameters before invoking
+ Compile(). The order in which parameters are added is generally
+ significant when using providers or functionality that do not use
+ named parameters.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ A DbProvider, SQL and any parameters must be supplied
+ before invoking the compile method and using this object.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A DbProvider, SQL and any parameters must be supplied
+ before invoking the compile method and using this object.
+
+ Database provider to use.
+
+
+
+ Initializes a new instance of the class.
+
+ A DbProvider, SQL and any parameters must be supplied
+ before invoking the compile method and using this object.
+
+ Database provider to use.
+ SQL query or stored procedure name.
+
+
+
+ Compiles this operation. Ignores subsequent attempts to compile.
+
+
+
+
+ Gets or sets the ADO template.
+
+ The ADO template.
+
+
+
+ Gets or sets the db provider.
+
+ The db provider.
+
+
+
+ Sets the command timeout for IDbCommands that this AdoTemplate executes.
+
+ Default is 0, indicating to use the database provider's default.
+ Any timeout specified here will be overridden by the remaining
+ transaction timeout when executing within a transaction that has a
+ timeout specified at the transaction level.
+
+ The command timeout.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Place together the mapping logic to a plain .NET object
+ for one result set within the same class.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Encapsulate Command ExecuteScalar operations within a reusable class.
+
+ The default CommandType is CommandType.Text
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reusable query in which concrete subclasses must implement the
+ MapRow method to map each row of a single result set into an
+ object.
+
+
+ Simplifies MappingAdoQueryWithContext API by dropping parameters and
+ context. Most subclasses won't care about parameters. If you don't use
+ contextual information, subclass this instead of MappingSqlQueryWithContext.
+
+ Mark Pollack (.NET)
+
+
+
+ Reusable query in which concrete subclasses must implement the
+ MapRow method to map each row of a single result set into an
+ object.
+
+ The MapRow method is also passed the input parameters and
+ a dictionary to provide the method with calling context information
+ (if necessary). If you do not need these additional parameters, use
+ the subclass MappingAdoQuery.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Callback to process each row of data in a result set to an object.
+
+ Implementations of this interface perform the actual work
+ of mapping rows, but don't need worry about managing
+ ADO.NET resources, such as closing the reader.
+
+ Typically used for AdoTemplate's query methods (with RowMapperResultSetExtractor
+ adapters). RowMapper objects are typically stateless and thus
+ reusable; they are ideal choices for implementing row-mapping logic in a single
+ place.
+
+
Alternatively, consider subclassing MappingSqlQuery from the Spring.Data.Object
+ namespace: Instead of working with separate AdoTemplate and RowMapper objects,
+ you can have executable query objects (containing row-mapping logic) there.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Implementations must implement this method to map each row of data in the
+ result set (DataReader). This method should not call Next() on the
+ DataReader; it should only extract the values of the current row.
+
+ The IDataReader to map (pre-initialized for the current row)
+ The number of the current row.
+ The result object for the current row.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ A superclass for object based abstractions of RDBMS stored procedures.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The db provider.
+ Name of the stored procedure.
+
+
+
+ Execute the stored procedure using 'ExecuteScalar'
+
+ Value of input parameters.
+ Dictionary with any named output parameters and the value of the
+ scalar under the key "scalar".
+
+
+
+ Summary description for AdoUtils.
+
+
+
+
+ Order value for TransactionSynchronization objects that clean up
+ ADO.NET Connections.
+
+
+
+
+ Property dispose of the command. Useful in finally or catch blocks.
+
+ command to dispose
+
+
+
+ Connection holder, wrapping a ADO.NET connection and transaction.
+
+ AdoTransactionManager binds instances of this class to the
+ thread for a given DbProvider.
+ Jurgen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Convenient base class for resource holders.
+
+
+
+ Features rollback-only support transactions. Can expire after a certain number of
+ seconds or milliseconds, to determine transactional timeouts.
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Clear the transaction state of this resource holder.
+
+
+
+
+ Increase the reference count by one because the holder has been requested.
+
+
+
+
+ Decrease the reference count by one because the holder has been released.
+
+
+
+
+ Mark the resource as synchronized with a transaction.
+
+
+
+
+ Get or set whether the resource is synchronized with a transaction.
+
+ true if synchronized; otherwise, false.
+
+
+
+ Return the expiration deadline of this object.
+
+
+
+
+ Return whether this object has an associated timeout.
+
+
+
+
+ Return the time to live for this object in seconds.
+
+
+
+ Rounds up eagerly, e.g. '9.00001' to '10'.
+
+
+
+ If no deadline has been set.
+
+
+
+
+ Return the time to live for this object in milliseconds.
+
+
+ If no deadline has been set.
+
+
+
+
+ Sets the timeout for this object in milliseconds.
+
+ Number of milliseconds until expiration.
+
+
+
+ Sets the timeout for this object in seconds.
+
+ Number of seconds until expiration.
+
+
+
+ Return wheterh there are still open references to this holder
+
+
+
+
+ Create a new ConnectionHolder
+
+ The connection to hold
+ The transaction to hold
+
+
+
+ Callback for resource cleanup at end of transaction.
+
+
+
+
+ Adapter for the
+ interface.
+
+
+ Contains empty implementations of all interface methods, for easy overriding of
+ single methods.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Interface for transaction synchronization callbacks.
+
+
+ Supported by .
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Suspend this synchronization.
+
+
+
+ Supposed to unbind resources from
+
+ if managing any.
+
+
+
+
+
+ Resume this synchronization.
+
+
+
+ Supposed to rebind resources from
+
+ if managing any.
+
+
+
+
+
+ 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!)
+
+
+
+ If the transaction is defined as a read-only transaction.
+
+
+
+
+ Invoked after transaction commit.
+
+ Can e.g. commit further operations that are supposed to follow on
+ a successful commit of the main transaction.
+ Throws exception in case of errors; will be propagated to the caller.
+ Note: To not throw TransactionExeption sbuclasses here!
+
+
+
+
+
+ Invoked before transaction commit/rollback (after
+ ,
+ even if
+
+ threw an exception).
+
+
+
+ Can e.g. perform resource cleanup.
+
+
+ Note that exceptions will get propagated to the commit caller
+ and cause a rollback of the transaction.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ Suspend this synchronization.
+
+
+
+ Supposed to unbind resources from
+
+ if managing any.
+
+
+
+
+
+ Resume this synchronization.
+
+
+
+ Supposed to unbind 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 after transaction commit.
+
+ Can e.g. commit further operations that are supposed to follow on
+ a successful commit of the main transaction.
+ Throws exception in case of errors; will be propagated to the caller.
+ Note: To not throw TransactionExeption sbuclasses here!
+
+
+
+
+ Invoked before transaction commit/rollback (after
+ ,
+ even if
+
+ threw an exception).
+
+
+
+ Can e.g. perform resource cleanup.
+
+
+ Note that exceptions will get propagated to the commit caller
+ and cause a rollback of the transaction.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ Compares the current instance with another object of the same type.
+
+
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj.
+
+
+ An object to compare with this instance.
+ obj is not the same type as this instance. 2
+
+
+
+ Create a new instance.
+
+
+
+
+
+
+ Compares the current instance with another object of the same type.
+
+ An object to compare with this instance.
+
+ The value of the order property.
+
+
+
+
+ Suspend this synchronization.
+
+
+
+ Supposed to unbind resources from
+
+ if managing any.
+
+
+
+
+
+ Resume this synchronization.
+
+
+
+ Supposed to unbind resources from
+
+ if managing any.
+
+
+
+
+
+ Invoked before transaction commit/rollback (after
+ ,
+ even if
+
+ threw an exception).
+
+
+
+ Can e.g. perform resource cleanup.
+
+
+ Note that exceptions will get propagated to the commit caller
+ and cause a rollback of the transaction.
+
+
+
+
+
+ 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.
+
+
+
+
+
+ A simple holder for the current Connection/Transaction objects
+ to use within a given AdoTemplate Execute operation. Used internally.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The connection.
+ The transaction.
+
+
+
+ Gets the connection.
+
+ The connection.
+
+
+
+ Gets the transaction.
+
+ The transaction.
+
+
+
+ Summary description for DbProviderUtils.
+
+
+
+
+ Dispose of the given Connection, created via the given IDbProvider,
+ if it is not managed externally (that is, not bound to the thread).
+
+ The connection to close if necessary. If
+ this is null the call will be ignored.
+ The IDbProvider the connection came from
+
+
+
+ Get a ADO.NET Connection/Transaction Pair for the given IDbProvider.
+ Changes any exception into the Spring hierarchy of generic data access
+ exceptions, simplifying calling code and making any exception that is
+ thrown more meaningful.
+
+
+ Is aware of a corresponding Connection/Transaction bound to the current thread, for example
+ when using AdoPlatformTransactionManager. Will bind a IDbConnection to the thread
+ if transaction synchronization is active
+
+ The provider.
+ A Connection/Transaction pair.
+
+
+
+ Get a ADO.NET Connection/Transaction Pair for the given IDbProvider.
+ Same as but throwing original provider
+ exception.
+
+
+ Is aware of a corresponding Connection/Transaction bound to the current thread, for example
+ when using AdoPlatformTransactionManager. Will bind a IDbConnection to the thread
+ if transaction synchronization is active
+
+ The provider.
+
+
+
+
+ Do the connection mgmt.
+
+
+
+
+
+
+ Applies the current transaction timeout, if any, to the given ADO.NET IDbCommand object.
+
+ The command.
+ The db provider.
+
+
+
+ Applies the specified timeout - overridden by the current transaction timeout, if any, to to the
+ given ADO.NET IDb command object.
+
+ The command.
+ The db provider the command was obtained from.
+ The timeout to apply (or 0 for no timeout outside of a transaction.
+
+
+
+ Implementation that delegates to ServiceDomain and ContextUtil for all functionality.
+
+ Introduced for purposes of unit testing.
+ Mark Pollack (.NET)
+
+
+
+ Provides the necessary transactional state and operations for ServiceDomainTransactionManager to
+ work with ServiceDomain and ContextUtil.
+
+ Introduced for purposes of unit testing.
+ Mark Pollack (.NET)
+
+
+
+ Creates the context specified by the ServiceConfig object and pushes it onto the context stack to
+ become the current context.
+
+ A ServiceConfig that contains the configuration information for the services to be used within the enclosed code.
+
+
+
+ Leaves this ServiceDomain. The current context is then popped from the context stack, and the
+ context that was running when Enter was called becomes the current context.
+
+ One of the TransactionStatus values
+
+
+
+ Sets the consistent bit and the done bit to true in the COM+ context
+
+
+
+
+ Sets the consistent bit to false and the done bit to true in the COM+ context.
+
+
+
+
+ Gets or sets the consistent bit in the COM+ context.
+
+ My transaction vote.
+
+
+
+ Gets a value indicating whether the current context is transactional.
+
+
+ true if this instance is existing transaction; otherwise, false.
+
+
+
+
+ Creates the context specified by the ServiceConfig object and pushes it onto the context stack to
+ become the current context.
+
+ A ServiceConfig that contains the configuration information for the services to be used within the enclosed code.
+
+
+
+ Leaves this ServiceDomain. The current context is then popped from the context stack, and the
+ context that was running when Enter was called becomes the current context.
+
+ One of the TransactionStatus values
+
+
+
+ Sets the consistent bit and the done bit to true in the COM+ context
+
+
+
+
+ Sets the consistent bit to false and the done bit to true in the COM+ context.
+
+
+
+
+ Gets or sets the consistent bit in the COM+ context.
+
+ My transaction vote.
+
+
+
+ Gets a value indicating whether the current context is transactional.
+
+
+ true if this instance is existing transaction; otherwise, false.
+
+
+
+
+ Uses and System.Transactions.Transaction.Current to provide
+ necessary state and operations to TxScopeTransactionManager.
+
+ Mark Pollack (.NET)
+
+
+
+ Provides the necessary transactional state and operations for TxScopeTransactionManager to
+ work with TransactionScope and Transaction.Current.
+
+ Introduced for purposes of unit testing.
+ Mark Pollack (.NET)
+
+
+
+ Creates the transaction scope.
+
+ The tx scope option.
+ The tx options.
+ The interop option.
+
+
+
+ Call Complete() on the TransactionScope object created by this instance.
+
+
+
+
+ Call Disponse() on the TransactionScope object created by this instance.
+
+
+
+
+ Gets a value indicating whether there is a new transaction or an existing transaction.
+
+
+ true if this instance is existing transaction; otherwise, false.
+
+
+
+
+ Gets a value indicating whether rollback only has been called (i.e. Rollback() on the
+ Transaction object) and therefore voting that the transaction will be aborted.
+
+ true if rollback only; otherwise, false.
+
+
+
+ Call Complete() on the TransactionScope object created by this instance.
+
+
+
+
+ Call Disponse() on the TransactionScope object created by this instance.
+
+
+
+
+ Creates the transaction scope.
+
+ The tx scope option.
+ The tx options.
+ The interop option.
+
+
+
+ Gets a value indicating whether there is a new transaction or an existing transaction.
+
+
+ true if this instance is existing transaction; otherwise, false.
+
+
+
+
+ Gets a value indicating whether rollback only has been called (i.e. Rollback() on the
+ Transaction object) and therefore voting that the transaction will be aborted.
+
+ true if rollback only; otherwise, false.
+
+
+
+ Implementation of IAdoExceptionTranslator that analyzes provider specific
+ error codes and translates into the DAO exception hierarchy.
+
+ This class loads the obtains error codes from
+ the IDbProvider metadata property ErrorCodes
+ which defines error code mappings for various providers.
+
+ Mark Pollack (.NET)
+
+
+
+ Interface to be implemented by classes that can translate between properietary SQL exceptions
+ and Spring.NET's data access strategy-agnostic .
+
+
+
+ Implementations can be generic (for example, ADO.NET Exceptions) or proprietary (for example,
+ using SQL Server or Oracle error codes) for greater precision.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+ Mark Pollack
+
+
+
+ Translate the given into a generic data access exception.
+
+ A readable string describing the task being attempted.
+ The SQL query or update that caused the problem. May be null.
+
+ The encountered by the ADO.NET implementation.
+
+
+ A appropriate for the supplied
+ .
+
+
+
+
+ The shared log instance for this class (and derived classes).
+
+
+
+
+ Initializes a new instance of the class.
+
+ The data provider.
+
+
+
+ Initializes a new instance of the class.
+
+ The data provider.
+ The error code collection.
+
+
+
+ Translate the given into a generic data access exception.
+
+ A readable string describing the task being attempted.
+ The SQL query or update that caused the problem. May be null.
+
+ The encountered by the ADO.NET implementation.
+
+
+ A appropriate for the supplied
+ .
+
+
+
+
+ Template method for actually translating the given exception.
+ given into a generic data access exception.
+
+ A readable string describing the task being attempted.
+ The SQL query or update that caused the problem. May be null.
+ The error code.
+ The encountered by the ADO.NET implementation.
+
+ A appropriate for the supplied
+ .
+
+
+ The passed-in arguments will have been pre-checked. furthermore, this method is allowed to
+ return null to indicate that no exception match has been found and that
+ fallback translation should kick in.
+
+
+
+
+ Subclasses can override this method to attempt a custom mapping from a data access Exception
+ to DataAccessException.
+
+ Readable text describing the task being attempted.
+ SQL query or update that caused the problem. May be null.
+ The error code extracted from the generic data access exception for
+ a particular provider.
+ The exception thrown from a data access operation.
+
+ null if no custom translation was possible, otherwise a DataAccessException
+ resulting from custom translation. This exception should include the exception parameter
+ as a nested root cause. This implementation always returns null, meaning that
+ the translator always falls back to the default error codes.
+
+
+
+
+ Builds the message.
+
+ The task.
+ The SQL.
+ The exception.
+
+
+
+
+ Determines whether the specified exception is valid data access exception.
+
+ The exception.
+
+ true if is valid data access exception; otherwise, false.
+
+
+
+
+ Logs the translation.
+
+ The task.
+ The SQL.
+ The error code.
+ The exception.
+ if set to true [b].
+
+
+
+ Sets the db provider.
+
+ The db provider.
+
+
+
+ Gets the error codes for the provider
+
+ The error codes.
+
+
+
+ Gets or sets the fallback translator to use in case error code based translation
+ fails.
+
+ The fallback translator.
+
+
+
+ Translates all exceptions to an UncategorizedAdoException.
+
+
+ This exception translator used when an exception is thrown using the
+ "primary" implementation of IAdoExceptionTranslator, i.e. AdoExceptionTranslator.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Translate the given into a generic data access exception.
+
+ A readable string describing the task being attempted.
+ The SQL query or update that caused the problem. May be null.
+
+ The encountered by the ADO.NET implementation.
+
+
+ A appropriate for the supplied
+ .
+
+
+
+
+ Provides a name to a ResultSetProcessor for use with AdoOperation subclasses
+ such as StoredProcedure.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class with a
+ IRowCallback instance
+
+ The name of the associated row callback for use with output
+ result set mappers.
+ A row callback instance.
+
+
+
+ Initializes a new instance of the class with a
+ IRowMapper instance
+
+ The name of the associated row mapper.
+ A IRowMapper instance.
+
+
+
+ Initializes a new instance of the class with a
+ IResultSetExtractor instance
+
+ The name of the associated result set extractor.
+ A IResultSetExtractor instance.
+
+
+
+ A data reader implementation that mapps DBNull values to sensible defaults.
+
+ IDataRecord methods are virtual.
+ Mark Pollack (.NET)
+
+
+
+ Custom data reader implementations often delegate to an underlying
+ instance. This interface captures that relationship for reuse in
+ the framework.
+
+ Implementations will typically add behavior to standard IDataReader methods,
+ for example, by providing default values for DbNull values.
+ See as an example.
+
+ Mark Pollack (.NET)
+
+
+
+ The underlying reader implementation to delegate to for accessing data
+ from a returned result sets.
+
+ The wrapped reader.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The data reader to delegate operations to.
+
+
+
+ Gets the 32-bit signed integer value of the specified field.
+
+ The index of the field to find.
+
+ The 32-bit signed integer value of the specified field or 0 if null
+
+ The index passed was outside the range of 0 through .
+
+
+
+ Return the value of the specified field, null if value equals DBNull.Value
+
+ The index of the field to find.
+
+ The which will contain the field value upon return.
+ Returns null if value equals DBNull.Value
+
+
+ The index passed was outside the range of 0 through .
+
+
+
+
+ Return whether the specified field is set to null.
+
+ The index of the field to find.
+
+ if the specified field is set to null, otherwise
+ .
+
+ The index passed was outside the range of 0 through .
+
+
+
+ Gets the with the specified name.
+ Returns null if value equals DBNull.Value
+
+
+
+
+
+ Gets the with the specified i.
+ Returns null if value equals DBNull.Value
+
+ Return the object or null if the value equals DBNull.Value
+
+
+
+ Miscellaneous utility methods for manipulating parameter objects.
+
+ Mark Pollack (.NET)
+
+
+
+ The shared log instance for this class (and derived classes).
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Copies the parameters from IDbParameters to the parameter collection in IDbCommand
+
+ The command.
+ The spring param collection.
+
+
+
+ Copies the parameters in IDbCommand to IDbParameters
+
+ The spring param collection.
+ The command.
+
+
+
+ Adapter to enable use of a IRowCallback inside a ResultSetExtractor.
+
+ We don't use it for navigating since this could lead to unpredictable consequences.
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+ The row callback.
+
+
+
+ Initializes a new instance of the class.
+
+ The row callback delegate.
+
+
+
+ All rows of the data reader are passed to the IRowCallback
+ associated with this class.
+
+ The IDataReader to extract data from.
+ Implementations should not close this: it will be closed
+ by the AdoTemplate.
+
+ Null is returned since IRowCallback manages its own state.
+
+
+
+
+ A class that contains the properties of ServiceConfig used by ServiceDomainPlatformTransactionManager.
+
+ This is done to enhance testability of the transaction manager since ServiceConfig does not override Equals or Hashcode
+ Mark Pollack (.NET)
+
+
+
+ Using reflection on VS.NET 2005 a generated typed dataset, apply the
+ connection/transaction pair associated with the current Spring based
+ transaction scope.
+
+ This avoids the limitations of using System.Transaction
+ based transaction scope for multiple operation on typed datasets withone one
+ transaction. Reflection was used rather than partial classes to provide
+ a general solution that can be written and applied once.
+ Usage within a DAO method, FindAll() is shown below. Note: Convenience methods
+ to simplify calling syntax maybe provided in the future, it is a trade off on type
+ safety calling the typed adapter defined outside the anonymous method as
+ compared to casting inside a "DoInDbAdapter(object dbAdapter) method.
+
+ public PrintGroupMappingDataSet FindAll()
+ {
+
+ PrintGroupMappingTableAdapter adapter = new PrintGroupMappingTableAdapter();
+ PrintGroupMappingDataSet printGroupMappingDataSet = new PrintGroupMappingDataSet();
+
+
+ printGroupMappingDataSet = AdoTemplate.Execute(delegate(IDbCommand command)
+ {
+ TypedDataSetUtils.ApplyConnectionAndTx(adapter, command);
+ adapter.Fill(printGroupMappingDataSet.PrintGroupMapping);
+ return printGroupMappingDataSet;
+ })
+ as PrintGroupMappingDataSet;
+
+ return printGroupMappingDataSet;
+ }
+
+ See http://www.code-magazine.com/articleprint.aspx?quickid=0605031 for a
+ more complete discussion.
+
+
+
+
+
+ Applies the connection and tx to the provided typed dataset. The connection and transaction
+ used are taken from the Spring's current transactional context. See ConnectionUtils.GetConnectionTxPair
+ for more information
+
+ The typed data set adapter.
+ The db provider.
+
+
+
+ Applies the connection and tx to the provided typed dataset.
+
+ Generated dataset to not inherit from a common base
+ class so that we must pass in the generic object type.
+ The typed data set adapter.
+ The IDbCommand managed by Spring and set with
+ the connection/transaction of the current Spring transaction scope.
+
+
+
+ Exception thrown when SQL specified is invalid.
+
+ Mark Pollack (.NET)
+
+
+
+ SQL that led to the problem
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+ The inner exception.
+
+
+
+ Initializes a new instance of the class.
+
+ name of the current task.
+ The offending SQL statment
+ The root 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.
+
+
+
+
+ When overridden in a derived class, sets the
+ with information about the exception.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is a null reference ( in Visual Basic).
+
+
+
+ Fatal exception thrown when we can't connect to an RDBMS using ADO.NET
+
+ Rod Johnson
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+ The inner exception.
+
+
+
+ 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.
+
+
+
+
+ Callback delegate for code that operates on a IDbCommand.
+
+ the ADO.NET command object.
+
+
Allows you to execute any number of operations
+ on a single IDbCommand, for example a single ExecuteScalar
+ call or repeated execute calls with varying parameters.
+
+
Used internally by AdoTemplate, but also useful for
+ application code. Note that the passed in IDbCommand
+ has been created by the framework and will have its
+ Connection property set and the Transaction property
+ set based on the transaction context.
+
+ Mark Pollack
+
+
+
+ Callback delegate to set any necessary parameters or other
+ properties on the command object. The CommandType and
+ CommandText properties will have already been supplied
+
+ The database command object.
+ Mark Pollack
+
+
+
+ Exception thrown when an attempt to insert or update data
+ results in violation of an primary key or unique constraint.
+ Note that this is not necessarily a purely relational concept;
+ unique primary keys are required by most database types.
+
+ Thomas Risberg
+ Mark Pollack (.NET)
+
+
+
+ SQL that led to the problem
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+ The inner exception.
+
+
+
+ Initializes a new instance of the class.
+
+ name of the current task.
+ The offending SQL statment
+ The root 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.
+
+
+
+
+ When overridden in a derived class, sets the
+ with information about the exception.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is a null reference ( in Visual Basic).
+
+
+
+ Gets the SQL that caused the exception
+
+ The SQL that caused the exception.
+
+
+
+ Called by the AdoTemplate class to allow implementations
+ to set any necessary parameters on the command object.
+ The CommandType and CommandText will have already been supplied.
+
+ Mark Pollack (.NET)
+
+
+
+ Called by the AdoTemplate class to allow implementations
+ to set any necessary properties on the DbDataAdapter object.
+
+
+
For example, this callback can be used to set the
+ AcceptChangesDuringFill property, register an event handler
+ for the FillErrors event, set update batch sizes if your provider
+ supports such functionality, set the ContinueUpdateOnError property,
+ or in .NET 2.0 to set the property AcceptChangesDuringUpdate.
+
+
+ Downcast to the appropriate subtype to access vendor specific
+ functionality.
+
+ The DataAdapter SelectCommand will be already be
+ populated with values for CommandType and Text properties
+ along with Connection/Transaction properties based on the
+ calling transaction context.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Lifecycle callback methods that can be registered when
+ performing Fill operations with AdoTemplate.
+
+
+
+ The methods let you set various properties and invoke
+ methods on the DataSet before and after it gets filled by a DataAdapter.
+ For example, EnforceConstraints, BeginLoadData, and EndLoadData
+ can be called to optimize the loading of large DataSets with
+ many related tables.
+
+
Vendors may expose other propriety methods on their DataSet
+ implementation, downcast to access this specific functionality.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Called before a DataAdapter is used to fill a DataSet
+ the the provided tablename.
+
+ The DataSet to be filled with a DataTable
+ The table collection to be filled
+
+
+
+ Called after a DataAdapter is used to fill a DataSet
+ the the provided tablename.
+
+ The DataSet to be filled with a DataTable
+ The table collection to be filled
+
+
+
+ One of the central callback interfaces used by the AdoTemplate class
+ This interface creates a IDbCommand. Implementations are responsible
+ for configuring the created command with command type, command text and
+ any necessary parameters.
+
+ Mark Pollack (.NET)
+
+
+
+ Creates a IDbCommand.
+
+ The IDbProvider reference that can be used to create the command in a
+ provider independent manner. The provider supplied is the same as used in configuration of AdoTemplate.
+
+
+
+
+ Helper class that can efficiently create multiple IDbCommand
+ objects with different parameters based on a SQL statement and a single
+ set of parameter declarations.
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ This interface creates a IDbDataAdapterCommand.
+ Implementations are responsible
+ for configuring the created command with appropriate
+ select and actions commands along with their parameters.
+
+
+ Generally used to to support the DataSet functionality in
+ the Spring.Data.Objects namespace.
+
+ Mark Pollack (.NET)
+
+
+
+ Creates the data adapter.
+
+ A new IDbDataAdapter instance
+
+
+
+ Exception thrown when a result set has been accessed in an invalid fashion.
+
+ Mark Pollack (.NET)
+
+
+
+ SQL that led to the problem
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+ The inner exception.
+
+
+
+ Initializes a new instance of the class.
+
+ name of the current task.
+ The offending SQL statment
+ The root 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.
+
+
+
+
+ When overridden in a derived class, sets the
+ with information about the exception.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is a null reference ( in Visual Basic).
+
+
+
+ Gets the SQL that caused the exception
+
+ The SQL that caused the exception.
+
+
+
+ Callback to process each row of data in an AdoOperation's Query method.
+
+
+ Implementations of this interface perform the actual work of extracting
+ results. In contrast to a IResultSetExtractor, a IRowCallback object is typically
+ stateful. It keeps the result state within the object, to be available
+ for later inspection.
+
+
+
+
+
+ Implementations must implement this method to process each row of data
+ in the data reader.
+
+
+ This method should not advance the cursor by calling Read()
+ on IDataReader but only extract the current values. The
+ caller does not need to care about closing the reader, command, connection, or
+ about handling transactions: this will all be handled by
+ Spring's AdoTemplate
+
+ An active IDataReader instance
+ The result object
+
+
+
+ Callback delegate to process all result sets and row in an
+ AdoTemplate query method.
+
+
+ Implementations of this delegate perform the work
+ of extracting results but don't need worry about managing
+ ADO.NET resources, such as closing the reader, or transaction management.
+
+ The IDataReader to extract data from.
+ Implementations should not close this: it will be closed
+ by the AdoTemplate.
+ An arbitrary result object or null if none.
+
+
+
+ Callback delegate to process each row of data in a result set to an object.
+
+ The IDataReader to map
+ the number of the current row.
+ An abrirary object, typically derived from data
+ in the result set.
+
+
+
+ Exception thrown when we can't classify a SQLException into
+ one of our generic data access exceptions.
+
+ Mark Pollack (.NET)
+
+
+
+ SQL that led to the problem
+
+
+
+
+ The error code, if available, that was unable to be categorized.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+
+
+
+ Initializes a new instance of the class.
+
+ A message about the exception.
+ The inner exception.
+
+
+
+ Initializes a new instance of the class.
+
+ name of the current task.
+ the underlying error code that could not be translated
+ The offending SQL statment
+ The root 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.
+
+
+
+
+ When overridden in a derived class, sets the
+ with information about the exception.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is a null reference ( in Visual Basic).
+
+
+
+ Return the underlying error code if available from the underlying provider.
+
+
+
+
+ Return the SQL that resulted in this exception.
+
+
+
+
+ IObjectDefinitionParser implementation that allows users to easily configure all the
+ infrastructure objects required to enable attribute-driven transction demarcation.
+
+ Rob Harrop
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ The 'proxy-target-type' attribute
+
+
+
+
+ The 'order' property/attribute
+
+
+
+
+ Central template method to actually parse the supplied XmlElement
+ into one or more IObjectDefinitions.
+
+ The element that is to be parsed into one or more s
+ The the object encapsulating the current state of the parsing process;
+ provides access to a
+
+ The primary IObjectDefinition resulting from the parsing of the supplied XmlElement
+
+
+
+
+ Configures the auto proxy creator.
+
+ The parser context.
+ The element.
+
+
+
+ Gets a value indicating whether an ID should be generated instead of read
+ from the passed in XmlElement.
+
+ true if should generate id; otherwise, false.
+ Note that this flag is about always generating an ID; the parser
+ won't even check for an "id" attribute in this case.
+
+
+
+
+ The for the <tx:advice> tag.
+
+ Rob Harrop
+ Juergen Hoeller
+ Adrian Colyer
+ Mark Pollack (.NET)
+
+
+
+ NamespaceParser allowing for the configuration of
+ declarative transaction management using either XML or using attributes.
+
+ This namespace handler is the central piece of functionality in the
+ Spring transaction management facilities and offers two appraoches
+ to declaratively manage transactions.
+
+ One approach uses transaction semantics defined in XML using the
+ <tx:advice> elements, the other uses attributes
+ in combination with the <tx:annotation-driven> element.
+ Both approached are detailed in the Spring reference manual.
+
+
+
+
+ Register the for the 'advice' and
+ 'attribute-driven' tags.
+
+
+
+
+ This is a utility class to help in parsing the transaction namespace
+
+ Mark Pollack
+
+
+
+ The transaction manager attribute
+
+
+
+
+ The source of transaction metadata
+
+
+
+
+ The property asociated with the transaction manager xml element
+
+
+
+
+ Abstract implementation of
+
+ that caches attributes for methods, and implements a default fallback policy.
+
+
+
+ The default fallback policy applied by this class is:
+
+
+ most specific method
+
+
+ target class attribute
+
+
+ declaring method
+
+
+ declaring class
+
+
+
+
+ Defaults to using class's transaction attribute if none is associated
+ with the target method. Any transaction attribute associated with the
+ target method completely overrides a class transaction attribute.
+
+
+ This implementation caches attributes by method after they are first used.
+ If it's ever desirable to allow dynamic changing of transaction attributes
+ (unlikely) caching could be made configurable. Caching is desirable because
+ of the cost of evaluating rollback rules.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Interface used by
+ to source transaction attributes.
+
+
+
+ Implementations know how to source transaction attributes, whether from configuration,
+ metadata attributes at source level, or anywhere else.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Return the for this
+ method.
+
+ The method to check.
+
+ The target . May be null, in which case the declaring
+ class of the supplied must be used.
+
+
+ A or
+ null if the method is non-transactional.
+
+
+
+
+ Canonical value held in cache to indicate no transaction attibute was found
+ for this method, and we don't need to look again.
+
+
+
+
+ Cache of s, keyed by method and target class.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+ This is an class, and as such exposes no public constructors.
+
+
+
+
+
+ Subclasses should implement this to return all attributes for this method.
+ May return null.
+
+
+ We need all because of the need to analyze rollback rules.
+
+ The method to retrieve attributes for.
+ The transactional attributes associated with the method.
+
+
+
+ Subclasses should implement this to return all attributes for this class.
+ May return null.
+
+
+ The to retrieve attributes for.
+
+
+ All attributes associated with the supplied .
+
+
+
+
+ Return the transaction attribute for this method invocation.
+
+
+ Defaults to the class's transaction attribute if no method
+ attribute is found
+
+ method for the current invocation. Can't be null
+ target class for this invocation. May be null.
+ for this method, or null if the method is non-transactional
+
+
+
+ Return the transaction attribute, given this set of attributes
+ attached to a method or class. Return null if it's not transactional.
+
+
+ Protected rather than private as subclasses may want to customize
+ how this is done: for example, returning a
+
+ affected by the values of other attributes.
+ This implementation takes into account
+ s, if
+ the TransactionAttribute is a RuleBasedTransactionAttribute.
+
+
+ Attributes attached to a method or class. May be null, in which case a null
+ will be returned.
+
+
+ The configured transaction attribute, or null
+ if none was found.
+
+
+
+
+ Does the supplied satisfy this matcher?
+
+
+
+ Must be implemented by a derived class in order to specify matching
+ rules.
+
+
+ The candidate method.
+
+ The target (may be ,
+ in which case the candidate must be taken
+ to be the 's declaring class).
+
+
+ if this this method matches statically.
+
+
+
+
+ Implementation of that uses
+ s.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+ implementation.
+
+
+ We need all because of the need to analyze rollback rules.
+
+ The method to retrieve attributes for.
+ The transactional attributes associated with the method.
+
+
+
+
+ implementation.
+
+
+ The to retrieve attributes for.
+
+
+ All attributes associated with the supplied .
+
+
+
+
+ Transaction attribute approach to rolling back on all exceptions, no other
+ exceptions by default.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Default implementation of the
+ interface, offering object-style configuration and sensible default values.
+
+
+
+ Base class for both and
+ .
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Interface for classes that define transaction properties. Base interface for
+ .
+
+
+
+ Note that isolation level, timeout and read-only settings will only
+ get applied when starting a new transaction. As only
+ and
+ can actually cause that, it doesn't make sense
+ to specify any of those settings else. Furthermore, not all transaction
+ managers will support those features and thus throw respective exceptions
+ when given non-default values.
+
+
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Return the propagation behavior of type
+ .
+
+
+
+
+ Return the isolation level of type .
+
+
+
+ Only makes sense in combination with
+ and
+ .
+
+
+ Note that a transaction manager that does not support custom isolation levels
+ will throw an exception when given any other level than
+ .
+
+
+
+
+
+ Return the transaction timeout.
+
+
+
+ Must return a number of seconds, or -1.
+ Only makes sense in combination with
+ and
+ .
+ Note that a transaction manager that does not support timeouts will
+ throw an exception when given any other timeout than -1.
+
+
+
+
+
+ Get whether to optimize as read-only transaction.
+
+
+
+ This just serves as hint for the actual transaction subsystem,
+ it will not necessarily cause failure of write accesses.
+
+
+ Only makes sense in combination with
+ and
+ .
+
+
+ A transaction manager that cannot interpret the read-only hint
+ will not throw an exception when given ReadOnly=true.
+
+
+
+
+
+ Return the name of this transaction. Can be null.
+
+
+ This will be used as a transaction name to be shown in a
+ transaction monitor, if applicable. In the case of Spring
+ declarative transactions, the exposed name will be the fully
+ qualified type name + "." method name + assembly (by default).
+
+
+
+
+ Gets the enterprise services interop option.
+
+ The enterprise services interop option.
+
+
+
+ The default transaction timeout.
+
+
+
+
+ Prefix for Propagation settings.
+
+
+
+
+ Prefix for IsolationLevel settings.
+
+
+
+
+ Prefix for transaction timeout values in description strings.
+
+
+
+
+ Marker for read-only transactions in description strings.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class
+ with the supplied
+ behaviour.
+
+
+ The desired behavior.
+
+
+
+
+ An override of the default method.
+
+ The to compare to.
+ True if the objects are equal.
+
+
+
+ An override of the default method that returns the
+ hashcode of the
+
+ property.
+
+
+ The hashcode of the
+
+ property.
+
+
+
+
+ An override of the default method that returns a string
+ representation of the
+
+ property.
+
+
+ A string representation of the
+
+ property.
+
+
+
+
+ Gets / Sets the propagation
+ behavior.
+
+
+
+
+ Return the isolation level of type .
+
+
+
+ Only makes sense in combination with
+ and
+ .
+
+
+ Note that a transaction manager that does not support custom isolation levels
+ will throw an exception when given any other level than
+ .
+
+
+
+
+
+ Return the transaction timeout.
+
+
+
+ Must return a number of seconds, or -1.
+ Only makes sense in combination with
+ and
+ .
+ Note that a transaction manager that does not support timeouts will
+ throw an exception when given any other timeout than -1.
+
+
+
+
+
+ Get whether to optimize as read-only transaction.
+
+
+
+ This just serves as hint for the actual transaction subsystem,
+ it will not necessarily cause failure of write accesses.
+
+
+ Only makes sense in combination with
+ and
+ .
+
+
+ A transaction manager that cannot interpret the read-only hint
+ will not throw an exception when given ReadOnly=true.
+
+
+
+
+
+ Return the name of this transaction. Can be null.
+
+
+
+ This will be used as a transaction name to be shown in a
+ transaction monitor, if applicable. In the case of Spring
+ declarative transactions, the exposed name will be the fully
+ qualified type name + "." method name + assembly (by default).
+
+
+
+
+ Gets the enterprise services interop option.
+
+ The enterprise services interop option.
+
+
+
+ Returns a representation of the
+
+ property.
+
+
+
+
+ This interface adds a
+
+ specification to .
+
+ Griffin Caprio (.NET)
+
+
+
+ Decides if rollback is required for the supplied .
+
+ The to evaluate.
+ True if the exception causes a rollback, false otherwise.
+
+
+
+ Prefix for rollback-on-exception rules in description strings.
+
+
+
+
+ Prefix for commit-on-exception rules in description strings.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+
+ Creates a new instance of the
+
+ class, setting the propagation behavior to the supplied value.
+
+
+ The desired transaction propagation behaviour.
+
+
+
+
+ Decides if rollback is required for the supplied .
+
+
+
+ The default behavior is to rollback on any exception.
+ Consistent with 's behavior.
+
+
+ The to evaluate.
+ True if the exception causes a rollback, false otherwise.
+
+
+
+ Return a description of this transaction attribute.
+
+
+
+ The format matches the one used by the
+ ,
+ to be able to feed any result into a
+ instance's properties.
+
+
+
+
+
+ Advisor driven by a ,
+ used to exclude a general advice from methods that
+ are non-transactional.
+
+
+
+ To put it another way, use this advisor when you would like to associate other AOP
+ advice based on the pointcut specified by declarative transaction demarcation,
+ attibute based or otherwise.
+
+
+ Because the AOP framework caches advice calculations, this is normally
+ faster than just letting the
+ run and find out itself that it has no work to do.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Tests the input method to see if it's covered by the advisor.
+
+ The method to match.
+ The to match against.
+
+ True if the supplied is covered by the advisor.
+
+
+
+
+ ITransactionAttribute that delegates all calls to a give target attribute except for the
+ name, which is specified in the constructor.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The target attribute.
+ The identification.
+
+
+
+ Decides if rollback is required for the supplied .
+
+ The to evaluate.
+
+ True if the exception causes a rollback, false otherwise.
+
+
+
+
+ Return a description of this transaction attribute.
+
+
+
+ The format matches the one used by the
+ ,
+ to be able to feed any result into a
+ instance's properties.
+
+
+
+
+
+ Return the propagation behavior of type
+ .
+
+
+
+
+
+ Return the isolation level of type .
+
+
+
+
+ Only makes sense in combination with
+ and
+ .
+
+
+ Note that a transaction manager that does not support custom isolation levels
+ will throw an exception when given any other level than
+ .
+
+
+
+
+
+ Return the transaction timeout.
+
+
+
+
+ Must return a number of seconds, or -1.
+ Only makes sense in combination with
+ and
+ .
+ Note that a transaction manager that does not support timeouts will
+ throw an exception when given any other timeout than -1.
+
+
+
+
+
+ Get whether to optimize as read-only transaction.
+
+
+
+
+ This just serves as hint for the actual transaction subsystem,
+ it will not necessarily cause failure of write accesses.
+
+
+ Only makes sense in combination with
+ and
+ .
+
+
+ A transaction manager that cannot interpret the read-only hint
+ will not throw an exception when given ReadOnly=true.
+
+
+
+
+
+ Return the name of this transaction.
+
+
+
+ The exposed name will be the fully
+ qualified type name + "." method name + assembly (by default).
+
+
+
+
+ Gets the enterprise services interop option.
+
+ The enterprise services interop option.
+
+
+
+ Very simple implementation of
+ which will always return the same
+ for all methods fed to it.
+
+
+
+ The
+ may be specified, but will otherwise default to PROPAGATION_REQUIRED. This may be
+ used in the cases where you want to use the same transaction attribute with all
+ methods being handled by a transaction interceptor.
+
+
+ Colin Sampaleanu
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+
+ Return the for this
+ method.
+
+ The method to check.
+
+ The target . May be null, in which case the declaring
+ class of the supplied must be used.
+
+
+ A or
+ null if the method is non-transactional.
+
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents the current .
+
+
+
+ A that represents the current .
+
+ 2
+
+
+
+ Allows a transaction attribute to be specified, using the
+ form, for example, "PROPAGATION_REQUIRED".
+
+
+
+
+ Simple implementation of the
+ interface that allows attributes to be stored per method in a map.
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Add an attribute for a transactional method.
+
+
+ Method names can end or start with "*" for matching multiple methods.
+
+ The class and method name, separated by a dot.
+ The attribute to be associated with the method.
+
+
+
+ Add an attribute for a transactional method.
+
+
+ Method names can end or start with "*" for matching multiple methods.
+
+ The target interface or class.
+ The mapped method name.
+
+ The attribute to be associated with the method.
+
+
+
+
+ Add an attribute for a transactional method.
+
+ The transactional method.
+
+ The attribute to be associated with the method.
+
+
+
+
+ Does the supplied match the supplied ?
+
+
+ The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches,
+ as well as direct equality. This behaviour can (of course) be overridden in
+ derived classes.
+
+ The method name of the class.
+ The name in the descriptor.
+ True if the names match.
+
+
+
+ Return the for this
+ method.
+
+ The method to check.
+
+ The target . May be null, in which case the declaring
+ class of the supplied must be used.
+
+
+ A or
+ null if the method is non-transactional.
+
+
+
+
+ Set a name/attribute map, consisting of "FQCN.method, AssemblyName" method names
+ (e.g. "MyNameSpace.MyClass.MyMethod, MyAssembly") and ITransactionAttribute
+ instances (or Strings to be converted to instances).
+
+
+
+ The key values of the supplied
+ must adhere to the following form:
+ FQCN.methodName, Assembly.
+
+
+ MyNameSpace.MyClass.MyMethod, MyAssembly
+
+
+
+
+
+ Simple implementation of the
+ that allows attributes to be matched by registered name.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Logger available to subclasses, static for optimal serialization
+
+
+
+
+ Keys are method names; values are ITransactionAttributes
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Enumerate the string/ mapping entries.
+
+
+
+
+ Add a mapping.
+
+
+
+
+ Add a mapping.
+
+
+
+
+ Does the supplied match the supplied ?
+
+
+ The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches,
+ as well as direct equality. Can be overridden in subclasses.
+
+ The method name of the class.
+ The name in the descriptor.
+ True if the names match.
+
+
+
+ Add an attribute for a transactional method.
+
+
+
+ Method names can end with "*" for matching multiple methods.
+
+
+ The transactional method name.
+
+ The attribute to be associated with the method.
+
+
+
+
+ Parses the given properties into a name/attribute map.
+
+
+ Expects method names as keys and string attributes definitions as values,
+ parsable into
+ instances via
+ .
+
+ The properties of the transaction.
+
+
+
+ Return the for this
+ method.
+
+ The method to check.
+
+ The target . May be null, in which case the declaring
+ class of the supplied must be used.
+
+
+ A or
+ null if the method is non-transactional.
+
+
+
+
+ Set a name/attribute map, consisting of method names (e.g. "MyMethod") and
+ instances
+ (or Strings to be converted to ITransactionAttribute instances).
+
+
+
+
+ Parses the given properties into a name/attribute map.
+
+
+ Expects method names as keys and string attributes definitions as values,
+ parsable into
+ instances via
+ .
+
+ The properties of the transaction.
+
+
+
+ Tag class. Its class means it has the opposite behaviour to the
+ superclass.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Rule determining whether or not a given exception (and any subclasses) should
+ cause a rollback.
+
+
+
+ Multiple such rules can be applied to determine whether a transaction should commit
+ or rollback after an exception has been thrown.
+
+
+ Griffin Caprio (.NET)
+
+
+
+ Could hold exception, resolving class name but would always require FQN.
+ This way does multiple string comparisons, but how often do we decide
+ whether to roll back a transaction following an exception?
+
+
+
+
+ Canonical instance representing default behavior for rolling back on
+ all s.
+
+
+
+
+ Creates a new instance of the
+ class
+ for the named .
+
+ The exception name.
+
+
+ As always, the should be the full
+ assembly qualified version.
+
+
+
+
+
+ Creates a new instance of the
+ class
+ for the suplied .
+
+
+
+ The exception class must be or a subclass.
+
+
+ This is the preferred way to construct a
+ ,
+ matching the exception class and subclasses.
+
+
+
+ The class that will trigger a rollback.
+
+
+
+
+ Return the depth to the matching superclass execption .
+
+
+ A return value of 0 means that the matches.
+
+
+ The of exception to find.
+
+
+ Return -1 if there's no match. Otherwise, return depth. Lowest depth wins.
+
+
+
+
+ Return the depth to the matching superclass execption .
+
+
+ A return value of 0 means that the s
+ matches.
+
+
+ The exception object to find.
+
+
+ Return -1 if there's no match. Otherwise, return depth. Lowest depth wins.
+
+
+
+
+ Returns a representation of this instance.
+
+
+ A containing the exception covered by this instance.
+
+
+
+
+ Override of .
+
+ The hashcode of the exception name covered by this instance.
+
+
+
+ Override of .
+
+ The object to compare.
+ True if the input object is equal to this instance.
+
+
+
+ Strongly typed Equals() implementation.
+
+
+ The to compare.
+
+
+ True if the input object is equal to the supplied .
+
+
+
+
+ Returns the name of the exception.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The class that will trigger a rollback.
+
+
+
+
+ The that drives this advisor.
+
+
+
+
+ implementation
+ that works out whether a given exception should cause transaction rollback by applying
+ a number of rollback rules, both positive and negative.
+
+
+ If no rules are relevant to the exception, it behaves like the
+ class
+ (rolling back on runtime exceptions)..
+
+ The
+ creates objects of this class.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+ The desired transaction propagation behaviour.
+
+
+ The rollback rules list for this transaction attribute.
+
+
+
+
+ Creates a new instance of the
+
+ class.
+
+
+
+
+ Will a transaction be rolled back if the supplied
+ is thrown during the lifecycle of a transaction to which this attribute is applied?
+
+ The offending .
+ True if the exception should cause a rollback, false otherwise.
+
+
+
+ Returns a representation of this instance.
+
+
+ A representation of this instance.
+
+
+
+
+ Adds a to this
+ attributes list of rollback rules.
+
+
+ The to add.
+
+
+
+
+ Clears the rollback rules for this attribute.
+
+
+
+
+ Sets the rollback rules list for this transaction attribute.
+
+
+
+
+ Superclass for transaction aspects, such as the AOP Alliance-compatible
+ .
+
+
+
+ This enables the underlying Spring transaction infrastructure to be used
+ to easily implement an aspect for any aspect system.
+
+
+ Subclasses are responsible for calling methods in this class in the correct order.
+
+
+ Uses the Strategy design pattern. A
+ implementation will perform the actual transaction management
+
+
+ A transaction aspect is serializable if its
+ and
+ are serializable.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ The name in thread local storage where the TransactionInfo object is located
+
+
+
+
+ The currently referenced by
+ this aspect
+
+
+
+
+ The currently
+ referenced by this aspect.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Checks that the required properties are set.
+
+
+
+
+ Create a transaction if necessary
+
+ Method about to execute
+ Type that the method is on
+
+ A object,
+ whether or not a transaction was created.
+
+ The
+
+ property on the
+
+ class can be used to tell if there was a transaction created.
+
+
+
+
+
+ Creates the transaction if necessary.
+
+ The source transaction attribute.
+ The joinpoint identification.
+ Transaction Info for declarative transaction management.
+
+
+
+ Identifies the method by providing the qualfied method name.
+
+ The method info.
+ qualified mehtod name.
+
+
+
+ Execute after the successful completion of call, but not after an exception was handled.
+
+
+
+ Do nothing if we didn't create a transaction.
+
+
+
+ The
+
+ about the current transaction.
+
+
+
+
+ Handle a exception, closing out the transaction.
+
+
+
+ We may commit or roll back, depending on our configuration.
+
+
+
+ The
+
+ about the current transaction.
+
+ The encountered.
+
+
+
+ Resets the
+
+ for this thread.
+
+
+
+ Call this in all cases: exceptions or normal return.
+
+
+
+ The
+
+ about the current transaction. May be null.
+
+
+
+
+ Gets and sets the for
+ this aspect.
+
+
+
+
+ Gets and sets the
+ for
+ this aspect.
+
+
+
+
+ Returns the
+ of the current method invocation.
+
+
+ Mainly intended for code that wants to set the current transaction
+ rollback-only but not throw an application exception.
+
+
+ If the transaction info cannot be found, because the method was invoked
+ outside of an AOP invocation context.
+
+
+
+
+ Subclasses can use this to return the current
+ .
+
+
+ Only subclasses that cannot handle all operations in one method
+ need to use this mechanism to get at the current
+ .
+ An around advice such as an AOP Alliance
+ can hold a reference to the
+
+ throughout the aspect method.
+ A
+ will be returned even if no transaction was created. The
+
+ property can be used to query this.
+
+
+ If no transaction has been created by an aspect.
+
+
+
+
+ Set properties with method names as keys and transaction attribute
+ descriptors (parsed via ) as values:
+ e.g. key = "MyMethod", value = "PROPAGATION_REQUIRED,readOnly".
+
+
+
+ Method names are always applied to the target class, no matter if defined in an
+ interface or the class itself.
+
+
+ Internally, a
+
+ will be created from the given properties.
+
+
+
+
+
+ Opaque object used to hold transaction information.
+
+
+
+ Subclasses must pass it back to method on this class, but not see its internals.
+
+
+
+
+
+ Creates a new instance of the
+
+ class for the supplied .
+
+ The transaction attributes to associate with any transaction.
+ The info for diagnostic display of joinpoint
+
+
+
+ Binds this
+
+ instance to the thread local storage variable for the current thread and
+ backs up the existing
+
+ object for the current thread.
+
+
+
+
+ Restores the previous
+
+ object to the current thread.
+
+
+
+
+ Does this instance currently have a transaction?
+
+ True if this instance has a transaction.
+
+
+
+ Gets and sets the for this object.
+
+
+
+
+ Gets the current
+ for this
+
+ object.
+
+
+
+
+ Gets the joinpoint identification.
+
+ The joinpoint identification.
+
+
+
+ .NET Attribute for describing transactional behavior of methods in a class.
+
+ This attribute type is generally directly comparable
+ to Spring's class and
+ in fact will
+ directly convert the data to a
+ so that Spring's transaction support code does not have to know about
+ attributes. If no rules are relevant to the exception it will be treaded
+ like DefaultTransactionAttribute, (rolling back on all exceptions).
+
+ The default property values are TransactionPropagation.Required, IsolationLevel.ReadCommitted,
+ DefaultTransactionDefinition.TIMEOUT_DEFAULT (can be changed, by default is the default
+ value of the underlying transaction subsystem)
+ ReadOnly = false, and Type.EmtptyTypes specified for Rollbackfor and NoRollbackFor exception
+ types.
+
+
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The transaction propagation.
+
+
+
+ Initializes a new instance of the class.
+
+ The transaction propagation.
+ The isolation level.
+
+
+
+ Initializes a new instance of the class.
+
+ The isolation level.
+
+
+
+ Gets the transaction propagation.
+
+ Defaults to TransactionPropagation.Required
+ The transaction propagation.
+
+
+
+ Gets the isolation level.
+
+ Defaults to IsolationLevel.Unspecified
+ The isolation level.
+
+
+
+ Gets or sets the timeout.
+
+ Defaults to the default timeout of the underlying transaction system.
+ The timeout.
+
+
+
+ Gets or sets a value indicating whether the transaction is readonly.
+
+ Defaults to false
+ true if read-only; otherwise, false.
+
+
+
+ Gets or sets the zero or more exception types which
+ indicating which exception types must cause a transaction
+ rollback.
+
+ This is the preferred way to construct a rollback rule,
+ matching the exception class and subclasses.
+ The rollback types.
+
+
+
+ Gets or sets zero or more exceptions types which
+ indicationg which exception type must not
+ cause a transaction rollback.
+
+ This is the preferred way to construct a rollback rule,
+ matching the exception type.
+ The no rollback for.
+
+
+
+ Gets or sets the enterprise services interop option.
+
+ The enterprise services interop option.
+
+
+
+ Type converter for
+ objects.
+
+
+ Takes s of the form
+
where only propagation code is required. For example:
+
PROPAGATION_MANDATORY,ISOLATION_DEFAULT
+
+ The tokens can be in any order. Propagation and isolation codes
+ must use the names of the values in the
+ enumeration. Timeout values are in seconds. If no timeout is specified, the transaction
+ manager will apply a default timeout specific to the particular transaction manager.
+
+
+ A "+" before an exception name substring indicates that transactions should commit even
+ if this exception is thrown; a "-" that they should roll back.
+
+
+ Mark Pollack
+
+
+
+ Returns whether this converter can convert an object of the given type to an ITransactionAttribute, using the specified context.
+
+ An that provides a format context.
+ A that represents the type you want to convert from.
+
+ true if this converter can perform the conversion; otherwise, false.
+
+
+
+
+ Converts from string to ITransactionAttribute
+
+ The context.
+ The culture.
+ The string value to convert
+ An ITransactionAttribute instance
+
+
+
+ Type converter for
+ objects.
+
+
+ Takes s of the form
+
where only propagation code is required. For example:
+
PROPAGATION_MANDATORY,ISOLATION_DEFAULT
+
+ The tokens can be in any order. Propagation and isolation codes
+ must use the names of the values in the
+ enumeration. Timeout values are in seconds. If no timeout is specified, the transaction
+ manager will apply a default timeout specific to the particular transaction manager.
+
+
+ A "+" before an exception name substring indicates that transactions should commit even
+ if this exception is thrown; a "-" that they should roll back.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Parses the input properties string into a valid
+ instance
+
+
+ The string defining the transactional properties.
+
+
+
+
+ Gets the
+ from this editor.
+
+
+
+
+ Advisor driven by a , used to include
+ a for methods that
+ are transactional.
+
+
+
+ Because the AOP framework caches advice calculations, this is normally
+ faster than just letting the
+ run and find out itself that it has no work to do.
+
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+ This is an abstract class, and as such has no publicly
+ visible constructors.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The pre-configured transaction interceptor.
+
+
+
+
+ Tests the input method to see if it's covered by the advisor.
+
+ The method to match.
+ The to match against.
+
+ True if the supplied is covered by the advisor.
+
+
+
+
+ Sets the tx attribute source.
+
+ The transaction interceptor.
+
+
+
+ Sets the transaction interceptor.
+
+ The transaction interceptor.
+
+
+
+ Editor that can convert values into
+ instances.
+
+
+ The transaction attribute string must be parseable by the
+ in this package.
+
+ Strings must be specified in the following syntax:
+ FQCN.methodName=<transaction attribute string> (sans <>).
+
+
+ ExampleNamespace.ExampleClass.MyMethod=PROPAGATION_MANDATORY,ISOLATION_DEFAULT
+
+
+ The specified class must be the one where the methods are defined; in the case of
+ implementing an interface, the interface class name must be specified.
+
+
+ This will register all overloaded methods for a given name. Does not support explicit
+ registration of certain overloaded methods. Supports wildcard style mappings (in
+ the form "xxx*"), e.g. "Notify*" for "Notify" and "NotifyAll".
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Parses the input properties into a valid
+
+ instance
+
+ The properties string to be parsed.
+
+
+
+ Gets the
+ from this instance.
+
+
+
+
+ Internal class to parse property values.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+ The property values to be parsed.
+
+
+
+ Indexer to return values based on index value.
+
+
+
+
+ Returns the collection of keys for properties.
+
+
+
+
+ An AOP Alliance providing
+ declarative transaction management using the common Spring.NET transaction infrastructure.
+
+
+
+ That class contains the necessary calls into Spring.NET's underlying
+ transaction API: subclasses such as this are responsible for calling
+ superclass methods such as
+
+ in the correct order, in the event of normal invocation return or an exception.
+
+
+ s are thread-safe.
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ AOP Alliance invoke call that handles all transaction plumbing.
+
+
+ The method that is to execute in the context of a transaction.
+
+ The return value from the method invocation.
+
+
+
+ Proxy factory object for simplified declarative transaction handling.
+
+
+
+ Alternative to the standard AOP
+ with a .
+
+
+ This class is intended to cover the typical case of declarative
+ transaction demarcation: namely, wrapping a (singleton) target object with a
+ transactional proxy, proxying all the interfaces that the target implements.
+
+
+ Internally, a
+ instance is used, but the user of this class does not have to care. Optionally, an
+ can be specified to cause conditional invocation of
+ the underlying .
+
+
+ The
+
+ and
+
+ properties can be set to add additional interceptors to the mix.
+
+
+ Juergen Hoeller
+ Dmitriy Kopylenko
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Returns the object wrapped by this proxy factory.
+
+ The target object proxy.
+
+
+
+ Method run after all the properties have been set for this object.
+ Responsible for actual proxy creation.
+
+
+
+
+ Set the target or .
+
+
+ The target. If this is an implementation of the
+ interface, it is used as our ; otherwise it is
+ wrapped in a .
+
+ An for this object.
+
+
+
+ Set the transaction manager for this factory.
+
+
+ It is this instance that will perform actual transaction management: this class is
+ just a way of invoking it.
+
+
+
+
+ Set the target object, i.e. the object to be wrapped with a transactional proxy.
+
+
+
+ The target may be any object, in which case a
+ will
+ be created. If it is a , no wrapper
+ is created: this enables the use of a pooling
+ or prototype .
+
+
+
+
+
+ Specify the set of interfaces being proxied.
+
+
+
+ If left null (the default), the AOP infrastructure works
+ out which interfaces need proxying by analyzing the target,
+ proxying all of the interfaces that the target object implements.
+
+
+
+
+
+ Set properties with method names as keys and transaction attribute
+ descriptors as values.
+
+
+
+ The various transaction attribute descriptors are parsed via
+ an instance of the
+ class.
+
+
+ Method names are always applied to the target class, no matter if defined in an
+ interface or the class itself.
+
+
+ Internally, a
+
+ will be created from the given properties.
+
+
+
+
+ An example string (method name and transaction attributes) might be:
+
+
+ key = "myMethod", value = "PROPAGATION_REQUIRED,readOnly".
+
+
+
+
+
+ Set the transaction attribute source which is used to find transaction
+ attributes.
+
+
+
+ If specifying a property value, an
+ appropriate
+ implementation will create a
+
+ from the value.
+
+
+
+
+
+ Set a pointcut, i.e an object that can cause conditional invocation
+ of the
+ depending on method and attributes passed.
+
+
+
+ Additional interceptors are always invoked.
+
+
+
+
+
+ Set additional interceptors (or advisors) to be applied before the
+ implicit transaction interceptor.
+
+
+
+
+ Set additional interceptors (or advisors) to be applied after the
+ implicit transaction interceptor.
+
+
+
+ Note that this is just necessary if you rely on those interceptors in general.
+
+
+
+
+
+ Specify the to use.
+
+ The default instance is the global AdvisorAdapterRegistry.
+
+
+
+ Returns the object for this proxy factory.
+
+
+
+
+ Is this object a singleton? Always returns true in this implementation.
+
+
+
+
+ Default implementation of the interface,
+ used by .
+
+
+
+ Holds all status information that
+
+ needs internally, including a generic transaction object determined by
+ the concrete transaction manager implementation.
+
+
+ Supports delegating savepoint-related methods to a transaction object
+ that implements the interface.
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Representation of the status of a transaction,
+ consisting of a transaction object and some status flags.
+
+
+
+ Transactional code can use this to retrieve status information,
+ and to programmatically request a rollback (instead of throwing
+ an exception that causes an implicit rollback).
+
+
+ Derives from the interface to provide access
+ to savepoint management facilities. Note that savepoint management
+ is just available if the actual transaction manager supports it.
+
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Set the transaction rollback-only. This instructs the transaction manager that the only possible outcome of
+ the transaction may be a rollback, proceeding with the normal application
+ workflow though (i.e. no exception).
+
+
+
+ For transactions managed by a or
+ .
+ An alternative way to trigger a rollback is throwing an transaction exception.
+
+
+
+
+
+ Returns true if the transaction is new, else false if participating
+ in an existing transaction.
+
+
+
+
+ Return whether the transaction has been marked as rollback-only,
+ (either by the application or by the transaction infrastructure).
+
+
+
+
+ Gets the current transaction object.
+
+
+ Returns the current transaction object for a given connection.
+
+ Used to associate with the property.
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+ The underlying transaction object that can hold state for the internal
+ transaction implementation.
+ True if the transaction is new, else false if participating in an existing transaction.
+ True if a new transaction synchronization has been opened for the given
+ .
+ True if the transaction is read only.
+ if set to true, enable debug log in tx managers.
+ The suspended resources for the given .
+
+
+
+ Determines whether there is an actual transaction active.
+
+
+ true if there is an actual transaction active; otherwise, false.
+
+
+
+
+ Set the transaction rollback-only. This instructs the transaction manager that the only possible outcome of
+ the transaction may be a rollback, proceeding with the normal application
+ workflow though (i.e. no exception).
+
+
+
+ For transactions managed by a or
+ .
+ An alternative way to trigger a rollback is throwing an transaction exception.
+
+
+
+
+
+ This implementation delegates to the underlying transaction object
+ (if it implements the interface)
+ to create a savepoint.
+
+
+ If the underlying transaction does not support savepoints.
+
+
+
+
+ This implementation delegates to the underlying transaction object
+ (if it implements the interface)
+ to rollback to the supplied .
+
+ The savepoint to rollback to.
+
+
+
+ This implementation delegates to the underlying transaction object
+ (if it implements the interface)
+ to release the supplied .
+
+ The savepoint to release.
+
+
+
+ Create a savepoint and hold it for the transaction.
+
+
+ If the underlying transaction does not support savepoints.
+
+
+
+
+ Roll back to the savepoint that is held for the transaction.
+
+
+ If no save point has been created.
+
+
+
+
+ Release the savepoint that is held for the transaction.
+
+
+ If no save point has been created.
+
+
+
+
+ Gets a value indicating whether the progress of this transaction is debugged.
+ This is used by AbstractPlatformTransactionManager as an optimization, to prevent repeated
+ calls to log.IsDebug. Not really intended for client code.
+ true if debug; otherwise, false.
+
+
+
+ Returns the underlying transaction object.
+
+
+
+
+ Gets or sets a value indicating whether the Transaction is completed, that is commited or rolled back.
+
+ true if completed; otherwise, false.
+
+
+
+ Returns true if the underlying transaction is read only.
+
+
+
+
+ Flag indicating if a new transaction synchronization has been opened
+ for this transaction.
+
+
+
+
+ Returns suspended resources for this transaction.
+
+
+
+
+ Gets and sets the savepoint for the current transaction, if any.
+
+
+
+
+ Returns a flag indicating if the transaction has a savepoint.
+
+
+
+
+ Return the underlying transaction as a
+ , if possible.
+
+
+ If the underlying transaction does not support savepoints.
+
+
+
+
+ Return true if the underlying transaction implements the
+ interface.
+
+
+
+
+ Returns true if the transaction is new, else false if participating
+ in an existing transaction.
+
+
+
+
+ Determine the rollbackOnly flag via checking both this
+
+ and the transaction object, provided that the latter implements the
+ interface.
+
+ The property can only be set to true.
+
+
+
+ Determine the rollback-only flag via checking this TransactionStatus. Will only
+ return true if the application set the property RollbackOnly to true on this
+ TransactionStatus object.
+
+ true if [local rollback only]; otherwise, false.
+
+
+
+ Callback interface for transactional code.
+
+
+
To be used with 's Execute
+ methods.
+
+
+ Typically used to gather various calls to transaction-unaware low-level
+ services into a higher-level method implementation with transaction
+ demarcation.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Gets called by TransactionTemplate.Execute within a
+ transaction context.
+
+ The associated transaction status.
+ A result object or null.
+
+
+
+ Interface specifying basic transaction exectuion operations.
+
+
+ Implemented by . Not often used directly,
+ but a useful option to enhance testability, as it can easily be mocked or stubbed.
+
+ Juergen Hoeller
+ Mark Pollac (.NET)
+
+
+
+ Executes the the action specified by the given delegate callback within a transaction.
+
+ Allows for returning a result object created within the transaction, that is,
+ a domain object or a collection of domain objects. An exception thrown by the callback
+ is treated as a fatal exception that enforces a rollback. Such an exception gets
+ propagated to the caller of the template.
+
+ The delegate that specifies the transactional action.
+ A result object returned by the callback, or null if one
+
+ In case of initialization or system errors.
+
+
+
+
+ Executes the action specified by the given callback object within a transaction.
+
+ Allows for returning a result object created within the transaction, that is,
+ a domain object or a collection of domain objects. An exception thrown by the callback
+ is treated as a fatal exception that enforces a rollback. Such an exception gets
+ propagated to the caller of the template.
+
+ The callback object that specifies the transactional action.
+ A result object returned by the callback, or null if one
+
+ In case of initialization or system errors.
+
+
+
+
+ Simple convenience class for TransactionCallback implementation.
+ Allows for implementing a DoInTransaction version without result,
+ i.e. without the need for a return statement.
+
+ Mark Pollack (.NET)
+
+
+
+ Gets called by TransactionTemplate.execute within a transactional context
+ when no return value is required.
+
+ The status.
+
+ Does not need to care about transactions itself, although it can retrieve
+ and influence the status of the current transaction via the given status
+ object, e.g. setting rollback-only.
+ A RuntimeException thrown by the callback is treated as application
+ exception that enforces a rollback. An exception gets propagated to the
+ caller of the template.
+
+
+
+
+ Gets called by TransactionTemplate.Execute within a
+ transaction context.
+
+ The associated transaction status.
+ a result object or null
+
+
+
+ Callback delegate for performing actions within a transactional context.
+
+
+
To be used with 's Execute
+ methods.
+
+
+ Typically used to gather various calls to transaction-unaware low-level
+ services into a higher-level method implementation with transaction
+ demarcation.
+
+
+ The status of the transaction, can be used to
+ trigger a rollback the current transaction by settings its
+ RollbackOnly property to true.
+ A result object or null.
+
+
+
+ Internal class that manages resources and transaction synchronizations per thread.
+
+
+ Supports one resource per key without overwriting, i.e. a resource needs to
+ be removed before a new one can be set for the same key.
+ Supports a list of transaction synchronizations if synchronization is active.
+
+ Resource management code should check for thread-bound resources via GetResource().
+ It is normally not supposed
+ to bind resources to threads, as this is the responsiblity of transaction managers.
+ A further option is to lazily bind on first use if transaction synchronization
+ is active, for performing transactions that span an arbitrary number of resources.
+
+
+ Transaction synchronization must be activated and deactivated by a transaction
+ manager via
+ InitSynchronization
+ and
+ ClearSynchronization.
+ This is automatically supported by
+ .
+
+
+ Resource management code should only register synchronizations when this
+ manager is active, and perform resource cleanup immediately else.
+ If transaction synchronization isn't active, there is either no current
+ transaction, or the transaction manager doesn't support synchronizations.
+
+ Note that this class uses following naming convention for the
+ named 'data slots' for storage of thread local data, 'Spring.Transaction:Name'
+ where Name is either
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Check if there is a resource for the given key bound to the current thread.
+
+ key to check
+ if there is a value bound to the current thread
+
+
+
+ Retrieve a resource for the given key that is bound to the current thread.
+
+ key to check
+ a value bound to the current thread, or null if none.
+
+
+
+ Bind the given resource for teh given key to the current thread
+
+ key to bind the value to
+ value to bind
+
+
+
+ Unbind a resource for the given key from the current thread
+
+ key to check
+ the previously bound value
+ if there is no value bound to the thread
+
+
+
+ Activate transaction synchronization for the current thread.
+
+
+ Called by transaction manager at the beginning of a transaction.
+
+
+ If synchronization is already active.
+
+
+
+
+ Deactivate transaction synchronization for the current thread.
+
+
+ Called by transaction manager on transaction cleanup.
+
+
+ If synchronization is not active.
+
+
+
+
+ Clears the entire transaction synchronization state for the current thread, registered
+ synchronizations as well as the various transaction characteristics.
+
+
+
+
+ Register a new transaction synchronization for the current thread.
+
+
+ Typically called by resource management code.
+
+
+ If synchronization is not active.
+
+
+
+
+ Return all resources that are bound to the current thread.
+
+ Main for debugging purposes. Resource manager should always
+ invoke HasResource for a specific resource key that they are interested in.
+
+ IDictionary with resource keys and resource objects or empty
+ dictionary if none is bound.
+
+
+
+ Return an unmodifiable list of all registered synchronizations
+ for the current thread.
+
+
+ A list of
+ instances.
+
+
+ If synchronization is not active.
+
+
+
+
+ Return if transaction synchronization is active for the current thread.
+
+
+ Can be called before
+ InitSynchronization
+ to avoid unnecessary instance creation.
+
+
+
+
+ Gets or sets a value indicating whether the
+ current transaction is read only.
+
+
+ Called by transaction manager on transaction begin and on cleanup.
+ Return whether the current transaction is marked as read-only.
+ To be called by resource management code when preparing a newly
+ created resource (for example, a Hibernate Session).
+
Note that transaction synchronizations receive the read-only flag
+ as argument for the beforeCommit callback, to be able
+ to suppress change detection on commit. The present method is meant
+ to be used for earlier read-only checks, for example to set the
+ flush mode of a Hibernate Session to FlushMode.Never upfront.
+
+
+
+ true if current transaction read only; otherwise, false.
+
+
+
+
+ Gets or sets the name of the current transaction, if any.
+
+ Called by the transaction manager on transaction begin and on cleanup.
+ To be called by resource management code for optimizations per use case, for
+ example to optimize fetch strategies for specific named transactions.
+ The name of the current transactio or null if none set.
+
+
+
+ Gets or sets a value indicating whether there currently is an actual transaction
+ active.
+
+ This indicates wheter the current thread is associated with an actual
+ transaction rather than just with active transaction synchronization.
+ Called by the transaction manager on transaction begin and on cleanup.
+ To be called by resource management code that wants to discriminate between
+ active transaction synchronization (with or without backing resource transaction;
+ also on PROPAGATION_SUPPORTS) and an actual transaction being active; on
+ PROPAGATION_REQUIRES, PROPAGATION_REQUIRES_NEW, etC)
+
+ true if [actual transaction active]; otherwise, false.
+
+
+
+
+ Gets or sets the current transaction isolation level, if any.
+
+ Called by the transaction manager on transaction begin and on cleanup.
+ The current transaction isolation level. If no current transaction is
+ active, retrun IsolationLevel.Unspecified
+
+
+
+ Enumeration containing the state of transaction synchronization.
+
+ Griffin Caprio (.NET)
+
+
+
+ Always activate transaction synchronization, even for "empty" transactions
+ that result from .
+
+ with no existing backend transaction.
+
+
+
+ Activate transaction synchronization only for actual transactions,
+ i.e. not for empty ones that result from .
+
+ with no
+ existing backend transaction.
+
+
+
+ Never active transaction synchronization.
+
+
+
+
+ Enumeration of status values when synchronizing transactions.
+
+ Griffin Caprio
+
+
+
+ Completion status in case of proper commit.
+
+
+
+
+ Completion status in case of proper rollback.
+
+
+
+
+ Completion status in case of heuristic mixed completion or system error.
+
+
+
+
+ Helper class that simplifies programmatic transaction demarcation and
+ transaction exception handling.
+
+
+
+ The central methods are
+
+ and
+ supporting transactional code wrapped in the delegate instance. It handles the
+ transaction lifecycle and possible exceptions such that neither the delegate
+ implementation nor the calling code needs to explicitly handle transactions.
+
+
+ Can be used within a service implementation via direct instantiation with
+ a transaction manager reference, or get prepared in an application context
+ and given to services as object reference.
+
+
+ The transaction manager 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.
+
+
+ Supports setting the propagation behavior and the isolation level by name,
+ for convenient configuration in context definitions.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ Mainly targeted at configuration by an object factory.
+
+
+ The
+
+ property must be set before any calls to the
+
+ or
+ method.
+
+
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+ Mainly targeted at configuration by an object factory.
+
+
+
+ The transaction management strategy to be used.
+
+
+
+
+ Ensures that the
+
+ has been set.
+
+
+
+
+ Executes the the action specified by the given delegate callback within a transaction.
+
+ The delegate that specifies the transactional action.
+
+ A result object returned by the callback, or null if one
+
+ Allows for returning a result object created within the transaction, that is,
+ a domain object or a collection of domain objects. An exception thrown by the callback
+ is treated as a fatal exception that enforces a rollback. Such an exception gets
+ propagated to the caller of the template.
+
+
+ In case of initialization or system errors.
+
+
+
+
+ Executes the action specified by the given callback object within a transaction.
+
+ The callback object that specifies the transactional action.
+
+ A result object returned by the callback, or null if one
+
+ Allows for returning a result object created within the transaction, that is,
+ a domain object or a collection of domain objects. An exception thrown by the callback
+ is treated as a fatal exception that enforces a rollback. Such an exception gets
+ propagated to the caller of the template.
+
+
+ In case of initialization or system errors.
+
+
+
+
+ Perform a rollback, handling rollback exceptions properly.
+
+ The object representing the transaction.
+ The thrown application exception or error.
+
+
+
+ Gets and sets the to
+ be used.
+
+
+
+
+ Exception thrown when a transaction can't be created using an
+ underlying transaction API such as COM+.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Base class for all transaction exceptions.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates a new instance of the TransactionException class.
+
+
+
+
+ Creates a new instance of the TransactionException class, with the specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the TransactionException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the TransactionException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Exception that represents a transaction failure caused by heuristics.
+
+ Rod Johnson
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ The outcome state of the transaction: have some or all resources been committed?
+
+
+
+
+ Returns a representation of the supplied
+ .
+
+
+ The value that
+ is to be stringified.
+
+ A representation.
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ Creates a new instance of the
+ class
+ with the specified
+ and inner exception.
+
+
+ The
+ for the transaction.
+
+
+ The inner exception that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Override of
+ to allow for private serialization.
+
+
+ The
+ that holds the serialized object data about the exception.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Returns the transaction's outcome state.
+
+
+
+
+ Exception thrown when the existence or non-existence of a transaction
+ amounts to an illegal state according to the transaction propagation
+ behavior that applies.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Exception that gets thrown when an invalid isolation level is specified,
+ i.e. an isolation level that the transaction manager implementation
+ doesn't support.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Superclass for exceptions caused by inappropriate usage of
+ a Spring.NET transaction API.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Exception that gets thrown when an invalid timeout is specified,
+ for example when the transaction manager implementation doesn't support timeouts.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Invalid timeout value.
+
+
+
+
+ Creates a new instance of the
+ class
+ with the specified message and timeout value.
+
+
+ A message about the exception.
+
+ The (possibly invalid) timeout value.
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Override of
+ to allow for private serialization.
+
+
+ The
+ that holds the serialized object data about the exception.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Returns the invalid timeout for this exception.
+
+
+
+
+ Exception thrown when attempting to work with a nested transaction
+ but nested transactions are not supported by the underlying backend.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Exception thrown when an operation is attempted that relies on an existing
+ transaction (such as setting rollback status) and there is no existing transaction.
+ This represents an illegal usage of the transaction API.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Represents a transaction's current state.
+
+ Griffin Caprio (.NET)
+
+
+
+ The transaction state is unknown.
+
+
+
+
+ The transaction has been committed.
+
+
+
+
+ The transaction has been rolled back.
+
+
+
+
+ The transaction is in an unknown, mixed state.
+
+
+
+
+ Enumeration describing Spring.NET's
+ transaction propagation settings.
+
+ Griffin Caprio (.NET)
+
+
+
+ Support a current transaction, create a new one if none exists.
+
+
+
+ Analogous to System.EnterpriseServices.TransactionOption value of the same name.
+ This is typically the default setting of a transaction definition.
+
+
+
+
+
+ Support a current transaction, execute non-transactionally if none exists.
+
+
+
+ Analogous to System.EnterpriseServices.TransactionOption.Supported.
+
+
+
+
+
+ Support a current transaction, throw an exception if none exists.
+
+
+
+ No corresponding System.EnterpriseServices.TransactionOption value.
+
+
+
+
+
+ Create a new transaction, suspending the current transaction if one exists.
+
+
+
+ Analogous to System.EnterpriseServices.TransactionOption value of the same name.
+
+
+
+
+
+ Execute non-transactionally, suspending the current transaction if one exists.
+
+
+
+ Analogous to System.EnterpriseServices.TransactionOption value of the same name.
+
+
+
+
+
+ Execute non-transactionally, throw an exception if a transaction exists.
+
+
+
+ Analogous to System.EnterpriseServices.TransactionOption.Disabled.
+
+
+
+
+
+ Execute within a nested transaction if a current transaction exists, else
+ behave like .
+
+
+
+ There is no analogous feature in TransactionOption.
+
+
+
+
+
+ Exception thrown when attempting to suspend an existing transaction
+ but transaction suspension is not supported by the underlying backend.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Exception thrown when a general transaction system error is encountered,
+ for instance on commit or rollback.
+
+ Juergen Hoeller
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Exception to be thrown when a transaction has timed out.
+
+
+
+
+ Create a new instance
+
+
+
+
+ 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
+ Thrown when an attempt to commit a transaction resulted in an unexpected rollback.
+
+ Rod Johnson
+ Griffin Caprio (.NET)
+
+
+
+ Creates 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 that is being wrapped.
+
+
+
+
+ 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.
+
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Messaging.Ems.dll b/Resources/Libraries/Spring.NET/Spring.Messaging.Ems.dll
new file mode 100644
index 00000000..a09e91cc
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Messaging.Ems.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Messaging.Ems.pdb b/Resources/Libraries/Spring.NET/Spring.Messaging.Ems.pdb
new file mode 100644
index 00000000..5802b7aa
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Messaging.Ems.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Messaging.Ems.xml b/Resources/Libraries/Spring.NET/Spring.Messaging.Ems.xml
new file mode 100644
index 00000000..3ea3a32d
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Messaging.Ems.xml
@@ -0,0 +1,4922 @@
+
+
+
+ Spring.Messaging.Ems
+
+
+
+
+ A Connection object is a client's active connection to TIBCO EMS Server.
+
+
+
+
+ An interface containing all methods and properties on the TIBCO.EMS.Connection class.
+ Refer to the TIBCO EMS API documentation for more information.
+
+ Mark Pollack
+
+
+
+ Closes the connection and reclaims resources.
+
+
+
+
+ Creates the session.
+
+ if set to true the session has transaction semantcis.
+ Indicates whether and how the consumer is to acknowledge received messages.
+ This version of CreateSession accepts an integer value associated with the acknowledge mode described by a Session member and should only be used for backward compatibility.
+ This parameter is ignored if the session is transacted.
+ A newly created session.
+
+
+
+ Creates the session.
+
+ if set to true [transacted].
+ The acknowledge mode.
+ When true, the new session has transaction semantics.
+ Indicates whether and how the consumer is to acknowledge received messages.
+ Legal values are listed under SessionMode.
+ This parameter is ignored if the session is transacted.
+
+ A newly created session.
+
+
+
+ Starts (or restarts) a connection's delivery of incoming messages.
+
+
+
+
+ Temporarily stops a connection's delivery of incoming messages.
+
+
+
+
+ A String representation of the connection object
+
+
+ A that represents this instance.
+
+
+
+
+ Gets the native TIBCO EMS connection.
+
+ The native connection.
+
+
+
+ Occurs when the client library detects a problem with the connection.
+
+
+
+
+ Gets the URL of the server this connection is currently connected to
+
+ The active URL.
+
+
+
+ Gets or sets the client ID.
+
+ The client ID.
+
+
+
+ Gets the connection ID.
+
+ The connection ID.
+
+
+
+ Gets or sets the exception listener.
+
+ The exception listener.
+
+
+
+ Gets a value indicating whether the connection is closed.
+
+ true if the connection is closed; otherwise, false.
+
+
+
+ Gets a value indicating whether the connection communicates with a secure protocol
+
+ true if the connection communicates with a secure protocol; otherwise, false.
+
+
+
+ Gets the metadata for this connection
+
+ The metadata for this connection.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying TIBCO EMS connection.
+
+
+
+ Closes the connection and reclaims resources.
+
+
+
+
+ Creates the session.
+
+ if set to true the session has transaction semantcis.
+ Indicates whether and how the consumer is to acknowledge received messages.
+ This version of CreateSession accepts an integer value associated with the acknowledge mode described by a Session member and should only be used for backward compatibility.
+ This parameter is ignored if the session is transacted.
+ A newly created session.
+
+
+
+ Creates the session.
+
+ if set to true [transacted].
+ The acknowledge mode.
+ When true, the new session has transaction semantics.
+ Indicates whether and how the consumer is to acknowledge received messages.
+ Legal values are listed under SessionMode.
+ This parameter is ignored if the session is transacted.
+ A newly created session.
+
+
+
+ Starts (or restarts) a connection's delivery of incoming messages.
+
+
+
+
+ Temporarily stops a connection's delivery of incoming messages.
+
+
+
+
+ Gets the native TIBCO EMS connection.
+
+ The native connection.
+
+
+
+ Occurs when the client library detects a problem with the connection.
+
+
+
+
+ Gets the URL of the server this connection is currently connected to
+
+ The active URL.
+
+
+
+ Gets or sets the client ID.
+
+ The client ID.
+
+
+
+ Gets the connection ID.
+
+ The connection ID.
+
+
+
+ Gets or sets the exception listener.
+
+ The exception listener.
+
+
+
+ Gets a value indicating whether the connection is closed.
+
+
+ true if the connection is closed; otherwise, false.
+
+
+
+
+ Gets a value indicating whether the connection communicates with a secure protocol
+
+
+ true if the connection communicates with a secure protocol; otherwise, false.
+
+
+
+
+ Gets the metadata for this connection
+
+ The metadata for this connection.
+
+
+
+ An interface containing all methods and properties on the TIBCO.EMS.ConnectionFactory class.
+ Refer to the TIBCO EMS API documentation for more information.
+
+
+ All the 'GetXXX()' methods in the TIBCO.EMS.ConnectionFactory were translated to .NET properties
+
+ Mark Pollack
+
+
+
+ Creates the connection.
+
+ The newly created connection
+
+
+
+ Creates the connection with the given username and password
+
+ Name of the user.
+ The password.
+
+
+
+
+ Gets the native TIBCO EMS connection factory.
+
+ The native connection factory.
+
+
+
+ Gets the certificate store info object associated with this connection factory.
+
+ The certificate store.
+
+
+
+ Gets or sets the SSL proxy host.
+
+ The SSL proxy host.
+
+
+
+ Gets or sets the SSL proxy port.
+
+ The SSL proxy port.
+
+
+
+ Gets the SSL proxy password.
+
+ The SSL proxy password.
+
+
+
+ Gets the SSL proxy user.
+
+ The SSL proxy user.
+
+
+
+ Sets the type of the certificate store.
+
+ The type of the certificate store.
+
+
+
+ Sets the client ID.
+
+ The client ID.
+
+
+
+ Sets the client tracer to a given output stream
+
+ The client tracer.
+
+
+
+ Sets the number of connection attempts
+
+ The number of connection attempts.
+
+
+
+ Sets delay between connection attempts
+
+ The delay between connection attempts.
+
+
+
+ Sets the connection attempt timeout.
+
+ The connection attempt timeout.
+
+
+
+ Sets the custom host name verifier. Set to null to remove custom host name verifier.
+
+ The host name verifier.
+
+
+
+ Sets the load balance metric as an integer.
+
+ The load balance metric as int.
+
+
+
+ Sets the port on which the client will connect to the multicast daemon.
+
+ The multicast daemon port.
+
+
+
+ Sets whether MessageConsumers subscribed to a multicast-enabled topic will receive messages over multicast.
+
+ true to enable multicast; false to disable.
+
+
+
+ Gets or sets the the default length of time in milliseconds from its dispatch time
+ that a produced message should be retained by the message system.
+
+ Time to live is set to zero by default.
+ The message time to live in milliseconds; zero is unlimited
+
+
+
+ Market interface for EMS SSL store types
+
+
+
+
+ Namespace parser for the EMS namespace.
+
+ Mark Fisher
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Register a MessageListenerContainer for the 'listener-container' tag.
+
+
+
+
+ Parser for the EMS <listener-container> element.
+
+ Mark Fisher
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Parse the specified XmlElement and register the resulting
+ ObjectDefinitions with the IObjectDefinitionRegistry
+ embedded in the supplied
+
+ The element to be parsed.
+ TThe object encapsulating the current state of the parsing process.
+ Provides access to a IObjectDefinitionRegistry
+ The primary object definition.
+
+
+ This method is never invoked if the parser is namespace aware
+ and was called to process the root node.
+
+
+
+
+
+ EMS MessageConsumer decorator that adapts all calls
+ to a shared MessageConsumer instance underneath.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ The target.
+
+
+
+ Receives the next message produced for this message consumer.
+
+ the next message produced for this message consumer, , or null if this message consumer is concurrently closed
+
+
+
+ Receives the next message that arrives within the specified timeout interval.
+
+ The timeout value.
+ the next message produced for this message consumer, or null if the timeout expires or this message consumer is concurrently closed
+
+
+
+ Receives the next message if one is immediately available.
+
+ the next message produced for this message consumer, or null if one is not available
+
+
+
+ No-op implementation since it is caching.
+
+
+
+
+ Description that shows this is a cached MessageConsumer
+
+ Description that shows this is a cached MessageConsumer
+
+
+
+ Gets the target MessageConsumer, the consumer we are 'wrapping'
+
+ The target MessageConsumer.
+
+
+
+ Occurs when a message is received.
+
+
+
+
+ MessageProducer decorator that adapts calls to a shared MessageProducer
+ instance underneath, managing QoS settings locally within the decorator.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ The target.
+
+
+
+ Sends the specified message.
+
+ The message.
+
+
+
+ Sends the specified message.
+
+ The message.
+ The delivery mode.
+ The priority.
+ The time to live.
+
+
+
+ Sends a message to the specified destination.
+
+ The destination.
+ The message.
+
+
+
+ Reset properties.
+
+
+
+
+ Returns string indicated this is a wrapped MessageProducer
+
+
+
+
+
+ Gets or sets a value indicating whether disable setting of the message ID property.
+
+ true if disable message ID setting; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether disable setting the message timestamp property.
+
+
+ true if disable message timestamp; otherwise, false.
+
+
+
+
+ Gets or sets the producer's default delivery mode.
+
+ The message delivery mode for this message producer
+
+
+
+ Gets or sets the MSG delivery mode.
+
+ The MSG delivery mode.
+
+
+
+ Gets or sets the priority of messages sent with this producer.
+
+ The priority.
+
+
+
+ Gets or sets the the default length of time in milliseconds from its dispatch time
+ that a produced message should be retained by the message system.
+
+ Time to live is set to zero by default.
+ The message time to live in milliseconds; zero is unlimited
+
+
+
+ Gets the target MessageProducer, the producer we are 'wrapping'
+
+ The target MessageProducer.
+
+
+
+ Wrapper for Session that caches producers and registers itself as available
+ to the session cache when being closed. Generally used for testing purposes or
+ if need to get at the wrapped Session object via the TargetSession property (for
+ vendor specific methods).
+
+ Juergen Hoeller
+ Mark Pollack
+
+
+
+ Subinterface of Session to be implemented by
+ implementations that wrap an Session to provide added
+ functionality. Allows access to the the underlying target Session.
+
+ Mark Pollack
+
+
+
+
+
+ Gets the target session of the decorator.
+ This will typically be the native provider Session or a wrapper from a session pool.
+
+ The underlying session, never null
+
+
+
+ Initializes a new instance of the class.
+
+ The target session.
+ The session list.
+ The CachingConnectionFactory.
+
+
+
+ Creates the producer, potentially returning a cached instance.
+
+ The destination.
+ A message producer.
+
+
+
+ If have not yet reached session cache size, cache the session, otherwise
+ dispose of all cached message producers and close the session.
+
+
+
+
+ Creates the consumer, potentially returning a cached instance.
+
+ The destination.
+ A message consumer
+
+
+
+ Creates the consumer, potentially returning a cached instance.
+
+ The destination.
+ The selector.
+ A message consumer
+
+
+
+ Creates the consumer, potentially returning a cached instance.
+
+ The destination.
+ The selector.
+ if set to true [no local].
+ A message consumer.
+
+
+
+ Creates the durable consumer, potentially returning a cached instance.
+
+ The destination.
+ The name of the durable subscription.
+ The selector.
+ if set to true [no local].
+ A message consumer
+
+
+
+ Creates the durable consumer, potentially returning a cached instance.
+
+ The destination.
+ The name of the durable subscription.
+ A message consumer
+
+
+
+ Creates the consumer.
+
+ The destination.
+ The selector.
+ if set to true [no local].
+ The subscription.
+
+
+
+
+ Gets the queue.
+
+ The name.
+
+
+
+
+ Gets the topic.
+
+ The name.
+
+
+
+
+ Creates the temporary queue.
+
+
+
+
+
+ Creates the temporary topic.
+
+
+
+
+
+ Creates the message.
+
+
+
+
+
+ Creates the text message.
+
+
+
+
+
+ Creates the text message.
+
+ The text.
+
+
+
+
+ Creates the map message.
+
+
+
+
+
+ Creates the bytes message.
+
+
+
+
+
+ Creates the object message.
+
+
+
+
+
+ Creates the object message.
+
+ The body.
+
+
+
+
+ Creates the stream message.
+
+
+
+
+
+ Commits this instance.
+
+
+
+
+ Rollbacks this instance.
+
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets the target, for testing purposes.
+
+ The target.
+
+
+
+ Gets a value indicating whether this is transacted.
+
+ true if transacted; otherwise, false.
+
+
+
+ Gets the acknowledgement mode.
+
+ The acknowledgement mode.
+
+
+
+ subclass that adds
+ Session, MessageProducer, and MessageConsumer caching. This ConnectionFactory
+ also switches the ReconnectOnException property to true
+ by default, allowing for automatic recovery of the underlying
+ Connection.
+
+
+ By default, only one single Session will be cached, with further requested
+ Sessions being created and disposed on demand. Consider raising the
+ SessionCacheSize property in case of a high-concurrency environment.
+
+ NOTE: This ConnectionFactory requires explicit closing of all Sessions
+ obtained from its shared Connection. This is the usual recommendation for
+ native EMS access code anyway. However, with this ConnectionFactory, its use
+ is mandatory in order to actually allow for Session reuse.
+
+
+ Note also that MessageConsumers obtained from a cached Session won't get
+ closed until the Session will eventually be removed from the pool. This may
+ lead to semantic side effects in some cases. For a durable subscriber, the
+ logical Session.Close() call will also close the subscription.
+ Re-registering a durable consumer for the same subscription on the same
+ Session handle is not supported; close and reobtain a cached Session first.
+
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ A ConnectionFactory adapter that returns the same Connection
+ from all CreateConnection() calls, and ignores calls to
+ Connection.Close(). According to the JMS Connection
+ model, this is perfectly thread-safe. The
+ shared Connection can be automatically recovered in case of an Exception.
+
+
+
+ You can either pass in a specific Connection directly or let this
+ factory lazily create a Connection via a given target ConnectionFactory.
+
+
+ Useful for testing and in applications when you want to keep using the
+ same Connection for multiple
+ calls, without having a pooling ConnectionFactory underneath. This may span
+ any number of transactions, even concurrently executing transactions.
+
+
+ Note that Spring's message listener containers support the use of
+ a shared Connection within each listener container instance. Using
+ SingleConnectionFactory with a MessageListenerContainer only really makes sense for
+ sharing a single Connection across multiple listener containers.
+
+
+ Juergen Hoeller
+ Mark Pollack
+ Mark Pollack (.NET)
+
+
+
+ Wrapped Connection
+
+
+
+
+ Proxy Connection
+
+
+
+
+ Whether the shared Connection has been started
+
+
+
+
+ Synchronization monitor for the shared Connection
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ that alwasy returns the given Connection.
+
+ The single Connection.
+
+
+
+ Initializes a new instance of the class
+ that alwasy returns a single Connection.
+
+ The target connection factory.
+
+
+
+ Creates the connection.
+
+ A single shared connection
+
+
+
+ Creates the connection.
+
+ Name of the user.
+ The password.
+
+
+
+
+ Initialize the underlying shared Connection. Closes and reinitializes the Connection if an underlying
+ Connection is present already.
+
+
+
+
+ Exception listener callback that renews the underlying single Connection.
+
+ The exception from the messaging infrastructure.
+
+
+
+ Prepares the connection before it is exposed.
+ The default implementation applies ExceptionListener and client id.
+ Can be overridden in subclasses.
+
+ The Connection to prepare.
+ if thrown by any EMS API methods.
+
+
+
+ Template method for obtaining a (potentially cached) Session.
+
+ The connection to operate on.
+ The session ack mode.
+ the Session to use, or null to indicate
+ creation of a raw standard Session
+
+
+
+ reate a JMS Connection via this template's ConnectionFactory.
+
+
+
+
+
+ Closes the given connection.
+
+ The connection.
+
+
+
+ Ensure that the connection or TargetConnectionFactory are specified.
+
+
+
+
+ Close the underlying shared connection. The provider of this ConnectionFactory needs to care for proper shutdown.
+ As this object implements an application context will automatically
+ invoke this on distruction o
+
+
+
+
+ Resets the underlying shared Connection, to be reinitialized on next access.
+
+
+
+
+ Wrap the given Connection with a proxy that delegates every method call to it
+ but suppresses close calls. This is useful for allowing application code to
+ handle a special framework Connection just like an ordinary Connection from a
+ ConnectionFactory.
+
+ The original connection to wrap.
+ the wrapped connection
+
+
+
+ Gets or sets the target connection factory which will be used to create a single
+ connection.
+
+ The target connection factory.
+
+
+
+ Sets the exception listener.
+
+ The exception listener.
+
+
+
+ Gets or sets a value indicating whether the single Connection
+ should be reset (to be subsequently renewed) when a EMSException
+ is reported by the underlying Connection.
+
+
+ Default is false. Switch this to true
+ to automatically trigger recover based on your messaging provider's
+ exception notifications.
+
+ Internally, this will lead to a special ExceptionListener (this
+ SingleConnectionFactory itself) being registered with the underlying
+ Connection. This can also be combined with a user-specified
+ ExceptionListener, if desired.
+
+
+
+ true attempt to reconnect on exception during next access; otherwise, false.
+
+
+
+
+ Gets the connection monitor.
+
+ The connection monitor.
+
+
+
+ Gets a value indicating whether this instance is started.
+
+
+ true if this instance is started; otherwise, false.
+
+
+
+
+ Gets the client id.
+
+ The client id.
+
+
+
+ Initializes a new instance of the class.
+ and sets the ReconnectOnException to true
+
+
+
+
+ Initializes a new instance of the class for the given
+ IConnectionFactory
+
+ The target connection factory.
+
+
+
+ Resets the Session cache as well as resetting the connection.
+
+
+
+
+ Obtaining a cached Session.
+
+ The connection to operate on.
+ The session ack mode.
+ The Session to use
+
+
+
+
+ Wraps the given Session so that it delegates every method call to the target session but
+ adapts close calls. This is useful for allowing application code to
+ handle a special framework Session just like an ordinary Session.
+
+ The original Session to wrap.
+ The List of cached Sessions that the given Session belongs to.
+ The wrapped Session
+
+
+
+ Gets or sets the size of the session cache.
+
+
+ This cache size is the maximum limit for the number of cached Sessions
+ per session acknowledgement type (auto, client, dups_ok, transacted).
+ As a consequence, the actual number of cached Sessions may be up to
+ four times as high as the specified value - in the unlikely case
+ of mixing and matching different acknowledgement types.
+
+ Default is 1: caching a single Session, (re-)creating further ones on
+ demand. Specify a number like 10 if you'd like to raise the number of cached
+ Sessions; that said, 1 may be sufficient for low-concurrency scenarios.
+
+
+ The size of the session cache.
+
+
+
+ Gets or sets a value indicating whether to cache MessageProducers per
+ Session instance. (more specifically: one MessageProducer per Destination
+ and Session).
+
+
+ Default is "true". Switch this to "false" in order to always,
+ recreate MessageProducers on demand.
+
+
+ true if should cache message producers; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether o cache JMS MessageConsumers per
+ EMS Session instance.
+
+
+ Mmore specifically: one MessageConsumer per Destination, selector String
+ and Session. Note that durable subscribers will only be cached until
+ logical closing of the Session handle.
+
+ Default is "true". Switch this to "false" in order to always
+ recreate MessageConsumers on demand.
+
+
+ true to cache consumers per session instance; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this instance is active.
+
+ true if this instance is active; otherwise, false.
+
+
+
+ Implementation of Spring IExceptionListener interface that supports
+ chaining allowing the addition of multiple ExceptionListener instances in order.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Adds the exception listener to the chain
+
+ The listener.
+
+
+
+ Called when an exception occurs in message processing.
+
+ The exception.
+
+
+
+ Gets the exception listeners as an array.
+
+ The exception listeners.
+
+
+ Helper class for obtaining transactional EMS resources
+ for a given ConnectionFactory.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Releases the given connection, stopping it (if necessary) and eventually closing it.
+
+ Checks , if available.
+ This is essentially a more sophisticated version of
+
+
+ The connection to release. (if this is null, the call will be ignored)
+ The ConnectionFactory that the Connection was obtained from. (may be null)
+ whether the Connection might have been started by the application.
+
+
+
+ Return the innermost target Session of the given Session. If the given
+ Session is a decorated session, it will be unwrapped until a non-decorated
+ Session is found. Otherwise, the passed-in Session will be returned as-is.
+
+ The session to unwrap
+ The innermost target Session, or the passed-in one if no decorator
+
+
+
+ Determines whether the given JMS Session is transactional, that is,
+ bound to the current thread by Spring's transaction facilities.
+
+ The session to check.
+ The ConnectionFactory that the Session originated from
+
+ true if is session transactional, bound to current thread; otherwise, false.
+
+
+
+ Obtain a EMS Session that is synchronized with the current transaction, if any.
+ the ConnectionFactory to obtain a Session for
+
+ the existing EMS Connection to obtain a Session for
+ (may be null)
+
+ whether to allow for a local EMS transaction
+ that is synchronized with a Spring-managed transaction (where the main transaction
+ might be a ADO.NET-based one for a specific DataSource, for example), with the EMS
+ transaction committing right after the main transaction. If not allowed, the given
+ ConnectionFactory needs to handle transaction enlistment underneath the covers.
+
+ the transactional Session, or null if none found
+
+ EMSException in case of EMS failure
+
+
+
+ Obtain a EMS Session that is synchronized with the current transaction, if any.
+
+ the TransactionSynchronizationManager key to bind to
+ (usually the ConnectionFactory)
+ the ResourceFactory to use for extracting or creating
+ EMS resources
+ whether the underlying Connection approach should be
+ started in order to allow for receiving messages. Note that a reused Connection
+ may already have been started before, even if this flag is false.
+
+ the transactional Session, or null if none found
+
+ EMSException in case of EMS failure
+
+
+ Callback interface for resource creation.
+ Serving as argument for the DoGetTransactionalSession method.
+
+
+
+ Fetch an appropriate Session from the given EmsResourceHolder.
+ the EmsResourceHolder
+
+ an appropriate Session fetched from the holder,
+ or null if none found
+
+
+
+ Fetch an appropriate Connection from the given EmsResourceHolder.
+ the EmsResourceHolder
+
+ an appropriate Connection fetched from the holder,
+ or null if none found
+
+
+
+ Create a new EMS Connection for registration with a EmsResourceHolder.
+ the new EMS Connection
+
+ EMSException if thrown by EMS API methods
+
+
+ Create a new EMS Session for registration with a EmsResourceHolder.
+ the EMS Connection to create a Session for
+
+ the new EMS Session
+
+ EMSException if thrown by EMS API methods
+
+
+
+ Return whether to allow for a local EMS transaction that is synchronized with
+ a Spring-managed transaction (where the main transaction might be a ADO.NET-based
+ one for a specific IDbProvider, for example), with the EMS transaction
+ committing right after the main transaction.
+ Returns whether to allow for synchronizing a local EMS transaction
+
+
+
+
+ Callback for resource cleanup at the end of a non-native EMS transaction
+
+
+
+ Connection holder, wrapping a EMS Connection and a EMS Session.
+ EmsTransactionManager binds instances of this class to the thread,
+ for a given EMS ConnectionFactory.
+
+
Note: This is an SPI class, not intended to be used by applications.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Create a new EmsResourceHolder that is open for resources to be added.
+
+
+
+ Initializes a new instance of the class
+ at is open for resources to be added.
+
+ The connection factory that this
+ resource holder is associated with (may be null)
+
+
+
+
+ Initializes a new instance of the class for the
+ given Session.
+
+ The session.
+
+
+ Create a new EmsResourceHolder for the given EMS resources.
+ the EMS Connection
+
+ the EMS Session
+
+
+
+
+ Initializes a new instance of the class.
+
+ The connection factory.
+ The connection.
+ The session.
+
+
+
+ Adds the connection to the list of resources managed by this holder.
+
+ The connection.
+
+
+
+ Adds the session to the list of resources managed by this holder.
+
+ The session.
+
+
+
+ Adds the session and connection to the list of resources managed by this holder.
+
+ The session.
+ The connection.
+
+
+
+ Gets the connection managed by this resource holder
+
+ A Connection, or null if no managed connection.
+
+
+
+ Gets the connection of a given type managed by this resource holder. This is used
+ when storing Queue or Topic Connections (from the older 1.0.2 API) as compared to the
+ 'unified domain' API , just Connection, in the newer 1.2 API.
+
+ Type of the connection.
+ The connection, or null if not found.
+
+
+
+ Gets the first session manged by this holder or null if not available.
+
+ The session or null if not available.
+
+
+
+ Gets the session managed by this holder by type.
+
+ Type of the session.
+ The session or null if not available.
+
+
+
+ Gets the session of a given type associated with the given connection
+
+ Type of the session.
+ The connection.
+ The sessin or null if not available.
+
+
+
+ Commits all sessions.
+
+
+
+
+ Closes all sessions then stops and closes all connections, in that order.
+
+
+
+
+ Determines whether the holder contains the specified session.
+
+ The session.
+
+ true if the holder contains the specified session; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this is frozen, namely that
+ additional resources can be registered with the holder. If using any of the constructors with
+ a Session, the holder will be set to the frozen state.
+
+ true if frozen; otherwise, false.
+
+
+
+ A implementation
+ for a single EMS ConnectionFactory. Binds a
+ Connection/Session pair from the specified ConnecctionFactory to the thread,
+ potentially allowing for one thread-bound Session per ConnectionFactory.
+
+
+
+ Application code is required to retrieve the transactional Session via
+ . Spring's
+ will autodetect a thread-bound Session and
+ automatically participate in it.
+
+
+ Transaction synchronization is turned off by default, as this manager might be used
+ alongside an IDbProvider based Spring transaction manager such as the
+ AdoPlatformTransactionManager, which has stronger needs for synchronization.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+ The ConnectionFactory has to be set before using the instance.
+ This constructor can be used to prepare a EmsTemplate via a ApplicationContext,
+ typically setting the ConnectionFactory via ConnectionFactory property.
+
+ Turns off transaction synchronization by default, as this manager might
+ be used alongside a dbprovider-based Spring transaction manager like
+ AdoPlatformTransactionManager, which has stronger needs for synchronization.
+ Only one manager is allowed to drive synchronization at any point of time.
+
+
+
+
+
+ Initializes a new instance of the class
+ given a ConnectionFactory.
+
+ The connection factory to obtain connections from.
+
+
+
+ Make sure the ConnectionFactory has been set.
+
+
+
+
+ Get the EmsTransactionObject.
+
+ he EmsTransactionObject.
+
+
+
+ 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.
+
+
+ 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.
+
+
+ In the case of system errors.
+
+
+
+
+ Perform an actual commit on the given transaction.
+
+ The status representation of the transaction.
+
+ In the case of system errors.
+
+
+
+
+ Perform an actual rollback on the given transaction.
+
+ The status representation of the transaction.
+
+ 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.
+
+
+
+
+ Cleanup resources after transaction completion.
+
+ Transaction object returned by
+ .
+
+
+ Called after
+ and
+
+ execution on any outcome.
+
+
+
+
+
+ Check if the given transaction object indicates an existing transaction
+ (that is, a transaction which has already started).
+
+ Transaction object returned by
+ .
+
+ True if there is an existing transaction.
+
+
+ In the case of system errors.
+
+
+
+
+ Creates the connection via thie manager's ConnectionFactory.
+
+ The new Connection
+ If thrown by underlying messaging APIs
+
+
+
+ Creates the session for the given Connection
+
+ The connection to create a Session for.
+ the new Session
+ If thrown by underlying messaging APIs
+
+
+
+ Gets or sets the connection factory that this instance should manage transaction.
+ for.
+
+ The connection factory.
+
+
+
+ Gets the resource factory that this transaction manager operates on,
+ In tihs case the ConnectionFactory
+
+ The ConnectionFactory.
+
+
+
+ EMS Transaction object, representing a EmsResourceHolder.
+ Used as transaction object by EMSTransactionManager
+
+
+
+
+ Extension of the IConnectionFactory interface,
+ indicating how to release Connections obtained from it.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Shoulds we stop the connection, obtained from this ConnectionFactory?
+
+ The connection to check.
+ wheter a stop call is necessary
+
+
+
+ Internal chained ExceptionListener for handling the internal recovery listener
+ in combination with a user-specified listener.
+
+
+
+
+ Add information to show this is a shared EMS connection
+
+ Description of connection wrapper
+
+
+ Exception thrown when a synchronized local transaction failed to complete
+ (after the main transaction has already completed).
+
+ Jergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the SynchedLocalTransactionFailedException class. with the specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the SynchedLocalTransactionFailedException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Delegate callback for browsing the messages in an EMS queue.
+
+
+
+
+ Convenient super class for application classes that need EMS access.
+
+
+ Requires a ConnectionFactory or a EmsTemplate instance to be set.
+ It will create its own EmsTemplate if a ConnectionFactory is passed in.
+ A custom EmsTemplate instance can be created for a given ConnectionFactory
+ through overriding the createEmsTemplate method.
+
+
+
+
+
+ Creates a EmsTemplate for the given ConnectionFactory.
+
+ Only invoked if populating the gateway with a ConnectionFactory reference.
+ Can be overridden in subclasses to provide a different EmsTemplate instance
+
+
+ The connection factory.
+
+
+
+
+ Ensures that the JmsTemplate is specified and calls .
+
+
+
+
+ Subclasses can override this for custom initialization behavior.
+ Gets called after population of this instance's properties.
+
+
+
+
+ Gets or sets the EMS template for the gateway.
+
+ The EMS template.
+
+
+
+ Gets or sets he EMS connection factory to be used by the gateway.
+ Will automatically create a EmsTemplate for the given ConnectionFactory.
+
+ The connection factory.
+
+
+ Helper class that simplifies EMS access code.
+
+ If you want to use dynamic destination creation, you must specify
+ the type of EMS destination to create, using the "pubSubDomain" property.
+ For other operations, this is not necessary.
+ Point-to-Point (Queues) is the default domain.
+
+ Default settings for EMS Sessions is "auto-acknowledge".
+
+ This template uses a DynamicDestinationResolver and a SimpleMessageConverter
+ as default strategies for resolving a destination name or converting a message,
+ respectively.
+
+
+ Mark Pollack
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Base class for EmsTemplate} and other
+ EMS-accessing gateway helpers, adding destination-related properties to
+ EmsAccessor's common properties.
+
+
+
Not intended to be used directly. See EmsTemplate.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Base class for EmsTemplate and other EMS-accessing gateway helpers
+ It defines common properties like the ConnectionFactory}. The subclass
+ EmsDestinationAccessor adds further, destination-related properties.
+
+ Not intended to be used directly. See EmsTemplate.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Verify that ConnectionFactory property has been set.
+
+
+
+
+ Creates the connection via the ConnectionFactory.
+
+
+
+
+
+ Creates the session for the given Connection
+
+ The connection to create a session for.
+ The new session
+
+
+
+ Returns whether the Session is in client acknowledgement mode.
+
+ The session to check.
+ true if in client ack mode, false otherwise
+
+
+
+ Gets or sets the connection factory to use for obtaining EMS Connections.
+
+ The connection factory.
+
+
+
+ Gets or sets the session acknowledge mode for EMS Sessions including whether or not the session is transacted
+
+
+ Set the EMS acknowledgement mode that is used when creating a EMS
+ Session to send a message. The default is AUTO_ACKNOWLEDGE.
+
+ The session acknowledge mode.
+
+
+
+ Set the transaction mode that is used when creating a EMS Session.
+ Default is "false".
+
+
+ Setting this flag to "true" will use a short local EMS transaction
+ when running outside of a managed transaction, and a synchronized local
+ EMS transaction in case of a managed transaction being present.
+ The latter has the effect of a local EMS
+ transaction being managed alongside the main transaction (which might
+ be a native ADO.NET transaction), with the EMS transaction committing
+ right after the main transaction.
+
+
+
+
+
+ Resolves the given destination name to a EMS destination.
+
+ The current session.
+ Name of the destination.
+ The located Destination
+ If resolution failed.
+
+
+
+ Gets or sets the destination resolver that is to be used to resolve
+ Destination references for this accessor.
+
+ The default resolver is a DynamicDestinationResolver. Specify a
+ JndDestinationResolver for resolving destination names as JNDI locations.
+
+ The destination resolver.
+
+
+
+ Gets or sets a value indicating whether Publish/Subscribe
+ domain (Topics) is used. Otherwise, the Point-to-Point domain
+ (Queues) is used.
+
+
+ this
+ setting tells what type of destination to create if dynamic destinations are enabled.
+ true if Publish/Subscribe domain; otherwise, false
+ for the Point-to-Point domain.
+
+
+ Specifies a basic set of EMS operations.
+
+
+
Implemented by EmsTemplate. Not often used but a useful option
+ to enhance testability, as it can easily be mocked or stubbed.
+
+
Provides EmsTemplate'ssend(..) and
+ receive(..) methods that mirror various EMS API methods.
+ See the EMS specification and EMS API docs for details on those methods.
+
+
+ Mark Pollack
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Execute the action specified by the given action object within
+ a EMS Session.
+
+ delegate that exposes the session
+ the result object from working with the session
+
+ If there is any problem accessing the EMS API
+
+
+ Execute the action specified by the given action object within
+ a EMS Session.
+
+ callback object that exposes the session
+
+ the result object from working with the session
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to a EMS destination. The callback gives access to
+ the EMS session and MessageProducer in order to do more complex
+ send operations.
+
+ callback object that exposes the session/producer pair
+
+ the result object from working with the session
+
+ EMSException if there is any problem
+
+
+ Send a message to a EMS destination. The callback gives access to
+ the EMS session and MessageProducer in order to do more complex
+ send operations.
+
+ delegate that exposes the session/producer pair
+
+ the result object from working with the session
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the default destination.
+
This will only work with a default destination specified!
+
+ callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the specified destination.
+ The IMessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the specified destination.
+ The IMessageCreator callback creates the message given a Session.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the default destination.
+
This will only work with a default destination specified!
+
+ delegate callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the specified destination.
+ The IMessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ delegate callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the specified destination.
+ The IMessageCreator callback creates the message given a Session.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ delegate callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the default destination, converting the object
+ to a EMS message with a configured IMessageConverter.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter.
+
+ the destination to send this message to
+
+ the object to convert to a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the object to convert to a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the default destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the destination to send this message to
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the object to convert to a message.
+
+ the callback to modify the message
+
+ If there is any problem accessing the EMS API
+
+
+
+ Send the given object to the default destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+ the callback to modify the message
+ If there is any problem accessing the EMS API
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the destination to send this message to
+ the object to convert to a message
+ the callback to modify the message
+ If there is any problem accessing the EMS API
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+ the object to convert to a message.
+ the callback to modify the message
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in the default EMS queue. The callback gives access to the EMS
+ Session and QueueBrowser in order to browse the queue and react to the contents.
+
+ The action callback object that exposes the session/browser pair.
+ the result object from working with the session
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The queue to browse.
+ The action callback object that exposes the session/browser pair.
+ the result object from working with the session
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ Name of the queue to browse,
+ (to be resolved to an actual destination by a DestinationResolver)
+ The action callback object that exposes the session/browser pair.
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The EMS message selector expression (or null if none).
+ The action callback object that exposes the session/browser pair.
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The queue to browse.
+ The EMS message selector expression (or null if none).
+ The action callback object that exposes the session/browser pair.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ Name of the queue to browse,
+ (to be resolved to an actual destination by a DestinationResolver)
+ The EMS message selector expression (or null if none).
+ The action callback object that exposes the session/browser pair.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in the default EMS queue. The callback gives access to the EMS
+ Session and QueueBrowser in order to browse the queue and react to the contents.
+
+ The action callback delegate that exposes the session/browser pair.
+ the result object from working with the session
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The queue to browse.
+ The action callback delegate that exposes the session/browser pair.
+ the result object from working with the session
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ Name of the queue to browse,
+ (to be resolved to an actual destination by a DestinationResolver)
+ The action callback delegate that exposes the session/browser pair.
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The EMS message selector expression (or null if none).
+ The action callback delegate that exposes the session/browser pair.
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The queue to browse.
+ The EMS message selector expression (or null if none).
+ The action callback delegate that exposes the session/browser pair.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ Name of the queue to browse,
+ (to be resolved to an actual destination by a DestinationResolver)
+ The EMS message selector expression (or null if none).
+ The action callback delegate that exposes the session/browser pair.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Timeout value indicating that a receive operation should
+ check if a message is immediately available without blocking.
+
+
+
+ Create a new EmsTemplate.
+
+ Note: The ConnectionFactory has to be set before using the instance.
+ This constructor can be used to prepare a EmsTemplate via an ObjectFactory,
+ typically setting the ConnectionFactory.
+
+
+
+ Create a new EmsTemplate, given a ConnectionFactory.
+ the ConnectionFactory to obtain Connections from
+
+
+
+ Initialize the default implementations for the template's strategies:
+ DynamicDestinationResolver and SimpleMessageConverter.
+
+
+
+ Execute the action specified by the given action object within a
+ EMS Session.
+
+ Generalized version of execute(SessionCallback),
+ allowing the EMS Connection to be started on the fly.
+
Use execute(SessionCallback) for the general case.
+ Starting the EMS Connection is just necessary for receiving messages,
+ which is preferably achieved through the receive methods.
+
+ callback object that exposes the session
+
+ Start the connection before performing callback action.
+
+ the result object from working with the session
+
+ If there is any problem accessing the EMS API
+
+
+ Execute the action specified by the given action object within a
+ EMS Session.
+
+ Generalized version of execute(SessionCallback),
+ allowing the EMS Connection to be started on the fly.
+
Use execute(SessionCallback) for the general case.
+ Starting the EMS Connection is just necessary for receiving messages,
+ which is preferably achieved through the receive methods.
+
+ callback object that exposes the session
+
+ Start the connection before performing callback action.
+
+ the result object from working with the session
+
+ If there is any problem accessing the EMS API
+
+
+
+ Extract the content from the given JMS message.
+
+ The Message to convert (can be null).
+ The content of the message, or null if none
+
+
+ Fetch an appropriate Connection from the given EmsResourceHolder.
+
+ the EmsResourceHolder
+
+ an appropriate Connection fetched from the holder,
+ or null if none found
+
+
+
+ Fetch an appropriate Session from the given EmsResourceHolder.
+
+ the EmsResourceHolder
+
+ an appropriate Session fetched from the holder,
+ or null if none found
+
+
+
+ Create a EMS MessageProducer for the given Session and Destination,
+ configuring it to disable message ids and/or timestamps (if necessary).
+
Delegates to doCreateProducer for creation of the raw
+ EMS MessageProducer
+
+ the EMS Session to create a MessageProducer for
+
+ the EMS Destination to create a MessageProducer for
+
+ the new EMS MessageProducer
+
+ If there is any problem accessing the EMS API
+
+
+
+
+
+
+
+
+
+ Determines whether the given Session is locally transacted, that is, whether
+ its transaction is managed by this template class's Session handling
+ and not by an external transaction coordinator.
+
+
+ The Session's own transacted flag will already have been checked
+ before. This method is about finding out whether the Session's transaction
+ is local or externally coordinated.
+
+ The session to check.
+
+ true if the session is locally transacted; otherwise, false.
+
+
+
+ Create a raw EMS MessageProducer for the given Session and Destination.
+
+ If CacheJmsResource is true, then the producer
+ will be created upon the first invocation and will retrun the same
+ producer (per destination) on all subsequent calls.
+
+ the EMS Session to create a MessageProducer for
+
+ the EMS Destination to create a MessageProducer for
+
+ the new EMS MessageProducer
+
+ If there is any problem accessing the EMS API
+
+
+ Create a EMS MessageConsumer for the given Session and Destination.
+
+ the EMS Session to create a MessageConsumer for
+
+ the EMS Destination to create a MessageConsumer for
+
+ the message selector for this consumer (can be null)
+
+ the new EMS MessageConsumer
+
+ If there is any problem accessing the EMS API
+
+
+
+ Send the given message.
+
+ The session to operate on.
+ The destination to send to.
+ The message creator delegate callback to create a Message.
+
+
+
+ Send the given message.
+
+ The session to operate on.
+ The destination to send to.
+ The message creator callback to create a Message.
+
+
+ Send the given EMS message.
+ the EMS Session to operate on
+
+ the EMS Destination to send to
+
+ callback to create a EMS Message
+
+ delegate callback to create a EMS Message
+
+ If there is any problem accessing the EMS API
+
+
+ Actually send the given EMS message.
+ the EMS MessageProducer to send with
+
+ the EMS Message to send
+
+ If there is any problem accessing the EMS API
+
+
+
+ Execute the action specified by the given action object within
+ a EMS Session.
+
+ delegate that exposes the session
+
+ the result object from working with the session
+
+
+ Note that the value of PubSubDomain affects the behavior of this method.
+ If PubSubDomain equals true, then a Session is passed to the callback.
+ If false, then a Session is passed to the callback.b
+
+ If there is any problem accessing the EMS API
+
+
+ Execute the action specified by the given action object within
+ a EMS Session.
+
Note: The value of PubSubDomain affects the behavior of this method.
+ If PubSubDomain equals true, then a Session is passed to the callback.
+ If false, then a Session is passed to the callback.
+
+ callback object that exposes the session
+
+ the result object from working with the session
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to a EMS destination. The callback gives access to
+ the EMS session and MessageProducer in order to do more complex
+ send operations.
+
+ callback object that exposes the session/producer pair
+
+ the result object from working with the session
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to a EMS destination. The callback gives access to
+ the EMS session and MessageProducer in order to do more complex
+ send operations.
+
+ delegate that exposes the session/producer pair
+
+ the result object from working with the session
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the default destination.
+
This will only work with a default destination specified!
+
+ delegate callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the specified destination.
+ The MessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ delegate callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the specified destination.
+ The MessageCreator callback creates the message given a Session.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ delegate callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the default destination.
+
This will only work with a default destination specified!
+
+ callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the specified destination.
+ The MessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send a message to the specified destination.
+ The MessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ callback to create a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the default destination, converting the object
+ to a EMS message with a configured IMessageConverter.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter.
+
+ the destination to send this message to
+
+ the object to convert to a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the object to convert to a message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the default destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the destination to send this message to
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ If there is any problem accessing the EMS API
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the object to convert to a message.
+
+ the callback to modify the message
+
+ If there is any problem accessing the EMS API
+
+
+
+ Send the given object to the default destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+ the callback to modify the message
+ If there is any problem accessing the EMS API
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the destination to send this message to
+ the object to convert to a message
+ the callback to modify the message
+ If there is any problem accessing the EMS API
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a EMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+ the object to convert to a message.
+ the callback to modify the message
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ If there is any problem accessing the EMS API
+
+
+
+ Receive a message.
+
+ The session to operate on.
+ The destination to receive from.
+ The message selector for this consumer (can be null
+ The Message received, or null if none.
+
+
+
+ Receive a message.
+
+ The session to operate on.
+ The consumer to receive with.
+ The Message received, or null if none
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the EMS message selector expression (or null if none).
+ See the EMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in the default EMS queue. The callback gives access to the EMS
+ Session and QueueBrowser in order to browse the queue and react to the contents.
+
+ The action callback object that exposes the session/browser pair.
+ the result object from working with the session
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The queue to browse.
+ The action callback object that exposes the session/browser pair.
+ the result object from working with the session
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ Name of the queue to browse,
+ (to be resolved to an actual destination by a DestinationResolver)
+ The action callback object that exposes the session/browser pair.
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The EMS message selector expression (or null if none).
+ The action callback object that exposes the session/browser pair.
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The queue to browse.
+ The EMS message selector expression (or null if none).
+ The action callback object that exposes the session/browser pair.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ Name of the queue to browse,
+ (to be resolved to an actual destination by a DestinationResolver)
+ The EMS message selector expression (or null if none).
+ The action callback object that exposes the session/browser pair.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in the default EMS queue. The callback gives access to the EMS
+ Session and QueueBrowser in order to browse the queue and react to the contents.
+
+ The action callback delegate that exposes the session/browser pair.
+ the result object from working with the session
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The queue to browse.
+ The action callback delegate that exposes the session/browser pair.
+ the result object from working with the session
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ Name of the queue to browse,
+ (to be resolved to an actual destination by a DestinationResolver)
+ The action callback delegate that exposes the session/browser pair.
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The EMS message selector expression (or null if none).
+ The action callback delegate that exposes the session/browser pair.
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ The queue to browse.
+ The EMS message selector expression (or null if none).
+ The action callback delegate that exposes the session/browser pair.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Browses messages in a EMS queue. The callback gives access to the EMS Session
+ and QueueBrowser in order to browse the queue and react to the contents.
+
+ Name of the queue to browse,
+ (to be resolved to an actual destination by a DestinationResolver)
+ The EMS message selector expression (or null if none).
+ The action callback delegate that exposes the session/browser pair.
+
+ If there is any problem accessing the EMS API
+
+
+
+ Creates the queue browser.
+
+ The session.
+ The queue.
+ The selector.
+ A new queue browser
+
+
+
+ Gets or sets the default destination to be used on send/receive operations that do not
+ have a destination parameter.
+
+ Alternatively, specify a "defaultDestinationName", to be
+ dynamically resolved via the DestinationResolver.
+ The default destination.
+
+
+
+ Gets or sets the name of the default destination name
+ to be used on send/receive operations that
+ do not have a destination parameter.
+
+
+ Alternatively, specify a EMS Destination object as "DefaultDestination"
+
+ The name of the default destination.
+
+
+
+ Gets or sets the message converter for this template.
+
+
+ Used to resolve
+ Object parameters to convertAndSend methods and Object results
+ from receiveAndConvert methods.
+
The default converter is a SimpleMessageConverter, which is able
+ to handle BytesMessages, TextMessages and ObjectMessages.
+
+ The message converter.
+
+
+
+ Gets or sets a value indicating whether Message Ids are enabled.
+
+ true if message id enabled; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether message timestamps are enabled.
+
+
+ true if [message timestamp enabled]; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to inhibit the delivery of messages published by its own connection.
+
+
+ true if inhibit the delivery of messages published by its own connection; otherwise, false.
+
+
+
+ Gets or sets the receive timeout to use for recieve calls.
+
+ The default is -1, which means no timeout.
+ The receive timeout.
+
+
+
+ Gets or sets a value indicating whether to use explicit Quality of Service values.
+
+ If "true", then the values of deliveryMode, priority, and timeToLive
+ will be used when sending a message. Otherwise, the default values,
+ that may be set administratively, will be used
+ true if use explicit QoS values; otherwise, false.
+
+
+
+ Sets a value indicating the delivery mode QOS
+
+
+ This will set the delivery to persistent, non-persistent, or reliable delivery.
+ Default value is Message.DEFAULT_DELIVERY_MODE (aka TIBCO.EMS.DeliveryMode.PERSISTENT)
+
+ Integer value representing the delivery mode [delivery persistent]; otherwise, false.
+
+
+
+ Gets or sets the priority when sending.
+
+ Since a default value may be defined administratively,
+ this is only used when "isExplicitQosEnabled" equals "true".
+ The priority.
+
+
+
+ Gets or sets the time to live when sending
+
+ Since a default value may be defined administratively,
+ this is only used when "isExplicitQosEnabled" equals "true".
+ The time to live.
+
+
+
+ ResourceFactory implementation that delegates to this template's callback methods.
+
+
+
+ Callback for executing any number of operations on a provided
+ Session
+
+
+
To be used with the EmsTemplate.Execute(ISessionCallback)}
+ method, often implemented as an anonymous inner class.
+
+ Mark Pollack
+
+
+
+
+ Execute any number of operations against the supplied EMS
+ Session, possibly returning a result.
+
+ the EMS Session
+
+ a result object from working with the Session, if any (so can be null)
+
+ EMSException if there is any problem
+
+
+ Creates a EMS message given a Session
+
+
The Session typically is provided by an instance
+ of the EmsTemplate class.
+
+ Mark Pollack
+
+
+ Create a Message to be sent.
+ the EMS Session to be used to create the
+ Message (never null)
+
+ the Message to be sent
+
+ EMSException if thrown by EMS API methods
+
+
+
+ This is a TIBCO specific class so that we can reuse connections, session, and
+ message producers instead of creating/destroying them on each operation.
+
+
+
+
+ Callback for browsing the messages in an EMS queue.
+
+
+ To be used with EmsTemplate's callback methods that take a IBrowserCallback argument
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Perform operations on the given Session and QueueBrowser
+
+ The session.
+ The browser.
+ The object from working with the Session and QueueBrowser, may be null
+ If there is any problem when accessing EMS API
+
+
+ To be used with EmsTemplate's send method that
+ convert an object to a message.
+
+
+ It allows for further modification of the message after it has been processed
+ by the converter. This is useful for setting of EMS Header and Properties.
+
+ Mark Pollack
+
+
+ Apply a IMessagePostProcessor to the message. The returned message is
+ typically a modified version of the original.
+
+ the EMS message from the IMessageConverter
+
+ the modified version of the Message
+
+ EMSException if thrown by EMS API methods
+
+
+ Callback for sending a message to a EMS destination.
+
+
To be used with the EmsTemplate.Execute(IProducerCallback)
+ method, often implemented as an anonymous inner class.
+
+
The typical implementation will perform multiple operations on the
+ supplied EMS Session and MessageProducer.
+
+ Mark Pollack
+
+
+ Perform operations on the given Session and MessageProducer.
+ The message producer is not associated with any destination.
+
+ the EMS Session object to use
+
+ the EMS MessageProducer object to use
+
+ a result object from working with the Session, if any (can be null)
+
+
+
+
+ Delegate that creates a EMS message given a Session
+
+ the EMS Session to be used to create the
+ Message (never null)
+
+ the Message to be sent
+
+ EMSException if thrown by EMS API methods
+
+
+
+ Delegate that is used with EmsTemplate's ConvertAndSend method that converts
+ an object.
+
+
+ It allows for further modification of the message after it has been processed
+ by the converter. This is useful for setting of EMS Header and Properties.
+
+ Mark Pollack
+
+
+ Perform operations on the given Session and MessageProducer.
+ The message producer is not associated with any destination.
+
+ the EMS Session object to use
+
+ the EMS MessageProducer object to use
+
+ a result object from working with the Session, if any (can be null)
+
+
+
+
+ Callback delegate for code that operates on a Session.
+
+ The EMS Session object.
+
+ Allows you to execute any number of operations
+ on a single ISession, possibly returning a result a result.
+
+
+ A result object from working with the Session, if any (so can be null)
+
+ EMSException if there is any problem
+ Mark Pollack
+
+
+
+ Convenient superclass to access JndiProperties, JndiContextType or alternatively set the ILookupContext directly.
+
+ Juergen Hoeller
+ Mark Pollack
+
+
+
+ Create the JndiLookupContext if it has not been explicitly set.
+
+
+
+
+ Gets or sets the lookup context.
+
+ The lookup context.
+
+
+
+ Gets or sets the JNDI environment properties.
+
+ The jndi properties.
+
+
+
+ Gets or sets the type of the jndi context. The default is JndiContextType.JMS
+
+ The type of the jndi context.
+
+
+
+ The various JNDI Context types.
+
+
+
+
+ Create a tibjmsnaming context to lookup administered object inside the tibjmsnaming server.
+
+
+
+
+ Create a ldap context to lookup administered object in an ldap server.
+
+
+
+
+ Convenient superclass for JNDI-based service locators,
+ providing configurable lookup of a specific JNDI resource.
+
+
+
+ Exposes a JndiName property.
+
+ Subclasses may invoke the Lookup method whenever it is appropriate.
+ Some classes might do this on initialization, while others might do it
+ on demand. The latter strategy is more flexible in that it allows for
+ initialization of the locator before the JNDI object is available.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Ensure that the JndiName property is set and create the TIBCO EMS ILookupContext instance.
+
+
+
+
+ Lookups this instance using the JndiName and ExpectedType properties
+
+ The object retrieved from Jndi
+
+
+
+ Gets or sets the Jndi name to lookup.
+
+ The name of the jndi.
+
+
+
+ Gets or sets the type that the located JNDI object is supposed
+ to be assignable to, if any.
+
+ The expected type.
+
+
+
+ Return the Jndi object
+
+ The Jndi object
+
+
+
+ Sets the default object to fall back to if the JNDI lookup fails.
+ Default is none.
+
+
+ This can be an arbitrary bean reference or literal value.
+ It is typically used for literal values in scenarios where the JNDI environment
+ might define specific config settings but those are not required to be present.
+
+
+ The default object to use when lookup fails.
+
+
+
+ Return type of object retrieved from Jndi or the expected type if the Jndi retrieval
+ did not succeed.
+
+ Return value of retrieved object
+
+
+
+ Returns true
+
+
+
+
+ Gets the template object definition that should be used
+ to configure the instance of the object managed by this factory.
+
+
+
+
+
+ A Spring FactoryObject that returns TIBCO.EMS.ILookupContext. Use the returned
+ ILookupContext to do you lookups at runtime.
+
+
+
+ Important properties to set are JndiProperties and JndiContexType. JndiContextType is set to
+ LookupContextFactory.TIBJMS_NAMING_CONT by default.
+
+ To lookup objects at startup time and cache their values, as well as provide a
+ default value if lookup fail,
+
+
+ Mark Pollack
+
+
+
+ Returns the TIBCO.EMS.ILookupContext
+
+ TIBCO.EMS.ILookupContext
+
+
+
+ Return typeof(TIBCO.EMS.ILookupContext)
+
+
+
+
+ Returns true
+
+
+
+
+ Exception thrown if a type mismatch is encountered for an object
+ located in a JNDI environment.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ A message about the exception.
+
+
+
+
+ Initializes a new instance of the class
+ building an explanation text from the given arguments.
+
+ The Jndi name.
+ Type required type of the lookup.
+ The actual type that the lookup returned.
+
+
+
+ Gets the actual type that the lookup returned, if available.
+
+ The actual type that the lookup.
+
+
+
+ Gets the required type for the lookup, if available.
+
+ The equired type for the lookup
+
+
+
+ Exception to be thrown when the execution of a listener method failed.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class, with the specified message
+
+ The message.
+
+
+
+ Initializes a new instance of the class, with the specified message
+ and root cause exception
+
+ The message.
+ The inner exception.
+
+
+
+ Message listener adapter that delegates the handling of messages to target
+ listener methods via reflection, with flexible message type conversion.
+ Allows listener methods to operate on message content types, completely
+ independent from the EMS API.
+
+
+ By default, the content of incoming messages gets extracted before
+ being passed into the target listener method, to let the target method
+ operate on message content types such as String or byte array instead of
+ the raw Message. Message type conversion is delegated to a Spring
+ . By default, a
+ will be used. (If you do not want such automatic message conversion taking
+ place, then be sure to set the property
+ to null.)
+
+ If a target listener method returns a non-null object (typically of a
+ message content type such as String or byte array), it will get
+ wrapped in a EMS Message and sent to the response destination
+ (either the EMS "reply-to" destination or the
+ specified.
+
+
+ The sending of response messages is only available when
+ using the entry point (typically through a
+ Spring message listener container). Usage as standard EMS MessageListener
+ does not support the generation of response messages.
+
+ Consult the reference documentation for examples of method signatures compliant with this
+ adapter class.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Variant of the standard EMS MessageListener interface,
+ offering not only the received Message but also the underlying
+ Session object. The latter can be used to send reply messages,
+ without the need to access an external Connection/Session,
+ i.e. without the need to access the underlying ConnectionFactory.
+
+
+ Supported by Spring's
+ as direct alternative to the standard MessageListener interface.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Callback for processing a received EMS message.
+ Implementors are supposed to process the given Message,
+ typically sending reply messages through the given Session.
+
+ the received EMS message
+
+ the underlying EMS Session
+
+ EMSException if thrown by EMS methods
+
+
+
+ The default handler method name.
+
+
+
+
+ Initializes a new instance of the class with default settings.
+
+
+
+
+ Initializes a new instance of the class for the given handler object
+
+ The delegate object.
+
+
+
+ Standard JMS {@link MessageListener} entry point.
+ Delegates the message to the target listener method, with appropriate
+ conversion of the message arguments
+
+
+
+ In case of an exception, the method will be invoked.
+ Note
+ Does not support sending response messages based on
+ result objects returned from listener methods. Use the
+ entry point (typically through a Spring
+ message listener container) for handling result objects as well.
+
+ The incoming message.
+
+
+
+ Spring entry point.
+
+ Delegates the message to the target listener method, with appropriate
+ conversion of the message argument. If the target method returns a
+ non-null object, wrap in a EMS message and send it back.
+
+
+ The incoming message.
+ The session to operate on.
+
+
+
+ Initialize the default implementations for the adapter's strategies.
+
+
+
+
+ Handle the given exception that arose during listener execution.
+ The default implementation logs the exception at error level.
+ This method only applies when used as standard EMS MessageListener.
+ In case of the Spring mechanism,
+ exceptions get handled by the caller instead.
+
+
+ The exception to handle.
+
+
+
+ Extract the message body from the given message.
+
+ The message.
+ the content of the message, to be passed into the
+ listener method as argument
+ if thrown by EMS API methods
+
+
+
+ Gets the name of the listener method that is supposed to
+ handle the given message.
+ The default implementation simply returns the configured
+ default listener method, if any.
+
+ The EMS request message.
+ The converted JMS request message,
+ to be passed into the listener method as argument.
+ the name of the listener method (never null)
+ if thrown by EMS API methods
+
+
+
+ Handles the given result object returned from the listener method, sending a response message back.
+
+ The result object to handle (never null).
+ The original request message.
+ The session to operate on (may be null).
+
+
+
+ Builds a JMS message to be sent as response based on the given result object.
+
+ The JMS Session to operate on.
+ The content of the message, as returned from the listener method.
+ the JMS Message (never null)
+ If there was an error in message conversion
+ if thrown by EMS API methods
+
+
+
+ Post-process the given response message before it will be sent. The default implementation
+ sets the response's correlation id to the request message's correlation id.
+
+ The original incoming message.
+ The outgoing JMS message about to be sent.
+ if thrown by EMS API methods
+
+
+
+ Determine a response destination for the given message.
+
+
+ The default implementation first checks the JMS Reply-To
+ Destination of the supplied request; if that is not null
+ it is returned; if it is null, then the configured
+ default response destination}
+ is returned; if this too is null, then an
+ is thrown.
+
+
+ The original incoming message.
+ Tthe outgoing message about to be sent.
+ The session to operate on.
+ the response destination (never null)
+ if thrown by EMS API methods
+ if no destination can be determined.
+
+
+
+ Resolves the default response destination into a Destination, using this
+ accessor's in case of a destination name.
+
+ The session to operate on.
+ The located destination
+
+
+
+ Sends the given response message to the given destination.
+
+ The session to operate on.
+ The destination to send to.
+ The outgoing message about to be sent.
+
+
+
+ Post-process the given message producer before using it to send the response.
+ The default implementation is empty.
+
+ The producer that will be used to send the message.
+ The outgoing message about to be sent.
+
+
+
+ Gets or sets the handler object to delegate message listening to.
+
+
+ Specified listener methods have to be present on this target object.
+ If no explicit handler object has been specified, listener
+ methods are expected to present on this adapter instance, that is,
+ on a custom subclass of this adapter, defining listener methods.
+
+ The handler object.
+
+
+
+ Gets or sets the default handler method to delegate to,
+ for the case where no specific listener method has been determined.
+ Out-of-the-box value is ("HandleMessage"}.
+
+ The default handler method.
+
+
+
+ Sets the default destination to send response messages to. This will be applied
+ in case of a request message that does not carry a "JMSReplyTo" field.
+ Response destinations are only relevant for listener methods that return
+ result objects, which will be wrapped in a response message and sent to a
+ response destination.
+
+ Alternatively, specify a "DefaultResponseQueueName" or "DefaultResponseTopicName",
+ to be dynamically resolved via the DestinationResolver.
+
+
+ The default response destination.
+
+
+
+ Sets the name of the default response queue to send response messages to.
+ This will be applied in case of a request message that does not carry a
+ "EMSReplyTo" field.
+ Alternatively, specify a JMS Destination object as "defaultResponseDestination".
+
+ The name of the default response destination queue.
+
+
+
+ Sets the name of the default response topic to send response messages to.
+ This will be applied in case of a request message that does not carry a
+ "ReplyTo" field.
+ Alternatively, specify a JMS Destination object as "defaultResponseDestination".
+
+ The name of the default response destination topic.
+
+
+
+ Gets or sets the destination resolver that should be used to resolve response
+ destination names for this adapter.
+ The default resolver is a .
+ Specify another implementation, for other strategies, perhaps from a directory service.
+
+ The destination resolver.
+
+
+
+ Gets or sets the message converter that will convert incoming JMS messages to
+ listener method arguments, and objects returned from listener
+ methods back to EMS messages.
+
+
+ The default converter is a {@link SimpleMessageConverter}, which is able
+ to handle BytesMessages}, TextMessages, MapMessages, and ObjectMessages.
+
+
+ The message converter.
+
+
+
+ Internal class combining a destination name and its target destination type (queue or topic).
+
+
+
+
+ Common base class for all containers which need to implement listening
+ based on a Connection (either shared or freshly obtained for each attempt).
+ Inherits basic Connection and Session configuration handling from the
+ base class.
+
+
+ This class provides basic lifecycle management, in particular management
+ of a shared Connection. Subclasses are supposed to plug into this
+ lifecycle, implementing the as well as
+
+
+
+
+
+ Mark Pollack
+
+
+
+ The monitor object to lock on when performing operations on the connection.
+
+
+
+
+ The monitor object to lock on when performing operations that update the lifecycle of the container.
+
+
+
+
+ Call base class method, then and then
+
+
+
+
+ Validates the configuration of this container. The default implementation
+ is empty. To be overriden in subclasses.
+
+
+
+
+ Calls when the application context destroys the container instance.
+
+
+
+
+ Initializes this container. Creates a Connection, starts the Connection
+ (if the property hasn't been turned off), and calls
+ .
+
+ If startup failed
+
+
+
+ Stop the shared connection, call , and close this container.
+
+
+
+
+ Starts this container.
+
+ if starting failed.
+
+
+
+ Start the shared Connection, if any, and notify all invoker tasks.
+
+
+
+
+ Stops this container.
+
+ if stopping failed.
+
+
+
+ Notify all invoker tasks and stop the shared Connection, if any.
+
+ if thrown by EMS API methods.
+
+
+
+
+ Register any invokers within this container.
+ Subclasses need to implement this method for their specific
+ invoker management process. A shared Connection, if any, will already have been
+ started at this point.
+
+
+
+
+ Close the registered invokers. Subclasses need to implement this method
+ for their specific invoker management process. A shared Connection, if any,
+ will automatically be closed afterwards.
+
+
+
+
+ Establishes a shared Connection for this container.
+
+
+
+ The default implementation delegates to
+ which does one immediate attempt and throws an exception if it fails.
+ Can be overridden to have a recovery process in place, retrying
+ until a Connection can be successfully established.
+
+
+ If thrown by EMS API methods
+
+
+
+ Refreshes the shared connection that this container holds.
+
+
+ Called on startup and also after an infrastructure exception
+ that occurred during invoker setup and/or execution.
+
+ If thrown by EMS API methods
+
+
+
+ Creates the shared connection for this container.
+
+
+ The default implementation creates a standard Connection
+ and prepares it through
+
+ the prepared Connection
+ if the creation failed.
+
+
+
+ Prepares the given connection, which is about to be registered
+ as shared Connection for this container.
+
+
+ The default implementation sets the specified client id, if any.
+ Subclasses can override this to apply further settings.
+
+ The connection to prepare.
+ If the preparation efforts failed.
+
+
+
+ Starts the shared connection.
+
+ If thrown by EMS API methods
+
+
+
+
+ Stops the shared connection.
+
+ if thrown by EMS API methods.
+
+
+
+ Gets or sets the client id for a shared Connection created and used by this container.
+
+
+ Note that client ids need to be unique among all active Connections
+ of the underlying JMS provider. Furthermore, a client id can only be
+ assigned if the original ConnectionFactory hasn't already assigned one.
+
+ The client id.
+
+
+ Set whether to automatically start the listener after initialization.
+
Default is "true"; set this to "false" to allow for manual startup.
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+ The name of the object in the factory.
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+
+ Gets a value indicating whether this container is currently running,
+ that is, whether it has been started and not stopped yet.
+
+
+ true if this container is running; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this container's listeners are generally allowed to run.
+
+
+
+ >This implementation always returns true; the default 'running'
+ state is purely determined by /.
+
+
+ Subclasses may override this method to check against temporary
+ conditions that prevent listeners from actually running. In other words,
+ they may apply further restrictions to the 'running' state, returning
+ false if such a restriction prevents listeners from running.
+
+
+ true if running allowed; otherwise, false.
+
+
+
+ Gets a value indicating whether this container is currently active,
+ that is, whether it has been set up but not shut down yet.
+
+ true if active; otherwise, false.
+
+
+ Return whether a shared EMS Connection should be maintained
+ by this listener container base class.
+
+
+
+
+
+ Gets the shared connection maintained by this container.
+ Available after initialization.
+
+ The shared connection (never null)
+ if this container does not maintain a
+ shared Connection, or if the Connection hasn't been initialized yet.
+
+
+
+
+
+ Exception that indicates that the initial setup of this container's
+ shared Connection failed. This is indicating to invokers that they need
+ to establish the shared Connection themselves on first access.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message.
+
+
+
+ Abstract base class for message listener containers. Can either host
+ a standard EMS MessageListener or a Spring-specific
+
+
+
+
+
+ Validate that the destination is not null and that if the subscription is durable, then we are not
+ using the Pub/Sub domain.
+
+
+
+
+ Executes the specified listener,
+ committing or rolling back the transaction afterwards (if necessary).
+
+ The session to operate on.
+ The received message.
+
+
+
+
+
+
+
+ Executes the specified listener,
+ committing or rolling back the transaction afterwards (if necessary).
+
+ The session to operate on.
+ The received message.
+ If thrown by EMS API methods.
+
+
+
+
+
+
+ Invokes the specified listener: either as standard EMS MessageListener
+ or (preferably) as Spring ISessionAwareMessageListener.
+
+ The session to operate on.
+ The received message.
+ If thrown by EMS API methods.
+
+
+
+
+ Invoke the specified listener as Spring ISessionAwareMessageListener,
+ exposing a new EMS Session (potentially with its own transaction)
+ to the listener if demanded.
+
+ The Spring ISessionAwareMessageListener to invoke.
+ The session to operate on.
+ The received message.
+ If thrown by EMS API methods.
+
+
+
+
+
+ Invoke the specified listener as standard JMS MessageListener.
+
+ Default implementation performs a plain invocation of the
+ OnMessage methods
+ The listener to invoke.
+ The received message.
+ if thrown by the EMS API methods
+
+
+
+ Perform a commit or message acknowledgement, as appropriate
+
+ The session to commit.
+ The message to acknowledge.
+ In case of commit failure
+
+
+
+ Determines whether the given Session is locally transacted, that is, whether
+ its transaction is managed by this listener container's Session handling
+ and not by an external transaction coordinator.
+
+
+ The Session's own transacted flag will already have been checked
+ before. This method is about finding out whether the Session's transaction
+ is local or externally coordinated.
+
+ The session to check.
+
+ true if the is session locally transacted; otherwise, false.
+
+
+
+
+
+ Perform a rollback, if appropriate.
+
+ The session to rollback.
+ In case of a rollback error
+
+
+
+ Perform a rollback, handling rollback excepitons properly.
+
+ The session to rollback.
+ The thrown application exception.
+ in case of a rollback error.
+
+
+
+ Handle the given exception that arose during listener execution.
+
+
+ The default implementation logs the exception at error level,
+ not propagating it to the JMS provider - assuming that all handling of
+ acknowledgement and/or transactions is done by this listener container.
+ This can be overridden in subclasses.
+
+ The exceptin to handle
+
+
+
+ Invokes the registered exception listener, if any.
+
+ The exception that arose during EMS processing.
+
+
+
+
+ Checks the message listener, throwing an exception
+ if it does not correspond to a supported listener type.
+ By default, only a standard JMS MessageListener object or a
+ Spring object will be accepted.
+
+ The message listener.
+
+
+
+ Gets or sets the destination to receive messages from. Will be null
+ if the configured destination is not an actual Destination type;
+ c.f. when the destination is a String.
+
+ The destination.
+
+
+
+ Gets or sets the name of the destination to receive messages from.
+ Will be null if the configured destination is not a
+ string type; c.f. when it is an actual Destination object.
+
+ The name of the destination.
+
+
+
+ Gets or sets the message selector.
+
+ The message selector expression (or null if none)..
+
+
+
+ Gets or sets the message listener to register.
+
+
+
+
+ This can be either a standard EMS MessageListener object or a
+ Spring object.
+
+
+ The message listener.
+
+
+
+ Gets or sets a value indicating whether the subscription is durable.
+
+
+ Set whether to make the subscription durable. The durable subscription name
+ to be used can be specified through the "DurableSubscriptionName" property.
+ Default is "false". Set this to "true" to register a durable subscription,
+ typically in combination with a "DurableSubscriptionName" value (unless
+ your message listener class name is good enough as subscription name).
+
+ Only makes sense when listening to a topic (pub-sub domain).
+
+ true if the subscription is durable; otherwise, false.
+
+
+
+ Gets or sets the name of the durable subscription to create.
+
+
+ To be applied in case of a topic (pub-sub domain) with subscription durability activated.
+ The durable subscription name needs to be unique within this client's
+ client id. Default is the class name of the specified message listener.
+ Note: Only 1 concurrent consumer (which is the default of this
+ message listener container) is allowed for each durable subscription.
+
+
+ The name of the durable subscription.
+
+
+
+ Gets or sets the exception listener to notify in case of a EMSException thrown
+ by the registered message listener or the invocation infrastructure.
+
+ The exception listener.
+
+
+
+ Sets an ErrorHandler to be invoked in case of any uncaught exceptions thrown
+ while processing a Message. By default there will be no ErrorHandler
+ so that error-level logging is the only result.
+
+ The error handler.
+
+
+
+ Gets or sets a value indicating whether to expose listener session to a registered
+ as well as to calls.
+
+
+ Default is "true", reusing the listener's Session.
+ Turn this off to expose a fresh Session fetched from the same
+ underlying Connection instead, which might be necessary
+ on some messaging providers.
+ Note that Sessions managed by an external transaction manager will
+ always get exposed to
+ calls. So in terms of EmsTemplate exposure, this setting only affects
+ locally transacted Sessions.
+
+
+
+ true if expose listener session; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to accept messages while
+ the listener container is in the process of stopping.
+
+
+
+ Return whether to accept received messages while the listener container
+ receive attempt. Switch this flag on to fully process such messages
+ even in the stopping phase, with the drawback that even newly sent
+ messages might still get processed (if coming in before all receive
+ timeouts have expired).
+
+
+ Aborting receive attempts for such incoming messages
+ might lead to the provider's retry count decreasing for the affected
+ messages. If you have a high number of concurrent consumers, make sure
+ that the number of retries is higher than the number of consumers,
+ to be on the safe side for all potential stopping scenarios.
+
+
+
+ true if accept messages while in the process of stopping; otherwise, false.
+
+
+
+
+ Internal exception class that indicates a rejected message on shutdown.
+ Used to trigger a rollback for an external transaction manager in that case.
+
+
+
+
+ EmsResourceHolder marker subclass that indicates local exposure,
+ i.e. that does not indicate an externally managed transaction.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ The session.
+
+
+
+ Exception thrown when the maximum connection recovery time has been exceeded.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class, with the specified message
+
+ The message.
+
+
+
+ Initializes a new instance of the class, with the specified message
+ and root cause exception
+
+ The message.
+ The inner exception.
+
+
+
+ Message listener container that uses the plain EMS client API's
+ MessageConsumer.Listener method to create concurrent
+ MessageConsumers for the specified listeners.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ The default recovery time interval between connection reconnection attempts
+
+
+
+
+ The total time connection recovery will be attempted.
+
+
+
+
+ Call base class for valdation and then check that if the subscription is durable that the number of
+ concurrent consumers is equal to one.
+
+
+
+
+ Creates the specified number of concurrent consumers,
+ in the form of a JMS Session plus associated MessageConsumer
+
+
+
+
+
+ Re-initializes this container's EMS message consumers,
+ if not initialized already.
+
+
+
+
+ Registers this listener container as EMS ExceptionListener on the shared connection.
+
+
+
+
+
+ implementation, invoked by the EMS provider in
+ case of connection failures. Re-initializes this listener container's
+ shared connection and its sessions and consumers.
+
+ The reported connection exception.
+
+
+
+ Refresh the underlying Connection, not returning before an attempt has been
+ successful. Called in case of a shared Connection as well as without shared
+ Connection, so either needs to operate on the shared Connection or on a
+ temporary Connection that just gets established for validation purposes.
+
+
+ The default implementation retries until it successfully established a
+ Connection, for as long as this message listener container is active.
+ Applies the specified recovery interval between retries.
+
+
+
+
+ The amount of time to sleep in between recovery attempts.
+
+
+
+
+ Initialize the Sessions and MessageConsumers for this container.
+
+ in case of setup failure.
+
+
+
+ Creates a MessageConsumer for the given Session,
+ registering a MessageListener for the specified listener
+
+ The session to work on.
+ the MessageConsumer"/>
+ if thrown by EMS methods
+
+
+
+ Close the message consumers and sessions.
+
+ EMSException if destruction failed
+
+
+
+ Creates a MessageConsumer for the given Session and Destination.
+
+ The session to create a MessageConsumer for.
+ The destination to create a MessageConsumer for.
+ The new MessageConsumer
+
+
+
+ Gets or sets a value indicating whether to inhibit the delivery of messages published by its own connection.
+ Default is "false".
+
+ true if should inhibit the delivery of messages published by its own connection; otherwise, false.
+
+
+
+ Specify the number of concurrent consumers to create. Default is 1.
+
+
+ Raising the number of concurrent consumers is recommendable in order
+ to scale the consumption of messages coming in from a queue. However,
+ note that any ordering guarantees are lost once multiple consumers are
+ registered. In general, stick with 1 consumer for low-volume queues.
+ Do not raise the number of concurrent consumers for a topic.
+ This would lead to concurrent consumption of the same message,
+ which is hardly ever desirable.
+
+
+ The concurrent consumers.
+
+
+
+ Sets the time interval between connection recovery attempts. The default is 5 seconds.
+
+ The recovery interval.
+
+
+
+ Sets the max recovery time to try reconnection attempts. The default is 10 minutes.
+
+ The max recovery time.
+
+
+
+ Always use a shared EMS connection
+
+
+
+ Strategy interface that specifies a IMessageConverter
+ between .NET objects and EMS messages.
+
+
+ Mark Pollack
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Convert a .NET object to a EMS Message using the supplied session
+ to create the message object.
+
+ the object to convert
+
+ the Session to use for creating a EMS Message
+
+ the EMS Message
+
+ EMSException if thrown by EMS API methods
+ MessageConversionException in case of conversion failure
+
+
+ Convert from a EMS Message to a .NET object.
+ the message to convert
+
+ the converted .NET object
+
+ MessageConversionException in case of conversion failure
+
+
+
+ Provides a layer of indirection when adding the 'type' of the object as a message property.
+
+ Mark Pollack
+
+
+
+ Convert from a type to a string.
+
+ The type of object to convert.
+
+
+
+
+ Convert from a string to a type
+
+ The type id.
+
+
+
+
+ Gets the name of the field in the message that has type information..
+
+ The name of the type id field.
+
+
+ Thrown by IMessageConverter implementations when the conversion
+ of an object to/from a Message fails.
+
+ Mark Pollack
+
+
+
+ Creates a new instance of the IMessageConverterException class. with the specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the IMessageConverterException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+ A simple message converter that can handle TextMessages, BytesMessages,
+ MapMessages, and ObjectMessages. Used as default by EmsTemplate, for
+ ConvertAndSend and ReceiveAndConvert operations.
+
+
Converts a String to a EMS TextMessage, a byte array to a EMS BytesMessage,
+ a Map to a EMS MapMessage, and a Serializable object to a EMS ObjectMessage
+ (or vice versa).
+
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Convert a .NET object to a EMS Message using the supplied session
+ to create the message object.
+
+ the object to convert
+
+ the Session to use for creating a EMS Message
+
+ the EMS Message
+
+ EMSException if thrown by EMS API methods
+ MessageConversionException in case of conversion failure
+
+
+ Convert from a EMS Message to a .NET object.
+ the message to convert
+
+ the converted .NET object
+
+ MessageConversionException in case of conversion failure
+
+
+ Create a EMS TextMessage for the given String.
+ the String to convert
+
+ current EMS session
+
+ the resulting message
+
+ EMSException if thrown by EMS methods
+
+
+ Create a EMS BytesMessage for the given byte array.
+ the byyte array to convert
+
+ current EMS session
+
+ the resulting message
+
+ EMSException if thrown by EMS methods
+
+
+ Create a EMS MapMessage for the given Map.
+ the Map to convert
+
+ current EMS session
+
+ the resulting message
+
+ EMSException if thrown by EMS methods
+
+
+ Create a EMS ObjectMessage for the given Serializable object.
+ the Serializable object to convert
+
+ current EMS session
+
+ the resulting message
+
+ EMSException if thrown by EMS methods
+
+
+ Extract a String from the given TextMessage.
+ the message to convert
+
+ the resulting String
+
+ EMSException if thrown by EMS methods
+
+
+ Extract a byte array from the given BytesMessage.
+ the message to convert
+
+ the resulting byte array
+
+ EMSException if thrown by EMS methods
+
+
+ Extract a IDictionary from the given MapMessage.
+ the message to convert
+
+ the resulting Map
+
+ EMSException if thrown by EMS methods
+
+
+
+ Extracts the serializable object from the given object message.
+
+ The message to convert.
+ The resulting serializable object.
+
+
+
+ Provides a layer of indirection when adding the 'type' of the object as a message property.
+
+
+
+
+ Initializes a new instance of the
+
+
+
+
+ Convert from a type to a string.
+
+ The type of object to convert.
+
+
+
+
+ Convert from a string to a type
+
+ The type id.
+
+
+
+
+ Afters the properties set.
+
+
+
+
+ Gets or sets the id type mapping.
+
+ The id type mapping.
+
+
+
+ Gets the name of the field in the message that has type information..
+
+ The name of the type id field.
+
+
+
+ Sets the default hashtable class.
+
+ The default hashtable class.
+
+
+
+ Gets or sets the default namespace.
+
+ The default namespace.
+
+
+
+ Gets or sets the default name of the assembly.
+
+ The default name of the assembly.
+
+
+
+ Convert an object via XML serialization for sending via an ITextMessage
+
+ Mark Pollack
+
+
+
+ Convert a .NET object to a EMS Message using the supplied session
+ to create the message object.
+
+ the object to convert
+ the Session to use for creating a EMS Message
+ the EMS Message
+ EMSException if thrown by EMS API methods
+ MessageConversionException in case of conversion failure
+
+
+
+ Gets the XML string for an object
+
+ The object to convert.
+ XML string
+
+
+
+ Convert from a EMS Message to a .NET object.
+
+ the message to convert
+ the converted .NET object
+ MessageConversionException in case of conversion failure
+
+
+
+ Gets the type of the target given the message.
+
+ The message.
+ Type of the target
+
+
+
+ Converts a byte array to a UTF8 string.
+
+ The characters.
+ UTF8 string
+
+
+
+ Converts a UTF8 string to a byte array
+
+ The p XML string.
+
+
+
+
+ Sets the type mapper.
+
+ The type mapper.
+
+
+
+ Gets or sets a value indicating whether encoder should emit UTF8 byte order mark. Default is false.
+
+
+ true to specify that a Unicode byte order mark is provided; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to throw an exception on invalid bytes. Default is true.
+
+ true to specify that an exception be thrown when an invalid encoding is detected; otherwise, false.
+
+
+
+ Simple DestinationResolver implementation resolving destination names
+ as dynamic destinations.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Strategy interface for resolving EMS destinations.
+
+
+ Used by EmsTemplate for resolving
+ destination names from simple Strings to actual
+ Destination implementation instances.
+
+
+ The default DestinationResolver implementation used by
+ EmsTemplate instances is the
+ DynamicDestinationResolver class. Consider using the
+ JndDestinationResolver for more advanced scenarios.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Resolve the given destination name, either as located resource
+ or as dynamic destination.
+
+ the current EMS Session
+
+ the name of the destination
+
+ true if the domain is pub-sub, false if P2P
+
+ the EMS destination (either a topic or a queue)
+
+ EMSException if resolution failed
+
+
+ Resolve the given destination name, either as located resource
+ or as dynamic destination.
+
+ the current EMS Session
+
+ the name of the destination
+
+ true if the domain is pub-sub, false if P2P
+
+ the EMS destination (either a topic or a queue)
+
+ EMSException if resolution failed
+
+
+ Resolve the given destination name to a Topic.
+ the current EMS Session
+
+ the name of the desired Topic.
+
+ the EMS Topic name
+
+ EMSException if resolution failed
+
+
+ Resolve the given destination name to a Queue.
+ the current EMS Session
+
+ the name of the desired Queue.
+
+ the EMS Queue name
+
+ EMSException if resolution failed
+
+
+
+ Generic utility methods for working with EMS. Mainly for internal use
+ within the framework, but also useful for custom EMS access code.
+
+
+
+ Close the given EMS Connection and ignore any thrown exception.
+ This is useful for typical finally blocks in manual EMS code.
+
+ the EMS Connection to close (may be null)
+
+
+
+ Close the given EMS Connection and ignore any thrown exception.
+ This is useful for typical finally blocks in manual EMS code.
+
+ the EMS Connection to close (may be null)
+
+ whether to call stop() before closing
+
+
+
+ Close the given EMS Session and ignore any thrown exception.
+ This is useful for typical finally blocks in manual EMS code.
+
+ the EMS Session to close (may be null)
+
+
+
+ Close the given EMS MessageProducer and ignore any thrown exception.
+ This is useful for typical finally blocks in manual EMS code.
+
+ the EMS MessageProducer to close (may be null)
+
+
+
+ Close the given EMS MessageConsumer and ignore any thrown exception.
+ This is useful for typical finally blocks in manual EMS code.
+
+ the EMS MessageConsumer to close (may be null)
+
+
+
+ Commit the Session if not within a distributed transaction.
+ Needs investigation - no distributed tx in .NET messaging providers
+ the EMS Session to commit
+
+ EMSException if committing failed
+
+
+ Rollback the Session if not within a distributed transaction.
+ Needs investigation - no distributed tx in EMS
+ the EMS Session to rollback
+
+ EMSException if committing failed
+
+
+
+ Closes the given queue browser and ignore any thrown exception.
+ This is useful for typical finally blocks in manual EMS code.
+
+ The queue browser to close (may be null.
+
+
+
+ Converts the acknowledgement mode from an integer to an enumeration. If the integer
+ does not match a valid enumeration, the returned enumeration is SessionMode.AutoAcknowledge
+
+ The ack mode.
+ The corresponding SessionMode enumeration
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Messaging.Nms.dll b/Resources/Libraries/Spring.NET/Spring.Messaging.Nms.dll
new file mode 100644
index 00000000..012fbbe4
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Messaging.Nms.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Messaging.Nms.pdb b/Resources/Libraries/Spring.NET/Spring.Messaging.Nms.pdb
new file mode 100644
index 00000000..30300af6
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Messaging.Nms.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Messaging.Nms.xml b/Resources/Libraries/Spring.NET/Spring.Messaging.Nms.xml
new file mode 100644
index 00000000..03eb447a
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Messaging.Nms.xml
@@ -0,0 +1,4469 @@
+
+
+
+ Spring.Messaging.Nms
+
+
+
+
+ Parser for the NMS <listener-container> element.
+
+ Mark Fisher
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Parse the specified XmlElement and register the resulting
+ ObjectDefinitions with the IObjectDefinitionRegistry
+ embedded in the supplied
+
+ The element to be parsed.
+ TThe object encapsulating the current state of the parsing process.
+ Provides access to a IObjectDefinitionRegistry
+ The primary object definition.
+
+
+ This method is never invoked if the parser is namespace aware
+ and was called to process the root node.
+
+
+
+
+
+ Namespace parser for the nms namespace.
+
+ Mark Fisher
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Register a MessageListenerContainer for the 'listener-container' tag.
+
+
+
+
+ NMS MessageConsumer decorator that adapts all calls
+ to a shared MessageConsumer instance underneath.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ The target.
+
+
+
+ Receives the next message produced for this message consumer.
+
+ the next message produced for this message consumer, , or null if this message consumer is concurrently closed
+
+
+
+ Receives the next message that arrives within the specified timeout interval.
+
+ The timeout value.
+ the next message produced for this message consumer, or null if the timeout expires or this message consumer is concurrently closed
+
+
+
+ Receives the next message if one is immediately available.
+
+ the next message produced for this message consumer, or null if one is not available
+
+
+
+ No-op implementation since it is caching.
+
+
+
+
+ Dispose of wrapped MessageConsumer
+
+
+
+
+ Description that shows this is a cached MessageConsumer
+
+ Description that shows this is a cached MessageConsumer
+
+
+
+ Gets the target MessageConsumer, the consumer we are 'wrapping'
+
+ The target MessageConsumer.
+
+
+
+ Register for message events.
+
+
+
+
+ A Delegate that is called each time a Message is dispatched to allow the client to do
+ any necessary transformations on the received message before it is delivered.
+
+
+
+
+
+ MessageProducer decorator that adapts calls to a shared MessageProducer
+ instance underneath, managing QoS settings locally within the decorator.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ The target.
+
+
+
+ Sends the specified message.
+
+ The message.
+
+
+
+ Sends a message to the specified message.
+
+ The message to send.
+ The QOS to use for sending .
+ The message priority.
+ The time to live.
+
+
+
+ Sends a message to the specified destination.
+
+ The destination.
+ The message.
+
+
+
+ Sends a message the specified destination.
+
+ The destination.
+ The message to send.
+ The QOS to use for sending .
+ The priority.
+ The time to live.
+
+
+
+ Creates the message.
+
+ A new message
+
+
+
+ Creates the text message.
+
+ A new text message.
+
+
+
+ Creates the text message.
+
+ The text.
+ A texst message with the given text.
+
+
+
+ Creates the map message.
+
+ a new map message.
+
+
+
+ Creates the object message.
+
+ The body.
+ A new object message with the given body.
+
+
+
+ Creates the bytes message.
+
+ A new bytes message.
+
+
+
+ Creates the bytes message.
+
+ The body.
+ A new bytes message with the given body.
+
+
+
+ Creates the stream message.
+
+ A new stream message.
+
+
+
+ Reset properties.
+
+
+
+
+ Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+
+
+
+
+ Returns string indicated this is a wrapped MessageProducer
+
+
+
+
+
+ Gets the target MessageProducer, the producer we are 'wrapping'
+
+ The target MessageProducer.
+
+
+
+ A delegate that is called each time a Message is sent from this Producer which allows
+ the application to perform any needed transformations on the Message before it is sent.
+ The Session instance sets the delegate on each Producer it creates.
+
+
+
+
+
+ Gets or sets a value indicating what DeliveryMode this
+ should use, for example a persistent QOS
+
+
+
+
+
+ Gets or sets the time to live value for messages sent with this producer.
+
+ The time to live.
+
+
+
+ Gets or sets the request timeout for the message producer.
+
+ The request timeout.
+
+
+
+ Gets or sets the priority of messages sent with this producer.
+
+ The priority.
+
+
+
+ Gets or sets a value indicating whether disable setting of the message ID property.
+
+ true if disable message ID setting; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether disable setting the message timestamp property.
+
+
+ true if disable message timestamp; otherwise, false.
+
+
+
+
+ Wrapper for Session that caches producers and registers itself as available
+ to the session cache when being closed. Generally used for testing purposes or
+ if need to get at the wrapped Session object via the TargetSession property (for
+ vendor specific methods).
+
+ Juergen Hoeller
+ Mark Pollack
+
+
+
+ Subinterface of Session to be implemented by
+ implementations that wrap an Session to provide added
+ functionality. Allows access to the the underlying target Session.
+
+ Mark Pollack
+
+
+
+
+
+ Gets the target session of the decorator.
+ This will typically be the native provider Session or a wrapper from a session pool.
+
+ The underlying session, never null
+
+
+
+ Initializes a new instance of the class.
+
+ The target session.
+ The session list.
+ The CachingConnectionFactory.
+
+
+
+ Creates the producer, potentially returning a cached instance.
+
+ A message producer, potentially cached.
+
+
+
+ Creates the producer, potentially returning a cached instance.
+
+ The destination.
+ A message producer.
+
+
+
+ If have not yet reached session cache size, cache the session, otherwise
+ dispose of all cached message producers and close the session.
+
+
+
+
+ Creates the consumer, potentially returning a cached instance.
+
+ The destination.
+ A message consumer
+
+
+
+ Creates the consumer, potentially returning a cached instance.
+
+ The destination.
+ The selector.
+ A message consumer
+
+
+
+ Creates the consumer, potentially returning a cached instance.
+
+ The destination.
+ The selector.
+ if set to true [no local].
+ A message consumer.
+
+
+
+ Creates the durable consumer, potentially returning a cached instance.
+
+ The destination.
+ The name of the durable subscription.
+ The selector.
+ if set to true [no local].
+ A message consumer
+
+
+
+ Deletes the durable consumer.
+
+ The name of the durable subscription.
+
+
+
+ Creates the consumer.
+
+ The destination.
+ The selector.
+ if set to true [no local].
+ The durable subscription name.
+
+
+
+
+ Gets the queue.
+
+ The name.
+
+
+
+
+ Gets the topic.
+
+ The name.
+
+
+
+
+ Creates the temporary queue.
+
+
+
+
+
+ Creates the temporary topic.
+
+
+
+
+
+ Deletes the destination.
+
+ The destination.
+
+
+
+ Creates the message.
+
+
+
+
+
+ Creates the text message.
+
+
+
+
+
+ Creates the text message.
+
+ The text.
+
+
+
+
+ Creates the map message.
+
+
+
+
+
+ Creates the object message.
+
+ The body.
+
+
+
+
+ Creates the bytes message.
+
+
+
+
+
+ Creates the bytes message.
+
+ The body.
+
+
+
+
+ Creates the stream message.
+
+
+
+
+
+ Commits this instance.
+
+
+
+
+ Rollbacks this instance.
+
+
+
+
+ Call dispose on the target.
+
+
+
+
+ Creates the queue browser with a specified selector
+
+ The queue.
+ The selector.
+ The Queue browser
+
+
+
+ Creates the queue browser.
+
+ The queue.
+ The Queue browser
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+ Gets the target, for testing purposes.
+
+ The target.
+
+
+
+ A Delegate that is called each time a Message is dispatched to allow the client to do
+ any necessary transformations on the received message before it is delivered.
+ The Session instance sets the delegate on each Consumer it creates.
+
+
+
+
+
+ A delegate that is called each time a Message is sent from this Producer which allows
+ the application to perform any needed transformations on the Message before it is sent.
+ The Session instance sets the delegate on each Producer it creates.
+
+
+
+
+
+ Gets or sets the request timeout.
+
+ The request timeout.
+
+
+
+ Gets a value indicating whether this is transacted.
+
+ true if transacted; otherwise, false.
+
+
+
+ Gets the acknowledgement mode.
+
+ The acknowledgement mode.
+
+
+
+ subclass that adds
+ Session, MessageProducer, and MessageConsumer caching. This ConnectionFactory
+ also switches the ReconnectOnException property to true
+ by default, allowing for automatic recovery of the underlying
+ Connection.
+
+
+ By default, only one single Session will be cached, with further requested
+ Sessions being created and disposed on demand. Consider raising the
+ SessionCacheSize property in case of a high-concurrency environment.
+
+ NOTE: This ConnectionFactory requires explicit closing of all Sessions
+ obtained from its shared Connection. This is the usual recommendation for
+ native NMS access code anyway. However, with this ConnectionFactory, its use
+ is mandatory in order to actually allow for Session reuse.
+
+
+ Note also that MessageConsumers obtained from a cached Session won't get
+ closed until the Session will eventually be removed from the pool. This may
+ lead to semantic side effects in some cases. For a durable subscriber, the
+ logical Session.Close() call will also close the subscription.
+ Re-registering a durable consumer for the same subscription on the same
+ Session handle is not supported; close and reobtain a cached Session first.
+
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ A ConnectionFactory adapter that returns the same Connection
+ from all CreateConnection() calls, and ignores calls to
+ Connection.Close(). According to the JMS Connection
+ model, this is perfectly thread-safe. The
+ shared Connection can be automatically recovered in case of an Exception.
+
+
+
+ You can either pass in a specific Connection directly or let this
+ factory lazily create a Connection via a given target ConnectionFactory.
+
+
+ Useful for testing and in applications when you want to keep using the
+ same Connection for multiple
+ calls, without having a pooling ConnectionFactory underneath. This may span
+ any number of transactions, even concurrently executing transactions.
+
+
+ Note that Spring's message listener containers support the use of
+ a shared Connection within each listener container instance. Using
+ SingleConnectionFactory with a MessageListenerContainer only really makes sense for
+ sharing a single Connection across multiple listener containers.
+
+
+ Juergen Hoeller
+ Mark Pollack
+ Mark Pollack (.NET)
+
+
+
+ Exception handler for exceptions from the messaging infrastrcture.
+
+ Mark Pollack
+
+
+
+ Called when there is an exception in message processing.
+
+ The exception.
+
+
+
+ Wrapped Connection
+
+
+
+
+ Proxy Connection
+
+
+
+
+ Whether the shared Connection has been started
+
+
+
+
+ Synchronization monitor for the shared Connection
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ that alwasy returns the given Connection.
+
+ The single Connection.
+
+
+
+ Initializes a new instance of the class
+ that alwasy returns a single Connection.
+
+ The target connection factory.
+
+
+
+ Creates the connection.
+
+ A single shared connection
+
+
+
+ Creates the connection.
+
+ Name of the user.
+ The password.
+
+
+
+
+ Initialize the underlying shared Connection. Closes and reinitializes the Connection if an underlying
+ Connection is present already.
+
+
+
+
+ Exception listener callback that renews the underlying single Connection.
+
+ The exception from the messaging infrastructure.
+
+
+
+ Prepares the connection before it is exposed.
+ The default implementation applies ExceptionListener and client id.
+ Can be overridden in subclasses.
+
+ The Connection to prepare.
+ if thrown by any NMS API methods.
+
+
+
+ Template method for obtaining a (potentially cached) Session.
+
+ The connection to operate on.
+ The session ack mode.
+ the Session to use, or null to indicate
+ creation of a raw standard Session
+
+
+
+ reate a JMS Connection via this template's ConnectionFactory.
+
+
+
+
+
+ Closes the given connection.
+
+ The connection.
+
+
+
+ Ensure that the connection or TargetConnectionFactory are specified.
+
+
+
+
+ Close the underlying shared connection. The provider of this ConnectionFactory needs to care for proper shutdown.
+ As this object implements an application context will automatically
+ invoke this on distruction o
+
+
+
+
+ Resets the underlying shared Connection, to be reinitialized on next access.
+
+
+
+
+ Wrap the given Connection with a proxy that delegates every method call to it
+ but suppresses close calls. This is useful for allowing application code to
+ handle a special framework Connection just like an ordinary Connection from a
+ ConnectionFactory.
+
+ The original connection to wrap.
+ the wrapped connection
+
+
+
+ Gets or sets the target connection factory which will be used to create a single
+ connection.
+
+ The target connection factory.
+
+
+
+ Gets or sets the client id for the single Connection created and exposed by
+ this ConnectionFactory.
+
+ Note that the client IDs need to be unique among all active
+ Connections of teh underlying provider. Furthermore, a client ID can only
+ be assigned if the original ConnectionFactory hasn't already assigned one.
+ The client id.
+
+
+
+ Gets or sets the exception listener implementation that should be registered
+ with with the single Connection created by this factory, if any.
+
+ The exception listener.
+
+
+
+ Gets or sets a value indicating whether the single Connection
+ should be reset (to be subsequently renewed) when a NMSException
+ is reported by the underlying Connection.
+
+
+ Default is false. Switch this to true
+ to automatically trigger recover based on your messaging provider's
+ exception notifications.
+
+ Internally, this will lead to a special ExceptionListener (this
+ SingleConnectionFactory itself) being registered with the underlying
+ Connection. This can also be combined with a user-specified
+ ExceptionListener, if desired.
+
+
+
+ true attempt to reconnect on exception during next access; otherwise, false.
+
+
+
+
+ Get/or set the broker Uri.
+
+
+
+
+ Get/or set the redelivery policy that new IConnection objects are
+ assigned upon creation.
+
+
+
+
+ A Delegate that is called each time a Message is dispatched to allow the client to do
+ any necessary transformations on the received message before it is delivered. The
+ ConnectionFactory sets the provided delegate instance on each Connection instance that
+ is created from this factory, each connection in turn passes the delegate along to each
+ Session it creates which then passes that along to the Consumers it creates.
+
+
+
+
+
+ A delegate that is called each time a Message is sent from this Producer which allows
+ the application to perform any needed transformations on the Message before it is sent.
+ The ConnectionFactory sets the provided delegate instance on each Connection instance that
+ is created from this factory, each connection in turn passes the delegate along to each
+ Session it creates which then passes that along to the Producers it creates.
+
+
+
+
+
+ Gets the connection monitor.
+
+ The connection monitor.
+
+
+
+ Gets a value indicating whether this instance is started.
+
+
+ true if this instance is started; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+ and sets the ReconnectOnException to true
+
+
+
+
+ Initializes a new instance of the class for the given
+ IConnectionFactory
+
+ The target connection factory.
+
+
+
+ Resets the Session cache as well as resetting the connection.
+
+
+
+
+ Obtaining a cached Session.
+
+ The connection to operate on.
+ The session ack mode.
+ The Session to use
+
+
+
+
+ Wraps the given Session so that it delegates every method call to the target session but
+ adapts close calls. This is useful for allowing application code to
+ handle a special framework Session just like an ordinary Session.
+
+ The original Session to wrap.
+ The List of cached Sessions that the given Session belongs to.
+ The wrapped Session
+
+
+
+ Gets or sets the size of the session cache.
+
+
+ This cache size is the maximum limit for the number of cached Sessions
+ per session acknowledgement type (auto, client, dups_ok, transacted).
+ As a consequence, the actual number of cached Sessions may be up to
+ four times as high as the specified value - in the unlikely case
+ of mixing and matching different acknowledgement types.
+
+ Default is 1: caching a single Session, (re-)creating further ones on
+ demand. Specify a number like 10 if you'd like to raise the number of cached
+ Sessions; that said, 1 may be sufficient for low-concurrency scenarios.
+
+
+ The size of the session cache.
+
+
+
+ Gets or sets a value indicating whether to cache MessageProducers per
+ Session instance. (more specifically: one MessageProducer per Destination
+ and Session).
+
+
+ Default is "true". Switch this to "false" in order to always,
+ recreate MessageProducers on demand.
+
+
+ true if should cache message producers; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether o cache JMS MessageConsumers per
+ NMS Session instance.
+
+
+ Mmore specifically: one MessageConsumer per Destination, selector String
+ and Session. Note that durable subscribers will only be cached until
+ logical closing of the Session handle.
+
+ Default is "true". Switch this to "false" in order to always
+ recreate MessageConsumers on demand.
+
+
+ true to cache consumers per session instance; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this instance is active.
+
+ true if this instance is active; otherwise, false.
+
+
+
+ Implementation of Spring IExceptionListener interface that supports
+ chaining allowing the addition of multiple ExceptionListener instances in order.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Adds the exception listener to the chain
+
+ The listener.
+
+
+
+ Called when an exception occurs in message processing.
+
+ The exception.
+
+
+
+ Gets the exception listeners as an array.
+
+ The exception listeners.
+
+
+ Helper class for obtaining transactional NMS resources
+ for a given ConnectionFactory.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Releases the given connection, stopping it (if necessary) and eventually closing it.
+
+ Checks , if available.
+ This is essentially a more sophisticated version of
+
+
+ The connection to release. (if this is null, the call will be ignored)
+ The ConnectionFactory that the Connection was obtained from. (may be null)
+ whether the Connection might have been started by the application.
+
+
+
+ Return the innermost target Session of the given Session. If the given
+ Session is a decorated session, it will be unwrapped until a non-decorated
+ Session is found. Otherwise, the passed-in Session will be returned as-is.
+
+ The session to unwrap
+ The innermost target Session, or the passed-in one if no decorator
+
+
+
+ Determines whether the given JMS Session is transactional, that is,
+ bound to the current thread by Spring's transaction facilities.
+
+ The session to check.
+ The ConnectionFactory that the Session originated from
+
+ true if is session transactional, bound to current thread; otherwise, false.
+
+
+
+ Obtain a NMS Session that is synchronized with the current transaction, if any.
+ the ConnectionFactory to obtain a Session for
+
+ the existing NMS Connection to obtain a Session for
+ (may be null)
+
+ whether to allow for a local NMS transaction
+ that is synchronized with a Spring-managed transaction (where the main transaction
+ might be a ADO.NET-based one for a specific DataSource, for example), with the NMS
+ transaction committing right after the main transaction. If not allowed, the given
+ ConnectionFactory needs to handle transaction enlistment underneath the covers.
+
+ the transactional Session, or null if none found
+
+ NMSException in case of NMS failure
+
+
+
+ Obtain a NMS Session that is synchronized with the current transaction, if any.
+
+ the TransactionSynchronizationManager key to bind to
+ (usually the ConnectionFactory)
+ the ResourceFactory to use for extracting or creating
+ NMS resources
+ whether the underlying Connection approach should be
+ started in order to allow for receiving messages. Note that a reused Connection
+ may already have been started before, even if this flag is false.
+
+ the transactional Session, or null if none found
+
+ NMSException in case of NMS failure
+
+
+ Callback interface for resource creation.
+ Serving as argument for the DoGetTransactionalSession method.
+
+
+
+ Fetch an appropriate Session from the given MessageResourceHolder.
+ the MessageResourceHolder
+
+ an appropriate Session fetched from the holder,
+ or null if none found
+
+
+
+ Fetch an appropriate Connection from the given MessageResourceHolder.
+ the MessageResourceHolder
+
+ an appropriate Connection fetched from the holder,
+ or null if none found
+
+
+
+ Create a new NMS Connection for registration with a MessageResourceHolder.
+ the new NMS Connection
+
+ NMSException if thrown by NMS API methods
+
+
+ Create a new NMS ISession for registration with a MessageResourceHolder.
+ the NMS Connection to create a ISession for
+
+ the new NMS Session
+
+ NMSException if thrown by NMS API methods
+
+
+
+ Return whether to allow for a local NMS transaction that is synchronized with
+ a Spring-managed transaction (where the main transaction might be a ADO.NET-based
+ one for a specific IDbProvider, for example), with the NMS transaction
+ committing right after the main transaction.
+ Returns whether to allow for synchronizing a local NMS transaction
+
+
+
+
+ Callback for resource cleanup at the end of a non-native NMS transaction
+
+
+
+
+ Extension of the ConnectionFactory interface,
+ indicating how to release Connections obtained from it.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Shoulds we stop the connection, obtained from this ConnectionFactory?
+
+ The connection to check.
+ wheter a stop call is necessary
+
+
+ Connection holder, wrapping a NMS Connection and a NMS Session.
+ MessageTransactionManager binds instances of this class to the thread,
+ for a given NMS ConnectionFactory.
+
+
Note: This is an SPI class, not intended to be used by applications.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Create a new MessageResourceHolder that is open for resources to be added.
+
+
+
+ Initializes a new instance of the class
+ at is open for resources to be added.
+
+ The connection factory that this
+ resource holder is associated with (may be null)
+
+
+
+
+ Initializes a new instance of the class for the
+ given Session.
+
+ The session.
+
+
+ Create a new MessageResourceHolder for the given NMS resources.
+ the NMS Connection
+
+ the NMS Session
+
+
+
+
+ Initializes a new instance of the class.
+
+ The connection factory.
+ The connection.
+ The session.
+
+
+
+ Adds the connection to the list of resources managed by this holder.
+
+ The connection.
+
+
+
+ Adds the session to the list of resources managed by this holder.
+
+ The session.
+
+
+
+ Adds the session and connection to the list of resources managed by this holder.
+
+ The session.
+ The connection.
+
+
+
+ Gets the connection managed by this resource holder
+
+ A Connection, or null if no managed connection.
+
+
+
+ Gets the connection of a given type managed by this resource holder. This is used
+ when storing Queue or Topic Connections (from the older 1.0.2 API) as compared to the
+ 'unified domain' API , just Connection, in the newer 1.2 API.
+
+ Type of the connection.
+ The connection, or null if not found.
+
+
+
+ Gets the first session manged by this holder or null if not available.
+
+ The session or null if not available.
+
+
+
+ Gets the session managed by this holder by type.
+
+ Type of the session.
+ The session or null if not available.
+
+
+
+ Gets the session of a given type associated with the given connection
+
+ Type of the session.
+ The connection.
+ The sessin or null if not available.
+
+
+
+ Commits all sessions.
+
+
+
+
+ Closes all sessions then stops and closes all connections, in that order.
+
+
+
+
+ Determines whether the holder contains the specified session.
+
+ The session.
+
+ true if the holder contains the specified session; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this is frozen, namely that
+ additional resources can be registered with the holder. If using any of the constructors with
+ a Session, the holder will be set to the frozen state.
+
+ true if frozen; otherwise, false.
+
+
+
+ A implementation
+ for a single NMS ConnectionFactory. Binds a
+ Connection/Session pair from the specified ConnecctionFactory to the thread,
+ potentially allowing for one thread-bound Session per ConnectionFactory.
+
+
+
+ Application code is required to retrieve the transactional Session via
+ . Spring's
+ will autodetect a thread-bound Session and
+ automatically participate in it.
+
+
+ The use of as a target for this
+ transaction manager is strongly recommended. CachingConnectionFactory
+ uses a single NMS Connection for all NMS access in order to avoid the overhead
+ of repeated Connection creation, as well as maintaining a cache of Sessions.
+ Each transaction will then share the same NMS Connection, while still using
+ its own individual NMS Session.
+
+ The use of a raw target ConnectionFactory would not only be inefficient
+ because of the lack of resource reuse. It might also lead to strange effects
+ when your NMS provider doesn't accept MessageProducer.close() calls
+ and/or MessageConsumer.close() calls before Session.commit(),
+ with the latter supposed to commit all the messages that have been sent through the
+ producer handle and received through the consumer handle. As a safe general solution,
+ always pass in a into this transaction manager's
+ ConnectionFactory property.
+
+
+ Transaction synchronization is turned off by default, as this manager might be used
+ alongside an IDbProvider based Spring transaction manager such as the
+ AdoPlatformTransactionManager, which has stronger needs for synchronization.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+ The ConnectionFactory has to be set before using the instance.
+ This constructor can be used to prepare a NmsTemplate via a ApplicationContext,
+ typically setting the ConnectionFactory via ConnectionFactory property.
+
+ Turns off transaction synchronization by default, as this manager might
+ be used alongside a dbprovider-based Spring transaction manager like
+ AdoPlatformTransactionManager, which has stronger needs for synchronization.
+ Only one manager is allowed to drive synchronization at any point of time.
+
+
+
+
+
+ Initializes a new instance of the class
+ given a ConnectionFactory.
+
+ The connection factory to obtain connections from.
+
+
+
+ Make sure the ConnectionFactory has been set.
+
+
+
+
+ Get the MessageTransactionObject.
+
+ he MessageTransactionObject.
+
+
+
+ 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.
+
+
+ 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.
+
+
+ In the case of system errors.
+
+
+
+
+ Perform an actual commit on the given transaction.
+
+ The status representation of the transaction.
+
+ In the case of system errors.
+
+
+
+
+ Perform an actual rollback on the given transaction.
+
+ The status representation of the transaction.
+
+ 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.
+
+
+
+
+ Cleanup resources after transaction completion.
+
+ Transaction object returned by
+ .
+
+
+ Called after
+ and
+
+ execution on any outcome.
+
+
+
+
+
+ Check if the given transaction object indicates an existing transaction
+ (that is, a transaction which has already started).
+
+ Transaction object returned by
+ .
+
+ True if there is an existing transaction.
+
+
+ In the case of system errors.
+
+
+
+
+ Creates the connection via thie manager's ConnectionFactory.
+
+ The new Connection
+ If thrown by underlying messaging APIs
+
+
+
+ Creates the session for the given Connection
+
+ The connection to create a Session for.
+ the new Session
+ If thrown by underlying messaging APIs
+
+
+
+ Gets or sets the connection factory that this instance should manage transaction.
+ for.
+
+ The connection factory.
+
+
+
+ Gets the resource factory that this transaction manager operates on,
+ In tihs case the ConnectionFactory
+
+ The ConnectionFactory.
+
+
+
+ NMS Transaction object, representing a MessageResourceHolder.
+ Used as transaction object by MessageTransactionManager
+
+
+
+
+ Add information to show this is a shared NMS connection
+
+ Description of connection wrapper
+
+
+ Exception thrown when a synchronized local transaction failed to complete
+ (after the main transaction has already completed).
+
+ Jergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance of the SynchedLocalTransactionFailedException class. with the specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the SynchedLocalTransactionFailedException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The SerializationInfo that holds the serialized object data about the exception being thrown.
+ The StreamingContext that contains contextual information about the source or destination.
+
+
+ Creates a NMS message given a Session
+
+
The Session typically is provided by an instance
+ of the MessageTemplate class.
+
+ Mark Pollack
+
+
+ Create a Message to be sent.
+ the NMS Session to be used to create the
+ IMessage (never null)
+
+ the Message to be sent
+
+ NMSException if thrown by NMS API methods
+
+
+
+ Interfaced based approach to listen to messaging events.
+
+
+
+
+ Called when a message is delivered.
+
+ The message.
+
+
+ To be used with NmsTemplate's send method that
+ convert an object to a message.
+
+
+ It allows for further modification of the message after it has been processed
+ by the converter. This is useful for setting of NMS Header and Properties.
+
+ Mark Pollack
+
+
+ Apply a IMessagePostProcessor to the message. The returned message is
+ typically a modified version of the original.
+
+ the NMS message from the IMessageConverter
+
+ the modified version of the Message
+
+ NMSException if thrown by NMS API methods
+
+
+
+ Specifies a basic set of NMS operations.
+
+
+
Implemented by NmsTemplate. Not often used but a useful option
+ to enhance testability, as it can easily be mocked or stubbed.
+
Provides NmsTemplate's
+ send(..) and
+ receive(..) methods that mirror various NMS API methods.
+ See the NMS specification and NMS API docs for details on those methods.
+
+
+ Mark Pollack
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Execute the action specified by the given action object within
+ a NMS Session.
+
+ callback object that exposes the session
+
+ the result object from working with the session
+
+ NMSException if there is any problem
+
+
+
+ Execute the action specified by the given action object within
+ a NMS Session.
+
+ delegate that exposes the session
+
+ the result object from working with the session
+
+ NMSException if there is any problem
+
+
+ Send a message to a NMS destination. The callback gives access to
+ the NMS session and MessageProducer in order to do more complex
+ send operations.
+
+ delegate that exposes the session/producer pair
+
+ the result object from working with the session
+
+ NMSException if there is any problem
+
+
+ Send a message to a NMS destination. The callback gives access to
+ the NMS session and MessageProducer in order to do more complex
+ send operations.
+
+ callback object that exposes the session/producer pair
+
+ the result object from working with the session
+
+ NMSException if there is any problem
+
+
+ Send a message to the default destination.
+
This will only work with a default destination specified!
+
+ callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the specified destination.
+ The IMessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the specified destination.
+ The IMessageCreator callback creates the message given a Session.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the default destination.
+
This will only work with a default destination specified!
+
+ delegate callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the specified destination.
+ The IMessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ delegate callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the specified destination.
+ The IMessageCreator callback creates the message given a Session.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ delegate callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the default destination, converting the object
+ to a NMS message with a configured IMessageConverter.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter.
+
+ the destination to send this message to
+
+ the object to convert to a message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the object to convert to a message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the default destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the destination to send this message to
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the object to convert to a message.
+
+ the callback to modify the message
+
+ NMSException if there is any problem
+
+
+
+ Send the given object to the default destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+ the callback to modify the message
+ NMSException if there is any problem
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the destination to send this message to
+ the object to convert to a message
+ the callback to modify the message
+ NMSException if there is any problem
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+ the object to convert to a message.
+ the callback to modify the message
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Callback for sending a message to a NMS destination.
+
+
To be used with the MessageTemplate.Execute(IProducerCallback)
+ method, often implemented as an anonymous inner class.
+
+
The typical implementation will perform multiple operations on the
+ supplied NMS Session and MessageProducer.
+
+ Mark Pollack
+
+
+ Perform operations on the given Session and MessageProducer.
+ The message producer is not associated with any destination.
+
+ the NMS Session object to use
+
+ the NMS MessageProducer object to use
+
+ a result object from working with the Session, if any (can be null)
+
+
+
+ Callback for executing any number of operations on a provided
+ Session
+
+
+ To be used with the NmsTemplate.Execute(ISessionCallback)}
+ method. See for the equivalent callback
+ that can be used as a (anonymous) delegate.
+
+ Mark Pollack
+
+
+
+
+ Execute any number of operations against the supplied NMS
+ Session, possibly returning a result.
+
+ the NMS Session
+
+ a result object from working with the Session, if any (so can be null)
+
+ NMSException if there is any problem
+
+
+
+ Delegate that creates a NMS message given a ISession
+
+ the NMS Session to be used to create the
+ Message (never null)
+
+ the Message to be sent
+
+ NMSException if thrown by NMS API methods
+
+
+
+ Delegate that is used with NmsTemplate's ConvertAndSend method that converts
+ an object.
+
+
+ It allows for further modification of the message after it has been processed
+ by the converter. This is useful for setting of NMS Header and Properties.
+
+ Mark Pollack
+
+
+
+ Convenient super class for application classes that need NMS access.
+
+
+ Requires a ConnectionFactory or a NmsTemplate instance to be set.
+ It will create its own NmsTemplate if a ConnectionFactory is passed in.
+ A custom NmsTemplate instance can be created for a given ConnectionFactory
+ through overriding the createNmsTemplate method.
+
+
+
+
+ Creates a NmsTemplate for the given ConnectionFactory.
+
+ Only invoked if populating the gateway with a ConnectionFactory reference.
+ Can be overridden in subclasses to provide a different NmsTemplate instance
+
+
+ The connection factory.
+
+
+
+
+ Ensures that the JmsTemplate is specified and calls .
+
+
+
+
+ Subclasses can override this for custom initialization behavior.
+ Gets called after population of this instance's properties.
+
+
+
+
+ Gets or sets the NMS template for the gateway.
+
+ The NMS template.
+
+
+
+ Gets or sets he NMS connection factory to be used by the gateway.
+ Will automatically create a NmsTemplate for the given ConnectionFactory.
+
+ The connection factory.
+
+
+ Helper class that simplifies NMS access code.
+
+ If you want to use dynamic destination creation, you must specify
+ the type of NMS destination to create, using the "pubSubDomain" property.
+ For other operations, this is not necessary.
+ Point-to-Point (Queues) is the default domain.
+
+ Default settings for NMS Sessions is "auto-acknowledge".
+
+ This template uses a DynamicDestinationResolver and a SimpleMessageConverter
+ as default strategies for resolving a destination name or converting a message,
+ respectively.
+
+
+ Mark Pollack
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Base class for NmsTemplate} and other
+ NMS-accessing gateway helpers, adding destination-related properties to
+ MessagingAccessor's common properties.
+
+
+
Not intended to be used directly. See NmsTemplate.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Base class for NmsTemplate and other NMS-accessing gateway helpers
+ It defines common properties like the ConnectionFactory}. The subclass
+ NmsIDestinationAccessor adds further, destination-related properties.
+
+ Not intended to be used directly. See NmsTemplate.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Verify that ConnectionFactory property has been set.
+
+
+
+
+ Creates the connection via the ConnectionFactory.
+
+
+
+
+
+ Creates the session for the given Connection
+
+ The connection to create a session for.
+ The new session
+
+
+
+ Returns whether the ISession is in client acknowledgement mode.
+
+ The session to check.
+ true if in client ack mode, false otherwise
+
+
+
+ Gets or sets the connection factory to use for obtaining NMS Connections.
+
+ The connection factory.
+
+
+
+ Gets or sets the session acknowledge mode for NMS Sessions including whether or not the session is transacted
+
+
+ Set the NMS acknowledgement mode that is used when creating a NMS
+ Session to send a message. The default is AUTO_ACKNOWLEDGE.
+
+ The session acknowledge mode.
+
+
+
+ Set the transaction mode that is used when creating a NMS Session.
+ Default is "false".
+
+
+ Setting this flag to "true" will use a short local NMS transaction
+ when running outside of a managed transaction, and a synchronized local
+ NMS transaction in case of a managed transaction being present.
+ The latter has the effect of a local NMS
+ transaction being managed alongside the main transaction (which might
+ be a native ADO.NET transaction), with the NMS transaction committing
+ right after the main transaction.
+
+
+
+
+
+ Resolves the given destination name to a NMS destination.
+
+ The current session.
+ Name of the destination.
+ The located IDestination
+ If resolution failed.
+
+
+
+ Gets or sets the destination resolver that is to be used to resolve
+ IDestination references for this accessor.
+
+ The default resolver is a DynamicDestinationResolver. Specify a
+ JndiDestinationResolver for resolving destination names as JNDI locations.
+
+ The destination resolver.
+
+
+
+ Gets or sets a value indicating whether Publish/Subscribe
+ domain (Topics) is used. Otherwise, the Point-to-Point domain
+ (Queues) is used.
+
+
+ this
+ setting tells what type of destination to create if dynamic destinations are enabled.
+ true if Publish/Subscribe domain; otherwise, false
+ for the Point-to-Point domain.
+
+
+
+ Timeout value indicating that a receive operation should
+ check if a message is immediately available without blocking.
+
+
+
+
+ Timeout value indicating a blocking receive without timeout.
+
+
+
+ Create a new NmsTemplate.
+
+ Note: The ConnectionFactory has to be set before using the instance.
+ This constructor can be used to prepare a NmsTemplate via an ObjectFactory,
+ typically setting the ConnectionFactory.
+
+
+
+ Create a new NmsTemplate, given a ConnectionFactory.
+ the ConnectionFactory to obtain IConnections from
+
+
+
+ Initialize the default implementations for the template's strategies:
+ DynamicDestinationResolver and SimpleMessageConverter.
+
+
+
+ Execute the action specified by the given action object within a
+ NMS Session.
+
+ Generalized version of execute(ISessionCallback),
+ allowing the NMS Connection to be started on the fly.
+
Use execute(ISessionCallback) for the general case.
+ Starting the NMS Connection is just necessary for receiving messages,
+ which is preferably achieved through the receive methods.
+
+ callback object that exposes the session
+
+ Start the connection before performing callback action.
+
+ the result object from working with the session
+
+ NMSException if there is any problem
+
+
+
+ Extract the content from the given JMS message.
+
+ The Message to convert (can be null).
+ The content of the message, or null if none
+
+
+ Fetch an appropriate Connection from the given MessageResourceHolder.
+
+ the MessageResourceHolder
+
+ an appropriate IConnection fetched from the holder,
+ or null if none found
+
+
+
+ Fetch an appropriate Session from the given MessageResourceHolder.
+
+ the MessageResourceHolder
+
+ an appropriate ISession fetched from the holder,
+ or null if none found
+
+
+
+ Create a NMS MessageProducer for the given Session and Destination,
+ configuring it to disable message ids and/or timestamps (if necessary).
+
Delegates to doCreateProducer for creation of the raw
+ NMS MessageProducer
+
+ the NMS Session to create a MessageProducer for
+
+ the NMS Destination to create a MessageProducer for
+
+ the new NMS MessageProducer
+
+ NMSException if thrown by NMS API methods
+
+
+
+
+
+
+
+
+
+ Determines whether the given Session is locally transacted, that is, whether
+ its transaction is managed by this template class's Session handling
+ and not by an external transaction coordinator.
+
+
+ The Session's own transacted flag will already have been checked
+ before. This method is about finding out whether the Session's transaction
+ is local or externally coordinated.
+
+ The session to check.
+
+ true if the session is locally transacted; otherwise, false.
+
+
+
+ Create a raw NMS MessageProducer for the given Session and Destination.
+
+ the NMS Session to create a MessageProducer for
+
+ the NMS IDestination to create a MessageProducer for
+
+ the new NMS MessageProducer
+
+ NMSException if thrown by NMS API methods
+
+
+ Create a NMS MessageConsumer for the given Session and Destination.
+
+ the NMS Session to create a MessageConsumer for
+
+ the NMS Destination to create a MessageConsumer for
+
+ the message selector for this consumer (can be null)
+
+ the new NMS IMessageConsumer
+
+ NMSException if thrown by NMS API methods
+
+
+
+ Send the given message.
+
+ The session to operate on.
+ The destination to send to.
+ The message creator delegate callback to create a Message.
+
+
+
+ Send the given message.
+
+ The session to operate on.
+ The destination to send to.
+ The message creator callback to create a Message.
+
+
+ Send the given NMS message.
+ the NMS Session to operate on
+
+ the NMS Destination to send to
+
+ callback to create a NMS Message
+
+ delegate callback to create a NMS Message
+
+ NMSException if thrown by NMS API methods
+
+
+ Actually send the given NMS message.
+ the NMS MessageProducer to send with
+
+ the NMS Message to send
+
+ NMSException if thrown by NMS API methods
+
+
+
+ Execute the action specified by the given action object within
+ a NMS Session.
+
+ delegate that exposes the session
+
+ the result object from working with the session
+
+
+ Note that the value of PubSubDomain affects the behavior of this method.
+ If PubSubDomain equals true, then a Session is passed to the callback.
+ If false, then a ISession is passed to the callback.b
+
+ NMSException if there is any problem
+
+
+ Execute the action specified by the given action object within
+ a NMS Session.
+
Note: The value of PubSubDomain affects the behavior of this method.
+ If PubSubDomain equals true, then a Session is passed to the callback.
+ If false, then a Session is passed to the callback.
+
+ callback object that exposes the session
+
+ the result object from working with the session
+
+ NMSException if there is any problem
+
+
+ Send a message to a NMS destination. The callback gives access to
+ the NMS session and MessageProducer in order to do more complex
+ send operations.
+
+ callback object that exposes the session/producer pair
+
+ the result object from working with the session
+
+ NMSException if there is any problem
+
+
+ Send a message to a NMS destination. The callback gives access to
+ the NMS session and MessageProducer in order to do more complex
+ send operations.
+
+ delegate that exposes the session/producer pair
+
+ the result object from working with the session
+
+ NMSException if there is any problem
+
+
+ Send a message to the default destination.
+
This will only work with a default destination specified!
+
+ delegate callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the specified destination.
+ The MessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ delegate callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the specified destination.
+ The MessageCreator callback creates the message given a Session.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ delegate callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the default destination.
+
This will only work with a default destination specified!
+
+ callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the specified destination.
+ The MessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send a message to the specified destination.
+ The MessageCreator callback creates the message given a Session.
+
+ the destination to send this message to
+
+ callback to create a message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the default destination, converting the object
+ to a NMS message with a configured IMessageConverter.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter.
+
+ the destination to send this message to
+
+ the object to convert to a message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the object to convert to a message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the default destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the destination to send this message to
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the object to convert to a message.
+
+ the callback to modify the message
+
+ NMSException if there is any problem
+
+
+
+ Send the given object to the default destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+ the callback to modify the message
+ NMSException if there is any problem
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the destination to send this message to
+ the object to convert to a message
+ the callback to modify the message
+ NMSException if there is any problem
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a NMS message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+ the object to convert to a message.
+ the callback to modify the message
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message received by the consumer, or null if the timeout expires
+
+ NMSException if there is any problem
+
+
+
+ Receive a message.
+
+ The session to operate on.
+ The destination to receive from.
+ The message selector for this consumer (can be null
+ The Message received, or null if none.
+
+
+
+ Receive a message.
+
+ The session to operate on.
+ The consumer to receive with.
+ The Message received, or null if none
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the default destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
This will only work with a default destination specified!
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the destination to receive a message from
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+ Receive a message synchronously from the specified destination, but only
+ wait up to a specified time for delivery. Convert the message into an
+ object with a configured IMessageConverter.
+
This method should be used carefully, since it will block the thread
+ until the message becomes available or until the timeout value is exceeded.
+
+ the name of the destination to send this message to
+ (to be resolved to an actual destination by a DestinationResolver)
+
+ the NMS message selector expression (or null if none).
+ See the NMS specification for a detailed definition of selector expressions.
+
+ the message produced for the consumer or null if the timeout expires.
+
+ NMSException if there is any problem
+
+
+
+ Gets or sets the default destination to be used on send/receive operations that do not
+ have a destination parameter.
+
+ Alternatively, specify a "defaultDestinationName", to be
+ dynamically resolved via the DestinationResolver.
+ The default destination.
+
+
+
+ Gets or sets the name of the default destination name
+ to be used on send/receive operations that
+ do not have a destination parameter.
+
+
+ Alternatively, specify a NMS IDestination object as "DefaultDestination"
+
+ The name of the default destination.
+
+
+
+ Gets or sets the message converter for this template.
+
+
+ Used to resolve
+ Object parameters to convertAndSend methods and Object results
+ from receiveAndConvert methods.
+
The default converter is a SimpleMessageConverter, which is able
+ to handle IBytesMessages, ITextMessages and IObjectMessages.
+
+ The message converter.
+
+
+
+ Gets or sets a value indicating whether Message Ids are enabled.
+
+ true if message id enabled; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether message timestamps are enabled.
+
+
+ true if [message timestamp enabled]; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to inhibit the delivery of messages published by its own connection.
+
+
+ true if inhibit the delivery of messages published by its own connection; otherwise, false.
+
+
+
+ Gets or sets the receive timeout to use for recieve calls (in milliseconds)
+
+ The default is -1, which means no timeout.
+ The receive timeout.
+
+
+
+ Gets or sets a value indicating whether to use explicit Quality of Service values.
+
+ If "true", then the values of deliveryMode, priority, and timeToLive
+ will be used when sending a message. Otherwise, the default values,
+ that may be set administratively, will be used
+ true if use explicit QoS values; otherwise, false.
+
+
+
+ Sets a value indicating whether message delivery should be persistent or non-persistent
+
+
+ This will set the delivery to persistent or non-persistent
+
Default it "true" aka delivery mode "PERSISTENT".
+
+ true if [delivery persistent]; otherwise, false.
+
+
+
+ Gets or sets a value indicating what DeliveryMode this
+ should use, for example a persistent QOS
+
+
+
+
+
+ Gets or sets the priority when sending.
+
+ Since a default value may be defined administratively,
+ this is only used when "isExplicitQosEnabled" equals "true".
+ The priority.
+
+
+
+ Gets or sets the time to live when sending
+
+ Since a default value may be defined administratively,
+ this is only used when "isExplicitQosEnabled" equals "true".
+ The time to live.
+
+
+
+ ResourceFactory implementation that delegates to this template's callback methods.
+
+
+
+
+ Implemention of NMS ITrace interface that will log NMS messages to Common.Logging.
+
+ Registering of this class is done by default in NmsTemplate and SimpleMessageListenerContainer if the value
+ of Apache.NMS.Tracer.Trace is null, indicating it was not set.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class. The log name used is typeof(NmsTrace).
+
+
+
+
+ Initializes a new instance of the class.
+
+ The log instance to use for logging.
+
+
+
+ Logs message at Debug Level.
+
+ The message.
+
+
+
+ Logs message at Info Level.
+
+ The message.
+
+
+
+ Logs message at Warn Level.
+
+ The message.
+
+
+
+ Logs message at Error Level.
+
+ The message.
+
+
+
+ Logs message at Fatal Level.
+
+ The message.
+
+
+
+ Gets a value indicating whether the debug log level is enabled.
+
+
+ true if this instance is debug enabled; otherwise, false.
+
+
+
+
+ Gets a value indicating whether the info log level is enabled.
+
+
+ true if this instance is info enabled; otherwise, false.
+
+
+
+
+ Gets a value indicating whether the warn log level is enabled.
+
+
+ true if this instance is warn enabled; otherwise, false.
+
+
+
+
+ Gets a value indicating whether the error log level is enabled.
+
+
+ true if this instance is error enabled; otherwise, false.
+
+
+
+
+ Gets a value indicating whether the fatal log level is enabled.
+
+
+ true if this instance is fatal enabled; otherwise, false.
+
+
+
+ Perform operations on the given Session and MessageProducer.
+ The message producer is not associated with any destination.
+
+ the NMS Session object to use
+
+ the NMS MessageProducer object to use
+
+ a result object from working with the Session, if any (can be null)
+
+
+
+
+ Callback delegate for code that operates on a Session.
+
+ The NMS ISession object.
+
+ Allows you to execute any number of operations
+ on a single ISession, possibly returning a result a result.
+
+
+ A result object from working with the Session, if any (so can be null)
+
+ NMSException if there is any problem
+ Mark Pollack
+
+
+
+ Exception to be thrown when the execution of a listener method failed.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class, with the specified message
+
+ The message.
+
+
+
+ Initializes a new instance of the class, with the specified message
+ and root cause exception
+
+ The message.
+ The inner exception.
+
+
+
+ Initializes a new instance of the class.
+
+ The SerializationInfo that holds the serialized object data about the exception being thrown.
+ The StreamingContext that contains contextual information about the source or destination.
+
+
+
+ Message listener adapter that delegates the handling of messages to target
+ listener methods via reflection, with flexible message type conversion.
+ Allows listener methods to operate on message content types, completely
+ independent from the NMS API.
+
+
+ By default, the content of incoming messages gets extracted before
+ being passed into the target listener method, to let the target method
+ operate on message content types such as String or byte array instead of
+ the raw Message. Message type conversion is delegated to a Spring
+ . By default, a
+ will be used. (If you do not want such automatic message conversion taking
+ place, then be sure to set the property
+ to null.)
+
+ If a target listener method returns a non-null object (typically of a
+ message content type such as String or byte array), it will get
+ wrapped in a NMS Message and sent to the response destination
+ (either the NMS "reply-to" destination or the
+ specified.
+
+
+ The sending of response messages is only available when
+ using the entry point (typically through a
+ Spring message listener container). Usage as standard NMS MessageListener
+ does not support the generation of response messages.
+
+ Consult the reference documentation for examples of method signatures compliant with this
+ adapter class.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Variant of the standard NMS MessageListener interface,
+ offering not only the received Message but also the underlying
+ Session object. The latter can be used to send reply messages,
+ without the need to access an external Connection/Session,
+ i.e. without the need to access the underlying ConnectionFactory.
+
+
+ Supported by Spring's
+ as direct alternative to the standard MessageListener interface.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Callback for processing a received NMS message.
+ Implementors are supposed to process the given Message,
+ typically sending reply messages through the given Session.
+
+ the received NMS message
+
+ the underlying NMS Session
+
+ NMSException if thrown by NMS methods
+
+
+
+ The default handler method name.
+
+
+
+
+ Initializes a new instance of the class with default settings.
+
+
+
+
+ Initializes a new instance of the class for the given handler object
+
+ The delegate object.
+
+
+
+ Standard JMS {@link MessageListener} entry point.
+ Delegates the message to the target listener method, with appropriate
+ conversion of the message arguments
+
+
+
+ In case of an exception, the method will be invoked.
+ Note
+ Does not support sending response messages based on
+ result objects returned from listener methods. Use the
+ entry point (typically through a Spring
+ message listener container) for handling result objects as well.
+
+ The incoming message.
+
+
+
+ Spring entry point.
+
+ Delegates the message to the target listener method, with appropriate
+ conversion of the message argument. If the target method returns a
+ non-null object, wrap in a NMS message and send it back.
+
+
+ The incoming message.
+ The session to operate on.
+
+
+
+ Initialize the default implementations for the adapter's strategies.
+
+
+
+
+ Handle the given exception that arose during listener execution.
+ The default implementation logs the exception at error level.
+ This method only applies when used as standard NMS MessageListener.
+ In case of the Spring mechanism,
+ exceptions get handled by the caller instead.
+
+
+ The exception to handle.
+
+
+
+ Extract the message body from the given message.
+
+ The message.
+ the content of the message, to be passed into the
+ listener method as argument
+ if thrown by NMS API methods
+
+
+
+ Gets the name of the listener method that is supposed to
+ handle the given message.
+ The default implementation simply returns the configured
+ default listener method, if any.
+
+ The NMS request message.
+ The converted JMS request message,
+ to be passed into the listener method as argument.
+ the name of the listener method (never null)
+ if thrown by NMS API methods
+
+
+
+ Handles the given result object returned from the listener method, sending a response message back.
+
+ The result object to handle (never null).
+ The original request message.
+ The session to operate on (may be null).
+
+
+
+ Builds a JMS message to be sent as response based on the given result object.
+
+ The JMS Session to operate on.
+ The content of the message, as returned from the listener method.
+ the JMS Message (never null)
+ If there was an error in message conversion
+ if thrown by NMS API methods
+
+
+
+ Post-process the given response message before it will be sent. The default implementation
+ sets the response's correlation id to the request message's correlation id.
+
+ The original incoming message.
+ The outgoing JMS message about to be sent.
+ if thrown by NMS API methods
+
+
+
+ Determine a response destination for the given message.
+
+
+ The default implementation first checks the JMS Reply-To
+ Destination of the supplied request; if that is not null
+ it is returned; if it is null, then the configured
+ default response destination
+ is returned; if this too is null, then an
+ is thrown.
+
+
+ The original incoming message.
+ Tthe outgoing message about to be sent.
+ The session to operate on.
+ the response destination (never null)
+ if thrown by NMS API methods
+ if no destination can be determined.
+
+
+
+ Resolves the default response destination into a Destination, using this
+ accessor's in case of a destination name.
+
+ The session to operate on.
+ The located destination
+
+
+
+ Sends the given response message to the given destination.
+
+ The session to operate on.
+ The destination to send to.
+ The outgoing message about to be sent.
+
+
+
+ Post-process the given message producer before using it to send the response.
+ The default implementation is empty.
+
+ The producer that will be used to send the message.
+ The outgoing message about to be sent.
+
+
+
+ Gets or sets the handler object to delegate message listening to.
+
+
+ Specified listener methods have to be present on this target object.
+ If no explicit handler object has been specified, listener
+ methods are expected to present on this adapter instance, that is,
+ on a custom subclass of this adapter, defining listener methods.
+
+ The handler object.
+
+
+
+ Gets or sets the default handler method to delegate to,
+ for the case where no specific listener method has been determined.
+ Out-of-the-box value is ("HandleMessage"}.
+
+ The default handler method.
+
+
+
+ Sets the default destination to send response messages to. This will be applied
+ in case of a request message that does not carry a "JMSReplyTo" field.
+ Response destinations are only relevant for listener methods that return
+ result objects, which will be wrapped in a response message and sent to a
+ response destination.
+
+ Alternatively, specify a "DefaultResponseQueueName" or "DefaultResponseTopicName",
+ to be dynamically resolved via the DestinationResolver.
+
+
+ The default response destination.
+
+
+
+ Sets the name of the default response queue to send response messages to.
+ This will be applied in case of a request message that does not carry a
+ "NMSReplyTo" field.
+ Alternatively, specify a JMS Destination object as "defaultResponseDestination".
+
+ The name of the default response destination queue.
+
+
+
+ Sets the name of the default response topic to send response messages to.
+ This will be applied in case of a request message that does not carry a
+ "NMSReplyTo" field.
+ Alternatively, specify a JMS Destination object as "defaultResponseDestination".
+
+ The name of the default response destination topic.
+
+
+
+ Gets or sets the destination resolver that should be used to resolve response
+ destination names for this adapter.
+ The default resolver is a .
+ Specify another implementation, for other strategies, perhaps from a directory service.
+
+ The destination resolver.
+
+
+
+ Gets or sets the message converter that will convert incoming JMS messages to
+ listener method arguments, and objects returned from listener
+ methods back to NMS messages.
+
+
+ The default converter is a {@link SimpleMessageConverter}, which is able
+ to handle BytesMessages}, TextMessages, MapMessages, and ObjectMessages.
+
+
+ The message converter.
+
+
+
+ Internal class combining a destination name and its target destination type (queue or topic).
+
+
+
+
+ Common base class for all containers which need to implement listening
+ based on a Connection (either shared or freshly obtained for each attempt).
+ Inherits basic Connection and Session configuration handling from the
+ base class.
+
+
+
+ This class provides basic lifecycle management, in particular management
+ of a shared Connection. Subclasses are supposed to plug into this
+ lifecycle, implementing the as well as
+
+
+ Juergen Hoeller
+ Mark Pollack(.NET)
+
+
+
+ The monitor object to lock on when performing operations on the connection.
+
+
+
+
+ The monitor object to lock on when performing operations that update the lifecycle of the container.
+
+
+
+
+ Call base class method, then and then
+
+
+
+
+ Validates the configuration of this container. The default implementation
+ is empty. To be overriden in subclasses.
+
+
+
+
+ Calls when the application context destroys the container instance.
+
+
+
+
+ Initializes this container. Creates a Connection, starts the Connection
+ (if the property hasn't been turned off), and calls
+ .
+
+ If startup failed
+
+
+
+ Stop the shared connection, call , and close this container.
+
+
+
+
+ Starts this container.
+
+ if starting failed.
+
+
+
+ Start the shared Connection, if any, and notify all invoker tasks.
+
+
+
+
+ Stops this container.
+
+ if stopping failed.
+
+
+
+ Notify all invoker tasks and stop the shared Connection, if any.
+
+ if thrown by NMS API methods.
+
+
+
+
+ Register any invokers within this container.
+ Subclasses need to implement this method for their specific
+ invoker management process. A shared Connection, if any, will already have been
+ started at this point.
+
+
+
+
+ Close the registered invokers. Subclasses need to implement this method
+ for their specific invoker management process. A shared Connection, if any,
+ will automatically be closed afterwards.
+
+
+
+
+ Establishes a shared Connection for this container.
+
+
+
+ The default implementation delegates to
+ which does one immediate attempt and throws an exception if it fails.
+ Can be overridden to have a recovery process in place, retrying
+ until a Connection can be successfully established.
+
+
+ If thrown by NMS API methods
+
+
+
+ Refreshes the shared connection that this container holds.
+
+
+ Called on startup and also after an infrastructure exception
+ that occurred during invoker setup and/or execution.
+
+ If thrown by NMS API methods
+
+
+
+ Creates the shared connection for this container.
+
+
+ The default implementation creates a standard Connection
+ and prepares it through
+
+ the prepared Connection
+ if the creation failed.
+
+
+
+ Prepares the given connection, which is about to be registered
+ as shared Connection for this container.
+
+
+ The default implementation sets the specified client id, if any.
+ Subclasses can override this to apply further settings.
+
+ The connection to prepare.
+ If the preparation efforts failed.
+
+
+
+ Starts the shared connection.
+
+ If thrown by NMS API methods
+
+
+
+
+ Stops the shared connection.
+
+ if thrown by NMS API methods.
+
+
+
+ Gets or sets the client id for a shared Connection created and used by this container.
+
+
+ Note that client ids need to be unique among all active Connections
+ of the underlying JMS provider. Furthermore, a client id can only be
+ assigned if the original ConnectionFactory hasn't already assigned one.
+
+ The client id.
+
+
+ Set whether to automatically start the listener after initialization.
+
Default is "true"; set this to "false" to allow for manual startup.
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+ The name of the object in the factory.
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+
+ Gets a value indicating whether this container is currently running,
+ that is, whether it has been started and not stopped yet.
+
+
+ true if this container is running; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this container's listeners are generally allowed to run.
+
+
+
+ >This implementation always returns true; the default 'running'
+ state is purely determined by /.
+
+
+ Subclasses may override this method to check against temporary
+ conditions that prevent listeners from actually running. In other words,
+ they may apply further restrictions to the 'running' state, returning
+ false if such a restriction prevents listeners from running.
+
+
+ true if running allowed; otherwise, false.
+
+
+
+ Gets a value indicating whether this container is currently active,
+ that is, whether it has been set up but not shut down yet.
+
+ true if active; otherwise, false.
+
+
+ Return whether a shared NMS Connection should be maintained
+ by this listener container base class.
+
+
+
+
+
+ Gets the shared connection maintained by this container.
+ Available after initialization.
+
+ The shared connection (never null)
+ if this container does not maintain a
+ shared Connection, or if the Connection hasn't been initialized yet.
+
+
+
+
+
+ Exception that indicates that the initial setup of this container's
+ shared Connection failed. This is indicating to invokers that they need
+ to establish the shared Connection themselves on first access.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message.
+
+
+
+ Initializes a new instance of the class, with the specified message
+ and root cause exception
+
+ The message.
+ The inner exception.
+
+
+
+ Initializes a new instance of the class.
+
+ The SerializationInfo that holds the serialized object data about the exception being thrown.
+ The StreamingContext that contains contextual information about the source or destination.
+
+
+
+ Abstract base class for message listener containers. Can either host
+ a standard NMS MessageListener or a Spring-specific
+
+
+
+
+
+ Validate that the destination is not null and that if the subscription is durable, then we are not
+ using the Pub/Sub domain.
+
+
+
+
+ Executes the specified listener,
+ committing or rolling back the transaction afterwards (if necessary).
+
+ The session to operate on.
+ The received message.
+
+
+
+
+
+
+
+ Executes the specified listener,
+ committing or rolling back the transaction afterwards (if necessary).
+
+ The session to operate on.
+ The received message.
+ If thrown by NMS API methods.
+
+
+
+
+
+
+ Invokes the specified listener: either as standard NMS MessageListener
+ or (preferably) as Spring SessionAwareMessageListener.
+
+ The session to operate on.
+ The received message.
+ If thrown by NMS API methods.
+
+
+
+
+ Invoke the specified listener as Spring SessionAwareMessageListener,
+ exposing a new NMS Session (potentially with its own transaction)
+ to the listener if demanded.
+
+ The Spring ISessionAwareMessageListener to invoke.
+ The session to operate on.
+ The received message.
+ If thrown by NMS API methods.
+
+
+
+
+
+ Invoke the specified listener as standard JMS MessageListener.
+
+ Default implementation performs a plain invocation of the
+ OnMessage methods
+ The listener to invoke.
+ The received message.
+ if thrown by the NMS API methods
+
+
+
+ Perform a commit or message acknowledgement, as appropriate
+
+ The session to commit.
+ The message to acknowledge.
+ In case of commit failure
+
+
+
+ Determines whether the given Session is locally transacted, that is, whether
+ its transaction is managed by this listener container's Session handling
+ and not by an external transaction coordinator.
+
+
+ The Session's own transacted flag will already have been checked
+ before. This method is about finding out whether the Session's transaction
+ is local or externally coordinated.
+
+ The session to check.
+
+ true if the is session locally transacted; otherwise, false.
+
+
+
+
+
+ Perform a rollback, if appropriate.
+
+ The session to rollback.
+ In case of a rollback error
+
+
+
+ Perform a rollback, handling rollback excepitons properly.
+
+ The session to rollback.
+ The thrown application exception.
+ in case of a rollback error.
+
+
+
+ Handle the given exception that arose during listener execution.
+
+
+ The default implementation logs the exception at error level,
+ not propagating it to the JMS provider - assuming that all handling of
+ acknowledgement and/or transactions is done by this listener container.
+ This can be overridden in subclasses.
+
+ The exceptin to handle
+
+
+
+ Invokes the error handler.
+
+ The exception.
+
+
+
+ Invokes the registered exception listener, if any.
+
+ The exception that arose during NMS processing.
+
+
+
+
+ Checks the message listener, throwing an exception
+ if it does not correspond to a supported listener type.
+ By default, only a standard JMS MessageListener object or a
+ Spring object will be accepted.
+
+ The message listener.
+
+
+
+ Gets or sets the destination to receive messages from. Will be null
+ if the configured destination is not an actual Destination type;
+ c.f. when the destination is a String.
+
+ The destination.
+
+
+
+ Gets or sets the name of the destination to receive messages from.
+ Will be null if the configured destination is not a
+ string type; c.f. when it is an actual Destination object.
+
+ The name of the destination.
+
+
+
+ Gets or sets the message selector.
+
+ The message selector expression (or null if none)..
+
+
+
+ Gets or sets the message listener to register.
+
+
+
+
+ This can be either a standard NMS MessageListener object or a
+ Spring object.
+
+
+ The message listener.
+
+
+
+ Gets or sets a value indicating whether the subscription is durable.
+
+
+ Set whether to make the subscription durable. The durable subscription name
+ to be used can be specified through the "DurableSubscriptionName" property.
+ Default is "false". Set this to "true" to register a durable subscription,
+ typically in combination with a "DurableSubscriptionName" value (unless
+ your message listener class name is good enough as subscription name).
+
+ Only makes sense when listening to a topic (pub-sub domain).
+
+ true if the subscription is durable; otherwise, false.
+
+
+
+ Gets or sets the name of the durable subscription to create.
+
+
+ To be applied in case of a topic (pub-sub domain) with subscription durability activated.
+ The durable subscription name needs to be unique within this client's
+ client id. Default is the class name of the specified message listener.
+ Note: Only 1 concurrent consumer (which is the default of this
+ message listener container) is allowed for each durable subscription.
+
+
+ The name of the durable subscription.
+
+
+
+ Gets or sets the exception listener to notify in case of a NMSException thrown
+ by the registered message listener or the invocation infrastructure.
+
+ The exception listener.
+
+
+
+ Sets an ErrorHandler to be invoked in case of any uncaught exceptions thrown
+ while processing a Message. By default there will be no ErrorHandler
+ so that error-level logging is the only result.
+
+ The error handler.
+
+
+
+ Gets or sets a value indicating whether to expose listener session to a registered
+ as well as to calls.
+
+
+ Default is "true", reusing the listener's Session.
+ Turn this off to expose a fresh Session fetched from the same
+ underlying Connection instead, which might be necessary
+ on some messaging providers.
+ Note that Sessions managed by an external transaction manager will
+ always get exposed to
+ calls. So in terms of NmsTemplate exposure, this setting only affects
+ locally transacted Sessions.
+
+
+
+ true if expose listener session; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to accept messages while
+ the listener container is in the process of stopping.
+
+
+
+ Return whether to accept received messages while the listener container
+ receive attempt. Switch this flag on to fully process such messages
+ even in the stopping phase, with the drawback that even newly sent
+ messages might still get processed (if coming in before all receive
+ timeouts have expired).
+
+
+ Aborting receive attempts for such incoming messages
+ might lead to the provider's retry count decreasing for the affected
+ messages. If you have a high number of concurrent consumers, make sure
+ that the number of retries is higher than the number of consumers,
+ to be on the safe side for all potential stopping scenarios.
+
+
+
+ true if accept messages while in the process of stopping; otherwise, false.
+
+
+
+
+ Internal exception class that indicates a rejected message on shutdown.
+ Used to trigger a rollback for an external transaction manager in that case.
+
+
+
+
+ MessageResourceHolder marker subclass that indicates local exposure,
+ i.e. that does not indicate an externally managed transaction.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Initializes a new instance of the class.
+
+ The session.
+
+
+
+ Exception thrown when the maximum connection recovery time has been exceeded.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class, with the specified message
+
+ The message.
+
+
+
+ Initializes a new instance of the class, with the specified message
+ and root cause exception
+
+ The message.
+ The inner exception.
+
+
+
+ Initializes a new instance of the class.
+
+ The SerializationInfo that holds the serialized object data about the exception being thrown.
+ The StreamingContext that contains contextual information about the source or destination.
+
+
+
+ Message listener container that uses the plain NMS client API's
+ MessageConsumer.Listener method to create concurrent
+ MessageConsumers for the specified listeners.
+
+ Mark Pollack
+
+
+
+ The default recovery time interval between connection reconnection attempts
+
+
+
+
+ The total time connection recovery will be attempted.
+
+
+
+
+ Call base class for valdation and then check that if the subscription is durable that the number of
+ concurrent consumers is equal to one.
+
+
+
+
+ Creates the specified number of concurrent consumers,
+ in the form of a JMS Session plus associated MessageConsumer
+
+
+
+
+
+ Re-initializes this container's NMS message consumers,
+ if not initialized already.
+
+
+
+
+ Registers this listener container as NMS ExceptionListener on the shared connection.
+
+
+
+
+
+ implementation, invoked by the NMS provider in
+ case of connection failures. Re-initializes this listener container's
+ shared connection and its sessions and consumers.
+
+ The reported connection exception.
+
+
+
+ Refresh the underlying Connection, not returning before an attempt has been
+ successful. Called in case of a shared Connection as well as without shared
+ Connection, so either needs to operate on the shared Connection or on a
+ temporary Connection that just gets established for validation purposes.
+
+
+ The default implementation retries until it successfully established a
+ Connection, for as long as this message listener container is active.
+ Applies the specified recovery interval between retries.
+
+
+
+
+ The amount of time to sleep in between recovery attempts.
+
+
+
+
+ Initialize the Sessions and MessageConsumers for this container.
+
+ in case of setup failure.
+
+
+
+ Creates a MessageConsumer for the given Session,
+ registering a MessageListener for the specified listener
+
+ The session to work on.
+ the MessageConsumer"/>
+ if thrown by NMS methods
+
+
+
+ Close the message consumers and sessions.
+
+ NMSException if destruction failed
+
+
+
+ Creates a MessageConsumer for the given Session and Destination.
+
+ The session to create a MessageConsumer for.
+ The destination to create a MessageConsumer for.
+ The new MessageConsumer
+
+
+
+ Gets or sets a value indicating whether to inhibit the delivery of messages published by its own connection.
+ Default is "false".
+
+ true if should inhibit the delivery of messages published by its own connection; otherwise, false.
+
+
+
+ Specify the number of concurrent consumers to create. Default is 1.
+
+
+ Raising the number of concurrent consumers is recommendable in order
+ to scale the consumption of messages coming in from a queue. However,
+ note that any ordering guarantees are lost once multiple consumers are
+ registered. In general, stick with 1 consumer for low-volume queues.
+ Do not raise the number of concurrent consumers for a topic.
+ This would lead to concurrent consumption of the same message,
+ which is hardly ever desirable.
+
+
+ The concurrent consumers.
+
+
+
+ Sets the time interval between connection recovery attempts. The default is 5 seconds.
+
+ The recovery interval.
+
+
+
+ Sets the max recovery time to try reconnection attempts. The default is 10 minutes.
+
+ The max recovery time.
+
+
+
+ Always use a shared NMS connection
+
+
+
+ Strategy interface that specifies a IMessageConverter
+ between .NET objects and NMS messages.
+
+
+ Mark Pollack
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Convert a .NET object to a NMS Message using the supplied session
+ to create the message object.
+
+ the object to convert
+
+ the Session to use for creating a NMS Message
+
+ the NMS Message
+
+ NMSException if thrown by NMS API methods
+ MessageConversionException in case of conversion failure
+
+
+ Convert from a NMS Message to a .NET object.
+ the message to convert
+
+ the converted .NET object
+
+ MessageConversionException in case of conversion failure
+
+
+
+ Provides a layer of indirection when adding the 'type' of the object as a message property.
+
+ Mark Pollack
+
+
+
+ Convert from a type to a string.
+
+ The type of object to convert.
+
+
+
+
+ Convert from a string to a type
+
+ The type id.
+
+
+
+
+ Gets the name of the field in the message that has type information..
+
+ The name of the type id field.
+
+
+ Thrown by IMessageConverter implementations when the conversion
+ of an object to/from a Message fails.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance of the IMessageConverterException class. with the specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the IMessageConverterException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The SerializationInfo that holds the serialized object data about the exception being thrown.
+ The StreamingContext that contains contextual information about the source or destination.
+
+
+ A simple message converter that can handle ITextMessages, IBytesMessages,
+ IMapMessages, and IObjectMessages. Used as default by NmsTemplate, for
+ ConvertAndSend and ReceiveAndConvert operations.
+
+
Converts a String to a NMS ITextMessage, a byte array to a NMS IBytesMessage,
+ a Map to a NMS IMapMessage, and a Serializable object to a NMS IObjectMessage
+ (or vice versa).
+
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Convert a .NET object to a NMS Message using the supplied session
+ to create the message object.
+
+ the object to convert
+
+ the Session to use for creating a NMS Message
+
+ the NMS Message
+
+ NMSException if thrown by NMS API methods
+ MessageConversionException in case of conversion failure
+
+
+ Convert from a NMS Message to a .NET object.
+ the message to convert
+
+ the converted .NET object
+
+ MessageConversionException in case of conversion failure
+
+
+ Create a NMS ITextMessage for the given String.
+ the String to convert
+
+ current NMS session
+
+ the resulting message
+
+ NMSException if thrown by NMS methods
+
+
+ Create a NMS IBytesMessage for the given byte array.
+ the byyte array to convert
+
+ current NMS session
+
+ the resulting message
+
+ NMSException if thrown by NMS methods
+
+
+ Create a NMS IMapMessage for the given Map.
+ the Map to convert
+
+ current NMS session
+
+ the resulting message
+
+ NMSException if thrown by NMS methods
+
+
+ Create a NMS IObjectMessage for the given Serializable object.
+ the Serializable object to convert
+
+ current NMS session
+
+ the resulting message
+
+ NMSException if thrown by NMS methods
+
+
+ Extract a String from the given ITextMessage.
+ the message to convert
+
+ the resulting String
+
+ NMSException if thrown by NMS methods
+
+
+ Extract a byte array from the given IBytesMessage.
+ the message to convert
+
+ the resulting byte array
+
+ NMSException if thrown by NMS methods
+
+
+ Extract a IDictionary from the given IMapMessage.
+ the message to convert
+
+ the resulting Map
+
+ NMSException if thrown by NMS methods
+
+
+
+ Extracts the serializable object from the given object message.
+
+ The message to convert.
+ The resulting serializable object.
+
+
+
+ Provides a layer of indirection when adding the 'type' of the object as a message property.
+
+
+
+
+ Initializes a new instance of the [ERROR: invalid expression DeclaringTypeKind].
+
+
+
+
+ Convert from a type to a string.
+
+ The type of object to convert.
+
+
+
+
+ Convert from a string to a type. Will look into the IdTypeMapping dictionary first to resolve the
+ type, then check if it is the well known typeId of 'Hashtable' followed by a strategy to resolve a fully qualfied
+ name from a simple type name. This strategy requires that
+
+ The type id.
+ The type associated with the string.
+ If the type can not be resolved.
+
+
+
+ Afters the properties set.
+
+
+
+
+ Gets or sets the id type mapping.
+
+ The id type mapping.
+
+
+
+ Gets the name of the field in the message that has type information..
+
+ The name of the type id field.
+
+
+
+ Sets the default hashtable class.
+
+ The default hashtable class.
+
+
+
+ Gets or sets a value indicating whether use the assembly qualified name when creating a string from a type reference.
+
+
+ By setting this property to true you will be able to easily share types that are available on both the publisher and
+ consumer with minimal configuration. However, this means that the publishers and subscribers would be tightly coupled
+ despite the use of loosely coupled messaging middleware.
+
+
+ true if to the assembly qualified name; otherwise, false.
+
+
+
+
+ Gets or sets the default namespace.
+
+ The default namespace.
+
+
+
+ Gets or sets the default name of the assembly.
+
+ The default name of the assembly.
+
+
+
+ Convert an object via XML serialization for sending via an ITextMessage
+
+ Mark Pollack
+
+
+
+ Convert a .NET object to a NMS Message using the supplied session
+ to create the message object.
+
+ the object to convert
+ the Session to use for creating a NMS Message
+ the NMS Message
+ NMSException if thrown by NMS API methods
+ MessageConversionException in case of conversion failure
+
+
+
+ Gets the XML string for an object
+
+ The object to convert.
+ XML string
+
+
+
+ Convert from a NMS Message to a .NET object.
+
+ the message to convert
+ the converted .NET object
+ MessageConversionException in case of conversion failure
+
+
+
+ Gets the type of the target given the message.
+
+ The message.
+ Type of the target
+
+
+
+ Converts a byte array to a UTF8 string.
+
+ The characters.
+ UTF8 string
+
+
+
+ Converts a UTF8 string to a byte array
+
+ The p XML string.
+
+
+
+
+ Sets the type mapper.
+
+ The type mapper.
+
+
+
+ Gets or sets a value indicating whether encoder should emit UTF8 byte order mark. Default is false.
+
+
+ true to specify that a Unicode byte order mark is provided; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to throw an exception on invalid bytes. Default is true.
+
+ true to specify that an exception be thrown when an invalid encoding is detected; otherwise, false.
+
+
+
+ Simple DestinationResolver implementation resolving destination names
+ as dynamic destinations.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Strategy interface for resolving NMS destinations.
+
+
+ Used by MessageTemplate for resolving
+ destination names from simple Strings to actual
+ IDestination implementation instances.
+
+
+ The default DestinationResolver implementation used by
+ MessageTemplate instances is the
+ DynamicDestinationResolver class. Consider using the
+ JndiDestinationResolver for more advanced scenarios.
+
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+ Resolve the given destination name, either as located resource
+ or as dynamic destination.
+
+ the current NMS Session
+
+ the name of the destination
+
+ true if the domain is pub-sub, false if P2P
+
+ the NMS destination (either a topic or a queue)
+
+ NMSException if resolution failed
+
+
+ Resolve the given destination name, either as located resource
+ or as dynamic destination.
+
+ the current NMS Session
+
+ the name of the destination
+
+ true if the domain is pub-sub, false if P2P
+
+ the NMS destination (either a topic or a queue)
+
+ NMSException if resolution failed
+
+
+ Resolve the given destination name to a Topic.
+ the current NMS Session
+
+ the name of the desired Topic.
+
+ the NMS Topic name
+
+ NMSException if resolution failed
+
+
+ Resolve the given destination name to a Queue.
+ the current NMS Session
+
+ the name of the desired Queue.
+
+ the NMS Queue name
+
+ NMSException if resolution failed
+
+
+
+ Generic utility methods for working with NMS. Mainly for internal use
+ within the framework, but also useful for custom NMS access code.
+
+
+
+ Close the given NMS Connection and ignore any thrown exception.
+ This is useful for typical finally blocks in manual NMS code.
+
+ the NMS Connection to close (may be null)
+
+
+
+ Close the given NMS Connection and ignore any thrown exception.
+ This is useful for typical finally blocks in manual NMS code.
+
+ the NMS Connection to close (may be null)
+
+ whether to call stop() before closing
+
+
+
+ Close the given NMS Session and ignore any thrown exception.
+ This is useful for typical finally blocks in manual NMS code.
+
+ the NMS Session to close (may be null)
+
+
+
+ Close the given NMS MessageProducer and ignore any thrown exception.
+ This is useful for typical finally blocks in manual NMS code.
+
+ the NMS MessageProducer to close (may be null)
+
+
+
+ Close the given NMS MessageConsumer and ignore any thrown exception.
+ This is useful for typical finally blocks in manual NMS code.
+
+ the NMS MessageConsumer to close (may be null)
+
+
+
+ Commit the Session if not within a distributed transaction.
+ Needs investigation - no distributed tx in .NET messaging providers
+ the NMS Session to commit
+
+ NMSException if committing failed
+
+
+ Rollback the Session if not within a distributed transaction.
+ Needs investigation - no distributed tx in EMS
+ the NMS Session to rollback
+
+ NMSException if committing failed
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Messaging.dll b/Resources/Libraries/Spring.NET/Spring.Messaging.dll
new file mode 100644
index 00000000..6f42daa4
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Messaging.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Messaging.pdb b/Resources/Libraries/Spring.NET/Spring.Messaging.pdb
new file mode 100644
index 00000000..38ee9b4a
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Messaging.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Messaging.xml b/Resources/Libraries/Spring.NET/Spring.Messaging.xml
new file mode 100644
index 00000000..69cc921d
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Messaging.xml
@@ -0,0 +1,2685 @@
+
+
+
+ Spring.Messaging
+
+
+
+
+ A implementation that caches MessageQueue and IMessageConverter
+ instances. The MessageQueue objects are created by retrieving them by-name from the
+ ApplicationContext.
+
+ Mark Pollack
+
+
+
+ An interface for creating MessageQueue and IMessageConverter objects from object definitions
+ defined in the application context.
+
+
+ MessageQueue and IMessageConverter objects have methods that are generally not thread safe,
+ (IMessageConverter classes rely on IMessageFormatter objects that are not thread safe).
+ As such, a major reason to for this interface is to provide thread-local instances such that
+ appliation code need not be concerned with these resource management issues.
+
+ Mark Pollack
+
+
+
+ Registers the message queue, its creation specified via the factory method
+ MessageQueueCreatorDelegate, with the provided name in the application context
+
+ Name of the message queue object.
+ The message queue creator delegate.
+
+
+
+ Creates the message queue given its name in the application context.
+
+ Name of the message queue object.
+ A MessageQueue instance configured via the application context
+
+
+
+ Determines whether the application context contains the message queue object definition.
+
+ Name of the message queue object.
+
+ true if the application context contains the specified message queue object name; otherwise, false.
+
+
+
+
+ Registers the message converter, its creation specified via the factory method
+ MessageConverterCreatorDelegate, with the provided name in the application context.
+
+ Name of the message converter.
+ The message converter creator delegate.
+
+
+
+ Creates the message converter given its name in the application context.
+
+ Name of the message converter object.
+ A IMessageConverter instance configured via the application context
+
+
+
+ Determines whether the application context contains the message queue object definition.
+
+ Name of the message converter object.
+
+ true if the application context contains the specified message message converter object name; otherwise, false.
+
+
+
+
+ The instance for this class.
+
+
+
+
+ Registers the message queue, its creation specified via the factory method
+ MessageQueueCreatorDelegate, with the provided name in the application context
+
+ Name of the message queue object.
+ The message queue creator delegate.
+
+
+
+ Creates the message queue given its name in the application context.
+
+ Name of the message queue object.
+
+ A MessageQueue instance configured via the application context
+
+
+
+
+ Determines whether the application context contains the message queue object definition.
+
+ Name of the message queue object.
+
+ true if the application context contains the specified message queue object name; otherwise, false.
+
+
+
+
+ Registers the message converter.
+
+ Name of the message converter.
+ The message converter creator delegate.
+
+
+
+ Creates the message converter given its name in the application context.
+
+ Name of the message converter object.
+
+ A IMessageConverter instance configured via the application context
+
+
+
+
+ Determines whether the application context contains the message queue object definition.
+
+ Name of the message converter object.
+
+ true if the application context contains the specified message message converter object name; otherwise, false.
+
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Specifies a basic set of helper MSMQ opertions.
+
+
+ Implemented by . Not often used but a useful option
+ to enhance testability, as it can easily be mocked or stubbed.
+
+
+ Provides MessageQueueTemplate's
+ Send(..) and receive(..) methods that mirror various MSMQ MessageQueue
+ API methods.
+
+
+ Mark Pollack
+
+
+
+ Send the given object to the default destination, converting the object
+ to a MSMQ message with a configured IMessageConverter.
+
+ This will only work with a default destination queue specified!
+ The obj.
+
+
+ Send the given object to the default destination, converting the object
+ to a MSMQ message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ if thrown by MSMQ API methods
+
+
+ Send the given object to the specified destination, converting the object
+ to a MSMQ message with a configured and resolving the
+ destination name to a using a
+
+ the name of the destination queue
+ to send this message to (to be resolved to an actual MessageQueue
+ by a IMessageQueueFactory)
+
+ the object to convert to a message
+
+ NMSException if there is any problem
+
+
+ Send the given object to the specified destination, converting the object
+ to a MSMQ message with a configured and resolving the
+ destination name to a with an
+ The callback allows for modification of the message after conversion.
+
+ the name of the destination queue
+ to send this message to (to be resolved to an actual MessageQueue
+ by a IMessageQueueFactory)
+
+ the object to convert to a message
+
+ the callback to modify the message
+
+ if thrown by MSMQ API methods
+
+
+
+ Receive and convert a message synchronously from the default message queue.
+
+ The converted object
+ if thrown by MSMQ API methods. Note an
+ exception will be thrown if the timeout of the syncrhonous recieve operation expires.
+
+
+
+
+ Receives and convert a message synchronously from the specified message queue.
+
+ Name of the message queue object.
+ the converted object
+ if thrown by MSMQ API methods. Note an
+ exception will be thrown if the timeout of the syncrhonous recieve operation expires.
+
+
+
+
+ Receives a message on the default message queue using the transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+ A message.
+
+
+
+ Receives a message on the specified queue using the transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+ Name of the message queue object.
+
+
+
+
+ Sends the specified message to the default message queue using the
+ transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+ The message to send
+
+
+
+ Sends the specified message to the message queue using the
+ transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+ Name of the message queue object.
+ The message.
+
+
+
+ Sends the specified message on the provided MessageQueue using the
+ transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+
+ Note that it is the callers responsibility to ensure that the MessageQueue instance
+ passed into this not being access simultaneously by other threads.
+
+ A transactional send (either local or DTC transaction) will be
+ attempted for a transacitonal queue, falling back to a single-transaction send
+ to a transactional queue if there is not ambient Spring managed transaction.
+ The DefaultMessageQueue to send a message to.
+ The message to send
+
+
+
+ MessageQueueResourceHolder marker subclass that indicates local exposure,
+ i.e. that does not indicate an externally managed transaction.
+
+ Mark Pollack
+
+
+
+ MessageQueue resource holder, wrapping a MessageQueueTransaction.
+ MessageQueueTransactionManager binds instances of this class to the thread.
+
+
+ This is an SPI class, not intended to be used by applications.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+ The message queue transaction.
+
+
+
+ Gets or sets the message queue transaction.
+
+ The message queue transaction.
+
+
+
+ Initializes a new instance of the class.
+
+ The message queue transaction.
+
+
+
+ To be used with MessageQueueTemplate's send method that
+ convert an object to a message.
+
+
+ It allows for further modification of the message after it has been processed
+ by the converter. This is useful for setting of Message properties (e.g.
+ CorrelationId, AppSpecific, TimeToReachQueue).
+
+ Mark Pollack
+
+
+
+ Convenient super class for application classes that need MSMQ access.
+
+
+ Override the InitGateway method to perform custom startup tasks.
+
+ Mark Pollack
+
+
+
+ Subclasses can override this for custom initialization behavior.
+ Gets called after population of this instance's properties.
+
+
+
+
+ Gets or sets the message queue template. .
+
+ The message queue template.
+
+
+
+ Gets the message queue factory, a convenience method.
+
+ The message queue factory.
+
+
+
+ Encapsulates additional metadata information about the MessageQueue that can not be easily obtained
+ from the MessageQueue itself.
+
+
+
+
+ Initializes a new instance of the class.
+
+ if set to true [remote queue].
+ if set to true [remote queue is transactional].
+
+
+
+ Gets or sets a value indicating whether the queue is a remote queue.
+
+
+ The operations that one can perform on the MessageQueue depend on if it is local or remote, for
+ example checking if it is transactional. This is very difficult to determine programmatically.
+ The property was made virtual so it can be overridden to take into account custom heuristics you
+ may want to use to determine this programmatically.
+
+ true if remote queue; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether the remote queue is transactional.
+
+
+ true if the remote queue is transactional; otherwise, false.
+
+
+
+
+ Retrieves MessageQueueMetadata from the cache.
+
+ The queue path.
+
+ Item for the specified , or null.
+
+
+
+
+ Removes the specified queue path from the cache
+
+ The queue path.
+
+
+
+ Removes collection of MessageQueueMetaCache from the cache.
+
+
+ Array of MessageQueue paths to remove.
+
+
+
+
+ Removes all MessageQueueMetadata from the cache.
+
+
+
+
+ Gets the number of items in the cache.
+
+
+
+
+ Gets a collection of all cache queue paths.
+
+
+
+
+ Helper class that simplifies MSMQ access code.
+
+
+
+ Using the System.Messaging.MessageQueue class directly in application code has a number of
+ shortcomings, namely that most operations are not thread safe (in particular Send) and
+ IMessageFormatter classes are not thread safe either.
+
+
+ The MessageQueueTemplate class overcomes these limitations letting you use a single instance
+ of MessageQueueTemplate across multiple threads to perform standard MessageQueue opertations.
+ Classes that are not thread safe are obtained and cached in thread local storage via an
+ implementation of the interface, specifically
+ .
+
+
+ You can access the thread local instance of the MessageQueue associated with this template
+ via the Property DefaultMessageQueue.
+
+
+ The template's Send methods will select an appropriate transaction delivery settings so
+ calling code does not need to explicitly manage this responsibility themselves and thus
+ allowing for greater portability of code across different, but common, transactional usage scenarios.
+
+ A transactional send (either local or DTC transaction) will be
+ attempted for a transacitonal queue, falling back to a single-transaction send
+ to a transactional queue if there is not ambient Spring managed transaction.
+
+ The overloaded ConvertAndSend and ReceiveAndConvert methods inherit the transactional
+ semantics of the previously described Send method but more importantly, they help to ensure
+ that thread safe access to instances are
+ used as well as providing additional central location to put programmic logic that translates
+ between the MSMQ Message object and the your business objects. This for example is useful if you
+ need to perform additional translation operations after calling a IMessageFormatter instance or
+ want to directly extract and process the Message body contents.
+
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Name of the message queue as registered in the Spring container.
+
+
+
+ Invoked by an
+ after it has injected all of an object's dependencies.
+
+
+ Ensure that the DefaultMessageQueueObjectName property is set, creates
+ a default implementation of the interface
+ () that retrieves instances on a per-thread
+ basis, and registers in the Spring container a default implementation of
+ () with a
+ simple System.String as its TargetType.
+
+
+
+
+ Send the given object to the default destination, converting the object
+ to a MSMQ message with a configured IMessageConverter.
+
+ The obj.
+ This will only work with a default destination queue specified!
+
+
+
+ Send the given object to the default destination, converting the object
+ to a MSMQ message with a configured IMessageConverter. The IMessagePostProcessor
+ callback allows for modification of the message after conversion.
+
This will only work with a default destination specified!
+
+ the object to convert to a message
+ the callback to modify the message
+ if thrown by MSMQ API methods
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a MSMQ message with a configured and resolving the
+ destination name to a using a
+
+ the name of the destination queue
+ to send this message to (to be resolved to an actual MessageQueue
+ by a IMessageQueueFactory)
+ the object to convert to a message
+ NMSException if there is any problem
+
+
+
+ Send the given object to the specified destination, converting the object
+ to a MSMQ message with a configured and resolving the
+ destination name to a with an
+ The callback allows for modification of the message after conversion.
+
+ the name of the destination queue
+ to send this message to (to be resolved to an actual MessageQueue
+ by a IMessageQueueFactory)
+ the object to convert to a message
+ the callback to modify the message
+ if thrown by MSMQ API methods
+
+
+
+ Receive and convert a message synchronously from the default message queue.
+
+ The converted object
+ if thrown by MSMQ API methods. Note an
+ exception will be thrown if the timeout of the syncrhonous recieve operation expires.
+
+
+
+
+ Receives and convert a message synchronously from the specified message queue.
+
+ Name of the message queue object.
+ the converted object
+ if thrown by MSMQ API methods. Note an
+ exception will be thrown if the timeout of the syncrhonous recieve operation expires.
+
+
+
+
+ Receives a message on the default message queue using the transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+ A message.
+
+
+
+ Receives a message on the specified queue using the transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+ Name of the message queue object.
+
+
+
+
+ Sends the specified message to the default message queue using the
+ transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+ The message to send
+
+
+
+ Sends the specified message to the message queue using the
+ transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+ Name of the message queue object.
+ The message.
+
+
+
+ Sends the specified message on the provided MessageQueue using the
+ transactional settings as dicted by MessageQueue's Transactional property and
+ the current Spring managed ambient transaction.
+
+ The DefaultMessageQueue to send a message to.
+ The message to send
+
+ Note that it is the callers responsibility to ensure that the MessageQueue instance
+ passed into this not being access simultaneously by other threads.
+
+ A transactional send (either local or DTC transaction) will be
+ attempted for a transacitonal queue, falling back to a single-transaction send
+ to a transactional queue if there is not ambient Spring managed transaction.
+
+
+
+ Sends the message to the given message queue.
+
+ If System.Transactions.Transaction.Current is null, then send based on
+ the transaction semantics of the queue definition. See
+ The message queue.
+ The message.
+
+
+
+ Send the message queue selecting the appropriate transactional delivery options.
+
+
+
+ If the message queue is transactional and there is an ambient MessageQueueTransaction
+ in thread local storage (put there via the use of Spring's MessageQueueTransactionManager
+ or TransactionalMessageListenerContainer), the message will be sent transactionally using the
+ MessageQueueTransaction object in thread local storage. This lets you group together multiple
+ messaging operations within the same transaction without having to explicitly pass around the
+ MessageQueueTransaction object.
+
+
+ If the message queue is transactional but there is no ambient MessageQueueTransaction,
+ then a single message transaction is created on each messaging operation.
+ (MessageQueueTransactionType = Single).
+
+
+ If there is an ambient System.Transactions transaction then that transaction will
+ be used (MessageQueueTransactionType = Automatic).
+
+
+ If the queue is not transactional, then a non-transactional send
+ (MessageQueueTransactionType = None) is used.
+
+
+ The mq.
+ The MSG.
+
+
+
+ Does the send message transaction.
+
+ The mq.
+ The transaction to use.
+ The MSG.
+
+
+
+ Does the send message queue non transactional.
+
+ The mq.
+ The transaction to use.
+ The MSG.
+
+
+
+ Sends using MessageQueueTransactionType.Automatic transaction type
+
+ The message queue.
+ The message.
+
+
+
+ Template method to convert the message if it is not null.
+
+ The message.
+ The converted message ,or null if no message converter is set.
+
+
+
+ Checks if the default message queue if defined.
+
+
+
+
+ Gets or sets the message queue factory to use for creating MessageQueue and IMessageConverters.
+ Default value is one that support thread local instances.
+
+ The message queue factory.
+
+
+
+ Gets or sets the name of the default message queue as identified in the Spring container.
+
+ The name of the message queue as identified in the Spring container.
+
+
+
+ Gets or sets the name of the message converter object. The name will be passed to
+ the class to resolve it to an actual MessageQueue
+ instance.
+
+ The default name is internally generated and will register an XmlMessageConverter
+ that uses an and a simple System.String as its TargetType.
+ The name of the message converter object.
+
+
+
+ Gets the default message queue to be used on send/receive operations that do not
+ have a destination parameter. The MessageQueue instance is resolved using
+ the template's , the default implementaion
+ will return an unique instance per thread.
+
+ The default message queue.
+
+
+
+ Gets the message converter to use for this template. Used to resolve
+ object parameters to ConvertAndSend methods and object results
+ from ReceiveAndConvert methods.
+
+
+ The default
+
+ The message converter.
+
+
+
+ Gets or sets the receive timeout to be used on recieve operations. Default value is
+ MessageQueue.InfiniteTimeout (which is actually ~3 months).
+
+ The receive timeout.
+
+
+
+ Gets or sets the metadata cache.
+
+ The metadata cache.
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ implementation for MSMQ. Binds a
+ MessageQueueTransaction to the thread.
+
+
+
+ This local strategy is an alternative to executing MSMQ operations within
+ DTC transactions. Its advantage is that multiple MSMQ operations can
+ easily participate within the same local MessagingTransaction transparently when
+ using the class for send and recieve operations
+ and not pay the overhead of a DTC transaction.
+
+ Transaction synchronization is turned off by default, as this manager might
+ be used alongside a IDbProvider-based Spring transaction manager such as the
+ ADO.NET .
+ which has stronger needs for synchronization.
+
+ Mark Pollack
+
+
+
+ Location where the message transaction is stored in thread local storage.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ Turns off transaction synchronization by default, as this manager might
+ be used alongside a DbProvider-based Spring transaction manager like
+ AdoPlatformTransactionManager, which has stronger needs for synchronization.
+ Only one manager is allowed to drive synchronization at any point of time.
+
+
+
+
+ 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 transaction
+ (that is, a transaction which has already started).
+
+ MessageQueueTransactionObject object returned by
+ .
+
+ True if there is an existing transaction.
+
+
+
+
+ Begin a new transaction with the given transaction definition.
+
+ Transaction object returned by
+ .
+ instance, describing
+ propagation behavior, isolation level, timeout etc.
+
+ 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
+ .)
+
+
+
+
+ Resume the resources of the current transaction.
+
+ Transaction object returned by
+ .
+ The object that holds suspended resources as returned by
+ .
+
+
+
+ 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.
+
+
+
+
+
+ Perform an actual rollback on the given transaction, calls Transaction.Abort().
+
+ The status representation of the transaction.
+
+ An implementation does not need to check the new transaction flag.
+
+
+
+
+ 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.
+ Default implementation throws an IllegalTransactionStateException,
+ assuming that participating in existing transactions is generally not
+ supported. Subclasses are of course encouraged to provide such support.
+
+
+ In the case of system errors.
+
+
+
+
+ Cleanup resources after transaction completion.
+
+ Transaction object returned by
+ .
+
+
+ Called after
+ and
+
+ execution on any outcome.
+
+
+
+
+
+ Utility methods to support Spring's MSMQ functionality
+
+
+
+
+ Registers the default message converter with the application context.
+
+ The application context.
+ The name of the message converter to use for lookups with
+ .
+
+
+
+
+ Gets the message queue transaction from thread local storage
+
+ The resource factory.
+ null if not found in thread local storage
+
+
+ Callback interface for resource creation.
+ Serving as argument for the GetMessageQueueTransaction method.
+
+
+
+
+ Return whether to allow for a local transaction that is synchronized with
+ a Spring-managed transaction (where the main transaction might be a ADO.NET-based
+ one for a specific IDbProvider, for example), with the MSMQ transaction
+ committing right after the main transaction.
+ Returns whether to allow for synchronizing a local MSMQ transaction
+
+
+
+
+ Provides basic lifecyle management methods for implementing a message listener container.
+
+
+ This base class does not assume any specific listener programming model
+ or listener invoker mechanism. It just provides the general runtime
+ lifecycle management needed for any kind of message-based listening mechanism.
+
+ For a concrete listener programming model, check out the
+ subclass. For a concrete listener
+ invoker mechanism, check out the ,
+ , or
+ classes.
+
+
+ Mark Pollack
+
+
+
+ Delegates to and
+
+
+
+
+ Calls when the application context destroys the container instance.
+
+
+
+
+ Validates the configuration of this container
+ The default implementation is empty. To be overridden in subclasses.
+
+
+
+
+ Initializes this container. Calls the abstract method to
+ initialize the listening infrastructure (i.e. subclasses will typically
+ resolve a MessageQueue instance from a MessageQueueObjectName) and then calls
+ the abstract method DoStart if the property is set to true,
+
+
+
+
+ Sets the container state to inactive and not running, calls template method
+
+
+
+
+
+ Starts this container.
+
+
+
+
+ Sets the state to running, can be overridden in subclasses.
+
+
+
+
+ Stops this instance.
+
+
+
+
+ Template method suitable for overriding that stops the container.
+
+
+
+
+ Check whether this container's listeners are generally allowed to run.
+
+
+ This implementation always returns true; the default 'running'
+ state is purely determined by and
+
+ Subclasses may override this method to check against temporary
+ conditions that prevent listeners from actually running. In other words,
+ they may apply further restrictions to the 'running' state, returning
+ false if such a restriction prevents listeners from running.
+
+
+ false if such a restriction prevents listeners from running.
+
+
+
+ Subclasses need to implement this method for their specific
+ listener management process.
+
+
+
+
+ Subclasses need to implement this method for their specific
+ listener management process.
+
+
+
+
+ Sets a value indicating whether to automatically start the container after initialization.
+ Default is "true"; set this to "false" to allow for manual startup though the
+ method.
+
+ true if autostartup; otherwise, false.
+
+
+
+ Gets a value indicating whether this Container is active,
+ that is, whether it has been set up but not shut down yet.
+
+ true if active; otherwise, false.
+
+
+
+ Gets a value indicating whether this Container is running,
+ that is whether it has been started and not stopped yet.
+
+ true if running; otherwise, false.
+
+
+
+ Return the object name that this listener container has been assigned
+ in its containing object factory, if any.
+
+
+
+
+ Defines a minimal programming model for message listener containers. They are expected to
+ invoke a upon asynchronous receives of a MSMQ message. Access to
+ obtain MessageQueue and instances is available through the
+ property, the default implementation
+ provides per-thread instances of these classes.
+
+ Mark Pollack
+
+
+
+ Most operations within the MessageListener container hierarchy use methods on the
+ MessageQueue instance which are thread safe (BeginPeek, BeginReceive,
+ EndPeek, EndReceive, GetAllMessages, Peek, and Receive). When using another
+ method on the shared MessageQueue instance, wrap calls with a lock on this object.
+
+
+
+
+ Validates that the is not null. If
+ is null, a is created. Can be be overridden in subclasses.
+
+
+
+
+ Template method that execute listener with the provided message if
+ is true. Subclasses will call
+ this method at the appropriate point in their processing lifecycle, for example
+ committing or rolling back a transaction if needed.
+
+ Calls the template method
+ The message.
+
+
+
+ Invokes the listener if it is not null. Invokes the method .
+ Can be overridden in subclasses.
+
+ The message.
+
+
+
+ Invokes the listener. Can be overriden in subclasses.
+
+ The listener.
+ The message.
+
+
+
+ Closes the queue handle. Cancel pending receive operation by closing the queue handle
+ To properly dispose of the queue handle, ensure that EnableConnectionCache=false on the
+ MessageQueue that this listener is configured to use.
+
+
+
+
+ Gets or sets the message queue factory.
+
+ The message queue factory.
+
+
+
+ Gets or sets the name of the message queue object, as refered to in the
+ Spring configuration, that will be used to create a DefaultMessageQueue instance
+ for consuming messages in the container.
+
+ The name of the message queue object.
+
+
+
+ Gets or sets the message listener.
+
+ The message listener.
+
+
+
+ Gets or sets the recovery time span, how long to sleep after an exception in processing occured
+ to avoid excessive redelivery attempts. Default value is 1 second.
+
+ The recovery time span.
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Base class for listener container implementations which are based on Peeking for messages on
+ a MessageQueue. Peeking is the only resource efficient approach that can be used in
+ order to have MessageQueue receipt in conjunction with transactions, either local MSMQ transactions,
+ local ADO.NET based transactions, or DTC transactions. See SimpleMessageListenerContainer for
+ an implementation based on a synchronous receives and you do not require transactional support.
+
+
+ The number of threads that will be created for processing messages after the Peek occurs
+ is set via the property MaxConcurrentListeners. Each processing thread will continue to listen
+ for messages up until the the timeout value specified by ListenerTimeLimit or until
+ there are no more messages on the queue (which ver comes first).
+
+ The default value of
+ ListenerTimeLimit is TimeSpan.Zero, meaning that only one attempt to recieve a message from the
+ queue will be performed by each listener thread.
+
+
+ The current implementation uses the standard .NET thread pool. Future implementations will
+ use a custom (and pluggable) thread pool.
+
+
+
+
+
+ Retrieves a MessageQueue instance given the MessageQueueObjectName
+
+
+
+
+ Wait for all listener threads to exit and closes the DefaultMessageQueue.
+
+
+
+
+ Starts peeking on the DefaultMessageQueue.
+
+
+
+
+ Stops peeking on the message queue.
+
+
+
+
+ Starts peeking on the DefaultMessageQueue. This is the method that must be called
+ again at the end of message procesing to continue the peeking process.
+
+
+
+
+ The callback when the peek has completed. Schedule up to the maximum number of
+ concurrent listeners to receive messages off the queue. Delegates to the abstract
+ method DoReceiveAndExecute so that subclasses may customize the receiving process,
+ for example to surround the receive operation with transactional semantics.
+
+ The async result.
+
+
+
+ Execute the listener for a message received from the given queue
+ wrapping the entire operation in an external transaction if demanded.
+
+ The DefaultMessageQueue upon which the call to receive should be
+ called.
+
+
+
+ Subclasses perform a receive opertion on the message queue and execute the
+ message listener
+
+ The DefaultMessageQueue.
+ true if received a message, false otherwise
+
+
+
+ Waits for listener threads to exit.
+
+
+
+
+ Configures the initial peek thread, setting it to be a background thread.
+ Can be overridden in subclasses.
+
+ The peek thread.
+
+
+
+ Template method that gets called right when a new message has been received,
+ before attempting to process it. Allows subclasses to react to the event
+ of an actual incoming message, for example adapting their consumer count.
+
+ The message.
+
+
+
+ Template method that gets called right before a new message is received, i.e.
+ messageQueue.Receive().
+
+ It allows subclasses to modify the state of the MessageQueue
+ before receiving which maybe required when using remote queues
+
+
+
+
+ Gets or sets the listener time limit to continuously receive messages.
+ The value is specified in milliseconds. The default value is TimeSpan.Zero,
+ indicating to only perform one Receive operation per Peek trigger.
+
+ The listener time limit in millis.
+
+
+
+ Gets or sets the max concurrent listeners to receive messages.
+
+ The max concurrent listeners.
+
+
+
+ Gets or sets the message queue used for Peeking.
+
+ The message queue.
+
+
+
+ Provides common functionality to exception handlers that will send the exceptional message to
+ another queue.
+
+ Allows for setting of MaxRetry limit and contains an internal dictionary to keep track
+ of the Message Ids of messages.
+
+ Mark Pollack
+
+
+
+ Synchronization object for access to messageMap protected variable
+
+
+
+
+ In-memory storage to keep track of Message Ids that have been already processed.
+
+
+
+
+ Ensure that the MessageQueueObject name is set and creates a
+ if no
+ is specified.
+
+ Will attempt to create an instance of the DefaultMessageQueue to detect early
+ any configuraiton errors.
+
+ In the event of misconfiguration (such as the failure to set a
+ required property) or if initialization fails.
+
+
+
+
+ Gets or sets the maximum retry count to reattempt processing of a message that has thrown
+ an exception
+
+ The max retry count.
+
+
+
+ Gets or sets the message queue factory.
+
+ The message queue factory.
+
+
+
+ Gets or sets the name of the message queue object to send the message that cannot be
+ processed successfully after MaxRetry delivery attempts.
+
+ The name of the message queue object.
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ An implementation of a Peeking based MessageListener container that starts a transaction
+ before recieving a message. The implementation determines
+ the type of transaction that will be started. An exception while processing the message will
+ result in a rollback, otherwise a transaction commit will be performed.
+
+
+ The type of transaction that can be started can either be local transaction,
+ (e.g. , a local messaging transaction
+ (e.g. or a DTC based transaction,
+ (eg. .
+
+ Transaction properties can be set using the property
+ and the transaction timeout via the property .
+
+
+
+
+
+ Subclasses perform a receive opertion on the message queue and execute the
+ message listener
+
+ The DefaultMessageQueue.
+
+ true if received a message, false otherwise
+
+
+
+
+ Does the receive and execute using platform transaction manager.
+
+ The message queue.
+ The transactional status.
+ true if should continue peeking, false otherwise.
+
+
+
+ Rollback the transaction on exception.
+
+ The transactional status.
+ The exception.
+
+
+
+ Gets or sets the platform transaction manager.
+
+ The platform transaction manager.
+
+
+
+ Gets or sets the transaction definition.
+
+ The transaction definition.
+
+
+
+ Sets the transaction timeout to use for transactional wrapping, in seconds.
+ Default is none, using the transaction manager's default timeout.
+
+ The transaction timeout.
+
+
+
+ A MessageListenerContainer that uses distributed (DTC) based transactions. Exceptions are
+ handled by instances of .
+
+
+
+ Starts a DTC based transaction before receiving the message. The transaction is
+ automaticaly promoted to 2PC to avoid the default behaivor of transactional promotion.
+ Database and messaging operations will commit or rollback together.
+
+
+ If you only want local message based transactions use the
+ . With some simple programming
+ you may also achieve 'exactly once' processing using the
+ .
+
+
+ Poison messages can be detected and sent to another queue using Spring's
+ .
+
+
+
+
+
+ Set the transaction name to be the spring object name.
+ Call base class Initialize() functionality.
+
+
+
+
+ Does the receive and execute using TxPlatformTransactionManager. Starts a distributed
+ transaction before calling Receive.
+
+ The message queue.
+ The transactional status.
+
+ true if should continue peeking, false otherwise.
+
+
+
+
+ Handles the distributed transaction listener exception by calling the
+ if not null.
+
+ The exception.
+ The message.
+
+
+
+ Gets or sets the distributed transaction exception handler.
+
+ The distributed transaction exception handler.
+
+
+
+ Exception handler for use with DTC based message listener container.
+ such as .
+ See for
+ an implementation that detects poison messages and send them to another queue.
+
+
+
+
+ Determines whether the incoming message is a poison message. This method is
+ called before the is invoked.
+
+
+ The will call
+ if this method returns true and will
+ then commit the distibuted transaction (removing the message from the queue).
+
+ The incoming message.
+
+ true if it is a poison message; otherwise, false.
+
+
+
+
+ Handles the poison message.
+
+ Typical implementations will move the message to another queue.
+ The will call this
+ method while still within a DTC-based transaction.
+
+ The poison message.
+
+
+
+ Called when an exception is thrown in listener processing.
+
+ The exception.
+ The message.
+
+
+
+ Exception handler called when an exception occurs during
+ non-transactional receive processing.
+
+
+ A non-transactional receive will remove the message from the queue. Non-transactional
+ receivers do not suffer from poison messages since there is no redelivery by MSMQ.
+ Typical actions to perform are to log the message or place it in another queue.
+ If placed in another queue, another message listener container can be used to
+ process the message later, assuming the root cause of the original exception is
+ transient in nature.
+
+
+
+
+ Called when an exception is thrown in listener processing.
+
+ The exception.
+ The message.
+
+
+
+ The callback invoked when a message is received.
+
+ Mark Pollack
+
+
+
+ Called when message is received.
+
+ The message.
+
+
+
+ The exception handler within a transactional context.
+
+
+ The return value indicates to the invoker (typically a
+ ) whether the
+ MessageTransaction that is associated with the delivery of this message
+ should be rolled back (placing the message back on the transactional queue
+ for redelivery) or commited (removing the message from the transactional queue)
+
+ Mark Pollack
+
+
+
+ Called when an exception is thrown during listener processing under the
+ scope of a .
+
+ The exception.
+ The message.
+ The message queue transaction.
+ An action indicating if the caller should commit or rollback the
+
+
+
+
+
+ Exception to be thrown when the execution of a listener method failed.
+
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Base exception class for exceptions thrown by Spring in Spring.Messaging
+
+ Mark Pollack
+
+
+ Creates a new instance of the MessagingException class.
+
+
+
+ Creates a new instance of the MessagingException class. with the specified message.
+
+
+ A message about the exception.
+
+
+
+
+ Creates a new instance of the MessagingException class with the specified message
+ and root cause.
+
+
+ A message about the exception.
+
+
+ The root exception that is being wrapped.
+
+
+
+
+ Creates a new instance of the MessagingException class.
+
+
+ The
+ that holds the serialized object data about the exception being thrown.
+
+
+ The
+ that contains contextual information about the source or destination.
+
+
+
+
+ Initializes a new instance of the class, with the specified message
+
+ The message.
+
+
+
+ Initializes a new instance of the class, with the specified message
+ and root cause exception
+
+ The message.
+ The inner exception.
+
+
+
+ Message listener adapter that delegates the handling of messages to target
+ listener methods via reflection ,
+ with flexible message type conversion.
+ Allows listener methods to operate on message content types, completely
+ independent from the MSMQ API.
+
+
+
+ By default, the content of incoming MSMQ messages gets extracted before
+ being passed into the target handler method, to let the target method
+ operate on message content types such as String or business object instead of
+ . Message type conversion is delegated to a Spring
+ By default, an
+ with TargetType set to System.String is used. If you do not want such automatic
+ message conversion taking place, then be sure to set the
+ MessageConverter property to null.
+
+
+ If a target handler method returns a non-null object (for example, with a
+ message content type such as String), it will get
+ wrapped in a MSMQ Message and sent to the response destination
+ (either using the MSMQ Message.ResponseQueue property or
+ ) specified default response queue
+ destination).
+
+
+ Find below some examples of method signatures compliant with this adapter class.
+ This first example uses the default that can
+ marhsall/unmarshall string values from the MSMQ Message.
+
+
+ public interface IMyHandler
+ {
+ void HandleMessage(string text);
+ }
+
+
+ The next example indicates a similar method signature but the name of the
+ handler method name has been changed to "DoWork", using the property
+
+
+
+ public interface IMyHandler
+ {
+ void DoWork(string text);
+ }
+
+ If your implementation will return multiple object
+ types, overloading the handler method is perfectly acceptible, the most specific matching
+ method will be used. A method with an object signature would be consider a
+ 'catch-all' method
+
+
+ public interface IMyHandler
+ {
+ void DoWork(string text);
+ void DoWork(OrderRequest orderRequest);
+ void DoWork(InvoiceRequest invoiceRequest);
+ void DoWork(object obj);
+ }
+
+
+ The last example shows how to send a message to the ResponseQueue for those
+ methods that do not return void.
+
+ public interface MyHandler
+ {
+ string DoWork(string text);
+ OrderResponse DoWork(OrderRequest orderRequest);
+ InvoiceResponse DoWork(InvoiceRequest invoiceRequest);
+ void DoWork(object obj);
+ }
+
+
+
+ Mark Pollack
+
+
+
+ Out-of-the-box value for the default listener method: "HandleMessage"
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The handler object.
+
+
+
+ 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.
+
+
+
+
+ Called when message is received.
+
+ The message.
+
+
+
+ Gets the name of the handler method.
+
+ The original message.
+ The extracted message.
+ The name of the handler method.
+
+
+
+ Builds an array of arguments to be passed into the taret listener method.
+
+
+ Allows for multiple method arguments to be built from a single message object.
+
The default implementation builds an array with the given message object
+ as sole element. This means that the extracted message will always be passed
+ into a single method argument, even if it is an array, with the target
+ method having a corresponding single argument of the array's type declared.
+
This can be overridden to treat special message content such as arrays
+ differently, for example passing in each element of the message array
+ as distinct method argument.
+
+ The converted message.
+ the array of arguments to be passed into the
+ listener method (each element of the array corresponding
+ to a distinct method argument)
+
+
+
+ Invokes the specified listener method. This default implementation can only handle invoking a
+ single argument method.
+
+ Name of the listener method.
+ The arguments to be passed in. Only the first argument in the list is currently
+ supported in this implementation.
+ The result returned from the listener method
+
+
+
+ Initialize the default implementations for the adapter's strategies.
+
+
+
+
+ Extracts the message body from the given message.
+
+ The message.
+ the content of the message, to be passed into the
+ listener method as argument
+
+
+
+ Sends the given response message to the given destination.
+
+ The destination to send to.
+ The outgoing message about to be sent.
+
+
+
+ Builds a MSMQ message to be sent as response based on the given result object.
+
+ The result.
+ the MSMQ Message (never null)
+ If no messgae converter is specified.
+
+
+
+ Post-process the given response message before it will be sent. The default implementation
+ sets the response's correlation id to the request message's correlation id.
+
+ The original incoming message.
+ The outgoing MSMQ message about to be sent.
+
+
+
+ Determine a response destination for the given message.
+
+
+ The default implementation first checks the MSMQ ResponseQueue
+ of the supplied request; if that is not null
+ it is returned; if it is null, then the configured
+ default response destination}
+ is returned; if this too is null, then an
+ is thrown.
+
+
+ The request.
+ The response.
+
+
+
+
+ Gets or sets the handler object to delegate message listening to.
+
+
+ Specified listener methods have to be present on this target object.
+ If no explicit handler object has been specified, listener
+ methods are expected to present on this adapter instance, that is,
+ on a custom subclass of this adapter, defining listener methods.
+
+ The handler object.
+
+
+
+ Gets or sets the default handler method to delegate to,
+ for the case where no specific listener method has been determined.
+ Out-of-the-box value is "HandleMessage".
+
+ The default handler method.
+
+
+
+ Gets or sets the processing expression for use in custom subclasses
+
+ The processing expression.
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Gets or sets the message queue factory.
+
+ The message queue factory.
+
+
+
+ Sets the name of the default response queue to send response messages to.
+ This will be applied in case of a request message that does not carry a
+ "ResponseQueue" value.
+ Alternatively, specify a response queue via the property
+ .
+
+ The name of the default response destination queue.
+
+
+
+ Sets the default destination to send response messages to. This will be applied
+ in case of a request message that does not carry a "ResponseQueue" property
+ Response destinations are only relevant for listener methods that return
+ result objects, which will be wrapped in a response message and sent to a
+ response destination.
+
+ Alternatively, specify a "DefaultResponseQueueName"
+ to be dynamically resolved via the MessageQueueFactory.
+
+
+ The default response destination.
+
+
+
+ Gets or sets the name of the message converter object used to resolved a
+ instance.
+
+ The name of the message converter object.
+
+
+
+ Gets message converter that will convert incoming MSMQ messages to
+ listener method arguments, and objects returned from listener
+ methods back to MSMQ messages.
+
+
+ The converter used is the one returned by CreateMessageConverter on MessageQueueFactory.
+
+
+ The message converter.
+
+
+
+ Sets the message queue template.
+
+ If not set, will create one for it own internal use whne MessageListenerAdapter is constructed.
+ It maybe useful to share an existing instance if you have an extensively configured MessageQueueTemplate.
+
+ The message queue template.
+
+
+
+ An implementation of a Peeking based MessageListener container that does not surround the
+ receive operation with a transaction.
+
+
+ Exceptions that occur during message processing are handled by an instance
+ of .
+
+ Mark Pollack
+
+
+
+ Handles the listener exception.
+
+ The exception.
+ The message delivered that resultd in an processing exception.
+
+
+
+ Perform a receive opertion on the message queue and execute the
+ message listener
+
+ The MessageQueue.
+
+ true if received a message, false otherwise
+
+
+
+
+ Gets or sets the exception handler.
+
+ The exception handler.
+
+
+
+ detects poison messages by tracking the Message Id property in memory with a count of how many
+ times an exception has occurred. If that count is greater than the handler's MaxRetry count it
+ will be sent to another queue. The queue to send the message to is specified via the property M
+ essageQueueObjectName.
+
+ Exception handler when using DistributedTxMessageListenerContainer
+
+
+
+ Determines whether the incoming message is a poison message. This method is
+ called before the is invoked.
+
+ The incoming message.
+
+ true if it is a poison message; otherwise, false.
+
+
+ The will call
+ if this method returns true and will
+ then commit the distibuted transaction (removing the message from the queue).
+
+
+
+
+ Handles the poison message.
+
+ The message.
+
+
+
+ Called when an exception is thrown in listener processing.
+
+ The exception.
+ The message.
+
+
+
+ Sends the message to queue.
+
+ The message.
+
+
+
+ Keeps track of the Message's Id property in memory with a count of how many times an
+ exception has occurred. If that count is greater than the handler's MaxRetry count it
+ will be sent to another queue using the provided MessageQueueTransaction. The queue to
+ send the message to is specified via the property MessageQueueObjectName.
+
+
+
+
+ Called when an exception is thrown during listener processing under the
+ scope of a .
+
+ The exception.
+ The message.
+ The message queue transaction.
+
+ An action indicating if the caller should commit or rollback the
+
+
+
+
+
+ Determines whether this exception was already processed.
+
+ The exception.
+
+ true if the exception was already processed; otherwise, false.
+
+
+
+
+ Sends the message to queue.
+
+ The message.
+ The message queue transaction.
+ TransactionAction.Commit
+
+
+
+ Template method called before the message that caused the exception is
+ send to another queue. The default behavior is to set the CorrelationId
+ to the current message's Id value for tracking purposes. Subclasses
+ can use other means, perhaps using the AppSpecific field or modifying the
+ body of the message to a known shared format that keeps track of
+ the full 'lifecycle' of the message as it goes from queue-to-queue.
+
+ The message.
+
+
+
+ Gets or sets the exception anmes that indicate the message has already
+ been processed. If the exception thrown matches one of these names then
+ the returned TransactionAction is Commit to remove it from the queue.
+
+ The name test is thrownException.GetType().Name.IndexOf(exceptionName) >= 0
+ The message already processed exception types.
+
+
+
+ Action to perform on the MessageQueueTransaction when handling message listener exceptions.
+
+
+
+
+ Rollback the MessageQueueTransaction, returning the recieved message back onto the queue.
+
+
+
+
+ Commit the MessageQueueTransaction, removing the message from the queue.
+
+
+
+
+ A MessageListenerContainer that uses local (non-DTC) based transactions. Exceptions are
+ handled by instances of .
+
+
+
+ This container distinguishes between two types of
+ implementations.
+
+ If you specify a then
+ a MSMQ will be started
+ before receiving the message and used as part of the container's recieve operation. The
+ binds the
+ to thread local storage and as such will implicitly be used by
+ send and receive operations to a transactional queue.
+
+
+ Service layer operations that are called inside the message listener will typically
+ be transactional based on using standard Spring declarative transaction management
+ functionality. In case of exceptions in the service layer, the database operation
+ will have been rolled back and the
+ that is later invoked should decide to either commit the surrounding local
+ MSMQ based transaction (removing the message from the queue) or to rollback
+ (placing the message back on the queue for redelivery).
+
+
+ The use of a transactional service layer in combination with
+ a container managed is a powerful combination
+ that can be used to achieve "exactly one" transaction message processing with
+ database operations that are commonly associated with using transactional messaging and
+ distributed transactions (i.e. both the messaging and database operation commit or rollback
+ together).
+
+
+ The additional programming logic needed to achieve this is to keep track of the Message.Id
+ that has been processed successfully within the transactional service layer.
+ This is needed as there may be a system failure (e.g. power goes off)
+ between the 'inner' database commit and the 'outer' messaging commit, resulting
+ in message redelivery. The transactional service layer needs logic to detect if incoming
+ message was processed successfully. It can do this by checking the database for an
+ indication of successfull processing, perhaps by recording the Message.Id itself in a
+ status table. If the transactional service layer determines that the message has
+ already been processed, it can throw a specific exception for thise case. The
+ container's exception handler will recognize this exception type and vote to commit
+ (remove from the queue) the 'outer' messaging transaction.
+ Spring provides an exception handler with this functionality,
+ see for more information.
+
+ If you specify an implementation of
+ (e.g. or HibernateTransactionManager) then
+ an local database transaction will be started before receiving the message. By default,
+ the container will also start a local
+ after the local database transaction has started, but before the receiving the message.
+ The will be used to receive the message.
+ If you do not want his behavior set
+ to false. Also by default, the
+ will be bound to thread local storage such that any
+ send or recieve operations will participate transparently in the same
+ . If you do not want this behavior
+ set the property to false.
+
+ In case of exceptions during processing
+ when using an implementation of
+ (e.g. and starting a container managed
+ ) the container's
+ will determine if the
+ should commit (removing it from the queue)
+ or rollback (placing it back on the queue for redelivery). The listener
+ exception will always
+ trigger a rollback in the 'outer' (e.g.
+ or HibernateTransactionManager) based transaction.
+
+
+ PoisonMessage handing, that is endless redelivery of a message due to exceptions
+ during processing, can be detected using implementatons of the
+ interface. A specific implementation
+ is provided that will move the poison message to another queue after a maximum number
+ of redelivery attempts. See for more information.
+
+
+
+
+
+ Determine if the container should create its own
+ MessageQueueTransaction when a IResourceTransactionManager is specified.
+ Set the transaction name to the name of the spring object.
+ Call base class Initialize() funtionality
+
+
+
+
+ Does the receive and execute using platform transaction manager.
+
+ The message queue.
+ The transactional status.
+
+ true if should continue peeking, false otherwise.
+
+
+
+
+ Does the recieve and execute using message queue transaction manager.
+
+ The message queue.
+ The transactional status.
+ true if should continue peeking, false otherise
+
+
+
+ Does the recieve and execute using a local MessageQueueTransaction.
+
+ The mqessage queue.
+ The transactional status.
+ true if should continue peeking, false otherwise.
+
+
+
+ Handles the transactional listener exception.
+
+ The exception thrown while processing the message.
+ The message.
+ The message queue transaction.
+ The TransactionAction retruned by the TransactionalExceptionListener
+
+
+
+ Invokes the transactional exception listener.
+
+ The exception thrown during message processing.
+ The message.
+ The message queue transaction.
+ TransactionAction.Rollback if no exception handler is defined, otherwise the
+ TransactionAction returned by the exception handler
+
+
+
+ Gets or sets a value indicating whether the MessageListenerContainer should be
+ responsible for creating a MessageQueueTransaction
+ when receiving a message.
+
+
+
+ Creating MessageQueueTransactions is usually the responsibility of the
+ IPlatformTransactionManager, e.g. TxScopePlatformTransactionManager (when using DTC)
+ or MessageQueueTransactionManager (when using local messaging transactions).
+
+
+ For all other IPlatformTransactionManager implementations, including when none is
+ specified, the MessageListenerContainer will itself create a MessageQueueTransaction
+ (assuming the container is consuming from a transactional queue).
+
+
+ Set the ExposeContainerManagedMessageQueueTransaction property to true if you want
+ the MessageQueueTransaction to be exposed to Spring's MessageQueueTemplate class
+
+
+
+ true to use a container managed MessageQueueTransaction; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether expose the
+ container managed to thread local storage
+ where it will be automatically used by send
+ and receive operations.
+
+
+ Using an will always exposes a
+ to thread local storage. This property
+ only has effect when using a non-DTC based
+
+
+ true if [expose container managed message queue transaction]; otherwise, false.
+
+
+
+
+ Gets or sets the message transaction exception handler.
+
+ The message transaction exception handler.
+
+
+
+ An implementation that delegates to an instance of
+ to convert messages.
+
+ Mark Pollack
+
+
+
+ An interface specifying the contract to convert to and from objects.
+
+
+
+
+ Convert the given object to a Message.
+
+ The object to send.
+ Message to send
+
+
+
+ Convert the given message to a object.
+
+ The message.
+ the object
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message formatter.
+
+
+
+ Convert the given object to a Message.
+
+ The object to send.
+ Message to send
+
+
+
+ Convert the given message to a object.
+
+ The message.
+ the object
+
+
+
+ Creates a new object that is a copy of the current instance.
+
+
+ A new object that is a copy of this instance.
+
+
+
+
+ An implementation that delegates to an instance of
+ to convert messages.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The binary message formatter.
+
+
+
+ Convert the given object to a Message using the
+
+ The object to send.
+ Message to send
+
+
+
+ Convert the given message to a object using the
+
+ The message.
+ the object
+
+
+
+ Creates a new object that is a copy of the current instance.
+
+
+ A new object that is a copy of this instance.
+
+
+
+
+ Gets or sets the type format used in the
+
+ The type format.
+
+
+
+ Gets or sets the top object format used in the
+
+ The top object format.
+
+
+
+ Delegate for creating IMessageConverter instance. Used by
+ to register a creation function with a given name.
+
+
+
+
+ Internal class to that users can specify a delegate function to register with the application context that
+ will create a IMessageConverter instance easily at runtime.
+
+ Mark Pollack
+
+
+
+ Gets the template object definition that should be used
+ to configure the instance of the object managed by this factory.
+
+ The object definition to configure the factory's product
+
+
+
+ Converts an to a Message and vice-versa by using the message's
+ body stream.
+
+ Mark Pollack
+
+
+
+ Convert the given object to a Message.
+
+ The object to send.
+ Message to send
+
+
+
+ Convert the given message to a object.
+
+ The message.
+ the object
+
+
+
+ Creates a new object that is a copy of the current instance.
+
+
+ A new object that is a copy of this instance.
+
+
+
+
+ An implementation that delegates to an instance of
+ to convert messages.
+
+ Mark Pollack
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message formatter.
+
+
+
+ Convert the given object to a Message.
+
+ The object to send.
+ Message to send
+
+
+
+ Convert the given message to a object.
+
+ The message.
+ the object
+
+
+
+ Creates a new object that is a copy of the current instance.
+
+
+ A new object that is a copy of this instance.
+
+
+
+
+ Gets or sets the target types used by the
+
+ The target types.
+
+
+
+ Gets or sets the target type names used by the
+
+ The target type names.
+
+
+
+ Delegate for creating MessageQueue instance. Used by
+ to register a creation function with a given name.
+
+
+
+
+ Factory for creating MessageQueues. This factory will create prototype instances, i.e. every call to GetObject
+ will return a new MessageQueue object.
+
+ All MessageQueue constructor arguments are exposed as properties of the factory object. As this
+ is a use the PropertyTemplate property to specify additional
+ configuration of the MessageQueue.
+
+ Mark Pollack
+
+
+
+ Retrun a configured MessageQueue object.
+
+ A newly configured MessageQueue object
+
+
+
+ Gets or sets an instance of the MessageQueueCreator delegate that will be used to create the
+ MessageQueue object, instead of using the various public properties on this class such
+ as Path, AccessMode, etc. Not intended for end-users but rather as a means to help
+ register MessageQueueFactoryObject at runtime using convenience method on the IMessageQueueFactory.
+
+
+ Can also be specifed using an instance of MessageCreatorDelegate. If both are specifed, the
+ Interface implementation has priority.
+
+ The function that is responsbile for creating a message queue.
+
+
+
+ Gets or sets the path used to create a MessageQueue instance.
+
+ The location of the queue.
+
+
+
+ Gets or sets a value indicating whether to create the MessageQueue instance with
+ exclusive read access to the first application that accesses the queue
+
+
+ true to grant exclusive read access to the first application that accesses the queue; otherwise, false.
+
+
+
+
+ Gets or sets the queue access mode.
+
+ The queue access mode.
+
+
+
+
+ Gets or sets a value indicating whether [enable cache].
+
+ true to create and use a connection cache; otherwise false.
+
+
+
+ Sets a value indicating whether to enable connection cache. The default is false, which
+ is different than the default value when creating a System.Messaging.MessageQueue object.
+
+
+ true if enable connection cache; otherwise, false.
+
+
+
+
+ Sets a value indicating whether to retrieve all message properties when receiving a message.
+
+
+ true if should etrieve all message properties when receiving a message; otherwise, false.
+
+
+
+
+ Sets a value indicating whether to set the filter values of common Message Queuing properties
+ to true and the integer-valued properties to their default values..
+
+
+ true if should set the filter values of common Message Queuing properties; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the queue is a remote queue.
+
+
+ The operations that one can perform on the MessageQueue depend on if it is local or remote, for
+ example checking if it is transactional. This is very difficult to determine programmatically.
+ The property was made virtual so it can be overridden to take into account custom heuristics you
+ may want to use to determine this programmatically.
+
+ true if remote queue; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether the remote queue is transactional.
+
+
+ true if the remote queue is transactional; otherwise, false.
+
+
+
+
+ Return the of object that this
+ creates, or
+ if not known in advance.
+
+ The type System.Messaging.MessageQueue
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+ return false, a new object will be created for each request of the object
+
+
+
+ Gets the template object definition that should be used
+ to configure the instance of the object managed by this factory.
+
+ The object definition to configure the factory's product
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+ The name of the object in the factory.
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Scheduling.Quartz.dll b/Resources/Libraries/Spring.NET/Spring.Scheduling.Quartz.dll
new file mode 100644
index 00000000..0bd3f2c3
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Scheduling.Quartz.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Scheduling.Quartz.pdb b/Resources/Libraries/Spring.NET/Spring.Scheduling.Quartz.pdb
new file mode 100644
index 00000000..79d1557b
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Scheduling.Quartz.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Scheduling.Quartz.xml b/Resources/Libraries/Spring.NET/Spring.Scheduling.Quartz.xml
new file mode 100644
index 00000000..be5b5be2
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Scheduling.Quartz.xml
@@ -0,0 +1,2040 @@
+
+
+
+ Spring.Scheduling.Quartz
+
+
+
+
+ JobFactory implementation that supports
+ objects as well as standard Quartz instances.
+
+ Juergen Hoeller
+ Marko Lahma (.NET)
+
+
+
+
+
+ Called by the scheduler at the time of the trigger firing, in order to
+ produce a instance on which to call Execute.
+
+
+ It should be extremely rare for this method to throw an exception -
+ basically only the the case where there is no way at all to instantiate
+ and prepare the Job for execution. When the exception is thrown, the
+ Scheduler will move all triggers associated with the Job into the
+ state, which will require human
+ intervention (e.g. an application restart after fixing whatever
+ configuration problem led to the issue wih instantiating the Job.
+
+ The TriggerFiredBundle from which the
+ and other info relating to the trigger firing can be obtained.
+ the newly instantiated Job
+ SchedulerException if there is a problem instantiating the Job.
+
+
+
+ Create an instance of the specified job class.
+
+ Can be overridden to post-process the job instance.
+
+
+
+ The TriggerFiredBundle from which the JobDetail
+ and other info relating to the trigger firing can be obtained.
+
+ The job instance.
+
+
+
+ Adapt the given job object to the Quartz Job interface.
+
+
+ The default implementation supports straight Quartz Jobs
+ as well as Runnables, which get wrapped in a DelegatingJob.
+
+
+ The original instance of the specified job class.
+
+ The adapted Quartz Job instance.
+
+
+
+
+ Convenience subclass of Quartz's CronTrigger type, making property based
+ usage easier.
+
+
+
+ CronTrigger itself is already property based but lacks sensible defaults.
+ This class uses the Spring object name as job name, the Quartz default group
+ ("DEFAULT") as job group, the current time as start time, and indefinite
+ repetition, if not specified.
+
+
+ This class will also register the trigger with the job name and group of
+ a given . This allows
+ to automatically register a trigger for the corresponding JobDetail,
+ instead of registering the JobDetail separately.
+
+
+ Juergen Hoeller
+
+
+
+
+
+
+
+
+
+
+
+ Interface to be implemented by Quartz Triggers that are aware
+ of the JobDetail object that they are associated with.
+
+
+
+ SchedulerFactoryObject will auto-detect Triggers that implement this
+ interface and register them for the respective JobDetail accordingly.
+
+
+
+ The alternative is to configure a Trigger for a Job name and group:
+ This involves the need to register the JobDetail object separately
+ with SchedulerFactoryObject.
+
+
+ Juergen Hoeller
+
+
+
+
+
+
+
+ Return the JobDetail that this Trigger is associated with.
+
+ The associated JobDetail, or null if none
+
+
+
+ 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.
+
+
+
+
+ Register objects in the JobDataMap via a given Map.
+
+
+ These objects will be available to this Trigger only,
+ in contrast to objects in the JobDetail's data map.
+
+
+
+
+
+ Set the misfire instruction via the name of the corresponding
+ constant in the CronTrigger class.
+ Default is .
+
+
+
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+ The name of the object in the factory.
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+
+ Set the JobDetail that this trigger should be associated with.
+
+
+ This is typically used with a object reference if the JobDetail
+ is a Spring-managed object. Alternatively, the trigger can also
+ be associated with a job by name and group.
+
+
+
+
+
+
+ Set the start delay as .
+
+
+
+ The start delay is added to the current system UTC time
+ (when the object starts) to control the
+ of the trigger.
+
+
+ If the start delay is non-zero it will always
+ take precedence over start time.
+
+
+ the start delay, as object.
+
+
+
+ Helper class to map constant names to their values.
+
+
+
+
+ Simple Quartz IJob adapter that delegates to a
+ given instance.
+
+
+ Typically used in combination with property injection on the
+ Runnable instance, receiving parameters from the Quartz JobDataMap
+ that way instead of via the JobExecutionContext.
+
+ Juergen Hoeller
+ Marko Lahma (.NET)
+
+
+
+
+
+ Create a new DelegatingJob.
+
+
+ The Runnable implementation to delegate to.
+
+
+
+
+ Delegates execution to the underlying ThreadStart.
+
+
+
+
+ Return the wrapped Runnable implementation.
+
+ The delegate.
+
+
+
+ Callback interface to be implemented by Spring-managed
+ Quartz artifacts that need access to the SchedulerContext
+ (without having natural access to it).
+
+
+ Currently only supported for custom JobFactory implementations
+ that are passed in via Spring's SchedulerFactoryObject.
+
+ Juergen Hoeller
+
+
+
+
+
+ Set the SchedulerContext of the current Quartz Scheduler.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Executes this instance.
+
+
+
+
+ Gets a value indicating whether´this instance prefers short lived tasks.
+
+
+ true if prefers short lived tasks; otherwise, false.
+
+
+
+
+ Convenience subclass of Quartz' JobDetail class that eases properties based
+ usage.
+
+
+ itself is already a object but lacks
+ sensible defaults. This class uses the Spring object name as job name,
+ and the Quartz default group ("DEFAULT") as job group if not specified.
+
+ Juergen Hoeller
+
+
+
+
+
+
+ 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.
+
+
+
+
+ Overridden to support any job class, to allow a custom JobFactory
+ to adapt the given job class to the Quartz Job interface.
+
+
+
+
+
+ Register objects in the JobDataMap via a given Map.
+
+
+ These objects will be available to this Job only,
+ in contrast to objects in the SchedulerContext.
+
+ Note: When using persistent Jobs whose JobDetail will be kept in the
+ database, do not put Spring-managed objects or an ApplicationContext
+ reference into the JobDataMap but rather into the SchedulerContext.
+
+
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+ The name of the object in the factory.
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Set the key of an IApplicationContext reference to expose in the JobDataMap,
+ for example "applicationContext". Default is none.
+ Only applicable when running in a Spring ApplicationContext.
+
+
+
+ In case of a QuartzJobObject, the reference will be applied to the Job
+ instance as object property. An "applicationContext" attribute will correspond
+ to a "setApplicationContext" method in that scenario.
+
+
+ Note that ObjectFactory callback interfaces like IApplicationContextAware
+ are not automatically applied to Quartz Job instances, because Quartz
+ itself is responsible for the lifecycle of its Jobs.
+
+
+ Note: When using persistent job stores where JobDetail contents will
+ be kept in the database, do not put an IApplicationContext reference into
+ the JobDataMap but rather into the SchedulerContext.
+
+
+
+
+
+
+
+ Subclass of Quartz's JobStoreCMT class that delegates to a Spring-managed
+ DataSource instead of using a Quartz-managed connection pool. This JobStore
+ will be used if SchedulerFactoryObject's "dbProvider" property is set.
+
+
+
Operations performed by this JobStore will properly participate in any
+ kind of Spring-managed transaction, as it uses Spring's DataSourceUtils
+ connection handling methods that are aware of a current transaction.
+
+
Note that all Quartz Scheduler operations that affect the persistent
+ job store should usually be performed within active transactions,
+ as they assume to get proper locks etc.
+
+ Juergen Hoeller
+ Marko Lahma (.NET)
+
+
+
+
+
+ Name used for the transactional ConnectionProvider for Quartz.
+ This provider will delegate to the local Spring-managed DataSource.
+
+
+
+
+
+
+ Gets the non managed TX connection.
+
+
+
+
+
+ Closes the connection.
+
+ The connection and transaction holder.
+
+
+
+ Gets or sets the name of the instance.
+
+ The name of the instance.
+
+
+
+ Quartz ThreadPool adapter that delegates to a Spring-managed
+ TaskExecutor instance, specified on SchedulerFactoryObject.
+
+ Juergen Hoeller
+
+
+
+
+ Logger available to subclasses.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Called by the QuartzScheduler before the is
+ used, in order to give the it a chance to Initialize.
+
+
+
+
+ Called by the QuartzScheduler to inform the
+ that it should free up all of it's resources because the scheduler is
+ shutting down.
+
+
+
+
+
+ Execute the given in the next
+ available .
+
+
+
+
+ The implementation of this interface should not throw exceptions unless
+ there is a serious problem (i.e. a serious misconfiguration). If there
+ are no available threads, rather it should either queue the Runnable, or
+ block until a thread is available, depending on the desired strategy.
+
+
+
+
+ Determines the number of threads that are currently available in in
+ the pool. Useful for determining the number of times
+ can be called before returning
+ false.
+
+
+ the number of currently available threads
+
+
+ The implementation of this method should block until there is at
+ least one available thread.
+
+
+
+
+ Gets the size of the pool.
+
+ The size of the pool.
+
+
+
+ Quartz Job implementation that invokes a specified method.
+ Automatically applied by MethodInvokingJobDetailFactoryObject.
+
+
+
+
+ Simple implementation of the Quartz Job interface, applying the
+ passed-in JobDataMap and also the SchedulerContext as object property
+ values. This is appropriate because a new Job instance will be created
+ for each execution. JobDataMap entries will override SchedulerContext
+ entries with the same keys.
+
+
+
+ For example, let's assume that the JobDataMap contains a key
+ "myParam" with value "5": The Job implementation can then expose
+ a object property "myParam" of type int to receive such a value,
+ i.e. a method "setMyParam(int)". This will also work for complex
+ types like business objects etc.
+
+
+
+ Note: The QuartzJobObject class itself only implements the standard
+ Quartz IJob interface. Let your subclass explicitly implement the
+ Quartz IStatefulJob interface to mark your concrete job object as stateful.
+
+
+ Juergen Hoeller
+
+
+
+
+
+
+
+
+
+
+ This implementation applies the passed-in job data map as object property
+ values, and delegates to ExecuteInternal afterwards.
+
+
+
+
+
+ Execute the actual job. The job data map will already have been
+ applied as object property values by execute. The contract is
+ exactly the same as for the standard Quartz execute method.
+
+
+
+
+
+ Invoke the method via the MethodInvoker.
+
+
+
+
+
+ Set the MethodInvoker to use.
+
+
+
+
+ IFactoryObject that exposes a JobDetail object that delegates job execution
+ to a specified (static or non-static) method. Avoids the need to implement
+ a one-line Quartz Job that just invokes an existing service method.
+
+
+
+ Derived from ArgumentConverting MethodInvoker to share common properties and behavior
+ with MethodInvokingFactoryObject.
+
+
+ Supports both concurrently running jobs and non-currently running
+ ones through the "concurrent" property. Jobs created by this
+ MethodInvokingJobDetailFactoryObject are by default volatile and durable
+ (according to Quartz terminology).
+
+
NOTE: JobDetails created via this FactoryObject are not
+ serializable and thus not suitable for persistent job stores.
+ You need to implement your own Quartz Job as a thin wrapper for each case
+ where you want a persistent job to delegate to a specific service method.
+
+
+ Juergen Hoeller
+ Alef Arendsen
+
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+ An instance (possibly shared or independent) of the object managed by
+ this factory.
+
+
+
+ If this method is being called in the context of an enclosing IoC container and
+ returns , the IoC container will consider this factory
+ object as not being fully initialized and throw a corresponding (and most
+ probably fatal) exception.
+
+
+
+
+
+ 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.
+
+
+
+
+ Callback for post-processing the JobDetail to be exposed by this FactoryObject.
+
+ The default implementation is empty. Can be overridden in subclasses.
+
+
+ the JobDetail prepared by this FactoryObject
+
+
+
+ Set the name of the job.
+ Default is the object name of this FactoryObject.
+
+
+
+
+
+ Set the group of the job.
+ Default is the default group of the Scheduler.
+
+
+
+
+
+
+ Specify whether or not multiple jobs should be run in a concurrent
+ fashion. The behavior when one does not want concurrent jobs to be
+ executed is realized through adding the interface.
+ More information on stateful versus stateless jobs can be found
+ here.
+
+ The default setting is to run jobs concurrently.
+
+
+
+
+
+ Gets the job detail.
+
+ The job detail.
+
+
+
+ Set a list of JobListener names for this job, referring to
+ non-global JobListeners registered with the Scheduler.
+
+
+ A JobListener name always refers to the name returned
+ by the JobListener implementation.
+
+
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+ The name of the object in the factory.
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+ Set the name of the target object in the Spring object factory.
+
+
+ This is an alternative to specifying TargetObject
+ allowing for non-singleton objects to be invoked. Note that specified
+ "TargetObject" and "TargetType" values will
+ override the corresponding effect of this "TargetObjectName" setting
+ (i.e. statically pre-define the object type or even the target object).
+
+
+
+
+ Sets the object factory.
+
+ The object factory.
+
+
+
+ Return the of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+
+
+ Adapter that implements the Runnable interface as a configurable
+ method invocation based on Spring's MethodInvoker.
+
+
+
+ Derives from ArgumentConvertingMethodInvoker, inheriting common
+ configuration properties from MethodInvoker.
+
+
+
+ Useful to generically encapsulate a method invocation as timer task for
+ java.util.Timer, in combination with a DelegatingTimerTask adapter.
+ Can also be used with JDK 1.5's java.util.concurrent.Executor
+ abstraction, which works with plain Runnables.
+
+
+ Extended by Spring's MethodInvokingTimerTaskFactoryObject adapter
+ for TimerTask. Note that you can populate a
+ ScheduledTimerTask object with a plain MethodInvokingRunnable instance
+ as well, which will automatically get wrapped with a DelegatingTimerTask.
+
+
+ Juergen Hoeller
+
+
+
+
+
+ Logger instance shared by this instance and its sub-class instances.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ 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.
+
+
+
+
+ This method has to be implemented in order that starting of the thread causes the object's
+ run method to be called in that separately executing thread.
+
+
+
+
+ Gets the invocation failure message.
+
+ The invocation failure message.
+
+
+
+ Subclass of Quartz' JobSchedulingDataProcessor that considers
+ given filenames as Spring resource locations.
+
+ Juergen Hoeller
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Returns an from the fileName as a resource.
+
+ Name of the file.
+
+ an from the fileName as a resource.
+
+
+
+
+ Sets the
+ that this object runs in.
+
+
+
+ Invoked after population of normal objects properties but
+ before an init callback such as
+ 's
+
+ or a custom init-method. Invoked before setting
+ 's
+
+ property.
+
+
+
+
+ Common base class for accessing a Quartz Scheduler, i.e. for registering jobs,
+ triggers and listeners on a instance.
+
+
+ For concrete usage, check out the and
+ classes.
+
+ Juergen Hoeller
+ Marko Lahma (.NET)
+
+
+
+ Logger instance.
+
+
+
+
+ Resource loader instance for sub-classes
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Register jobs and triggers (within a transaction, if possible).
+
+
+
+
+ Add the given job to the Scheduler, if it doesn't already exist.
+ Overwrites the job in any case if "overwriteExistingJobs" is set.
+
+ the job to add
+ true if the job was actually added, false if it already existed before
+
+
+
+ Add the given trigger to the Scheduler, if it doesn't already exist.
+ Overwrites the trigger in any case if "overwriteExistingJobs" is set.
+
+ the trigger to add
+ true if the trigger was actually added, false if it already existed before
+
+
+
+ Register all specified listeners with the Scheduler.
+
+
+
+
+ Template method that determines the Scheduler to operate on.
+ To be implemented by subclasses.
+
+
+
+
+
+ Set whether any jobs defined on this SchedulerFactoryObject should overwrite
+ existing job definitions. Default is "false", to not overwrite already
+ registered jobs that have been read in from a persistent job store.
+
+
+
+
+ Set the locations of Quartz job definition XML files that follow the
+ "job_scheduling_data_1_5" XSD. Can be specified to automatically
+ register jobs that are defined in such files, possibly in addition
+ to jobs defined directly on this SchedulerFactoryObject.
+
+
+
+
+
+ Set the location of a Quartz job definition XML file that follows the
+ "job_scheduling_data" XSD. Can be specified to automatically
+ register jobs that are defined in such a file, possibly in addition
+ to jobs defined directly on this SchedulerFactoryObject.
+
+
+
+
+
+
+ Register a list of JobDetail objects with the Scheduler that
+ this FactoryObject creates, to be referenced by Triggers.
+ This is not necessary when a Trigger determines the JobDetail
+ itself: In this case, the JobDetail will be implicitly registered
+ in combination with the Trigger.
+
+
+
+
+
+
+
+
+
+ Register a list of Quartz ICalendar objects with the Scheduler
+ that this FactoryObject creates, to be referenced by Triggers.
+
+ Map with calendar names as keys as Calendar objects as values
+
+
+
+
+
+ Register a list of Trigger objects with the Scheduler that
+ this FactoryObject creates.
+
+
+ If the Trigger determines the corresponding JobDetail itself,
+ the job will be automatically registered with the Scheduler.
+ Else, the respective JobDetail needs to be registered via the
+ "jobDetails" property of this FactoryObject.
+
+
+
+
+
+
+
+
+
+ Specify Quartz SchedulerListeners to be registered with the Scheduler.
+
+
+
+
+ Specify global Quartz JobListeners to be registered with the Scheduler.
+ Such JobListeners will apply to all Jobs in the Scheduler.
+
+
+
+
+ Specify named Quartz JobListeners to be registered with the Scheduler.
+ Such JobListeners will only apply to Jobs that explicitly activate
+ them via their name.
+
+
+
+
+
+
+
+ Specify global Quartz TriggerListeners to be registered with the Scheduler.
+ Such TriggerListeners will apply to all Triggers in the Scheduler.
+
+
+
+
+ Specify named Quartz TriggerListeners to be registered with the Scheduler.
+ Such TriggerListeners will only apply to Triggers that explicitly activate
+ them via their name.
+
+
+
+
+
+
+
+ Set the transaction manager to be used for registering jobs and triggers
+ that are defined by this SchedulerFactoryObject. Default is none; setting
+ this only makes sense when specifying a DataSource for the Scheduler.
+
+
+
+
+ Sets the
+ that this object runs in.
+
+
+
+ Invoked after population of normal objects properties but
+ before an init callback such as
+ 's
+
+ or a custom init-method. Invoked before setting
+ 's
+
+ property.
+
+
+
+
+ Spring class for accessing a Quartz Scheduler, i.e. for registering jobs,
+ triggers and listeners on a given instance.
+
+ Juergen Hoeller
+ Marko Lahma (.NET)
+
+
+
+
+
+ Template method that determines the Scheduler to operate on.
+
+
+
+
+
+ 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.
+
+
+
+
+ Finds the scheduler.
+
+ Name of the scheduler.
+
+
+
+
+ Specify the Quartz Scheduler to operate on via its scheduler name in the Spring
+ application context or also in the Quartz {@link org.quartz.impl.SchedulerRepository}.
+
+
+ Schedulers can be registered in the repository through custom bootstrapping,
+ e.g. via the or
+ factory classes.
+ However, in general, it's preferable to use Spring's
+ which includes the job/trigger/listener capabilities of this accessor as well.
+
+
+
+
+ Return the Quartz Scheduler instance that this accessor operates on.
+
+
+
+
+ Return the Quartz Scheduler instance that this accessor operates on.
+
+
+
+
+ FactoryObject that sets up a Quartz Scheduler and exposes it for object references.
+
+
+
+ Allows registration of JobDetails, Calendars and Triggers, automatically
+ starting the scheduler on initialization and shutting it down on destruction.
+ In scenarios that just require static registration of jobs at startup, there
+ is no need to access the Scheduler instance itself in application code.
+
+
+
+ For dynamic registration of jobs at runtime, use a object reference to
+ this SchedulerFactoryObject to get direct access to the Quartz Scheduler
+ (). This allows you to create new jobs
+ and triggers, and also to control and monitor the entire Scheduler.
+
+
+
+ Note that Quartz instantiates a new Job for each execution, in
+ contrast to Timer which uses a TimerTask instance that is shared
+ between repeated executions. Just JobDetail descriptors are shared.
+
+
+
+ When using persistent jobs, it is strongly recommended to perform all
+ operations on the Scheduler within Spring-managed transactions.
+ Else, database locking will not properly work and might even break.
+
+
+ The preferred way to achieve transactional execution is to demarcate
+ declarative transactions at the business facade level, which will
+ automatically apply to Scheduler operations performed within those scopes.
+ Alternatively, define a TransactionProxyFactoryObject for the Scheduler itself.
+
+
+ Juergen Hoeller
+ Marko Lahma (.NET)
+
+
+
+
+
+
+ Default thread count to be set to thread pool.
+
+
+
+
+ Property name for thread count in thread pool.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Shut down the Quartz scheduler on object factory Shutdown,
+ stopping all scheduled jobs.
+
+
+
+
+ Template method that determines the Scheduler to operate on.
+ To be implemented by subclasses.
+
+
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+ An instance (possibly shared or independent) of the object managed by
+ this factory.
+
+
+
+ If this method is being called in the context of an enclosing IoC container and
+ returns , the IoC container will consider this factory
+ object as not being fully initialized and throw a corresponding (and most
+ probably fatal) exception.
+
+
+
+
+
+ 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.
+
+
+
+
+ Load and/or apply Quartz properties to the given SchedulerFactory.
+
+ the SchedulerFactory to Initialize
+
+
+
+ Merges the properties into map. This effectively also
+ overwrites existing properties with same key in map.
+
+ The properties to merge into given map.
+ The map to merge to.
+
+
+
+ Create the Scheduler instance for the given factory and scheduler name.
+ Called by afterPropertiesSet.
+
+
+ Default implementation invokes SchedulerFactory's GetScheduler
+ method. Can be overridden for custom Scheduler creation.
+
+ the factory to create the Scheduler with
+ the name of the scheduler to create
+ the Scheduler instance
+
+
+
+
+
+ Expose the specified context attributes and/or the current
+ IApplicationContext in the Quartz SchedulerContext.
+
+
+
+
+ Start the Quartz Scheduler, respecting the "startDelay" setting.
+
+ the Scheduler to start
+ the time span to wait before starting
+ the Scheduler asynchronously
+
+
+
+ Starts this instance.
+
+
+
+
+ Stops this instance.
+
+
+
+
+ Handles the application context's refresh event and starts the scheduler.
+
+
+
+
+ Return the IDbProvider for the currently configured Quartz Scheduler,
+ to be used by LocalDataSourceJobStore.
+
+
+ This instance will be set before initialization of the corresponding
+ Scheduler, and reset immediately afterwards. It is thus only available
+ during configuration.
+
+
+
+
+
+
+ Return the TaskExecutor for the currently configured Quartz Scheduler,
+ to be used by LocalTaskExecutorThreadPool.
+
+
+ This instance will be set before initialization of the corresponding
+ Scheduler, and reset immediately afterwards. It is thus only available
+ during configuration.
+
+
+
+
+ Set the Quartz SchedulerFactory implementation to use.
+
+
+ Default is StdSchedulerFactory, reading in the standard
+ quartz.properties from Quartz' dll. To use custom Quartz
+ properties, specify "configLocation" or "quartzProperties".
+
+ The scheduler factory class.
+
+
+
+
+
+
+ Set the name of the Scheduler to fetch from the SchedulerFactory.
+ If not specified, the default Scheduler will be used.
+
+ The name of the scheduler.
+
+
+
+
+
+ Set the location of the Quartz properties config file, for example
+ as assembly resource "assembly:quartz.properties".
+
+
+ Note: Can be omitted when all necessary properties are specified
+ locally via this object, or when relying on Quartz' default configuration.
+
+
+
+
+
+ Set Quartz properties, like "quartz.threadPool.type".
+
+
+ Can be used to override values in a Quartz properties config file,
+ or to specify all necessary properties locally.
+
+
+
+
+
+ Set the Spring TaskExecutor to use as Quartz backend.
+ Exposed as thread pool through the Quartz SPI.
+
+
+ By default, a Quartz SimpleThreadPool will be used, configured through
+ the corresponding Quartz properties.
+
+ The task executor.
+
+
+
+
+
+ Register objects in the Scheduler context via a given Map.
+ These objects will be available to any Job that runs in this Scheduler.
+
+
+ Note: When using persistent Jobs whose JobDetail will be kept in the
+ database, do not put Spring-managed object or an ApplicationContext
+ reference into the JobDataMap but rather into the SchedulerContext.
+
+
+ Map with string keys and any objects as
+ values (for example Spring-managed objects)
+
+
+
+
+
+ Set the key of an IApplicationContext reference to expose in the
+ SchedulerContext, for example "applicationContext". Default is none.
+ Only applicable when running in a Spring ApplicationContext.
+
+
+
+ Note: When using persistent Jobs whose JobDetail will be kept in the
+ database, do not put an IApplicationContext reference into the JobDataMap
+ but rather into the SchedulerContext.
+
+
+
+ In case of a QuartzJobObject, the reference will be applied to the Job
+ instance as object property. An "applicationContext" attribute will
+ correspond to a "setApplicationContext" method in that scenario.
+
+
+
+ Note that ObjectFactory callback interfaces like IApplicationContextAware
+ are not automatically applied to Quartz Job instances, because Quartz
+ itself is reponsible for the lifecycle of its Jobs.
+
+
+ The application context scheduler context key.
+
+
+
+
+ Set the Quartz JobFactory to use for this Scheduler.
+
+
+
+ Default is Spring's , which supports
+ standard Quartz instances. Note that this default only applies
+ to a local Scheduler, not to a RemoteScheduler (where setting
+ a custom JobFactory is not supported by Quartz).
+
+
+ Specify an instance of Spring's here
+ (typically as an inner object definition) to automatically populate a job's
+ object properties from the specified job data map and scheduler context.
+
+
+
+
+
+
+
+ Set whether to expose the Spring-managed instance in the
+ Quartz . Default is "false", since the Spring-managed
+ Scheduler is usually exclusively intended for access within the Spring context.
+
+
+ Switch this flag to "true" in order to expose the Scheduler globally.
+ This is not recommended unless you have an existing Spring application that
+ relies on this behavior.
+
+
+
+
+ Set whether to automatically start the scheduler after initialization.
+ Default is "true"; set this to "false" to allow for manual startup.
+
+
+
+
+ Set the time span to wait after initialization before
+ starting the scheduler asynchronously. Default is 0, meaning
+ immediate synchronous startup on initialization of this object.
+
+
+ Setting this to 10 or 20 seconds makes sense if no jobs
+ should be run before the entire application has started up.
+
+
+
+
+ Set whether to wait for running jobs to complete on Shutdown.
+ Default is "false".
+
+
+ true if [wait for jobs to complete on Shutdown]; otherwise, false.
+
+
+
+
+
+ Set the default DbProvider to be used by the Scheduler. If set,
+ this will override corresponding settings in Quartz properties.
+
+
+
+ Note: If this is set, the Quartz settings should not define
+ a job store "dataSource" to avoid meaningless double configuration.
+
+
+ A Spring-specific subclass of Quartz' JobStoreSupport will be used.
+ It is therefore strongly recommended to perform all operations on
+ the Scheduler within Spring-managed transactions.
+ Else, database locking will not properly work and might even break
+ (e.g. if trying to obtain a lock on Oracle without a transaction).
+
+
+
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+ The name of the object in the factory.
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+
+ Gets a value indicating whether this is running.
+
+ true if running; otherwise, false.
+
+
+
+ Sets the that this
+ object runs in.
+
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Return the of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+
+
+ Generic scheduling exception.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The message.
+
+
+
+ Initializes a new instance of the class.
+
+ The message.
+ The original exception.
+
+
+
+ Subclass of Quartz's SimpleThreadPool that implements Spring's
+ TaskExecutor interface and listens to Spring lifecycle callbacks.
+
+ Juergen Hoeller
+
+
+
+
+
+
+ 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.
+
+
+
+
+ Executes the specified task.
+
+ The task.
+
+
+
+ Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+
+
+
+
+ Set whether to wait for running jobs to complete on Shutdown.
+ Default is "false".
+
+
+ true if [wait for jobs to complete on shutdown]; otherwise, false.
+
+
+
+
+ This task executor prefers short-lived work units.
+
+
+
+ Convenience subclass of Quartz's
+ class, making properties based usage easier.
+
+
+
+ SimpleTrigger itself is already a PONO but lacks sensible defaults.
+ This class uses the Spring object name as job name, the Quartz default group
+ ("DEFAULT") as job group, the current time as start time, and indefinite
+ repetition, if not specified.
+
+
+
+ This class will also register the trigger with the job name and group of
+ a given . This allows
+ to automatically register a trigger for the corresponding JobDetail,
+ instead of registering the JobDetail separately.
+
+
+ Juergen Hoeller
+
+
+
+
+
+
+
+
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ 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.
+
+
+
+
+ Register objects in the JobDataMap via a given Map.
+
+ These objects will be available to this Trigger only,
+ in contrast to objects in the JobDetail's data map.
+
+
+
+
+
+
+ Set the misfire instruction via the name of the corresponding
+ constant in the SimpleTrigger class.
+ Default is .
+
+
+
+
+
+
+
+
+
+
+ Set the delay before starting the job for the first time.
+ The given time span will be added to the current
+ time to calculate the start time. Default is .
+
+
+ This delay will just be applied if no custom start time was
+ specified. However, in typical usage within a Spring context,
+ the start time will be the container startup time anyway.
+ Specifying a relative delay is appropriate in that case.
+
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+ The name of the object in the factory.
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+
+ Set the JobDetail that this trigger should be associated with.
+
+ This is typically used with a object reference if the JobDetail
+ is a Spring-managed object. Alternatively, the trigger can also
+ be associated with a job by name and group.
+
+
+
+
+
+ Adapts Spring's to Quartz's
+ .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The Spring db provider.
+
+
+
+ Creates the command.
+
+
+
+
+
+ Creates the command builder.
+
+
+
+
+
+ Creates the connection.
+
+
+
+
+
+ Creates the parameter.
+
+
+
+
+
+ Shutdowns this instance.
+
+
+
+
+ Gets or sets the connection string.
+
+ The connection string.
+
+
+
+ Gets the metadata.
+
+ The metadata.
+
+
+
+ Helper class to map between Quartz and Spring DB metadata.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The metadata to wrap and adapt.
+
+
+
+ Gets or sets the name of the product.
+
+ The name of the product.
+
+
+
+ Gets or sets the type of the connection.
+
+ The type of the connection.
+
+
+
+ Gets or sets the type of the command.
+
+ The type of the command.
+
+
+
+ Gets or sets the type of the parameter.
+
+ The type of the parameter.
+
+
+
+ Gets or sets the type of the command builder.
+
+ The type of the command builder.
+
+
+
+ Gets or sets the command builder derive parameters method.
+
+ The command builder derive parameters method.
+
+
+
+ Gets or sets the parameter name prefix.
+
+ The parameter name prefix.
+
+
+
+ Gets or sets the type of the exception.
+
+ The type of the exception.
+
+
+
+ Gets or sets a value indicating whether [bind by name].
+
+ true if [bind by name]; otherwise, false.
+
+
+
+ Gets or sets the type of the parameter db.
+
+ The type of the parameter db.
+
+
+
+ Gets or sets the parameter db type property.
+
+ The parameter db type property.
+
+
+
+ Gets or sets the parameter is nullable property.
+
+ The parameter is nullable property.
+
+
+
+ Gets the type of the db binary.
+
+ The type of the db binary.
+
+
+
+ Gets or sets a value indicating whether [use parameter name prefix in parameter collection].
+
+
+ true if [use parameter name prefix in parameter collection]; otherwise, false.
+
+
+
+
+ Subclass of AdaptableJobFactory that also supports Spring-style
+ dependency injection on object properties. This is essentially the direct
+ equivalent of Spring's QuartzJobObject in the shape of a
+ Quartz JobFactory.
+
+
+ Applies scheduler context, job data map and trigger data map entries
+ as object property values. If no matching object property is found, the entry
+ is by default simply ignored. This is analogous to QuartzJobObject's behavior.
+
+ Juergen Hoeller
+
+
+
+
+
+ Create the job instance, populating it with property values taken
+ from the scheduler context, job data map and trigger data map.
+
+
+
+
+ Return whether the given job object is eligible for having
+ its object properties populated.
+
+ The default implementation ignores QuartzJobObject instances,
+ which will inject object properties themselves.
+
+
+
+ The job object to introspect.
+
+
+
+
+
+ Specify the unknown properties (not found in the object) that should be ignored.
+
+
+ Default is null, indicating that all unknown properties
+ should be ignored. Specify an empty array to throw an exception in case
+ of any unknown properties, or a list of property names that should be
+ ignored if there is no corresponding property found on the particular
+ job class (all other unknown properties will still trigger an exception).
+
+
+
+
+ Set the SchedulerContext of the current Quartz Scheduler.
+
+
+
+
+
+
+ Extension of the MethodInvokingJob, implementing the StatefulJob interface.
+ Quartz checks whether or not jobs are stateful and if so,
+ won't let jobs interfere with each other.
+
+
+
+
+ Summary description for TaskRejectedException.
+
+
+
+
+ Exception that wraps an exception thrown from a target method.
+ Propagated to the Quartz scheduler from a Job that reflectively invokes
+ an arbitrary target method.
+
+ Juergen Hoeller
+
+
+
+
+ Constructor for JobMethodInvocationFailedException.
+
+ the MethodInvoker used for reflective invocation
+ the root cause (as thrown from the target method)
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Services.dll b/Resources/Libraries/Spring.NET/Spring.Services.dll
new file mode 100644
index 00000000..1836814d
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Services.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Services.pdb b/Resources/Libraries/Spring.NET/Spring.Services.pdb
new file mode 100644
index 00000000..c0aa150d
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Services.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Services.xml b/Resources/Libraries/Spring.NET/Spring.Services.xml
new file mode 100644
index 00000000..369778a6
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Services.xml
@@ -0,0 +1,2127 @@
+
+
+
+ Spring.Services
+
+
+
+
+ Exports components as ServicedComponents using the specified s.
+
+
+
+ This class will create ServicedComponent wrapper for each of the
+ specified components and register them with the Component Services.
+
+
+ First you need to generate and register your components. This is done by writing a simple e.g. console application using a configuration as shown below:
+
+ <!-- actual objects 'calculatorService' and 'simpleCalculatorService' are defined elsewhere -->
+
+ <!-- Define the component for exporting 'calculatorService' -->
+ <object id="calculatorComponent" type="Spring.EnterpriseServices.ServicedComponentExporter,
+ Spring.Services">
+ <property name="TargetName" value="calculatorService" />
+ <property name="TypeAttributes">
+ <list>
+ <object type="System.EnterpriseServices.TransactionAttribute, System.EnterpriseServices" />
+ </list>
+ </property>
+ <property name="MemberAttributes">
+ <dictionary>
+ <entry key="*">
+ <list>
+ <object type="System.EnterpriseServices.AutoCompleteAttribute, System.EnterpriseServices" />
+ </list>
+ </entry>
+ </dictionary>
+ </property>
+ </object>
+
+ <!-- Define the component for exporting 'simpleCalculatorService' -->
+ <object id="simpleCalculatorComponent" type="Spring.EnterpriseServices.ServicedComponentExporter,
+ Spring.Services">
+ <property name="TargetName" value="simpleCalculatorService" />
+ </object>
+
+ <!-- Export components into assembly and autoregister with COM+ -->
+ <object type="Spring.EnterpriseServices.EnterpriseServicesExporter, Spring.Services">
+ <!-- assembly name to generated - will generate 'Spring.Calculator.EnterpriseServices.dll' -->
+ <property name="Assembly" value="Spring.Calculator.EnterpriseServices" />
+
+ <!--
+ use Spring's ContextRegistry for managing services. If true, requires a file
+ 'Spring.Calculator.EnterpriseServices.dll.spring-context.xml' containing a
+ <spring/context /> section placed next to the generated assembly.
+ -->
+ <property name="UseSpring" value="true" />
+
+ <property name="ApplicationName" value="Spring Calculator Application" />
+ <property name="ActivationMode" value="Library" />
+ <property name="Description" value="Spring Calculator application" />
+ <property name="Components">
+ <list>
+ <ref object="calculatorComponent" />
+ <ref object="simpleCalculatorComponent" />
+ </list>
+ </property>
+ </object>
+
+
+
+ To load your objectdefinitions at runtime of the components, place a configuration file next to the assembly
+ generated by the exporter, using the filename of the exported assembly, postfixing it with '.spring-context.config'.
+ Taking the example above, the file must be named 'Spring.Calculator.EnterpriseServices.dll.spring-context.xml' and look like:
+
+ <-- -->
+ <spring>
+ <context>
+ <resource uri="Config/services.xml" />
+ </context>
+ </spring>
+
+ This file should point to the service object definitions you exported using with a
+ configuration as shown above.
+
+
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ Creates new enterprise services exporter.
+
+
+
+
+ Called by Spring container after object is configured in order to initialize it.
+
+
+
+
+ Creates ServicedComponent wrappers for the specified components and registers
+ them with COM+ Component Services.
+
+
+
+
+ Generates all configured to the given assembly.
+
+
+
+
+ Generates service types from the list of instances
+ into the given assembly.
+
+ the module to export types to
+ the object factory to resolve target types
+ the list of instances.
+ whether to generate context lookups,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reads key pair from embedded resource.
+
+ Key pair as a byte array.
+
+
+
+ Applies custom attributes to generated assembly.
+
+ Dynamic assembly to apply attributes to.
+
+
+
+ Replaces roles expressed using string with appropriate SecurityRoleAttribute instance.
+
+
+
+
+ Parses string representation of SecurityRoleAttribute.
+
+ Role definition string.
+ Configured SecurityRoleAttribute instance.
+
+
+
+ Creates the SpringServicedComponent base class to derive all s from.
+
+
+
+ internal class SpringServicedComponent: BaseType
+ {
+ protected delegate object GetObjectHandler(ServicedComponent servicedComponent, string targetName);
+
+ protected static readonly GetObjectHandler getObjectRef;
+
+ static SpringServicedComponent()
+ {
+ // first look for a local copy
+ System.Reflection.Assembly servicesAssembly;
+ string servicesAssemblyPath = Path.Combine(
+ new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).DirectoryName
+ , "Spring.Services.dll" );
+ servicesAssembly = System.Reflection.Assembly.LoadFrom(servicesAssemblyPath);
+ if (servicesAssembly == null)
+ {
+ // then let the normal loader handle the typeload
+ servicesAssembly = System.Reflection.Assembly.Load("Spring.Services, culture=neutral, version=x.x.x.x, publicKey=xxxxxxxx");
+ }
+
+ Type componentHelperType = servicesAssembly.GetType("Spring.EnterpriseServices.ServicedComponentHelper");
+ getObjectRef = (GetObjectHandler) Delegate.CreateDelegate(typeof(GetObjectHandler)
+ , componentHelperType.GetMethod("GetObject"));
+ }
+ }
+
+
+
+
+
+ Gets or sets list of components to export.
+
+
+
+
+ Gets or sets COM+ application name.
+
+
+
+
+ Gets or sets application identifier (GUID). Defaults to generated GUID if not specified.
+
+
+
+
+ Gets or sets application activation mode, which can be either Server or Library (default).
+
+
+
+
+ Gets or sets application description.
+
+
+
+
+ Gets or sets access control attribute.
+
+
+
+
+ Gets or sets application queuing attribute.
+
+
+
+
+ Gets or sets application roles.
+
+
+
+
+ Gets or sets name of the generated assembly that will contain serviced components.
+
+
+
+
+ Use Spring context to configure the serviced components within COM.
+
+
+
+
+ Sets object factory instance.
+
+
+
+
+ SUBJECT TO CHANGE -FOR INTERNAL USE ONLY!
+ Holds configuration information from a given configuration file, obtained by .
+ You may use to replace the active configuration system.
+
+
+
+
+
+
+ initializes this instance with a path to be passed into
+
+
+
+
+
+ Purges cached configuration
+
+
+
+
+ Set the nested configuration system to delegate calls in case we can't resolve a config section ourselves
+
+
+
+
+ Get the specified section
+
+
+
+
+
+
+ Only true if the underlying config system supports this.
+
+
+
+
+ Handles loading of <spring/context> configuration sections for
+ in-process s generated by
+ .
+
+ Erich Eichinger
+
+
+
+ Prevent auto-registering the context with the global ContextRegistry
+
+
+
+
+ Encapsulates information necessary to create ServicedComponent
+ wrapper around target class.
+
+
+
+ Instances of this class should be used as elements in the Components
+ list of the class, which will
+ register them with COM+ Services. For a full description on how to export
+ and use services with COM+, see the reference.
+
+
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Validate configuration.
+
+
+
+
+ Creates ServicedComponent wrapper around target class.
+
+ Dynamic module builder to use
+
+ Type of the exported object.
+ whether to generate lookups in ContextRegistry for each service method call or use a 'new'ed target instance
+
+ if is true, each ServicedComponent method call will look similar to
+
+ class MyServicedComponent {
+ void MethodX() {
+ ContextRegistry.GetContext().GetObject("TargetName").MethodX();
+ }
+ }
+
+
+ if is false, the instance will be simply created at component activation using 'new':
+
+ class MyServicedComponent {
+ TargetType target = new TargetType();
+
+ void MethodX() {
+ target.MethodX();
+ }
+ }
+
+
+ The differences are of course that in the former case, the target lifecycle is entirely managed by Spring, thus avoiding
+ issues with ServiceComponent activation/deactivation as well as removing the need for default constructors.
+
+
+
+
+ Gets or sets name of the target object that should be exposed as a serviced component.
+
+
+
+
+ Gets or sets the list of interfaces whose methods should be exported.
+
+
+ The default value of this property is all the interfaces
+ implemented or inherited by the target type.
+
+ The interfaces to export.
+
+
+
+ Gets or sets a list of custom attributes
+ that should be applied to a proxy class.
+
+
+
+
+ Gets or sets a dictionary of custom attributes
+ that should be applied to proxy members.
+
+
+ Map key is an expression that members can be matched against. Value is a list
+ of attributes that should be applied to each member that matches expression.
+
+
+
+
+ Set the name of the object in the object factory
+ that created this object.
+
+
+
+
+ Suppress output to avoid Spring.Core dependency
+
+
+
+
+ Implements default constructor for the proxy class.
+
+
+
+
+ Generates the IL instructions that pushes
+ the target instance on which calls should be delegated to.
+
+ The IL generator to use.
+
+
+
+ Factory Object that instantiates and configures ServicedComponent.
+
+
+
+ This factory object should be used to instantiate and configure
+ serviced components created by .
+
+
+ Aleksandar Seovic
+
+
+
+ Creates new instance of serviced component factory.
+
+
+
+
+ Returns configured instance of the serviced component.
+
+ Configured instance of the serviced component.
+
+
+
+ Initializes factory object.
+
+
+
+
+ Creates new instance of serviced component.
+
+ New instance of serviced component.
+
+
+
+ Gets or sets component name, as registered with COM+ Services.
+
+
+
+
+ Gets or sets name of the remote server that COM+ component is registered with.
+
+
+
+
+ Returns type of serviced component.
+
+
+
+
+ Gets or sets whether serviced component should be treated as singleton. Default is false.
+
+
+
+
+ Gets or sets the template object definition
+ that should be used to configure proxy instance.
+
+
+
+
+ This class supports s exported using .
+ and must never be used directly.
+
+ Erich Eichinger
+
+
+
+ Reads in the 'xxx.spring-context.xml' configuration file associated with the specified .
+ See for an in-depth description on how to export and configure COM+ components.
+
+
+
+
+ Called by a exported by
+ to obtain a reference to the service it proxies.
+
+
+
+
+ Implementation of the custom configuration parser for remoting definitions.
+
+ Bruno Baia
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Parse the specified element and register any resulting
+ IObjectDefinitions with the IObjectDefinitionRegistry that is
+ embedded in the supplied ParserContext.
+
+ The element to be parsed into one or more IObjectDefinitions
+ The object encapsulating the current state of the parsing
+ process.
+
+ The primary IObjectDefinition (can be null as explained above)
+
+
+ Implementations should return the primary IObjectDefinition
+ that results from the parse phase if they wish to used nested
+ inside (for example) a <property> tag.
+ Implementations may return null if they will not
+ be used in a nested scenario.
+
+
+
+
+
+ Parses remoting definitions.
+
+ Validator XML element.
+ The name of the object definition.
+ The parser context.
+ A remoting object definition.
+
+
+
+ Parses the RemotingConfigurer definition.
+
+ The element to parse.
+ The name of the object definition.
+ The parser context.
+ RemotingConfigurer object definition.
+
+
+
+ Parses the SaoFactoryObject definition.
+
+ The element to parse.
+ The name of the object definition.
+ The parser context.
+ SaoFactoryObject object definition.
+
+
+
+ Parses the CaoFactoryObject definition.
+
+ The element to parse.
+ The name of the object definition.
+ The parser context.
+ CaoFactoryObject object definition.
+
+
+
+ Parses the RemoteObjectFactory definition.
+
+ The element to parse.
+ The name of the object definition.
+ The parser context.
+ RemoteObjectFactory object definition.
+
+
+
+ Parses the SaoExporter definition.
+
+ The element to parse.
+ The name of the object definition.
+ The parser context.
+ SaoExporter object definition.
+
+
+
+ Parses the CaoExporter definition.
+
+ The element to parse.
+ The name of the object definition.
+ The parser context.
+ CaoExporter object definition.
+
+
+
+ Parses the LifeTime definition.
+
+
+
+
+ Gets the name of the object type for the specified element.
+
+ The element.
+ The name of the object type.
+
+
+
+ This class extends to allow users
+ to define object lifecycle details by simply setting its properties.
+
+
+
+ Remoting exporters uses this class as a base proxy class
+ in order to support lifecycle configuration when exporting
+ a remote object.
+
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Obtains a lifetime service object to control the lifetime policy for this instance.
+
+
+
+ This method uses property values to configure for this object.
+
+
+ It is very much inspired by Ingo Rammer's example in Chapter 6 of "Advanced .NET Remoting",
+ but is modified slightly to make it more "Spring-friendly". Basically, the main difference is that
+ instead of pulling lease configuration from the .NET config file, this implementation relies
+ on Spring DI to get appropriate values injected, which makes it much more flexible.
+
+
+
+ An object of type used to control the
+ lifetime policy for this instance. This is the current lifetime service object for
+ this instance if one exists; otherwise, a new lifetime service object initialized to the value
+ of the property.
+
+ The immediate caller does not have infrastructure permission.
+
+
+
+ Gets or sets a value indicating whether this instance has infinite lifetime.
+
+
+ if this instance has infinite lifetime;
+ otherwise, .
+
+
+
+
+ Gets or sets the initial lease time.
+
+ The initial lease time.
+
+
+
+ Gets or sets the amount of time lease should be
+ extended for on each call to this object.
+
+ The amount of time lease should be
+ extended for on each call to this object.
+
+
+
+ Gets or sets the amount of time lease manager will for this object's
+ sponsors to respond.
+
+ The amount of time lease manager will for this object's
+ sponsors to respond.
+
+
+
+ Configurable implementation of the interface.
+
+ Bruno Baia
+
+
+
+ Defines lifetime's properties of remote objects that is used by Spring.
+
+ Bruno Baia
+
+
+
+ Gets or sets a value indicating whether this instance has infinite lifetime.
+
+
+ true if this instance has infinite lifetime; otherwise, false.
+
+
+
+
+ Gets the initial lease time.
+
+ The initial lease time.
+
+
+
+ Gets the amount of time lease
+ should be extended for on each call to this object.
+
+ The amount of time lease should be
+ extended for on each call to this object.
+
+
+
+ Gets the amount of time lease manager
+ will for this object's sponsors to respond.
+
+ The amount of time lease manager will for this object's
+ sponsors to respond.
+
+
+
+ Gets or sets a value indicating whether this instance has infinite lifetime.
+
+
+ true if this instance has infinite lifetime; otherwise, false.
+
+
+
+
+ Gets or sets the initial lease time.
+
+ The initial lease time.
+
+
+
+ Gets or sets the amount of time lease
+ should be extended for on each call to this object.
+
+ The amount of time lease should be
+ extended for on each call to this object.
+
+
+
+ Gets or sets the amount of time lease manager
+ will for this object's sponsors to respond.
+
+ The amount of time lease manager will for this object's
+ sponsors to respond.
+
+
+
+ Interface for a CAO based object factory.
+
+
+
+ Provides a well known location for clients to retrieve
+ references to CAO references.
+
+
+ Aleksandar Seovic
+ Mark Pollack
+ Bruno Baia
+
+
+
+ Returns the CAO proxy.
+
+ The remote object.
+
+
+
+ Returns the CAO proxy using the
+ argument list to call the constructor.
+
+
+ The matching of arguments to call the constructor is done
+ by type. The alternative ways, by index and by constructor
+ name are not supported.
+
+ Constructor
+ arguments used to create the object.
+ The remote object.
+
+
+
+ Builds a proxy type based on to wrap a target object
+ that is intended to be remotable.
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The lifetime properties to be applied to the target object.
+
+
+
+
+ Creates a remotable proxy type based on .
+
+ The generated proxy class.
+
+ If the is not
+ an instance of .
+
+
+
+
+ Implements constructors for the proxy class.
+
+
+ The to use.
+
+
+
+
+ Generate initialization code for 's lifetime properties.
+
+ ILGenerator
+
+
+
+ Registers an object type on the server
+ as a Client Activated Object (CAO).
+
+ Aleksandar Seovic
+ Mark Pollack
+ Bruno Baia
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Publish the object
+
+
+
+
+ Disconnect the remote object from the registered remoting channels.
+
+
+
+
+ Gets or sets the name of the target object definition.
+
+
+
+
+ Gets or sets the list of interfaces whose methods should be exported.
+
+
+ The default value of this property is all the interfaces
+ implemented or inherited by the target type.
+
+ The interfaces to export.
+
+
+
+ Sets the that this
+ object runs in.
+
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Sets object factory to use.
+
+
+
+
+ This class extends to allow CAOs
+ to be disconnect from the client.
+
+
+
+
+ Create a new instance of the RemoteFactory.
+
+
+
+
+ Returns the CAO proxy.
+
+ The remote object.
+
+
+
+ Returns the CAO proxy using the
+ argument list to call the constructor.
+
+
+ The matching of arguments to call the constructor is done
+ by type. The alternative ways, by index and by constructor
+ name are not supported.
+
+ Constructor
+ arguments used to create the object.
+ The remote object.
+
+
+
+ Set infinite lifetime.
+
+
+
+
+ Factory for creating a reference to a
+ client activated object (CAO).
+
+ Aleksandar Seovic
+ Mark Pollack
+ Bruno Baia
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Callback method called once all factory properties have been set.
+
+ if an error occured
+
+
+
+ Return the CAO proxy.
+
+ the CAO proxy
+
+
+
+ The remote target name to activate.
+
+
+
+
+ The Uri of the remote type.
+
+
+
+
+ Argument list used to call the CAO constructor.
+
+
+
+
+ Always return false.
+
+
+
+
+ The type of object to be created.
+
+
+
+
+ Factory for creating MarshalByRefObject wrapper around target class.
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the MarshalByRefObjectFactory.
+
+
+
+
+ Initializes factory object.
+
+
+
+
+ Creates new instance of the remotable target proxy.
+
+ New instance of the remotable target proxy.
+
+
+
+ Gets or sets the target object.
+
+
+
+
+ Gets or sets the class or subclass
+ that the proxy must inherit from.
+
+
+
+
+ Gets or sets the list of interfaces to wrap.
+
+
+ The default value of this property is all the interfaces
+ implemented or inherited by the target type.
+
+ The interfaces to export.
+
+
+
+ Returns type of the remotable target proxy.
+
+
+
+
+ Always returns false.
+
+
+
+
+ Convenience class to configure remoting infrastructure from the IoC container.
+
+ Bruno Baia
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Modify the application context's internal object factory after its
+ standard initialization.
+
+
+ The object factory used by the application context.
+
+
+
+
+
+ Gets or sets the name of the remoting configuration file.
+
+
+ If filename is or not set,
+ current AppDomain's configuration file will be used.
+
+
+
+
+ Indicates whether a configuration file is used.
+ Default value is .
+
+
+ If , default remoting configuration will be used.
+
+
+
+
+ Gets or sets if security is enabled.
+
+
+ This property is only available since .NET Framework 2.0.
+
+
+
+
+ Return the order value of this object,
+ where a higher value means greater in terms of sorting.
+
+
+
+
+ Publishes an instance of an object under
+ a given url as a Server Activated Object (SAO).
+
+
+ Remoting servers exported by always correspond to .
+ Objects can be exported either as SingleCall or Singleton by marking the exported object identified by
+ as either singleton or prototype.
+
+ Aleksandar Seovic
+ Mark Pollack
+ Bruno Baia
+ Erich Eichinger
+
+
+
+ Holds EXPORTER_ID to SaoExporter instance mappings.
+
+
+
+
+ Returns the target object instance exported by the SaoExporter identified by .
+
+
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Cleanup before GC
+
+
+
+
+ Publish the object
+
+
+
+
+ Disconnect the remote object from the registered remoting channels.
+
+
+
+
+ Stops exporting the object identified by .
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Gets or sets the name of the target object definition.
+
+
+
+
+ Gets or sets the name of the remote application.
+
+
+
+
+ Gets or sets the name of the exported remote service.
+
+ The name that will be used in the URI to refer to this service.
+ This will be of the form, tcp://host:port/ServiceName or
+ tcp://host:port/ApplicationName/ServiceName
+
+
+
+
+
+ Gets or sets the list of interfaces whose methods should be exported.
+
+
+ The default value of this property is all the interfaces
+ implemented or inherited by the target type.
+
+ The interfaces to export.
+
+
+
+ Sets object factory to use.
+
+
+
+
+ Builds a proxy type based on to wrap a target object
+ that is intended to be remotable.
+
+
+ The wrapped target object is retrieved by name from the IoC container.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+ The exporter to be associated with the proxy.
+
+
+
+
+ Generates the IL instructions that pushes
+ the target instance on which calls should be delegated to.
+
+ The IL generator to use.
+
+
+
+ Implements constructors for the proxy class.
+
+
+ The to use.
+
+
+
+
+ Deaclares a field that holds the target object instance.
+
+
+ The builder to use for code generation.
+
+
+
+
+ Factory for creating a reference to a
+ remote server activated object (SAO).
+
+
+ This is useful alternative to adminstrative type registration on
+ the client when you would like the client to have only
+ a reference to the interface that an SAO implements and not the
+ actual SAO implentation.
+
+ Aleksandar Seovic
+ Mark Pollack
+ Bruno Baia
+
+
+
+ Creates a new instance of the SaoFactoryObject class.
+
+
+
+
+ Callback method called once all factory properties have been set.
+
+ if an error occured
+
+
+
+ Return the SAO proxy.
+
+ the SAO proxy
+
+
+
+ The remote service interface.
+
+
+
+
+ The URI of the well known object
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+
+ The type of object to be created.
+
+
+
+
+ Factory that provides instances of
+ to host objects created by Spring's IoC container.
+
+ Bruno Baia
+
+
+
+ Creates a for
+ a specified Spring-managed object with a specific base address.
+
+
+ A reference to a Spring-managed object or to a service type.
+
+
+ The of type that contains
+ the base addresses for the service hosted.
+
+
+ A for the Spring-managed object.
+
+
+ If the Service attribute in the ServiceHost directive was not provided.
+
+
+
+
+ Factory that provides instances of
+ to host objects created with Spring's IoC container.
+
+ Bruno Baia
+
+
+
+ The owning factory.
+
+
+
+
+ The instance managed by this factory.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Return a instance
+ managed by this factory.
+
+
+ An instance of
+ managed by this factory.
+
+
+
+
+ Publish the object.
+
+
+
+
+ Close the SpringServiceHost
+
+
+
+
+ Validates the configuration.
+
+
+
+
+ Gets or sets the name of the target object that should be exposed as a service.
+
+
+ The name of the target object that should be exposed as a service.
+
+
+
+
+ Gets or sets the base addresses for the hosted service.
+
+
+ The base addresses for the hosted service.
+
+
+
+
+ Controls, whether the underlying should cache
+ the generated proxy types. Defaults to true.
+
+
+
+
+ Callback that supplies the owning factory to an object instance.
+
+
+ Owning
+ (may not be ). The object can immediately
+ call methods on the factory.
+
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+ In case of initialization errors.
+
+
+
+
+ Return the of object that this
+ creates.
+
+
+
+
+ Always returns
+
+
+
+
+ Factory that provides instances of
+ to host objects created by Spring's IoC container.
+
+ Steve Bohlen
+
+
+
+ Creates a for
+ a specified Spring-managed object with a specific base address.
+
+
+ A reference to a Spring-managed object or to a service type.
+
+
+ The of type that contains
+ the base addresses for the service hosted.
+
+
+ A for the Spring-managed object.
+
+
+ If the Service attribute in the ServiceHost directive was not provided.
+
+
+
+
+ The for the <wcf:channelFactory> tag.
+
+ Bruno Baia
+
+
+
+ Parse the specified XmlElement and register the resulting
+ ObjectDefinitions with the IObjectDefinitionRegistry
+ embedded in the supplied
+
+ The element to be parsed.
+ The object encapsulating the current state of the parsing process.
+ Provides access to a IObjectDefinitionRegistry
+ The primary object definition.
+
+
+ This method is never invoked if the parser is namespace aware
+ and was called to process the root node.
+
+
+
+
+
+ Namespace parser for the WCF namespace.
+
+ Bruno Baia
+
+
+
+ Register the for the WCF tags.
+
+
+
+
+ Builds a WCF service type.
+
+ Bruno Baia
+
+
+
+ Target instance calls should be delegated to.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+ The name of the service within Spring's IoC container.
+ The to use.
+ Whether to cache the generated service proxy type.
+
+
+
+ Creates a new instance of the
+ class.
+
+ The name of the service within Spring's IoC container.
+ The name of the generated WCF service .
+ The to use.
+ Whether to cache the generated service proxy type.
+
+
+
+ Creates a proxy that delegates calls to an instance of the target object.
+ This overriden implementation caches the generated proxy type
+ and sets the '__objectFactory' field.
+
+
+ If the
+ does not implement any interfaces.
+
+
+
+
+ Implements constructors for the proxy class.
+
+
+ This implementation generates a constructor
+ that gets instance of the target object using
+ .
+
+
+ The builder to use.
+
+
+
+
+ Creates an appropriate type builder. Add a field to hold a reference to the application context.
+
+ The name to use for the proxy type name.
+ The type to extends if provided.
+ The type builder to use.
+
+
+
+ that creates a channel that is used by clients
+ to send messages to a specified endpoint address.
+
+ The type of channel produced by the channel factory.
+ Bruno Baia
+
+
+
+ Creates a new instance of the class.
+
+
+ The configuration name used for the endpoint.
+
+
+
+
+ Return an instance (possibly shared or independent) of the channel
+ managed by this factory.
+
+
+ An instance (possibly shared or independent) of the channel managed by
+ this factory.
+
+
+
+
+ Gets the configuration name used for the endpoint.
+
+
+
+
+ Return the of channel that this
+ creates.
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype ?
+
+
+ Default value is .
+
+
+
+
+ Exports an object as a WCF service.
+
+ Bruno Baia
+
+
+
+ The name of the object in the factory.
+
+
+
+
+ The owning factory.
+
+
+
+
+ The generated WCF service wrapper type.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Publish the object
+
+
+
+
+ Return an instance (possibly shared or independent) of the object
+ managed by this factory.
+
+
+
+ If this method is being called in the context of an enclosing IoC container and
+ returns , the IoC container will consider this factory
+ object as not being fully initialized and throw a corresponding (and most
+ probably fatal) exception.
+
+
+
+ An instance (possibly shared or independent) of the object managed by
+ this factory.
+
+
+
+
+ Validates the configuration.
+
+
+
+
+ Generates the WCF service wrapper type.
+
+
+
+
+ Gets or sets the name of the target object definition.
+
+
+
+
+ Gets or sets the service contract interface type.
+
+
+ If not set, uses the unique interface implemented or inherited by the target type.
+ An error will be thrown if the target type implements more than one interface.
+
+ The service contract interface type.
+
+
+
+ Gets or sets a list of custom attributes
+ that should be applied to the WCF service class.
+
+
+
+
+ Gets or sets a dictionary of custom attributes
+ that should be applied to the WCF service members.
+
+
+ Dictionary key is an expression that members can be matched against.
+ Value is a list of attributes that should be applied
+ to each member that matches expression.
+
+
+
+
+ Controls, whether the underlying should cache
+ the generated proxy types. Defaults to true.
+
+
+
+
+ Gets or sets the name for the <portType> element in
+ Web Services Description Language (WSDL).
+
+
+ The default value is the name of the class or interface to which the
+ System.ServiceModel.ServiceContractAttribute is applied.
+
+
+
+
+ Gets or sets the namespace of the <portType> element in
+ Web Services Description Language (WSDL).
+
+
+ The WSDL namespace of the <portType> element. The default value is "http://tempuri.org".
+
+
+
+
+ Gets or sets the name used to locate the service in an application configuration file.
+
+
+ The name used to locate the service element in an application configuration file.
+ The default is the name of the service implementation class.
+
+
+
+
+ Gets or sets the type of callback contract when the contract is a duplex contract.
+
+
+ A that indicates the callback contract. The default is null.
+
+
+
+
+ Specifies whether the binding for the contract must support the value of
+ the ProtectionLevel property.
+
+
+ One of the values.
+ The default is .
+
+
+
+
+ Gets or sets whether sessions are allowed, not allowed or required.
+
+
+ A that indicates whether sessions are allowed,
+ not allowed, or required.
+
+
+
+
+ Callback that supplies the owning factory to an object instance.
+
+
+ Owning
+ (may not be ). The object can immediately
+ call methods on the factory.
+
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+ In case of initialization errors.
+
+
+
+
+ Return the of object that this
+ creates, or
+ if not known in advance.
+
+
+
+
+ Is the object managed by this factory a singleton or a prototype?
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+
+ The name of the object in the factory.
+
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+
+ Builds a WCF service type.
+
+
+
+
+ Applies attributes to the proxy class.
+
+ The type builder to use.
+ The proxied class.
+
+
+
+
+
+ Provides a host for Spring-managed services.
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the class.
+
+ The name of the service within Spring's IoC container.
+ The base addresses for the hosted service.
+
+
+
+ Creates a new instance of the class.
+
+ The name of the service within Spring's IoC container.
+ The name of the Spring context to use.
+ The base addresses for the hosted service.
+
+
+
+ Creates a new instance of the class.
+
+ The name of the service within Spring's IoC container.
+ The to use.
+ The base addresses for the hosted service.
+
+
+
+ Creates a new instance of the class.
+
+ The name of the service within Spring's IoC container.
+ The to use.
+ Whether to cache the generated service proxy type.
+ The base addresses for the hosted service.
+
+
+
+ Provides a host for Spring-managed services.
+
+ Bruno Baia
+
+
+
+ Creates a new instance of the class.
+
+ The name of the service within Spring's IoC container.
+ The base addresses for the hosted service.
+
+
+
+ Creates a new instance of the class.
+
+ The name of the service within Spring's IoC container.
+ The name of the Spring context to use.
+ The base addresses for the hosted service.
+
+
+
+ Creates a new instance of the class.
+
+ The name of the service within Spring's IoC container.
+ The to use.
+ The base addresses for the hosted service.
+
+
+
+ Creates a new instance of the class.
+
+ The name of the service within Spring's IoC container.
+ The to use.
+ Whether to cache the generated service proxy type.
+ The base addresses for the hosted service.
+
+
+
+ Factory Object that dynamically implements service interface for web service.
+
+
+
+ This factory object should be used to obtain reference to a web service
+ that can be safely cast to a service interface, which allows client code to code
+ against interface, and not directly against the web service.
+
+
+ The WSDL contract needs to conform to WS-I Basic Profiles.
+
+
+ Bruno Baia
+ Aleksandar Seovic
+
+
+
+ The web service proxy default constructor.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Creates new instance of the web service proxy.
+
+ New instance of the web service proxy.
+
+
+
+ Initializes factory object.
+
+
+
+
+ Validates the configuration.
+
+
+
+
+ Generates the web service proxy type.
+
+
+
+
+ Gets XML Web Services documents from a Spring resource.
+
+
+
+
+ Gets or sets the base type that web service proxy should inherit.
+
+
+ Default is
+
+
+
+
+ Gets or sets the URI for an
+ that contains the web service description (WSDL).
+
+
+
+
+ Gets or sets type of the proxy class to wrap.
+
+
+
+
+ Gets or sets service interface that proxy should implement.
+
+
+
+
+ Gets or sets the instance
+ to use when connecting to a server that requires authentication.
+
+
+
+
+ Gets or sets the url of the proxy server to use for retrieving the WSDL.
+
+
+
+ This only applies when using an as uri.
+
+
+ The default is to use the system proxy setting.
+
+
+
+
+
+ Gets or sets the instance
+ to use when connecting to a proxy server that requires authentication.
+
+
+
+ This only applies when using an as uri.
+
+
+
+
+
+ Gets or sets the web service binding name to use for the proxy.
+
+
+
+
+ Gets or sets a list of custom attributes
+ that should be applied to a proxy class.
+
+
+
+
+ Gets or sets a dictionary of custom attributes
+ that should be applied to web service members.
+
+
+ Dictionary key is an expression that members can be matched against.
+ Value is a list of attributes that should be applied
+ to each member that matches expression.
+
+
+
+
+ Returns type of the web service proxy.
+
+
+
+
+ Always returns false.
+
+
+
+
+ Gets or sets the template object definition
+ that should be used to configure proxy instance.
+
+
+
+
+ Proxy type builder that can be used to create a proxy for
+ derived classes.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+ The URI that contains the Web Service meta info (WSDL).
+ The XML Web Service documents to use to create the proxy.
+ The name of the Web Service binding to use.
+
+
+
+ Creates the proxy type.
+
+ The generated proxy class.
+
+
+
+ Generates the IL instructions that pushes
+ the target instance on which calls should be delegated to.
+
+ The IL generator to use.
+
+
+
+ Implements constructors for the proxy class.
+
+
+ The to use.
+
+
+
+
+ Search and returns the binding for the specified name.
+
+
+
+
+ Search and returns the url for the specified binding.
+
+
+
+
+ Search and returns the operation that matches the specified method.
+
+
+
+
+ Search and returns the OperationBinding that matches the specified Operation.
+
+
+
+
+ Search and returns the type mapping between method parameters/return value
+ and the element parts of a literal-use SOAP message.
+
+
+
+
+ Creates a that should be applied to proxy type.
+
+
+
+
+ Creates a or a
+ that should be applied to proxy method.
+
+
+
+
+ Proxy method builder that can be used to create a proxy method
+ for web services operation invocation.
+
+
+
+
+ Creates a new instance of the method builder.
+
+ The type builder to use.
+
+ The implementation to use.
+
+
+
+
+ Generates the proxy method.
+
+ The IL generator to use.
+ The method to proxy.
+
+ The interface definition of the method, if applicable.
+
+
+
+
+ Proxy type builder that can be used to create a proxy for
+ .Net-generated proxy class that can be safely cast to a service interface.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Gets the mapping of the interface to proxy
+ into the actual methods on the target type
+ that does not need to implement that interface.
+
+
+
+ As the proxy type does not implement the interface,
+ we try to find matching methods.
+
+
+
+ The of the target object.
+
+ The interface to implement.
+
+ An interface mapping for the interface to proxy.
+
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Template.Velocity.dll b/Resources/Libraries/Spring.NET/Spring.Template.Velocity.dll
new file mode 100644
index 00000000..3d590db8
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Template.Velocity.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Template.Velocity.pdb b/Resources/Libraries/Spring.NET/Spring.Template.Velocity.pdb
new file mode 100644
index 00000000..6eba2878
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Template.Velocity.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Template.Velocity.xml b/Resources/Libraries/Spring.NET/Spring.Template.Velocity.xml
new file mode 100644
index 00000000..d79c57ec
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Template.Velocity.xml
@@ -0,0 +1,698 @@
+
+
+
+ Spring.Template.Velocity
+
+
+
+
+ Implementation of the custom configuration parser for template configurations
+ based on
+
+
+ Erez Mazor
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+
+
+
+ Parse a template definition from the templating namespace
+
+ the root element defining the templating object
+ the parser context
+
+
+
+
+ Parses the object definition for the engine object, configures a single NVelocity template engine based
+ on the element definitions.
+
+ the root element defining the velocity engine
+ the parser context
+
+
+
+ Parses child element definitions for the NVelocity engine. Typically resource loaders and locally defined properties are parsed here
+
+ the XmlNodeList representing the child configuration of the root NVelocity engine element
+ the parser context
+ the MutablePropertyValues used to configure this object
+
+
+
+ Configures the NVelocity resource loader definitions from the xml definition
+
+ the root resource loader element
+ the MutablePropertyValues used to configure this object
+ the properties used to initialize the velocity engine
+
+
+
+ Set the caching and modification interval checking properties of a resource loader of a given type
+
+ the properties used to initialize the velocity engine
+ type of the resource loader
+ caching flag
+ modification interval value
+
+
+
+ Set global velocity resource loader properties (caching, modification interval etc.)
+
+ the properties used to initialize the velocity engine
+ the type of resource loader
+ the suffix property
+ the value of the property
+
+
+
+ Creates a nvelocity file based resource loader by setting the required properties
+
+ a list of nv:file elements defining the paths to template files
+ the properties used to initialize the velocity engine
+
+
+
+ Creates a nvelocity assembly based resource loader by setting the required properties
+
+ a list of nv:assembly elements defining the assemblies
+ the properties used to initialize the velocity engine
+
+
+
+ Creates a spring resource loader by setting the ResourceLoaderPaths of the
+ engine factory (the resource loader itself will be created internally either as
+ spring or as file resource loader based on the value of prefer-file-system-access
+ attribute).
+
+ list of resource loader path elements
+ the MutablePropertyValues to set the property for the engine factory
+
+
+
+ Create a custom resource loader from an nv:custom element
+ generates the 4 required nvelocity props for a resource loader (name, description, class and path).
+
+ the nv:custom xml definition element
+ the properties used to initialize the velocity engine
+
+
+
+ Parses the nvelocity properties map using ObjectNamespaceParserHelper
+ and appends it to the properties dictionary
+
+ root element of the map element
+ the parser context
+ the properties used to initialize the velocity engine
+
+
+
+ Gets the name of the object type for the specified element.
+
+ The element.
+ The name of the object type.
+
+
+
+ constructs an nvelocity style resource loader property in the format:
+ prefix.resource.loader.suffix
+
+ the prefix
+ the suffix
+ a concatenated string like: prefix.resource.loader.suffix
+
+
+
+ This method is overriden from ObjectsNamespaceParser since when invoked on
+ sub-elements from the objets namespace (e.g., objects:objectMap for nvelocity
+ property map) the element.SelectNodes fails because it is in
+ the nvelocity custom namespace and not the object's namespace (http://www.springframwork.net)
+ to amend this the object's namespace is added to the provided XmlNamespaceManager
+
+ The element to be searched in.
+ The name of the child nodes to look for.
+
+ The child s of the supplied
+ with the supplied .
+
+
+
+
+
+ Template definition constants
+
+
+
+
+ Engine element definition
+
+
+
+
+ Spring resource loader element definition
+
+
+
+
+ Custom resource loader element definition
+
+
+
+
+ uri attribute of the spring element
+
+
+
+
+ prefer-file-system-access attribute of the engine factory
+
+
+
+
+ config-file attribute of the engine factory
+
+
+
+
+ override-logging attribute of the engine factory
+
+
+
+
+ template-caching attribute of the nvelocity engine
+
+
+
+
+ default-cache-size attribute of the nvelocity engine resource manager
+
+
+
+
+ modification-check-interval attribute of the nvelocity engine resource loader
+
+
+
+
+ resource loader element
+
+
+
+
+ nvelocity propeties element (map)
+
+
+
+
+ PreferFileSystemAccess property of the engine factory
+
+
+
+
+ OverrideLogging property of the engine factory
+
+
+
+
+ ConfigLocation property of the engine factory
+
+
+
+
+ ResourceLoaderPaths property of the engine factory
+
+
+
+
+ VelocityProperties property of the engine factory
+
+
+
+
+ resource.loader.cache property of the resource loader configuration
+
+
+
+
+ resource.loader.modificationCheckInterval property of the resource loader configuration
+
+
+
+
+ the type used for file resource loader
+
+
+
+
+ the type used for assembly resource loader
+
+
+
+
+ the type used for spring resource loader
+
+
+
+
+ NVelocity LogSystem implementation for Commons Logging.
+
+ Erez Mazor
+
+
+
+ Shared logger instance.
+
+
+
+
+ Initializes the specified runtime services. No-op in current implementatin
+
+ the runtime services.
+
+
+
+ Log a NVelocity message using the commons logging system
+
+ LogLevel to match
+ message to log
+
+
+
+ NVelocity's abstract ResourceLoader extension which serves
+ as an adapter that loads templates via a Spring IResourceLoader.
+
+
+ Used by VelocityEngineFactory for any resource loader path that
+ cannot be resolved to a File or an Assembly or for
+ implementations which rely on spring's IResourceLoader
+ mechanism.
+
+
+ Important: this loader does not allow for modification detection.
+
+ Expects "spring.resource.loader" (IResourceLoader implementations)
+ and "spring.resource.loader.path" application attributes in the
+ NVelocity runtime.
+
+
+
+
+
+
+ Erez Mazor (.NET)
+
+
+
+ Prefix used for the NVelocity Configuration
+
+
+
+
+ The IResourceLoader implementation type
+
+
+
+
+ A flag indicating weather a template cache is used
+
+
+
+
+ Fully qualified name of the IResourceLoader implementation class
+
+
+
+
+ A comma delimited list of paths used by the spring IResourceLoader implementation
+
+
+
+
+ Shared logger instance.
+
+
+
+
+ Initialize the template loader with a resources class.
+
+ The ExtendedProperties representing the Velocity configuration.
+
+
+
+ Get the System.IO.Stream that the Runtime will parse to create a template.
+
+ the source template name
+ a System.IO.Stream representation of the resource
+
+
+
+ Given a template, check to see if the source of InputStream has been modified.
+
+ The resource.
+
+ true if the source of the InputStream has been modified; otherwise, false.
+
+
+
+
+ Get the last modified time of the InputStream source
+ that was used to create the template. We need the template
+ here because we have to extract the name of the template
+ in order to locate the InputStream source.
+
+ The resource.
+
+
+
+
+ Common Velocity constants.
+
+
+
+
+ File.
+
+
+
+
+ Type.
+
+
+
+
+ Assembly.
+
+
+
+
+ Class.
+
+
+
+
+ Name.
+
+
+
+
+ Description.
+
+
+
+
+ Path.
+
+
+
+
+ Separator.
+
+
+
+
+ Factory that configures a VelocityEngine. Can be used standalone,
+ but typically you will use VelocityEngineFactoryObject
+ for preparing a VelocityEngine as bean reference.
+
+
+ The optional "ConfigLocation" property sets the location of the Velocity
+ properties file, within the current application. Velocity properties can be
+ overridden via "VelocityProperties", or even completely specified locally,
+ avoiding the need for an external properties file.
+
+
+ The "ResourceLoaderPath" property can be used to specify the Velocity
+ resource loader path via Spring's IResource abstraction, possibly relative
+ to the Spring application context.
+
+
+ If "OverrideLogging" is true (the default), the VelocityEngine will be
+ configured to log via Commons Logging, that is, using the Spring-provided
+ CommonsLoggingLogSystem as log system.
+
+
+ The simplest way to use this class is to specify a ResourceLoaderPath
+ property. the VelocityEngine typically then does not need any further
+ configuration.
+
+
+
+
+
+ Erez Mazor
+
+
+
+ Shared logger instance.
+
+
+
+
+ Create and initialize the VelocityEngine instance and return it
+
+ VelocityEngine
+
+
+
+
+
+
+
+
+ This is to overcome an issue with the current NVelocity library, it seems the
+ default runetime properties/directives (nvelocity.properties and directive.properties
+ files) are not being properly located in the library at load time. A jira should
+ be filed but for now we attempt to do this on our own. Particularly our
+ concern here is with several required properties which I don't want
+ to require users to re-defined. e.g.,:
+
+
+ Pre-requisites:
+ resource.manager.class=NVelocity.Runtime.Resource.ResourceManagerImpl
+ directive.manager=NVelocity.Runtime.Directive.DirectiveManager
+ runtime.introspector.uberspect=NVelocity.Util.Introspection.UberspectImpl
+
+
+
+
+ Return a new VelocityEngine. Subclasses can override this for
+ custom initialization, or for using a mock object for testing.
+ Called by CreateVelocityEngine()
+
+ VelocityEngine instance (non-configured)
+
+
+
+
+ Initialize a Velocity resource loader for the given VelocityEngine:
+ either a standard Velocity FileResourceLoader or a SpringResourceLoader.
+ Called by CreateVelocityEngine().
+
+ velocityEngine the VelocityEngine to configure
+
+ paths the path list to load Velocity resources from
+
+
+
+
+
+
+
+ Initialize a SpringResourceLoader for the given VelocityEngine.
+ Called by InitVelocityResourceLoader.
+
+ Important: the NVeloctity ResourceLoaderFactory.getLoader
+ method replaces ';' with ',' when attempting to construct our resource
+ loader. The name on the SPRING_RESOURCE_LOADER_CLASS property
+ has to be in the form of "ClassFullName; AssemblyName" in replacement
+ of the tranditional "ClassFullName, AssemblyName" to work.
+
+ velocityEngine the VelocityEngine to configure
+
+ resourceLoaderPath the path to load Velocity resources from
+
+
+
+
+
+ To be implemented by subclasses that want to to perform custom
+ post-processing of the VelocityEngine after this FactoryObject
+ performed its default configuration (but before VelocityEngine.init)
+
+ Called by CreateVelocityEngine
+
+ velocityEngine the current VelocityEngine
+
+
+
+
+
+
+ Populates the velocity properties from the given resource
+
+ ExtendedProperties instance to populate
+ The resource from which to load the properties
+ A flag indicated weather the properties loaded from the resource should be appended or replaced in the extendedProperties
+
+
+
+ Set the location of the Velocity config file. Alternatively, you can specify all properties locally.
+
+
+
+
+
+
+ Set local NVelocity properties.
+
+
+
+
+
+ Single ResourceLoaderPath
+
+
+
+
+
+ Set the Velocity resource loader path via a Spring resource location.
+ Accepts multiple locations in Velocity's comma-separated path style.
+
+ When populated via a String, standard URLs like "file:" and "assembly:"
+ pseudo URLs are supported, as understood by IResourceLoader. Allows for
+ relative paths when running in an ApplicationContext.
+
+ Will define a path for the default Velocity resource loader with the name
+ "file". If the specified resource cannot be resolved to a File,
+ a generic SpringResourceLoader will be used under the name "spring", without
+ modification detection.
+
+ Take notice that resource caching will be enabled in any case. With the file
+ resource loader, the last-modified timestamp will be checked on access to
+ detect changes. With SpringResourceLoader, the resource will be throughout
+ the life time of the application context (for example for class path resources).
+
+ To specify a modification check interval for files, use Velocity's
+ standard "file.resource.loader.modificationCheckInterval" property. By default,
+ the file timestamp is checked on every access (which is surprisingly fast).
+ Of course, this just applies when loading resources from the file system.
+
+ To enforce the use of SpringResourceLoader, i.e. to not resolve a path
+ as file system resource in any case, turn off the "preferFileSystemAccess"
+ flag. See the latter's documentation for details.
+
+
+
+
+
+
+
+
+
+ Set the Spring ResourceLoader to use for loading Velocity template files.
+ The default is DefaultResourceLoader. Will get overridden by the
+ ApplicationContext if running in a context.
+
+
+
+
+
+
+
+
+ Set whether to prefer file system access for template loading.
+ File system access enables hot detection of template changes.
+
+ If this is enabled, VelocityEngineFactory will try to resolve the
+ specified "resourceLoaderPath" as file system resource.
+
+ Default is "true". Turn this off to always load via SpringResourceLoader
+ (i.e. as stream, without hot detection of template changes), which might
+ be necessary if some of your templates reside in a directory while
+ others reside in assembly files.
+
+
+
+
+
+ Set whether Velocity should log via Commons Logging, i.e. whether Velocity's
+ log system should be set to CommonsLoggingLogSystem. Default value is true
+
+
+
+
+
+ FactoryObject implementation that configures a VelocityEngine and provides it
+ as an object reference. This object is intended for any kind of usage of Velocity in
+ application code, e.g. for generating email content.
+
+ See the base class VelocityEngineFactory for configuration details.
+
+
+ Erez Mazor
+
+
+
+ Get the velocity engine underlying object
+
+ An instance of a configured VelocityEngine
+
+
+
+
+ Facilitate the creation of the velocity engine object
+
+
+
+
+ Get the type of the velocity engine
+
+
+
+
+ Singleton
+
+
+
+
+ Generalized Utility class for merging velocity templates into a text writer or return the result as a string
+
+ Erez Mazor
+
+
+
+ Shared logger instance.
+
+
+
+
+ Merge the specified Velocity template with the given model and write
+ the result to the given Writer.
+
+ VelocityEngine to work with
+ the location of template, relative to Velocity's resource loader path
+ encoding the encoding of the template file
+ the Hashtable that contains model names as keys and model objects
+ writer the TextWriter to write the result to
+ thrown if any exception is thrown by the velocity engine
+
+
+
+ Merge the specified Velocity template with the given model into a string.
+
+ VelocityEngine to work with
+ the location of template, relative to Velocity's resource loader path
+ the encoding string to use for the merge
+ the Hashtable that contains model names as keys and model objects
+ the result as string
+ thrown if any exception is thrown by the velocity engine
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Testing.Microsoft.dll b/Resources/Libraries/Spring.NET/Spring.Testing.Microsoft.dll
new file mode 100644
index 00000000..a807b27f
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Testing.Microsoft.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Testing.Microsoft.pdb b/Resources/Libraries/Spring.NET/Spring.Testing.Microsoft.pdb
new file mode 100644
index 00000000..6e0988ed
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Testing.Microsoft.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Testing.Microsoft.xml b/Resources/Libraries/Spring.NET/Spring.Testing.Microsoft.xml
new file mode 100644
index 00000000..42acb336
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Testing.Microsoft.xml
@@ -0,0 +1,521 @@
+
+
+
+ Spring.Testing.Microsoft
+
+
+
+
+ Convenient superclass for tests depending on a Spring context.
+ The test instance itself is populated by Dependency Injection.
+
+
+
+
Really for integration testing, not unit testing.
+ You should not normally use the Spring container
+ for unit tests: simply populate your objects in plain NUnit tests!
+
+
This supports two modes of populating the test:
+
+
Via Property Dependency Injection. Simply express dependencies on objects
+ in the test fixture, and they will be satisfied by autowiring by type.
+
Via Field Injection. Declare protected variables of the required type
+ which match named beans in the context. This is autowire by name,
+ rather than type. This approach is based on an approach originated by
+ Ara Abrahmian. Property Dependency Injection is the default: set the
+ "populateProtectedVariables" property to true in the constructor to switch
+ on Field Injection.
+
+
+
This class will normally cache contexts based on a context key:
+ normally the config locations String array describing the Spring resource
+ descriptors making up the context. Unless the SetDirty() method
+ is called by a test, the context will not be reloaded, even across different
+ subclasses of this test. This is particularly beneficial if your context is
+ slow to construct, for example if you are using Hibernate and the time taken
+ to load the mappings is an issue.
+
+
If you don't want this behavior, you can override the ContextKey
+ property, most likely to return the test class. In conjunction with this you would
+ probably override the GetContext method, which by default loads
+ the locations specified by the ConfigLocations property.
+
+
WARNING: When doing integration tests from within VS.NET, only use
+ assembly resource URLs. Else, you may see misleading failures when changing
+ context locations.
+
+
+ Rod Johnson
+ Rob Harrop
+ Rick Evans
+ Aleksandar Seovic (.NET)
+
+
+
+ Superclass for NUnit test cases using a Spring context.
+
+
+
Maintains a cache of contexts by key. This has significant performance
+ benefit if initializing the context would take time. While initializing a
+ Spring context itself is very quick, some objects in a context, such as
+ a LocalSessionFactoryObject for working with NHibernate, may take time to
+ initialize. Hence it often makes sense to do that initializing once.
+
Normally you won't extend this class directly but rather extend one
+ of its subclasses.
+
+ Rod Johnson
+ Aleksandar Seovic (.NET)
+
+
+
+ Map of context keys returned by subclasses of this class, to
+ Spring contexts.
+
+
+
+
+ Static ctor to avoid "beforeFieldInit" problem.
+
+
+
+
+ Disposes any cached context instance and removes it from cache.
+
+
+
+
+ Indicates, whether context instances should be automatically registered with the global .
+
+
+
+
+ Logger available to subclasses.
+
+
+
+
+ Default constructor for AbstractSpringContextTests.
+
+
+
+
+ Set custom locations dirty. This will cause them to be reloaded
+ from the cache before the next test case is executed.
+
+
+ Call this method only if you change the state of a singleton
+ object, potentially affecting future tests.
+
+ Locations
+
+
+
+ Returns true if context for the specified
+ is cached.
+
+ Context key to check.
+
+ true if context for the specified
+ is cached,
+ false otherwise.
+
+
+
+
+ Converts context key to string.
+
+
+ Subclasses can override this to return a string representation of
+ their contextKey for use in logging.
+
+ Context key to convert.
+
+ String representation of the specified . Null if
+ contextKey is null.
+
+
+
+
+ Caches application context.
+
+ Key to use.
+ Context to cache.
+
+
+
+ Returns cached context if present, or loads it if not.
+
+ Context key.
+ Spring application context associated with the specified key.
+
+
+
+ Loads application context from the specified resource locations.
+
+ Resources to load object definitions from.
+
+
+
+ Loads application context based on user-defined key.
+
+
+ Unless overriden by the user, this method will alway throw
+ a .
+
+ User-defined key.
+
+
+
+ Controls, whether application context instances will
+ be registered/unregistered with the global .
+ Defaults to true.
+
+
+
+
+ Application context this test will run against.
+
+
+
+
+ Holds names of the fields that should be used for field injection.
+
+
+
+
+ Default constructor for AbstractDependencyInjectionSpringContextTests.
+
+
+
+
+ Called to say that the "applicationContext" instance variable is dirty and
+ should be reloaded. We need to do this if a test has modified the context
+ (for example, by replacing an object definition).
+
+
+
+
+ Test setup method.
+
+
+
+
+ Inject dependencies into 'this' instance (that is, this test instance).
+
+
+
The default implementation populates protected variables if the
+ property is set, else
+ uses autowiring if autowiring is switched on (which it is by default).
+
You can certainly override this method if you want to totally control
+ how dependencies are injected into 'this' instance.
+
+
+
+
+ Loads application context from the specified resource locations.
+
+ Resources to load object definitions from.
+
+
+
+ Retrieves the names of the fields that should be used for field injection.
+
+
+
+
+ Injects protected fields using Field Injection.
+
+
+
+
+ Called right before a field is being injected
+
+
+
+
+ Subclasses can override this method in order to
+ add custom test setup logic.
+
+
+
+
+ Test teardown method.
+
+
+
+
+ Subclasses can override this method in order to
+ add custom test teardown logic.
+
+
+
+
+ Gets or sets a flag specifying whether to populate protected
+ variables of this test case.
+
+
+ A flag specifying whether to populate protected variables of this test case.
+ Default is false.
+
+
+
+
+ Gets or sets the autowire mode for test properties set by Dependency Injection.
+
+
+ The autowire mode for test properties set by Dependency Injection.
+ The default is .
+
+
+
+
+ Gets or sets a flag specifying whether or not dependency checking
+ should be performed for test properties set by Dependency Injection.
+
+
+
A flag specifying whether or not dependency checking
+ should be performed for test properties set by Dependency Injection.
+
The default is true, meaning that tests cannot be run
+ unless all properties are populated.
+
+
+
+
+ Gets the current number of context load attempts.
+
+
+
+
+ Gets a key for this context. Usually based on config locations, but
+ a subclass overriding buildContext() might want to return its class.
+
+
+
+
+ Subclasses must implement this property to return the locations of their
+ config files. A plain path will be treated as a file system location.
+
+ An array of config locations
+
+
+
+ Subclass of AbstractTransactionalSpringContextTests that adds some convenience
+ functionality for ADO.NET access. Expects a IDbProvider object
+ to be defined in the Spring application context.
+
+
+ This class exposes a AdoTemplate and provides an easy way to delete from the
+ database in a new transaction.
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Convenient superclass for tests that should occur in a transaction, but normally
+ will roll the transaction back on the completion of each test.
+
+
+
This is useful in a range of circumstances, allowing the following benefits:
+
+
Ability to delete or insert any data in the database, without affecting other tests
+
Providing a transactional context for any code requiring a transaction
+
Ability to write anything to the database without any need to clean up.
+
+
+
This class is typically very fast, compared to traditional setup/teardown scripts.
+
+
If data should be left in the database, call the SetComplete()
+ method in each test. The "DefaultRollback" property, which defaults to "true",
+ determines whether transactions will complete by default.
+
+
It is even possible to end the transaction early; for example, to verify lazy
+ loading behavior of an O/R mapping tool. (This is a valuable away to avoid
+ unexpected errors when testing a web UI, for example.) Simply call the
+ endTransaction() method. Execution will then occur without a
+ transactional context.
+
+
The StartNewTransaction() method may be called after a call to
+ EndTransaction() if you wish to create a new transaction, quite
+ independent of the old transaction. The new transaction's default fate will be to
+ roll back, unless setComplete() is called again during the scope of the
+ new transaction. Any number of transactions may be created and ended in this way.
+ The final transaction will automatically be rolled back when the test case is
+ torn down.
+
+
Transactional behavior requires a single object in the context implementing the
+ IPlatformTransactionManager interface. This will be set by the superclass's
+ Dependency Injection mechanism. If using the superclass's Field Injection mechanism,
+ the implementation should be named "transactionManager". This mechanism allows the
+ use of this superclass even when there's more than one transaction manager in the context.
+
+
This superclass can also be used without transaction management, if no
+ IPlatformTransactionManager object is found in the context provided. Be careful about
+ using this mode, as it allows the potential to permanently modify data.
+ This mode is available only if dependency checking is turned off in
+ the AbstractDependencyInjectionSpringContextTests superclass. The non-transactional
+ capability is provided to enable use of the same subclass in different environments.
+
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans
+ Mark Pollack (.NET)
+
+
+
+ The transaction manager to use
+
+
+
+
+ Should we roll back by default?
+
+
+
+
+ Should we commit the current transaction?
+
+
+
+
+ Number of transactions started
+
+
+
+
+ Default transaction definition is used.
+ Subclasses can change this to cause different behaviour.
+
+
+
+
+ TransactionStatus for this test. Typical subclasses won't need to use it.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Prevents the transaction.
+
+
+
+
+ Creates a transaction
+
+
+
+
+ Callback method called before transaction is setup.
+
+
+
+
+ Callback method called after transaction is setup.
+
+
+
+
+ rollback the transaction.
+
+
+
+
+ Callback before rolling back the transaction.
+
+
+
+
+ Callback after rolling back the transaction.
+
+
+
+
+ Set the complete flag..
+
+
+
+
+ Ends the transaction.
+
+
+
+
+ Starts the new transaction.
+
+
+
+
+ Sets the transaction manager to use.
+
+
+
+
+ Sets the default rollback flag.
+
+
+
+
+ Set the to be used
+
+
+ Defaults to
+
+
+
+
+ Holds the that this base class manages
+
+
+
+
+ Did this test delete any tables? If so, we forbid transaction completion,
+ and only allow rollback.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Convenient method to delete all rows from these tables.
+ Calling this method will make avoidance of rollback by calling
+ SetComplete() impossible.
+
+
+
+
+
+ Overridden to prevent the transaction committing if a number of tables have been
+ cleared, as a defensive measure against accidental permanent wiping of a database.
+
+
+
+
+ Counts the rows in given table.
+
+ Name of the table to count rows in.
+ The number of rows in the table
+
+
+
+ Sets the DbProvider, via Dependency Injection.
+
+ The IDbProvider.
+
+
+
+ Gets or sets the AdoTemplate that this base class manages.
+
+ The ADO template.
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Testing.NUnit.dll b/Resources/Libraries/Spring.NET/Spring.Testing.NUnit.dll
new file mode 100644
index 00000000..7406240a
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Testing.NUnit.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Testing.NUnit.pdb b/Resources/Libraries/Spring.NET/Spring.Testing.NUnit.pdb
new file mode 100644
index 00000000..5a434e3f
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Testing.NUnit.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Testing.NUnit.xml b/Resources/Libraries/Spring.NET/Spring.Testing.NUnit.xml
new file mode 100644
index 00000000..216d1beb
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Testing.NUnit.xml
@@ -0,0 +1,655 @@
+
+
+
+ Spring.Testing.NUnit
+
+
+
+
+ Holds status for an active transaction. You *must* dispose this object!
+
+
+
+ Usage Pattern:
+
+ TBD
+
+
+
+
+
+
+ Mark transaction for commit on disposal
+
+
+
+
+ Throw exception and rollback any uncommitted commands
+
+
+
+
+ TBD
+
+ Erich Eichinger
+
+
+
+ TBD
+
+
+
+
+ TBD
+
+
+
+
+ TBD
+
+
+
+
+ TBD
+
+
+
+
+ TBD
+
+
+
+
+ TBD
+
+
+
+
+ TBD
+
+
+
+
+ TBD
+
+
+
+
+ TBD
+
+
+
+
+ Execute the given script
+
+
+
+
+ Execute the given script
+
+
+
+
+ Execute the given script
+
+
+
+
+ Execute the given script
+
+
+
+
+ Execute the given script
+
+
+
+
+ Execute the given script
+
+
+
+
+ Execute the given script
+
+
+
+
+ TBD
+
+
+
+
+ Convenient superclass for tests depending on a Spring context.
+ The test instance itself is populated by Dependency Injection.
+
+
+
+
Really for integration testing, not unit testing.
+ You should not normally use the Spring container
+ for unit tests: simply populate your objects in plain NUnit tests!
+
+
This supports two modes of populating the test:
+
+
Via Property Dependency Injection. Simply express dependencies on objects
+ in the test fixture, and they will be satisfied by autowiring by type.
+
Via Field Injection. Declare protected variables of the required type
+ which match named beans in the context. This is autowire by name,
+ rather than type. This approach is based on an approach originated by
+ Ara Abrahmian. Property Dependency Injection is the default: set the
+ "populateProtectedVariables" property to true in the constructor to switch
+ on Field Injection.
+
+
+
This class will normally cache contexts based on a context key:
+ normally the config locations String array describing the Spring resource
+ descriptors making up the context. Unless the SetDirty() method
+ is called by a test, the context will not be reloaded, even across different
+ subclasses of this test. This is particularly beneficial if your context is
+ slow to construct, for example if you are using Hibernate and the time taken
+ to load the mappings is an issue.
+
+
If you don't want this behavior, you can override the ContextKey
+ property, most likely to return the test class. In conjunction with this you would
+ probably override the GetContext method, which by default loads
+ the locations specified by the ConfigLocations property.
+
+
WARNING: When doing integration tests from within VS.NET, only use
+ assembly resource URLs. Else, you may see misleading failures when changing
+ context locations.
+
+
+ Rod Johnson
+ Rob Harrop
+ Rick Evans
+ Aleksandar Seovic (.NET)
+
+
+
+ Superclass for NUnit test cases using a Spring context.
+
+
+
Maintains a cache of contexts by key. This has significant performance
+ benefit if initializing the context would take time. While initializing a
+ Spring context itself is very quick, some objects in a context, such as
+ a LocalSessionFactoryObject for working with NHibernate, may take time to
+ initialize. Hence it often makes sense to do that initializing once.
+
Normally you won't extend this class directly but rather extend one
+ of its subclasses.
+
+ Rod Johnson
+ Aleksandar Seovic (.NET)
+
+
+
+ Map of context keys returned by subclasses of this class, to
+ Spring contexts.
+
+
+
+
+ Static ctor to avoid "beforeFieldInit" problem.
+
+
+
+
+ Disposes any cached context instance and removes it from cache.
+
+
+
+
+ Indicates, whether context instances should be automatically registered with the global .
+
+
+
+
+ Logger available to subclasses.
+
+
+
+
+ Default constructor for AbstractSpringContextTests.
+
+
+
+
+ Set custom locations dirty. This will cause them to be reloaded
+ from the cache before the next test case is executed.
+
+
+ Call this method only if you change the state of a singleton
+ object, potentially affecting future tests.
+
+ Locations
+
+
+
+ Set context with dirty. This will cause
+ it to be reloaded from the cache before the next test case is executed.
+
+
+ Call this method only if you change the state of a singleton
+ object, potentially affecting future tests.
+
+ Locations
+
+
+
+ Returns true if context for the specified
+ is cached.
+
+ Context key to check.
+
+ true if context for the specified
+ is cached,
+ false otherwise.
+
+
+
+
+ Converts context key to string.
+
+
+ Subclasses can override this to return a string representation of
+ their contextKey for use in logging.
+
+ Context key to convert.
+
+ String representation of the specified . Null if
+ contextKey is null.
+
+
+
+
+ Caches application context.
+
+ Key to use.
+ Context to cache.
+
+
+
+ Returns cached context if present, or loads it if not.
+
+ Context key.
+ Spring application context associated with the specified key.
+
+
+
+ Loads application context from the specified resource locations.
+
+ Resources to load object definitions from.
+
+
+
+ Loads application context based on user-defined key.
+
+
+ Unless overriden by the user, this method will alway throw
+ a .
+
+ User-defined key.
+
+
+
+ Controls, whether application context instances will
+ be registered/unregistered with the global .
+ Defaults to true.
+
+
+
+
+ Application context this test will run against.
+
+
+
+
+ Holds names of the fields that should be used for field injection.
+
+
+
+
+ Default constructor for AbstractDependencyInjectionSpringContextTests.
+
+
+
+
+ Called to say that the "applicationContext" instance variable is dirty and
+ should be reloaded. We need to do this if a test has modified the context
+ (for example, by replacing an object definition).
+
+
+
+
+ Test setup method.
+
+
+
+
+ Inject dependencies into 'this' instance (that is, this test instance).
+
+
+
The default implementation populates protected variables if the
+ property is set, else
+ uses autowiring if autowiring is switched on (which it is by default).
+
You can certainly override this method if you want to totally control
+ how dependencies are injected into 'this' instance.
+
+
+
+
+ Loads application context from the specified resource locations.
+
+ Resources to load object definitions from.
+
+
+
+ Retrieves the names of the fields that should be used for field injection.
+
+
+
+
+ Injects protected fields using Field Injection.
+
+
+
+
+ Called right before a field is being injected
+
+
+
+
+ Subclasses can override this method in order to
+ add custom test setup logic after the context has been created and dependencies injected.
+ Called from this class's [SetUp] method.
+
+
+
+
+ Test teardown method.
+
+
+
+
+ Subclasses can override this method in order to
+ add custom test teardown logic. Called from this class's [TearDown] method.
+
+
+
+
+ Gets or sets a flag specifying whether to populate protected
+ variables of this test case.
+
+
+ A flag specifying whether to populate protected variables of this test case.
+ Default is false.
+
+
+
+
+ Gets or sets the autowire mode for test properties set by Dependency Injection.
+
+
+ The autowire mode for test properties set by Dependency Injection.
+ The default is .
+
+
+
+
+ Gets or sets a flag specifying whether or not dependency checking
+ should be performed for test properties set by Dependency Injection.
+
+
+
A flag specifying whether or not dependency checking
+ should be performed for test properties set by Dependency Injection.
+
The default is true, meaning that tests cannot be run
+ unless all properties are populated.
+
+
+
+
+ Gets the current number of context load attempts.
+
+
+
+
+ Gets a key for this context. Usually based on config locations, but
+ a subclass overriding buildContext() might want to return its class.
+
+
+
+
+ Subclasses must implement this property to return the locations of their
+ config files. A plain path will be treated as a file system location.
+
+ An array of config locations
+
+
+
+ Subclass of AbstractTransactionalSpringContextTests that adds some convenience
+ functionality for ADO.NET access. Expects a IDbProvider object
+ to be defined in the Spring application context.
+
+
+ This class exposes a AdoTemplate and provides an easy way to delete from the
+ database in a new transaction.
+
+ Rod Johnson
+ Juergen Hoeller
+ Mark Pollack (.NET)
+
+
+
+ Convenient superclass for tests that should occur in a transaction, but normally
+ will roll the transaction back on the completion of each test.
+
+
+
This is useful in a range of circumstances, allowing the following benefits:
+
+
Ability to delete or insert any data in the database, without affecting other tests
+
Providing a transactional context for any code requiring a transaction
+
Ability to write anything to the database without any need to clean up.
+
+
+
This class is typically very fast, compared to traditional setup/teardown scripts.
+
+
If data should be left in the database, call the SetComplete()
+ method in each test. The "DefaultRollback" property, which defaults to "true",
+ determines whether transactions will complete by default.
+
+
It is even possible to end the transaction early; for example, to verify lazy
+ loading behavior of an O/R mapping tool. (This is a valuable away to avoid
+ unexpected errors when testing a web UI, for example.) Simply call the
+ endTransaction() method. Execution will then occur without a
+ transactional context.
+
+
The StartNewTransaction() method may be called after a call to
+ EndTransaction() if you wish to create a new transaction, quite
+ independent of the old transaction. The new transaction's default fate will be to
+ roll back, unless setComplete() is called again during the scope of the
+ new transaction. Any number of transactions may be created and ended in this way.
+ The final transaction will automatically be rolled back when the test case is
+ torn down.
+
+
Transactional behavior requires a single object in the context implementing the
+ IPlatformTransactionManager interface. This will be set by the superclass's
+ Dependency Injection mechanism. If using the superclass's Field Injection mechanism,
+ the implementation should be named "transactionManager". This mechanism allows the
+ use of this superclass even when there's more than one transaction manager in the context.
+
+
This superclass can also be used without transaction management, if no
+ IPlatformTransactionManager object is found in the context provided. Be careful about
+ using this mode, as it allows the potential to permanently modify data.
+ This mode is available only if dependency checking is turned off in
+ the AbstractDependencyInjectionSpringContextTests superclass. The non-transactional
+ capability is provided to enable use of the same subclass in different environments.
+
+
+
+ Rod Johnson
+ Juergen Hoeller
+ Rick Evans
+ Mark Pollack (.NET)
+
+
+
+ The transaction manager to use
+
+
+
+
+ Should we roll back by default?
+
+
+
+
+ Should we commit the current transaction?
+
+
+
+
+ Number of transactions started
+
+
+
+
+ Default transaction definition is used.
+ Subclasses can change this to cause different behaviour.
+
+
+
+
+ TransactionStatus for this test. Typical subclasses won't need to use it.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Prevents the transaction.
+
+
+
+
+ Creates a transaction
+
+
+
+
+ Callback method called before transaction is setup.
+
+
+
+
+ Callback method called after transaction is setup.
+
+
+
+
+ rollback the transaction.
+
+
+
+
+ Callback before rolling back the transaction.
+
+
+
+
+ Callback after rolling back the transaction.
+
+
+
+
+ Set the complete flag..
+
+
+
+
+ Ends the transaction.
+
+
+
+
+ Starts the new transaction.
+
+
+
+
+ Sets the transaction manager to use.
+
+
+
+
+ Sets the default rollback flag.
+
+
+
+
+ Set the to be used
+
+
+ Defaults to
+
+
+
+
+ Holds the that this base class manages
+
+
+
+
+ Did this test delete any tables? If so, we forbid transaction completion,
+ and only allow rollback.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Convenient method to delete all rows from these tables.
+ Calling this method will make avoidance of rollback by calling
+ SetComplete() impossible.
+
+
+
+
+
+ Overridden to prevent the transaction committing if a number of tables have been
+ cleared, as a defensive measure against accidental permanent wiping of a database.
+
+
+
+
+ Counts the rows in given table.
+
+ Name of the table to count rows in.
+ The number of rows in the table
+
+
+
+ Execute the given SQL script using
+
+
+
+
+
+
+
+ Sets the DbProvider, via Dependency Injection.
+
+ The IDbProvider.
+
+
+
+ Gets or sets the AdoTemplate that this base class manages.
+
+ The ADO template.
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.Extensions.dll b/Resources/Libraries/Spring.NET/Spring.Web.Extensions.dll
new file mode 100644
index 00000000..dc8b5e7c
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Web.Extensions.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.Extensions.pdb b/Resources/Libraries/Spring.NET/Spring.Web.Extensions.pdb
new file mode 100644
index 00000000..58d59a5e
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Web.Extensions.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.Extensions.xml b/Resources/Libraries/Spring.NET/Spring.Web.Extensions.xml
new file mode 100644
index 00000000..c2970ec2
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Web.Extensions.xml
@@ -0,0 +1,50 @@
+
+
+
+ Spring.Web.Extensions
+
+
+
+
+ An implementation that
+ creates a handler object for either ASP.NET AJAX 1.0 or Spring web services.
+
+ Bruno Baia
+ Thomas Broyer
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Retrieves an instance of the
+ implementation for handling web service requests
+ for both Spring and ASP.NET AJAX 1.0 web services.
+
+ The current HTTP context.
+ The type of HTTP request (GET or POST).
+ The url of the web service.
+ The physical application path for the web service.
+ The web service handler object.
+
+
+
+ Enables a factory to reuse an existing handler instance.
+
+ The object to reuse.
+
+
+
+ Create a handler instance for the given URL.
+
+ the application context corresponding to the current request
+ The instance for this request.
+ The HTTP data transfer method (GET, POST, ...)
+ The requested .
+ The physical path of the requested resource.
+ A handler instance for the current request.
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.Mvc.dll b/Resources/Libraries/Spring.NET/Spring.Web.Mvc.dll
new file mode 100644
index 00000000..7da13f5d
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Web.Mvc.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.Mvc.pdb b/Resources/Libraries/Spring.NET/Spring.Web.Mvc.pdb
new file mode 100644
index 00000000..b7793de1
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Web.Mvc.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.Mvc.xml b/Resources/Libraries/Spring.NET/Spring.Web.Mvc.xml
new file mode 100644
index 00000000..ab89632b
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Web.Mvc.xml
@@ -0,0 +1,260 @@
+
+
+
+ Spring.Web.Mvc
+
+
+
+
+ Application Context for ASP.NET MVC Applications
+
+
+
+
+ Create a new MvcApplicationContext, loading the definitions
+ from the given XML resource.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ Names of configuration resources.
+
+
+
+ Create a new MvcApplicationContext with the given parent,
+ loading the definitions from the given XML resources.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ The parent context.
+ Names of configuration resources.
+
+
+
+ Initializes a new instance of the class.
+
+ The args.
+
+
+
+ Create a new MvcApplicationContext, loading the definitions
+ from the given XML resource.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ Names of configuration resources.
+ Configuration resources.
+
+
+
+ Create a new MvcApplicationContext, loading the definitions
+ from the given XML resource.
+
+ Names of configuration resources.
+
+
+
+ An array of resource locations, referring to the XML object
+ definition files that this context is to be built with.
+
+
+
+
+ Examples of the format of the various strings that would be
+ returned by accessing this property can be found in the overview
+ documentation of with the
+ class.
+
+
+
+ An array of resource locations, or if none.
+
+
+
+
+ An array of resources that this context is to be built with.
+
+
+
+
+ Examples of the format of the various strings that would be
+ returned by accessing this property can be found in the overview
+ documentation of with the
+ class.
+
+
+
+ An array of s, or if none.
+
+
+
+
+ Encapsulates arguments to the class.
+
+
+
+
+ Initializes a new instance of the MvcApplicationContextArgs class.
+
+
+
+
+ Initializes a new instance of the MvcApplicationContextArgs class.
+
+ The name.
+ The parent context.
+ The configuration locations.
+ The configuration resources.
+
+
+
+ Initializes a new instance of the MvcApplicationContextArgs class.
+
+ The name.
+ The parent context.
+ The configuration locations.
+ The configuration resources.
+ if set to true [case sensitive].
+
+
+
+ Context Handler for ASP.NET MVC Applications
+
+
+
+
+ The of
+ created if no type attribute is specified on a context element.
+
+
+
+
+
+ Get the context's case-sensitivity to use if none is specified
+
+
+
+
+ Derived handlers may override this property to change their default case-sensitivity.
+
+
+ Defaults to 'true'.
+
+
+
+
+
+ ActionInvoker implementation that enables the to satisfy dependencies on ActionFilter attributes.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The IApplicationContext.
+
+
+
+ Retrieves information about the action filters.
+
+ The controller context.
+ The action descriptor.
+ Information about the action filters.
+
+
+
+ Controller Factory for ASP.NET MVC
+
+
+
+
+ Creates the specified controller by using the specified request context.
+
+ The context of the HTTP request, which includes the HTTP context and route data.
+ The name of the controller.
+ A reference to the controller.
+ The parameter is null.
+ The parameter is null or empty.
+
+
+
+ Retrieves the controller instance for the specified request context and controller type.
+
+ The context of the HTTP request, which includes the HTTP context and route data.
+ The type of the controller.
+ The controller instance.
+
+ is null.
+
+ cannot be assigned.
+ An instance of cannot be created.
+
+
+
+ Adds the action invoker to the controller instance.
+
+ The controller.
+
+
+
+ Gets the application context.
+
+ The application context.
+
+
+
+ Gets or sets the name of the application context.
+
+
+ Defaults to using the root (default) Application Context.
+
+ The name of the application context.
+
+
+
+ Spring.NET-specific HttpApplication for ASP.NET MVC integration.
+
+
+
+
+ Handles the Start event of the Application control.
+
+ The source of the event.
+ The instance containing the event data.
+
+
+
+ Configures the instance.
+
+
+ You must override this method in a derived class to control the manner in which the
+ is configured.
+
+
+
+
+ Executes custom initialization code after all event handler modules have been added.
+
+
+
+
+ Registers the areas.
+
+
+ Override this method in a derived class to modify the registered areas as neeeded.
+
+
+
+
+ Registers the routes.
+
+
+ Override this method in a derived class to modify the registered routes as neeeded.
+
+
+
+
+ Registers the controller factory with the Mvc Framework.
+
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.Mvc3.dll b/Resources/Libraries/Spring.NET/Spring.Web.Mvc3.dll
new file mode 100644
index 00000000..bcfcaf1b
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Web.Mvc3.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.Mvc3.pdb b/Resources/Libraries/Spring.NET/Spring.Web.Mvc3.pdb
new file mode 100644
index 00000000..db6a077d
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Web.Mvc3.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.Mvc3.xml b/Resources/Libraries/Spring.NET/Spring.Web.Mvc3.xml
new file mode 100644
index 00000000..62def68b
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Web.Mvc3.xml
@@ -0,0 +1,218 @@
+
+
+
+ Spring.Web.Mvc3
+
+
+
+
+ Application Context for ASP.NET MVC Applications
+
+
+
+
+ Create a new MvcApplicationContext, loading the definitions
+ from the given XML resource.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ Names of configuration resources.
+
+
+
+ Create a new MvcApplicationContext with the given parent,
+ loading the definitions from the given XML resources.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ The parent context.
+ Names of configuration resources.
+
+
+
+ Initializes a new instance of the class.
+
+ The args.
+
+
+
+ Create a new MvcApplicationContext, loading the definitions
+ from the given XML resource.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ Names of configuration resources.
+ Configuration resources.
+
+
+
+ Create a new MvcApplicationContext, loading the definitions
+ from the given XML resource.
+
+ Names of configuration resources.
+
+
+
+ An array of resource locations, referring to the XML object
+ definition files that this context is to be built with.
+
+
+
+
+ Examples of the format of the various strings that would be
+ returned by accessing this property can be found in the overview
+ documentation of with the
+ class.
+
+
+
+ An array of resource locations, or if none.
+
+
+
+
+ An array of resources that this context is to be built with.
+
+
+
+
+ Examples of the format of the various strings that would be
+ returned by accessing this property can be found in the overview
+ documentation of with the
+ class.
+
+
+
+ An array of s, or if none.
+
+
+
+
+ Encapsulates arguments to the class.
+
+
+
+
+ Initializes a new instance of the MvcApplicationContextArgs class.
+
+
+
+
+ Initializes a new instance of the MvcApplicationContextArgs class.
+
+ The name.
+ The parent context.
+ The configuration locations.
+ The configuration resources.
+
+
+
+ Initializes a new instance of the MvcApplicationContextArgs class.
+
+ The name.
+ The parent context.
+ The configuration locations.
+ The configuration resources.
+ if set to true [case sensitive].
+
+
+
+ Context Handler for ASP.NET MVC Applications
+
+
+
+
+ Spring.NET-specific HttpApplication for ASP.NET MVC integration.
+
+
+
+
+ Executes custom initialization code after all event handler modules have been added.
+
+
+
+
+ Handles the BeginRequest event of the Application control.
+
+ The source of the event.
+ The instance containing the event data.
+
+
+
+ Builds the dependency resolver.
+
+ The instance.
+ You must override this method in a derived class to control the manner in which the
+ is created.
+
+
+
+ Configures the instance.
+
+
+ You must override this method in a derived class to control the manner in which the
+ is configured.
+
+
+
+
+ Registers the DependencyResolver implementation with the MVC runtime.
+
+ You must override this method in a derived class to control the manner in which the
+ is registered.
+
+
+
+
+
+ Thread-safe class that ensures that the is registered only once.
+
+
+
+
+ Registers the specified resolver.
+
+ The resolver.
+
+
+
+ Spring-based implementation of the interface.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The context.
+
+
+
+ Resolves singly registered services that support arbitrary object creation.
+
+ The type of the requested service or object.
+ The requested service or object.
+
+
+
+ Resolves multiply registered services.
+
+ The type of the requested services.
+ The requested services.
+
+
+
+ Gets the application context.
+
+ The application context.
+
+
+
+ Gets or sets the name of the application context.
+
+
+ Defaults to using the root (default) Application Context.
+
+ The name of the application context.
+
+
+
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.dll b/Resources/Libraries/Spring.NET/Spring.Web.dll
new file mode 100644
index 00000000..c9b1c7e9
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Web.dll differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.pdb b/Resources/Libraries/Spring.NET/Spring.Web.pdb
new file mode 100644
index 00000000..0cbd7e57
Binary files /dev/null and b/Resources/Libraries/Spring.NET/Spring.Web.pdb differ
diff --git a/Resources/Libraries/Spring.NET/Spring.Web.xml b/Resources/Libraries/Spring.NET/Spring.Web.xml
new file mode 100644
index 00000000..91d4d3bd
--- /dev/null
+++ b/Resources/Libraries/Spring.NET/Spring.Web.xml
@@ -0,0 +1,9254 @@
+
+
+
+ Spring.Web
+
+
+
+
+ An implementation backed by ASP.NET Cache (see ).
+
+
+
+ Because ASP.NET Cache uses strings as cache keys, you need to ensure
+ that the key object type has properly implemented ToString method.
+
+
+ Despite the shared underlying , it is possible to use more than
+ one instance of without interfering each other.
+
+
+ Aleksandar Seovic
+ Erich Eichinger
+
+
+
+ Initializes a new instance of
+
+
+
+
+ Initializes a new instance of
+ with the specified implementation.
+
+
+
+
+
+ Retrieves an item from the cache.
+
+
+ Item key.
+
+
+ Item for the specified , or null.
+
+
+
+
+ Removes an item from the cache.
+
+
+ Item key.
+
+
+
+
+ Inserts an item into the cache.
+
+
+ Items inserted using this method have default and default
+
+
+ Item key.
+
+
+ Item value.
+
+
+ Item's time-to-live (TTL).
+
+
+
+
+ Inserts an item into the cache.
+
+
+ Item key.
+
+
+ Item value.
+
+
+ Item's time-to-live.
+
+
+ Flag specifying whether the item's time-to-live should be reset
+ when the item is accessed.
+
+
+
+
+ Inserts an item into the cache.
+
+
+ Item key.
+
+
+ Item value.
+
+
+ Item's time-to-live.
+
+
+ Flag specifying whether the item's time-to-live should be reset
+ when the item is accessed.
+
+
+ Item priority.
+
+
+
+
+ Generate a key to be used for the underlying implementation.
+
+
+
+
+
+
+ Gets/Sets a flag, whether to use sliding expiration policy.
+
+
+
+
+ Gets/Sets a default priority to be applied to all items inserted into this cache.
+
+
+
+
+ Gets a collection of all cache item keys.
+
+
+
+
+ Abstracts the underlying runtime cache
+
+
+
+
+ Insert an item into the cache.
+
+
+
+
+ Removes an item from the cache.
+
+ The key of the item to remove
+ The object that has been removed from the cache
+
+
+
+ Retrieve an item with the specified key from the cache.
+
+ The key of the item to be retrieved
+ The item, if found. null otherwise
+
+
+
+ Actually delegates all calls to the underlying
+
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ Holds shared application Template
+
+
+
+
+ Holds shared modules Templates
+
+
+
+
+ Configures the instance and its modules.
+
+
+ When called, configures using the instance
+ provided in and the templates available in
+ and .
+
+ the application context instance to be used for resolving object references.
+ the instance to be configured.
+
+
+
+ Gets or Sets the shared application template
+
+
+
+
+ Gets the dictionary of shared module templates
+
+
+ to synchronize access to the dictionary, use property.
+
+
+
+
+ Web application context, taking the context definition files
+ from the file system or from URLs.
+
+ Treats resource paths as web resources, when using
+ IApplicationContext.GetResource. Resource paths are considered relative
+ to the virtual directory.
+
+ Note: In case of multiple config locations, later object definitions will
+ override ones defined in earlier loaded files. This can be leveraged to
+ deliberately override certain object definitions via an extra XML file.
+
+ Aleksandar Seovic
+
+
+
+ Create a new WebApplicationContext, loading the definitions
+ from the given XML resource.
+
+ Names of configuration resources.
+
+
+
+ Create a new WebApplicationContext, loading the definitions
+ from the given XML resource.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ Names of configuration resources.
+
+
+
+ Create a new WebApplicationContext, loading the definitions
+ from the given XML resource.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ Names of configuration resources.
+ Configuration resources.
+
+
+
+ Create a new WebApplicationContext with the given parent,
+ loading the definitions from the given XML resources.
+
+ The application context name.
+ Flag specifying whether to make this context case sensitive or not.
+ The parent context.
+ Names of configuration resources.
+
+
+
+ Initializes a new instance of the class.
+
+ The args.
+
+
+
+ returns detailed instance information for debugging
+
+
+
+
+
+ Since the HttpRuntime discards it's configurationsection cache, we maintain our own context cache.
+ Despite it really speeds up context-lookup, since we don't have to go through the whole HttpConfigurationSystem
+
+
+
+
+ EventHandler for ContextRegistry.Cleared event. Discards webContextCache.
+
+
+
+
+ Returns the root context of this web application
+
+
+
+
+ Returns the web application context for the given (absolute!) virtual path
+
+
+
+
+ Initializes object definition reader.
+
+ Reader to initialize.
+
+
+
+ Creates web object factory for this context using parent context's factory as a parent.
+
+ Web object factory to use.
+
+
+
+ Returns the application-relative virtual path of this context (without leading '~'!).
+
+
+
+
+
+ Create a reader instance capable of handling web objects (Pages,Controls) for importing o
+ bject definitions into the specified .
+
+
+
+
+ Returns the web application context for the current request's filepath
+
+
+
+
+ An array of resource locations, referring to the XML object
+ definition files with which this context is to be built.
+
+
+ An array of resource locations, or if none.
+
+
+
+
+
+ An array of resources instances with which this context is to be built.
+
+
+ An array of s, or if none.
+
+
+
+
+
+ Encapsulates arguments to the class.
+
+
+
+
+ Initializes a new instance of the WebApplicationContextArgs class.
+
+
+
+
+ Initializes a new instance of the WebApplicationContextArgs class.
+
+ The name.
+ The parent context.
+ The configuration locations.
+ The configuration resources.
+
+
+
+ Initializes a new instance of the WebApplicationContextArgs class.
+
+ The name.
+ The parent context.
+ The configuration locations.
+ The configuration resources.
+ if set to true [case sensitive].
+
+
+
+ Creates an instance
+ using context definitions supplied in a custom configuration and
+ configures the with that instance.
+
+
+ This class extends ContextHandler with
+ web specific behaviour. It uses WebApplicationContext
+ as default Context-Type.
+
+ Erich Eichinger
+
+
+
+ Gets the context name from the given
+
+
+
+
+ Throws a configuration exception, if child contexts are specified.
+
+
+ Nesting contexts in webapplications is done by explicitly declaring
+ spring context sections for each directory.
+
+
+
+
+ Handles web specific details of context instantiation.
+
+
+
+
+ Sets default context type to
+
+
+
+
+ Sets default case-sensitivity to 'false' for web-applications
+
+
+
+
+ Provides various support for proper handling requests.
+
+ Erich Eichinger
+
+
+
+ Identifies the Objectdefinition used for the current IHttpHandler instance in TLS
+
+
+
+
+ For webapplications always
+
+
convert IResources using the current context.
+
use "web" as default resource protocol
+
use as default threading storage
+
+
+
+
+
+ Registers this module for all events required by the Spring.Web framework
+
+
+
+
+ Configures the current IHttpHandler as specified by .
+
+
+
+
+ Configures the specified handler instance using the object definition .
+
+
+ TODO
+
+
+
+
+
+
+
+
+
+
+ TODO
+
+
+
+
+
+
+
+ TODO
+
+
+
+
+
+
+
+
+ Disposes this instance
+
+
+
+
+ Holds the handler configuration information.
+
+
+
+
+ implementation specifically
+ for resources served up from a web server.
+
+
+
+ Uses the System.Web.HttpContext.Current.Server.MapPath
+ method to resolve the file name for a given resource.
+
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the class.
+
+
+ The name of the file system resource (on the server).
+
+
+
+
+ Resolves the handle
+ for the supplied .
+
+
+ The name of the file system resource.
+
+
+ The handle for this resource.
+
+
+
+
+ Resolves the root location for the supplied .
+
+
+ The name of the file system resource.
+
+
+ The root location of the resource.
+
+
+
+
+ Resolves the path for the supplied .
+
+
+ The name of the file system resource.
+
+
+ The current path of the resource.
+
+
+
+
+ Resolves the presence of the
+ value
+ in the supplied into a path.
+
+
+ The name of the resource.
+
+
+ The string that is a placeholder for a base path.
+
+
+ The name of the resource with any
+ value having been resolved into an actual path.
+
+
+
+
+ Does the supplied relative ?
+
+
+ The name of the resource to test.
+
+
+ if resource name is relative;
+ otherwise .
+
+
+
+
+ Factory Method. Create a new instance of the current resource type using the given resourceName
+
+
+
+
+ The ResourceLoader to be used for resolving relative resources
+
+
+
+
+ Gets those characters that are valid path separators for the
+ resource type.
+
+
+ Those characters that are valid path separators for the resource
+ type.
+
+
+
+
+
+ This formatter acts as an adapter to a datasource. It parses a given datasource into
+ a table to allow converting back and forth between objects and their keys during formatting.
+
+
+
+ The DataSourceItemFormatter expects the "source" to have 2 properties named "DataSourceField" and "DataValueField".
+
+
+
+
+
+
+
+
+
+
+ Sets the binding context of this formatter.
+
+
+
+
+
+
+
+
+ Clears the binding context of this formatter.
+
+
+
+
+ Initialize this instance.
+
+ The name of the "source"s property containing the dataSource
+ The name of the "source"s property containing the name of the key property
+
+
+
+ Sets the bindingContext for the current thread.
+
+ The source object
+ The target object
+ Variables to be used during binding
+ The current binding's direction
+
+
+
+ Reset the current thread's binding context.
+
+
+
+
+ Initialize a new instance.
+
+ The datasource containing list items
+ The name of the listitem's property that evaluates to the item's key
+ The direction of the current binding
+
+
+
+ Returns the key of the specified value object.
+
+ The value to extract the key from.
+ Key extracted from .
+
+
+
+ Return the object with the specified key from the datasource.
+
+ The key of the object.
+ Parsed .
+
+
+
+ Binds agroup of HTTP request multi-valued items to the data model.
+
+
+ Due to the fact, that browsers don't send the values of unchecked checkboxes, you
+ can't use for binding to checkboxes.
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of .
+
+
+ Comma separated list of multi-valued request parameters that
+ should be used to create a target item.
+
+
+ Expression that identifies a target list items should be added to.
+
+
+ The type of the target item.
+
+
+
+
+ Adds the binding.
+
+
+ This is a convinience method for adding SimpleExpressionBinding,
+ one of the most often used binding types, to the bindings list.
+
+
+ The source expression.
+
+
+ The target expression.
+
+
+ Binding direction.
+
+
+ to use for value formatting and parsing.
+
+
+ Added instance.
+
+
+
+
+ Binds source object to target object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ Binds target object to source object.
+
+
+ The source object.
+
+
+ The target object.
+
+
+ Validation errors collection that type conversion errors should be added to.
+
+
+ Variables that should be used during expression evaluation.
+
+
+
+
+ A page or control must implement this interface to support spring's databinding infrastructure.
+
+
+
+
+
+
+
+
+
+ Return the UniqueID of this page or control.
+
+
+
+
+ Return the where
+ instances should be optained from.
+
+
+
+
+ This event is raised to initialize bindings for .
+
+
+
+
+ Handles binding of a multiple selection ListControl to a target's IList property.
+
+
+
+
+ Creates a new instance of this binding.
+
+ The expression that will evaluate to the acting as the source
+ The expression that will evaluate to an property acting as the target
+ Binding's direction
+ An optional formatter converting target items into and back
+
+ If no formatter is specified, a will be used.
+
+
+
+
+ Actually performs unbinding the ListControl's selected values into the target's
+
+
+
+
+ Actually performs binding the targetlist to the ListControl.
+
+
+
+
+ Setting source value is not allowed in this bindingType.
+
+
+
+
+ Setting target value is not allowed in this bindingType.
+
+
+
+
+ Culture resolver that uses cookie to store culture information.
+
+ Aleksandar Seovic
+
+
+
+ Default culture resolver for web applications. Contains some common utility methods for web culture resolvers.
+
+ Aleksandar Seovic
+
+
+
+ Returns default culture. If property is not set,
+ it tries to get culture from the request headers
+ and falls back to a current thread's culture if no headers are available.
+
+ Default culture to use.
+
+
+
+ Extracts the users favorite language from "accept-language" header of the current request.
+
+ a language string if any or null, if no languages have been sent with the request
+
+
+
+ Resolves a culture by name.
+
+ the name of the culture to get
+ a (possible neutral!) or null, if culture could not be resolved
+
+
+
+ Resolves the culture from the context.
+
+ Culture that should be used to render view.
+
+
+
+ Not supported for this implementation.
+
+ The new culture or null to clear the culture.
+
+
+
+ Resolves the culture from the request.
+
+
+ If the culture cookie doesn't exist, this method will return
+ the value of the 'Accept-Language' request header, or if no
+ headers are specified, the culture of the current server thread.
+
+ Culture that should be used to render view.
+
+
+
+ Sets the culture.
+
+ The new culture or null to clear the culture.
+
+
+
+ Creates cookie for the specified culture.
+
+ Culture to store in a cookie.
+ Created cookie.
+
+
+
+ Culture resolver that uses request headers to determine culture. If no languages
+ are specified in the request headers, it returns default culture specifed, and
+ if no default culture was specifed it returns current culture for the executing
+ server thread.
+
+
+ Note: This culture resolver cannot be used to change the culture
+ because request headers cannot be modified. In order to change the culture
+ when using this culture resolver user has to change language settings in
+ the web browser.
+
+ Aleksandar Seovic
+
+
+
+ Tries to determine culture from the request headers. If no languages
+ are specified in the request headers, it returns default culture specifed, and
+ if no default culture was specifed it returns current culture for the executing
+ server thread.
+
+ Culture that should be used to render view.
+
+
+
+ Not supported for this resolver implementation
+
+ The new culture or null to clear the culture.
+
+
+
+ Culture resolver that uses HTTP session to store culture information.
+
+ Aleksandar Seovic
+
+
+
+ Resolves the culture from the request.
+
+
+ If culture information doesn't exist in the session, it will be created and its value will
+ be set to the value of the 'Accept-Language' request header, or if no
+ headers are specified to the culture of the current server thread.
+
+ Culture that should be used to render view.
+
+
+
+ Sets the culture.
+
+ The new culture or null to clear the culture.
+
+
+
+ Gets/Sets the current session's culture.
+
+
+
+
+ Resource cache implementation that uses ASP.NET to cache resources.
+
+ Aleksandar Seovic
+
+
+
+ Gets the list of resources from cache.
+
+ Cache key to use for lookup.
+ A list of cached resources for the specified target object and culture.
+
+
+
+ Puts the list of resources in the cache.
+
+ Cache key to use for the specified resources.
+ A list of resources to cache.
+
+
+
+ Web object definitions extend
+ by adding scope property.
+
+
+
+ This is the most common type of object definition in ASP.Net web applications
+
+
+ Aleksandar Seovic
+
+
+
+ Defines additional members web object definitions need to implement.
+
+ Aleksandar Seovic
+
+
+
+ Gets or sets scope for the web object (application, session or request)
+
+
+
+
+ Returns true if web object is .aspx page.
+
+
+
+
+ Gets the rooted url of the .aspx page, if object definition represents page.
+
+
+
+
+ Creates a new instance of the
+ class
+ for a singleton, providing property values and constructor arguments.
+
+ Name of the parent object definition.
+ The class of the object to instantiate.
+
+ The
+ to be applied to a new instance of the object.
+
+
+ The to be applied to
+ a new instance of the object.
+
+
+
+
+ Creates a new instance of the
+ class
+ for a singleton, providing property values and constructor arguments.
+
+ Name of the parent object definition.
+ The class name of the object to instantiate.
+
+ The
+ to be applied to a new instance of the object.
+
+
+ The to be applied to
+ a new instance of the object.
+
+
+
+
+ Creates a new instance of the
+ class
+ for an .aspx page, providing property values.
+
+ Name of the parent object definition.
+ Name of the .aspx page to instantiate.
+
+ The to be applied to
+ a new instance of the object.
+
+
+
+
+ Overrides this object's values using values from other argument.
+
+ The object to copy values from.
+
+
+
+ A that represents the current
+ .
+
+
+ A that represents the current
+ .
+
+
+
+
+ Object scope.
+
+
+
+
+ Returns true if web object is .aspx page.
+
+
+
+
+ Gets the rooted url of the .aspx page, if object definition represents page.
+
+
+
+
+ Forces ASP pages to be treated as prototypes all the time inorder to comply with ASP.Net requirements.
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ Web object definitions extend
+ by adding scope property.
+
+
+
+ This is the most common type of object definition in ASP.Net web applications
+
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the
+ class
+ for a singleton, providing property values and constructor arguments.
+
+
+ The type of the object to instantiate.
+
+
+ The to be applied to
+ a new instance of the object.
+
+
+ The
+ to be applied to a new instance of the object.
+
+
+
+
+ Creates a new instance of the
+ class
+ for a singleton, providing property values and constructor arguments.
+
+
+ The assembly qualified of the object to instantiate.
+
+
+ The to be applied to
+ a new instance of the object.
+
+
+ The
+ to be applied to a new instance of the object.
+
+
+
+ Takes an object class name to avoid eager loading of the object class.
+
+
+
+
+
+ Creates a new instance of the
+ class
+ for an .aspx page, providing property values.
+
+
+ Name of the .aspx page to instantiate.
+
+
+ The to be applied to
+ a new instance of the object.
+
+
+
+
+ Creates a new instance of the
+ class
+
+
+ The definition that is to be copied.
+
+
+
+ Deep copy constructor.
+
+
+
+
+
+ Overrides this object's values using values from other argument.
+
+ The object to copy values from.
+
+
+
+ A that represents the current
+ .
+
+
+ A that represents the current
+ .
+
+
+
+
+ Object scope.
+
+
+
+
+ Returns true if web object is .aspx page.
+
+
+
+
+ Gets the rooted url of the .aspx page, if object definition represents page.
+
+
+
+
+ Forces ASP pages to be treated as prototypes all the time inorder to comply with ASP.Net requirements.
+
+
+
+
+ Object instantiation strategy for use in
+ .
+
+
+
+ This strategy checks if objects id ASP.Net page and if it is uses
+ PageParser to compile and instantiate page instance. Otherwise it
+ delagates call to its parent.
+
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Instantiate an instance of the object described by the supplied
+ from the supplied .
+
+
+ The definition of the object that is to be instantiated.
+
+
+ The name associated with the object definition. The name can be the null
+ or zero length string if we're autowiring an object that doesn't belong
+ to the supplied .
+
+
+ The owning
+
+
+ An instance of the object described by the supplied
+ from the supplied .
+
+
+
+
+ Custom implementation of
+ for web applications.
+
+
+
+ This implementation adds support for .aspx pages and scoped objects.
+
+
+ Aleksandar Seovic
+
+
+
+ Factory style method for getting concrete
+
+ instances.
+
+ If no parent is specified, a RootWebObjectDefinition is created, otherwise a
+ ChildWebObjectDefinition.
+ The of the defined object.
+ The name of the parent object definition (if any).
+ The against which any class names
+ will be resolved into instances.
+
+ An
+
+ instance.
+
+
+
+
+ Concrete implementation of
+ that knows
+ how to handle s.
+
+
+
+ This class should only be used within the context of an ASP.NET web application.
+
+
+ Aleksandar Seovic
+
+
+
+ Holds the virtual path this factory has been created from.
+
+
+
+
+ Holds the handler reference for creating an object dictionary
+ matching this factory's case-sensitivity
+
+
+
+
+ Registers events handlers with to ensure
+ proper disposal of 'request'- and 'session'-scoped objects
+
+
+
+
+ Creates a new instance of the
+ class.
+
+ The virtual path resources will be relative resolved to.
+ Flag specifying whether to make this object factory case sensitive or not.
+
+
+
+ Creates a new instance of the
+ class.
+
+ The virtual path resources will be relative resolved to.
+ Flag specifying whether to make this object factory case sensitive or not.
+
+ The parent object factory.
+
+
+
+
+ Creates a dictionary matching this factory's case sensitivity behaviour.
+
+
+
+
+ Creates the root object definition.
+
+ The template definition.
+ Root object definition.
+
+
+
+ Tries to find cached object for the specified name.
+
+
+ This implementation tries to find object first in the Request scope,
+ then in the Session scope and finally in the Application scope.
+
+ Object name to look for.
+ Cached object if found, null otherwise.
+
+
+
+ Looks up an in the specified cache dictionary.
+
+ the name to lookup.
+ the cache dictionary to search
+ the found instance. null otherwise
+
+
+
+ Creates a singleton instance for the specified object name and definition.
+
+
+ The object name (will be used as the key in the singleton cache key).
+
+ The object definition.
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a static factory method. It is invalid to use a non-null arguments value
+ in any other case.
+
+ The created object instance.
+
+
+
+ Creates a singleton instance for the specified object name and definition
+ and caches the instance in the specified dictionary
+
+
+ The object name (will be used as the key in the singleton cache key).
+
+ The object definition.
+
+ The arguments to use if creating a prototype using explicit arguments to
+ a static factory method. It is invalid to use a non-null arguments value
+ in any other case.
+
+ the dictionary to be used for caching singleton instances
+ The created object instance.
+
+ If the object is successfully created,
+ contains the cached instance with the key .
+
+
+
+
+ Add the created, but yet unpopulated singleton to the singleton cache
+ to be able to resolve circular references
+
+ the name of the object to add to the cache.
+ the definition used to create and populated the object.
+ the raw object instance.
+
+ Derived classes may override this method to select the right cache based on the object definition.
+
+
+
+
+ Remove the specified singleton from the singleton cache that has
+ been added before by a call to
+
+ the name of the object to remove from the cache.
+ the definition used to create and populated the object.
+
+ Derived classes may override this method to select the right cache based on the object definition.
+
+
+
+
+ Configures object instance by injecting dependencies, satisfying Spring lifecycle
+ interfaces and applying object post-processors.
+
+
+ The name of the object definition expressing the dependencies that are to
+ be injected into the supplied instance.
+
+
+ An object definition that should be used to configure object.
+
+
+ A wrapped object instance that is to be so configured.
+
+
+
+
+
+ Disposes all 'request'-scoped objects at the end of each Request
+
+
+
+
+ Disposes all 'session'-scoped objects at the end of a session
+
+
+
+
+ Creates a case insensitive hashtable instance
+
+
+
+
+ Creates a case sensitive hashtable instance
+
+
+
+
+ Returns the virtual path this object factory is associated with.
+
+
+
+
+ Convinience accessor for HttpContext
+
+
+
+
+ Get the table of 'request'-scoped objects.
+
+
+
+
+ Get the table of 'session'-scoped objects. Returns null, if Session is disabled.
+
+
+
+
+ Miscellaneous utility methods to support web functionality within Spring.Objects
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the class.
+
+
+
+ This is a utility class, and as such exposes no public constructors.
+
+
+
+
+
+ Creates an instance of the ASPX page
+ referred to by the supplied .
+
+
+ The URL of the ASPX page.
+
+ Page instance.
+
+ If this method is not called in the scope of an active web session
+ (i.e. the implementation this method depends on this code executing
+ in the environs of a running web server such as IIS); or if the
+ page could not be instantiated (for whatever reason, such as the
+ ASPX not actually existing).
+
+
+
+
+ Creates the raw handler instance without any exception handling
+
+
+
+
+
+
+ Returns the of the ASPX page
+ referred to by the supplied .
+
+
+
+ As indicated by the exception that can be thrown by this method,
+ the ASPX page referred to by the supplied
+ does have to be instantiated in order to determine its
+ see cref="System.Type"/>
+
+
+
+ The filename of the ASPX page.
+
+
+ The of the ASPX page
+ referred to by the supplied .
+
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+
+ If this method is not called in the scope of an active web session
+ (i.e. the implementation this method depends on this code executing
+ in the environs of a running web server such as IIS); or if the
+ page could not be instantiated (for whatever reason, such as the
+ ASPX not actually existing).
+
+
+
+
+ Calls the underlying ASP.NET infrastructure to obtain the compiled page type
+ relative to the current .
+
+
+ The filename of the ASPX page relative to the current
+
+
+ The of the ASPX page
+ referred to by the supplied .
+
+
+
+
+ Gets the controls type from a given filename
+
+
+
+
+ An capable of handling web objects (Pages,Controls).
+
+ Erich Eichinger
+
+
+
+ Creates an instance for the given
+ and element.
+
+
+
+
+ An capable of handling web objects (Pages,Controls)
+
+ Erich Eichinger
+
+
+
+ Initializes a new instance of the class.
+
+ used for generating object definition names from web object types (page, control)
+ The reader context.
+ The root element of the xml document to parse
+
+
+
+ Gets the scope out of the supplied .
+
+
+
+ If the supplied is invalid
+ (i.e. it does not resolve to one of the
+ values),
+ then the return value of this method call will be
+ ;
+ no exception will be raised (although the value of the invalid
+ scope will be logged).
+
+
+ The string containing the scope name.
+ The scope.
+
+
+
+
+ An capable of handling web object definitions (Pages, Controls)
+
+ Erich Eichinger
+
+
+
+ Creates a new instance of the
+ class.
+
+ the (rooted) virtual path to resolve relative virtual paths.
+
+ The
+ instance that this reader works on.
+
+ the to use for resolving entities.
+
+
+
+ Creates the to use for actually
+ reading object definitions from an XML document.
+
+
+
+
+ Create an object definition name for the given control path
+
+
+
+
+ Create an object definition name for the given page path
+
+
+
+
+ A custom implementation of the
+
+ interface that properly handles web application specific attributes,
+ such as object scope.
+
+
+
+ Parses object definitions according to the standard Spring.NET schema.
+
+
+ Aleksandar Seovic
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Implements by using .
+
+ Erich Eichinger
+
+
+
+ Retrieves an object with the specified name.
+
+ The name of the item.
+ The object in the context associated with the specified name or null if no object has been stored previously
+
+
+
+ Stores a given object and associates it with the specified name.
+
+ The name with which to associate the new item.
+ The object to store in the call context.
+
+
+
+ Empties a data slot with the specified name.
+
+ The name of the data slot to empty.
+
+
+
+ Implements by using both and and choosing dynamically between them.
+
+
+ In web applications a single Request may be executed on different threads. In this case HttpContext.Current is the only invariant.
+ This implementation dynamically chooses between System.Runtime.Remoting.Messaging.CallContext
+ and System.Web.HttpContext to store data.
+
+ Erich Eichinger
+
+
+
+ Retrieves an object with the specified name.
+
+ The name of the item.
+ The object in the context associated with the specified name or null if no object has been stored previously
+
+
+
+ Stores a given object and associates it with the specified name.
+
+ The name with which to associate the new item.
+ The object to store in the call context.
+
+
+
+ Empties a data slot with the specified name.
+
+ The name of the data slot to empty.
+
+
+
+ Performs a . Original path will be restored on
+
+
+ Rewrites the current HttpContext's filepath to <directory>/currentcontext.dummy.
+ This affects resolving resources by calls to and
+ Original path is restored during .
+
+
+
+ using( new HttpContextSwitch( "/path" ) )
+ {
+ Response.Write( Request.FilePath ); // writes "/path/currentcontext.dummy" to response.
+ }
+ // Request.FilePath has been reset to original url here
+
+
+ Erich Eichinger
+
+
+
+ Performs an immediate call to
+
+ a directory path (without trailing filename!)
+
+
+
+ Restores original path if necessary
+
+
+
+
+ Abstracts HttpSession
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Abstracts the underlying infrastructure of a HttpRequest
+
+
+
+
+ Maps a virtual path to it's physical location
+
+
+
+
+ Rewrites the , thus also affecting
+
+
+
+
+ Get the compiled type for the given virtual path
+
+ the absolute (=rooted) virtual path
+
+
+
+
+ Creates an instance from the given virtual path
+
+ the absolute (=rooted) virtual path
+ the required base type
+
+
+
+ The virtual (rooted) path of the current Application with trailing slash
+
+
+ For the site rooted applications, "/" will be returned, for all others "/..someappdir../"
+
+
+
+
+ The virtual (rooted) path of the current Request including
+
+
+
+
+ The virtual (rooted) path of the current Request without trailing
+
+
+
+
+ The virtual (rooted) path of the currently executing script
+
+
+ Normally this property is the same as .
+ In case of , this property returns the current script
+ whereas CurrentVirtualPath returns the original script path.
+
+
+
+
+ The query parameters
+
+
+
+
+ Returns the current Session's variable dictionary
+
+
+
+
+ Returns the current Request's variable dictionary
+
+
+
+
+ Returns the current Request's parameter dictionary
+
+
+
+
+ Utility class to be used from within this assembly for executing security critical code
+ NEVER EVER MAKE THIS PUBLIC!
+
+ Erich Eichinger
+
+
+
+ Provides platform independent access to HttpRuntime methods
+
+
+ For e.g. testing purposes, the default environment implementation may be replaced using .
+
+ Erich Eichinger
+
+
+
+ Replaces the current enviroment implementation.
+
+ the new environment implementation to be used
+ the previously set environment instance
+
+
+
+ Maps a virtual path to it's physical location
+
+
+
+
+ Rewrites the , thus also affecting
+
+
+
+
+ Returns an instance of the specified file.
+
+
+
+
+ Returns an the compiled type of the specified file.
+
+
+
+
+ Receives EndRequest-event from an instance
+ and dispatches it to all handlers registered with this module.
+
+ the HttpApplication instance sending this event
+ always
+
+
+
+ Receives the EndSession-event and dispatches it to all handlers
+ registered with this module.
+
+
+
+
+ Signals, that VirtualEnvironment is ready to accept
+ handler registrations for EndRequest and EndSession events
+
+
+
+
+ Ensures, that WebSupportModule has been initialized. Otherwise an exception is thrown.
+
+
+
+
+ The virtual (rooted) path of the current Application containing a leading '/' as well as a trailing '/'
+
+
+
+
+ The virtual (rooted) path of the current Request including
+
+
+
+
+ The virtual (rooted) path of the current Request including
+
+
+
+
+ The virtual (rooted) path of the current Request without trailing
+
+
+
+
+ The virtual (rooted) path of the currently executing script
+
+
+
+
+ The query parameters
+
+
+
+
+ Returns the current Request's variable dictionary ()
+
+
+
+
+ Returns the current Request's parameter dictionary ()
+
+
+
+
+ Register with this event to receive any EndRequest event occuring in the current AppDomain.
+
+
+
+
+ Register with this event to receive any EndSession event occuring in the current AppDomain
+
+
+ This event may be raised asynchronously on it's own thread.
+ Don't rely on e.g. being available.
+
+
+
+
+ Is this VirtualEnviroment ready to accept handler registrations
+ for EndRequest and EndSession events ?
+
+
+
+
+ Represents a method that handles Request related events
+
+
+
+
+ Represents a method that handles Session related events
+
+
+
+
+ Implementation for running within HttpRuntime
+
+
+
+
+ Miscellaneous web utility methods.
+
+ Aleksandar Seovic
+
+
+
+ Creates a new instance of the class.
+
+
+
+ This is a utility class, and as such exposes no public constructors.
+
+
+
+
+
+ Default protocol used for resolving resources in web applications
+
+
+
+
+ Extracts the bare ASPX page name without any extension from the
+ supplied .
+
+
+
+ Examples of what would be returned from this method given a url would be:
+
+
+ The full URL to the ASPX page.
+
+ The bare ASPX page name without any extension.
+
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+
+
+
+ Returns only the directory portion of a virtual path
+
+
+ The returned path is guaranteed to always have a leading and a trailing slash.
+ If a path does not end with a file-extension it is assumed to be a directory
+
+
+
+
+ Returns absolute path that can be referenced within plain HTML.
+
+
+
+ If relative path starts with '/' (forward slash), no concatenation will occur
+ and it will be assumed that the relative path specified is indeed the absolute path
+ and will be returned verbatim.
+
+ Otherwise, relative path will be appended to the application path, while making sure that
+ path separators are not duplicated between the paths.
+
+ Application path.
+ Relative path to combine with the application path.
+ Absolute path.
+
+
+
+ Combines a rooted base path with a relative path.
+
+ Must be a path starting with '/'
+ the path to be combined. May start with basepath Placeholder '~'
+ the combined path
+
+ If relativePath starts with '~', rootPath is ignored and '~' resolves to the current AppDomain's application virtual path
+ If relativePath start with '/', rootPath is ignored and relativePath is returned as-is.
+
+
+
+
+ Gets the application-relative virtual path portion of the given absolute URL.
+
+ the absolute url
+ the url relative to the current application's virtual path
+
+
+
+ Gets the virtual path portion of the given absolute URL
+ relative to the given base path.
+
+
+ Base path comparison is done case insensitive.
+
+ the absolute base path
+ the absolute url
+ the url relative to the given basePath
+
+
+
+ Returns the 'logical' parent of the specified control. Technically when dealing with masterpages and control hierarchy,
+ the order goes controls->masterpage->page. But one often wants the more logical order controls->page->masterpage.
+
+ the control, who's parent is to be determined.
+ the logical parent or null if the top of the hierarchy is reached.
+ if is null
+
+
+
+ Encode for use in URLs.
+
+ the text to be encoded.
+ the url-encoded
+
+ This method may be used outside of a current request. If executed within a
+ request, is used.
+ will be used otherwise.
+
+
+
+
+ A spring configurable version of
+
+ Erich Eichinger
+
+
+
+ An Interface for class.
+
+ Damjan Tomic
+
+
+
+ Initializes the provider.
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+ The providerId attribute is mandatory.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ Adds a new membership user to the data source.
+
+
+
+ A object populated with the information for the newly created user.
+
+
+ Whether or not the new user is approved to be validated.
+ The password answer for the new user
+ The user name for the new user.
+ The unique identifier from the membership data source for the user.
+ The password for the new user.
+ The password question for the new user.
+ The e-mail address for the new user.
+ A enumeration value indicating whether the user was created successfully.
+
+
+
+ Processes a request to update the password question and answer for a membership user.
+
+
+
+ true if the password question and answer are updated successfully; otherwise, false.
+
+
+ The new password question for the specified user.
+ The new password answer for the specified user.
+ The user to change the password question and answer for.
+ The password for the specified user.
+
+
+
+ Gets the password for the specified user name from the data source.
+
+
+
+ The password for the specified user name.
+
+
+ The user to retrieve the password for.
+ The password answer for the user.
+
+
+
+ Processes a request to update the password for a membership user.
+
+
+
+ true if the password was updated successfully; otherwise, false.
+
+
+ The new password for the specified user.
+ The current password for the specified user.
+ The user to update the password for.
+
+
+
+ Resets a user's password to a new, automatically generated password.
+
+
+
+ The new password for the specified user.
+
+
+ The user to reset the password for.
+ The password answer for the specified user.
+
+
+
+ Updates information about a user in the data source.
+
+
+ A object that represents the user to update and the updated information for the user.
+
+
+
+ Verifies that the specified user name and password exist in the data source.
+
+
+
+ true if the specified username and password are valid; otherwise, false.
+
+
+ The name of the user to validate.
+ The password for the specified user.
+
+
+
+ Clears a lock so that the membership user can be validated.
+
+
+
+ true if the membership user was successfully unlocked; otherwise, false.
+
+
+ The membership user to clear the lock status for.
+
+
+
+ Gets information from the data source for a user based on the unique identifier for the membership user. Provides an option to update the last-activity date/time stamp for the user.
+
+
+
+ A object populated with the specified user's information from the data source.
+
+
+ The unique identifier for the membership user to get information for.
+ true to update the last-activity date/time stamp for the user; false to return user information without updating the last-activity date/time stamp for the user.
+
+
+
+ Gets information from the data source for a user. Provides an option to update the last-activity date/time stamp for the user.
+
+
+
+ A object populated with the specified user's information from the data source.
+
+
+ The name of the user to get information for.
+ true to update the last-activity date/time stamp for the user; false to return user information without updating the last-activity date/time stamp for the user.
+
+
+
+ Gets the user name associated with the specified e-mail address.
+
+
+
+ The user name associated with the specified e-mail address. If no match is found, return null.
+
+
+ The e-mail address to search for.
+
+
+
+ Removes a user from the membership data source.
+
+
+
+ true if the user was successfully deleted; otherwise, false.
+
+
+ The name of the user to delete.
+ true to delete data related to the user from the database; false to leave data related to the user in the database.
+
+
+
+ Gets a collection of all the users in the data source in pages of data.
+
+
+
+ A collection that contains a page of pageSize objects beginning at the page specified by pageIndex.
+
+
+ The total number of matched users.
+ The index of the page of results to return. pageIndex is zero-based.
+ The size of the page of results to return.
+
+
+
+ Gets the number of users currently accessing the application.
+
+
+
+ The number of users currently accessing the application.
+
+
+
+
+
+ Gets a collection of membership users where the user name contains the specified user name to match.
+
+
+
+ A collection that contains a page of pageSize objects beginning at the page specified by pageIndex.
+
+
+ The total number of matched users.
+ The index of the page of results to return. pageIndex is zero-based.
+ The user name to search for.
+ The size of the page of results to return.
+
+
+
+ Gets a collection of membership users where the e-mail address contains the specified e-mail address to match.
+
+
+
+ A collection that contains a page of pageSize objects beginning at the page specified by pageIndex.
+
+
+ The total number of matched users.
+ The index of the page of results to return. pageIndex is zero-based.
+ The e-mail address to search for.
+ The size of the page of results to return.
+
+
+
+ Gets the friendly name used to refer to the provider during configuration.
+
+
+
+ The friendly name used to refer to the provider during configuration.
+
+
+
+
+
+ Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).
+
+
+
+ A brief, friendly description suitable for display in administrative tools or other UIs.
+
+
+
+
+
+ Indicates whether the membership provider is configured to allow users to retrieve their passwords.
+
+
+
+ true if the membership provider is configured to support password retrieval; otherwise, false. The default is false.
+
+
+
+
+
+ Indicates whether the membership provider is configured to allow users to reset their passwords.
+
+
+
+ true if the membership provider supports password reset; otherwise, false. The default is true.
+
+
+
+
+
+ Gets a value indicating whether the membership provider is configured to require the user to answer a password question for password reset and retrieval.
+
+
+
+ true if a password answer is required for password reset and retrieval; otherwise, false. The default is true.
+
+
+
+
+
+ The name of the application using the custom membership provider.
+
+
+
+ The name of the application using the custom membership provider.
+
+
+
+
+
+ Gets the number of invalid password or password-answer attempts allowed before the membership user is locked out.
+
+
+
+ The number of invalid password or password-answer attempts allowed before the membership user is locked out.
+
+
+
+
+
+ Gets the number of minutes in which a maximum number of invalid password or password-answer attempts are allowed before the membership user is locked out.
+
+
+
+ The number of minutes in which a maximum number of invalid password or password-answer attempts are allowed before the membership user is locked out.
+
+
+
+
+
+ Gets a value indicating whether the membership provider is configured to require a unique e-mail address for each user name.
+
+
+
+ true if the membership provider requires a unique e-mail address; otherwise, false. The default is true.
+
+
+
+
+
+ Gets a value indicating the format for storing passwords in the membership data store.
+
+
+
+ One of the values indicating the format for storing passwords in the data store.
+
+
+
+
+
+ Gets the minimum length required for a password.
+
+
+
+ The minimum length required for a password.
+
+
+
+
+
+ Gets the minimum number of special characters that must be present in a valid password.
+
+
+
+ The minimum number of special characters that must be present in a valid password.
+
+
+
+
+
+ Gets the regular expression used to evaluate a password.
+
+
+
+ A regular expression used to evaluate a password.
+
+
+
+
+
+ Initializes the provider.
+
+
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+
+ Values may be overridden by specifying them in list.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ The ConnectionString to be used
+
+
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ An Interface for class.
+
+
+
+ Configuration for this provider requiresproviderId element set in web.config file,
+ as the Id of wrapped provider (defined in the Spring context).
+
+
+ Damjan Tomic
+
+
+
+ Initializes the provider.
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+ The providerId attribute is mandatory.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ Returns the collection of settings property values for the specified application instance and settings property group.
+
+
+
+ A containing the values for the specified settings property group.
+
+
+ A describing the current application use.
+ A containing the settings property group whose values are to be retrieved.2
+
+
+
+ Sets the values of the specified group of property settings.
+
+
+ A describing the current application usage.
+ A representing the group of property settings to set.2
+
+
+
+ When overridden in a derived class, deletes profile properties and information for the supplied list of profiles.
+
+
+
+ The number of profiles deleted from the data source.
+
+
+ A of information about profiles that are to be deleted.
+
+
+
+ When overridden in a derived class, deletes profile properties and information for profiles that match the supplied list of user names.
+
+
+
+ The number of profiles deleted from the data source.
+
+
+ A string array of user names for profiles to be deleted.
+
+
+
+ When overridden in a derived class, deletes all user-profile data for profiles in which the last activity date occurred before the specified date.
+
+
+
+ The number of profiles deleted from the data source.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are deleted.
+ A that identifies which user profiles are considered inactive. If the value of a user profile occurs on or before this date and time, the profile is considered inactive.
+
+
+
+ When overridden in a derived class, returns the number of profiles in which the last activity date occurred on or before the specified date.
+
+
+
+ The number of profiles in which the last activity date occurred on or before the specified date.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ A that identifies which user profiles are considered inactive. If the of a user profile occurs on or before this date and time, the profile is considered inactive.
+
+
+
+ When overridden in a derived class, retrieves user profile data for all profiles in the data source.
+
+
+
+ A containing user-profile information for all profiles in the data source.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ When this method returns, contains the total number of profiles.
+ The index of the page of results to return.
+ The size of the page of results to return.
+
+
+
+ When overridden in a derived class, retrieves user-profile data from the data source for profiles in which the last activity date occurred on or before the specified date.
+
+
+
+ A containing user-profile information about the inactive profiles.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ A that identifies which user profiles are considered inactive. If the of a user profile occurs on or before this date and time, the profile is considered inactive.
+ When this method returns, contains the total number of profiles.
+ The index of the page of results to return.
+ The size of the page of results to return.
+
+
+
+ When overridden in a derived class, retrieves profile information for profiles in which the user name matches the specified user names.
+
+
+
+ A containing user-profile information for profiles where the user name matches the supplied usernameToMatch parameter.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ When this method returns, contains the total number of profiles.
+ The index of the page of results to return.
+ The user name to search for.
+ The size of the page of results to return.
+
+
+
+ When overridden in a derived class, retrieves profile information for profiles in which the last activity date occurred on or before the specified date and the user name matches the specified user name.
+
+
+
+ A containing user profile information for inactive profiles where the user name matches the supplied usernameToMatch parameter.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ A that identifies which user profiles are considered inactive. If the value of a user profile occurs on or before this date and time, the profile is considered inactive.
+ When this method returns, contains the total number of profiles.
+ The index of the page of results to return.
+ The user name to search for.
+ The size of the page of results to return.
+
+
+
+ Gets the friendly name used to refer to the provider during configuration.
+
+
+
+ The friendly name used to refer to the provider during configuration.
+
+
+
+
+ Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).
+
+
+
+ A brief, friendly description suitable for display in administrative tools or other UIs.
+
+
+
+
+ Gets or sets the name of the currently running application.
+
+
+
+ A that contains the application's shortened name, which does not contain a full path or extension, for example, SimpleAppSettings.
+
+ 2
+
+
+
+ Initializes the provider.
+
+
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+
+ Values may be overridden by specifying them in list.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ The ConnectionString to be used
+
+
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+
+
+
+
+ A spring-configurable version of
+
+ Erich Eichinger
+
+
+
+ An Interface for class.
+
+
+
+ Configuration for this provider requiresproviderId element set in web.config file,
+ as the Id of wrapped provider (defined in the Spring context).
+
+
+ Damjan Tomic
+
+
+
+ Initializes the provider.
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+ The providerId attribute is mandatory.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ Gets a value indicating whether the specified user is in the specified role for the configured applicationName.
+
+
+
+ true if the specified user is in the specified role for the configured applicationName; otherwise, false.
+
+
+ The user name to search for.
+ The role to search in.
+
+
+
+ Gets a list of the roles that a specified user is in for the configured applicationName.
+
+
+
+ A string array containing the names of all the roles that the specified user is in for the configured applicationName.
+
+
+ The user to return a list of roles for.
+
+
+
+ Adds a new role to the data source for the configured applicationName.
+
+
+ The name of the role to create.
+
+
+
+ Removes a role from the data source for the configured applicationName.
+
+
+
+ true if the role was successfully deleted; otherwise, false.
+
+
+ If true, throw an exception if roleName has one or more members and do not delete roleName.
+ The name of the role to delete.
+
+
+
+ Gets a value indicating whether the specified role name already exists in the role data source for the configured applicationName.
+
+
+
+ true if the role name already exists in the data source for the configured applicationName; otherwise, false.
+
+
+ The name of the role to search for in the data source.
+
+
+
+ Adds the specified user names to the specified roles for the configured applicationName.
+
+
+ A string array of the role names to add the specified user names to.
+ A string array of user names to be added to the specified roles.
+
+
+
+ Removes the specified user names from the specified roles for the configured applicationName.
+
+
+ A string array of role names to remove the specified user names from.
+ A string array of user names to be removed from the specified roles.
+
+
+
+ Gets a list of users in the specified role for the configured applicationName.
+
+
+
+ A string array containing the names of all the users who are members of the specified role for the configured applicationName.
+
+
+ The name of the role to get the list of users for.
+
+
+
+ Gets a list of all the roles for the configured applicationName.
+
+
+
+ A string array containing the names of all the roles stored in the data source for the configured applicationName.
+
+
+
+
+
+ Gets an array of user names in a role where the user name contains the specified user name to match.
+
+
+
+ A string array containing the names of all the users where the user name matches usernameToMatch and the user is a member of the specified role.
+
+
+ The user name to search for.
+ The role to search in.
+
+
+
+ Gets the friendly name used to refer to the provider during configuration.
+
+
+
+ The friendly name used to refer to the provider during configuration.
+
+
+
+
+ Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).
+
+
+
+ A brief, friendly description suitable for display in administrative tools or other UIs.
+
+
+
+
+ Gets or sets the name of the application to store and retrieve role information for.
+
+
+
+ The name of the application to store and retrieve role information for.
+
+
+
+
+
+ Initializes the provider.
+
+
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+
+ Values may be overridden by specifying them in list.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ The ConnectionString to be used
+
+
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+
+
+
+
+ A spring-configurable version of
+
+ Erich Eichinger
+
+
+
+ An Interface for class.
+
+
+
+ Configuration for this provider requiresproviderId element set in web.config file,
+ as the Id of wrapped provider (defined in the Spring context).
+
+
+ Damjan Tomic
+
+
+
+ Initializes the provider.
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+ The providerId attribute is mandatory.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ Retrieves a object that represents the currently requested page using the specified object.
+
+
+
+ A that represents the currently requested page; otherwise, null, if no corresponding can be found in the or if the page context is null.
+
+
+ The used to match node information with the URL of the requested page.
+
+
+
+ Retrieves a object based on a specified key.
+
+
+
+ A that represents the page identified by key; otherwise, null, if no corresponding is found or if security trimming is enabled and the cannot be returned for the current user. The default is null.
+
+
+ A lookup key with which a is created.
+
+
+
+ When overridden in a derived class, retrieves a object that represents the page at the specified URL.
+
+
+
+ A that represents the page identified by rawURL; otherwise, null, if no corresponding is found or if security trimming is enabled and the cannot be returned for the current user.
+
+
+ A URL that identifies the page for which to retrieve a .
+
+
+
+ When overridden in a derived class, retrieves the child nodes of a specific .
+
+
+
+ A read-only that contains the immediate child nodes of the specified ; otherwise, null or an empty collection, if no child nodes exist.
+
+
+ The for which to retrieve all child nodes.
+
+
+
+ Provides an optimized lookup method for site map providers when retrieving the node for the currently requested page and fetching the parent and ancestor site map nodes for the current page.
+
+
+
+ A that represents the currently requested page; otherwise, null, if the is not found or cannot be returned for the current user.
+
+
+ The number of ancestor site map node generations to get. A value of -1 indicates that all ancestors might be retrieved and cached by the provider.
+ upLevel is less than -1.
+
+
+
+ Provides an optimized lookup method for site map providers when retrieving the node for the currently requested page and fetching the site map nodes in the proximity of the current node.
+
+
+
+ A that represents the currently requested page; otherwise, null, if the is not found or cannot be returned for the current user.
+
+
+ The number of ancestor generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors might be retrieved and cached by the provider.
+ The number of child generations to fetch. 0 indicates no descendant nodes are retrieved and a -1 indicates that all descendant nodes might be retrieved and cached by the provider.
+ upLevel or downLevel is less than -1.
+
+
+
+ When overridden in a derived class, retrieves the parent node of a specific object.
+
+
+
+ A that represents the parent of node; otherwise, null, if the has no parent or security trimming is enabled and the parent node is not accessible to the current user.
+
+
+ The for which to retrieve the parent node.
+
+
+
+ Provides an optimized lookup method for site map providers when retrieving an ancestor node for the currently requested page and fetching the descendant nodes for the ancestor.
+
+
+
+ A that represents an ancestor of the currently requested page; otherwise, null, if the current or ancestor is not found or cannot be returned for the current user.
+
+
+ The number of descendant node levels to retrieve from the target ancestor node.
+ The number of ancestor node levels to traverse when retrieving the requested ancestor node.
+ walkupLevels or relativeDepthFromWalkup is less than 0.
+
+
+
+ Provides an optimized lookup method for site map providers when retrieving an ancestor node for the specified object and fetching its child nodes.
+
+
+
+ A that represents an ancestor of node; otherwise, null, if the current or ancestor is not found or cannot be returned for the current user.
+
+
+ The number of descendant node levels to retrieve from the target ancestor node.
+ The that acts as a reference point for walkupLevels and relativeDepthFromWalkup.
+ The number of ancestor node levels to traverse when retrieving the requested ancestor node.
+ The value specified for walkupLevels or relativeDepthFromWalkup is less than 0.
+ node is null.
+
+
+
+ Provides a method that site map providers can override to perform an optimized retrieval of one or more levels of parent and ancestor nodes, relative to the specified object.
+
+
+ The number of ancestor generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors might be retrieved and cached.
+ The that acts as a reference point for upLevel.
+ upLevel is less than -1.
+ node is null.
+
+
+
+ Provides a method that site map providers can override to perform an optimized retrieval of nodes found in the proximity of the specified node.
+
+
+ The number of ancestor generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors (and their descendant nodes to the level of node) might be retrieved and cached.
+ The number of descendant generations to fetch. 0 indicates no descendant nodes are retrieved and -1 indicates that all descendant nodes might be retrieved and cached.
+ The that acts as a reference point for upLevel.
+ upLevel or downLevel is less than -1.
+ node is null.
+
+
+
+ Retrieves a Boolean value indicating whether the specified object can be viewed by the user in the specified context.
+
+
+
+ true if security trimming is enabled and node can be viewed by the user or security trimming is not enabled; otherwise, false.
+
+
+ The that contains user information.
+ The that is requested by the user.
+ context is null.- or -node is null.
+
+
+
+ Gets the friendly name used to refer to the provider during configuration.
+
+
+
+ The friendly name used to refer to the provider during configuration.
+
+
+
+
+
+ Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).
+
+
+
+ A brief, friendly description suitable for display in administrative tools or other UIs.
+
+
+
+
+
+ Gets the object that represents the currently requested page.
+
+
+
+ A that represents the currently requested page; otherwise, null, if the is not found or cannot be returned for the current user.
+
+
+
+
+
+ Gets or sets the parent object of the current provider.
+
+
+
+ The parent provider of the current .
+
+
+
+
+
+ Gets the root object in the current provider hierarchy.
+
+
+
+ An that is the top-level site map provider in the provider hierarchy that the current provider belongs to.
+
+
+ There is a circular reference to the current site map provider.
+
+
+
+ Gets the root object of the site map data that the current provider represents.
+
+
+
+ The root of the current site map data provider. The default implementation performs security trimming on the returned node.
+
+
+
+
+
+ Initializes the provider.
+
+
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+
+ Values may be overridden by specifying them in list.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ The XML file to be used for reading in the sitemap
+
+
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+
+
+
+
+ Wrapper for class.
+
+
+
+ Configuration for this provider requiresproviderId element set in web.config file,
+ as the Id of wrapped provider (defined in the Spring context).
+
+
+ Damjan Tomic
+
+
+
+ Reference to wrapped provider (defined in Spring context).
+
+
+
+
+ Initializes the provider.
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+ The providerId attribute may be used to override the name being used for looking up an object definition.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ Adds a new membership user to the data source.
+
+
+
+ A object populated with the information for the newly created user.
+
+
+ Whether or not the new user is approved to be validated.
+ The password answer for the new user
+ The user name for the new user.
+ The unique identifier from the membership data source for the user.
+ The password for the new user.
+ The password question for the new user.
+ The e-mail address for the new user.
+ A enumeration value indicating whether the user was created successfully.
+
+
+
+ Processes a request to update the password question and answer for a membership user.
+
+
+
+ true if the password question and answer are updated successfully; otherwise, false.
+
+
+ The new password question for the specified user.
+ The new password answer for the specified user.
+ The user to change the password question and answer for.
+ The password for the specified user.
+
+
+
+ Gets the password for the specified user name from the data source.
+
+
+
+ The password for the specified user name.
+
+
+ The user to retrieve the password for.
+ The password answer for the user.
+
+
+
+ Processes a request to update the password for a membership user.
+
+
+
+ true if the password was updated successfully; otherwise, false.
+
+
+ The new password for the specified user.
+ The current password for the specified user.
+ The user to update the password for.
+
+
+
+ Resets a user's password to a new, automatically generated password.
+
+
+
+ The new password for the specified user.
+
+
+ The user to reset the password for.
+ The password answer for the specified user.
+
+
+
+ Updates information about a user in the data source.
+
+
+ A object that represents the user to update and the updated information for the user.
+
+
+
+ Verifies that the specified user name and password exist in the data source.
+
+
+
+ true if the specified username and password are valid; otherwise, false.
+
+
+ The name of the user to validate.
+ The password for the specified user.
+
+
+
+ Clears a lock so that the membership user can be validated.
+
+
+
+ true if the membership user was successfully unlocked; otherwise, false.
+
+
+ The membership user to clear the lock status for.
+
+
+
+ Gets information from the data source for a user based on the unique identifier for the membership user. Provides an option to update the last-activity date/time stamp for the user.
+
+
+
+ A object populated with the specified user's information from the data source.
+
+
+ The unique identifier for the membership user to get information for.
+ true to update the last-activity date/time stamp for the user; false to return user information without updating the last-activity date/time stamp for the user.
+
+
+
+ Gets information from the data source for a user. Provides an option to update the last-activity date/time stamp for the user.
+
+
+
+ A object populated with the specified user's information from the data source.
+
+
+ The name of the user to get information for.
+ true to update the last-activity date/time stamp for the user; false to return user information without updating the last-activity date/time stamp for the user.
+
+
+
+ Gets the user name associated with the specified e-mail address.
+
+
+
+ The user name associated with the specified e-mail address. If no match is found, return null.
+
+
+ The e-mail address to search for.
+
+
+
+ Removes a user from the membership data source.
+
+
+
+ true if the user was successfully deleted; otherwise, false.
+
+
+ The name of the user to delete.
+ true to delete data related to the user from the database; false to leave data related to the user in the database.
+
+
+
+ Gets a collection of all the users in the data source in pages of data.
+
+
+
+ A collection that contains a page of pageSize objects beginning at the page specified by pageIndex.
+
+
+ The total number of matched users.
+ The index of the page of results to return. pageIndex is zero-based.
+ The size of the page of results to return.
+
+
+
+ Gets the number of users currently accessing the application.
+
+
+
+ The number of users currently accessing the application.
+
+
+
+
+
+ Gets a collection of membership users where the user name contains the specified user name to match.
+
+
+
+ A collection that contains a page of pageSize objects beginning at the page specified by pageIndex.
+
+
+ The total number of matched users.
+ The index of the page of results to return. pageIndex is zero-based.
+ The user name to search for.
+ The size of the page of results to return.
+
+
+
+ Gets a collection of membership users where the e-mail address contains the specified e-mail address to match.
+
+
+
+ A collection that contains a page of pageSize objects beginning at the page specified by pageIndex.
+
+
+ The total number of matched users.
+ The index of the page of results to return. pageIndex is zero-based.
+ The e-mail address to search for.
+ The size of the page of results to return.
+
+
+
+ Gets the friendly name used to refer to the provider during configuration.
+
+
+
+ The friendly name used to refer to the provider during configuration.
+
+
+
+
+
+ Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).
+
+
+
+ A brief, friendly description suitable for display in administrative tools or other UIs.
+
+
+
+
+
+ Indicates whether the membership provider is configured to allow users to retrieve their passwords.
+
+
+
+ true if the membership provider is configured to support password retrieval; otherwise, false. The default is false.
+
+
+
+
+
+ Indicates whether the membership provider is configured to allow users to reset their passwords.
+
+
+
+ true if the membership provider supports password reset; otherwise, false. The default is true.
+
+
+
+
+
+ Gets a value indicating whether the membership provider is configured to require the user to answer a password question for password reset and retrieval.
+
+
+
+ true if a password answer is required for password reset and retrieval; otherwise, false. The default is true.
+
+
+
+
+
+ The name of the application using the custom membership provider.
+
+
+
+ The name of the application using the custom membership provider.
+
+
+
+
+
+ Gets the number of invalid password or password-answer attempts allowed before the membership user is locked out.
+
+
+
+ The number of invalid password or password-answer attempts allowed before the membership user is locked out.
+
+
+
+
+
+ Gets the number of minutes in which a maximum number of invalid password or password-answer attempts are allowed before the membership user is locked out.
+
+
+
+ The number of minutes in which a maximum number of invalid password or password-answer attempts are allowed before the membership user is locked out.
+
+
+
+
+
+ Gets a value indicating whether the membership provider is configured to require a unique e-mail address for each user name.
+
+
+
+ true if the membership provider requires a unique e-mail address; otherwise, false. The default is true.
+
+
+
+
+
+ Gets a value indicating the format for storing passwords in the membership data store.
+
+
+
+ One of the values indicating the format for storing passwords in the data store.
+
+
+
+
+
+ Gets the minimum length required for a password.
+
+
+
+ The minimum length required for a password.
+
+
+
+
+
+ Gets the minimum number of special characters that must be present in a valid password.
+
+
+
+ The minimum number of special characters that must be present in a valid password.
+
+
+
+
+
+ Gets the regular expression used to evaluate a password.
+
+
+
+ A regular expression used to evaluate a password.
+
+
+
+
+
+ Wrapper for class.
+
+
+
+ Configuration for this provider requiresproviderId element set in web.config file,
+ as the Id of wrapped provider (defined in the Spring context).
+
+
+ Damjan Tomic
+
+
+
+ Reference to wrapped provider (defined in Spring context).
+
+
+
+
+ Initializes the provider.
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+ The providerId attribute may be used to override the name being used for looking up an object definition.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ Returns the collection of settings property values for the specified application instance and settings property group.
+
+
+
+ A containing the values for the specified settings property group.
+
+
+ A describing the current application use.
+ A containing the settings property group whose values are to be retrieved.2
+
+
+
+ Sets the values of the specified group of property settings.
+
+
+ A describing the current application usage.
+ A representing the group of property settings to set.2
+
+
+
+ When overridden in a derived class, deletes profile properties and information for the supplied list of profiles.
+
+
+
+ The number of profiles deleted from the data source.
+
+
+ A of information about profiles that are to be deleted.
+
+
+
+ When overridden in a derived class, deletes profile properties and information for profiles that match the supplied list of user names.
+
+
+
+ The number of profiles deleted from the data source.
+
+
+ A string array of user names for profiles to be deleted.
+
+
+
+ When overridden in a derived class, deletes all user-profile data for profiles in which the last activity date occurred before the specified date.
+
+
+
+ The number of profiles deleted from the data source.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are deleted.
+ A that identifies which user profiles are considered inactive. If the value of a user profile occurs on or before this date and time, the profile is considered inactive.
+
+
+
+ When overridden in a derived class, returns the number of profiles in which the last activity date occurred on or before the specified date.
+
+
+
+ The number of profiles in which the last activity date occurred on or before the specified date.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ A that identifies which user profiles are considered inactive. If the of a user profile occurs on or before this date and time, the profile is considered inactive.
+
+
+
+ When overridden in a derived class, retrieves user profile data for all profiles in the data source.
+
+
+
+ A containing user-profile information for all profiles in the data source.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ When this method returns, contains the total number of profiles.
+ The index of the page of results to return.
+ The size of the page of results to return.
+
+
+
+ When overridden in a derived class, retrieves user-profile data from the data source for profiles in which the last activity date occurred on or before the specified date.
+
+
+
+ A containing user-profile information about the inactive profiles.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ A that identifies which user profiles are considered inactive. If the of a user profile occurs on or before this date and time, the profile is considered inactive.
+ When this method returns, contains the total number of profiles.
+ The index of the page of results to return.
+ The size of the page of results to return.
+
+
+
+ When overridden in a derived class, retrieves profile information for profiles in which the user name matches the specified user names.
+
+
+
+ A containing user-profile information for profiles where the user name matches the supplied usernameToMatch parameter.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ When this method returns, contains the total number of profiles.
+ The index of the page of results to return.
+ The user name to search for.
+ The size of the page of results to return.
+
+
+
+ When overridden in a derived class, retrieves profile information for profiles in which the last activity date occurred on or before the specified date and the user name matches the specified user name.
+
+
+
+ A containing user profile information for inactive profiles where the user name matches the supplied usernameToMatch parameter.
+
+
+ One of the values, specifying whether anonymous, authenticated, or both types of profiles are returned.
+ A that identifies which user profiles are considered inactive. If the value of a user profile occurs on or before this date and time, the profile is considered inactive.
+ When this method returns, contains the total number of profiles.
+ The index of the page of results to return.
+ The user name to search for.
+ The size of the page of results to return.
+
+
+
+ Gets the friendly name used to refer to the provider during configuration.
+
+
+
+ The friendly name used to refer to the provider during configuration.
+
+
+
+
+ Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).
+
+
+
+ A brief, friendly description suitable for display in administrative tools or other UIs.
+
+
+
+
+ Gets or sets the name of the currently running application.
+
+
+
+ A that contains the application's shortened name, which does not contain a full path or extension, for example, SimpleAppSettings.
+
+ 2
+
+
+
+ Wrapper for class.
+
+
+
+ Configuration for this provider requiresproviderId element set in web.config file,
+ as the Id of wrapped provider (defined in the Spring context).
+
+
+ Damjan Tomic
+
+
+
+ Reference to wrapped provider (defined in Spring context).
+
+
+
+
+ Initializes the provider.
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+ The providerId attribute may be used to override the name being used for looking up an object definition.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ Gets a value indicating whether the specified user is in the specified role for the configured applicationName.
+
+
+
+ true if the specified user is in the specified role for the configured applicationName; otherwise, false.
+
+
+ The user name to search for.
+ The role to search in.
+
+
+
+ Gets a list of the roles that a specified user is in for the configured applicationName.
+
+
+
+ A string array containing the names of all the roles that the specified user is in for the configured applicationName.
+
+
+ The user to return a list of roles for.
+
+
+
+ Adds a new role to the data source for the configured applicationName.
+
+
+ The name of the role to create.
+
+
+
+ Removes a role from the data source for the configured applicationName.
+
+
+
+ true if the role was successfully deleted; otherwise, false.
+
+
+ If true, throw an exception if roleName has one or more members and do not delete roleName.
+ The name of the role to delete.
+
+
+
+ Gets a value indicating whether the specified role name already exists in the role data source for the configured applicationName.
+
+
+
+ true if the role name already exists in the data source for the configured applicationName; otherwise, false.
+
+
+ The name of the role to search for in the data source.
+
+
+
+ Adds the specified user names to the specified roles for the configured applicationName.
+
+
+ A string array of the role names to add the specified user names to.
+ A string array of user names to be added to the specified roles.
+
+
+
+ Removes the specified user names from the specified roles for the configured applicationName.
+
+
+ A string array of role names to remove the specified user names from.
+ A string array of user names to be removed from the specified roles.
+
+
+
+ Gets a list of users in the specified role for the configured applicationName.
+
+
+
+ A string array containing the names of all the users who are members of the specified role for the configured applicationName.
+
+
+ The name of the role to get the list of users for.
+
+
+
+ Gets a list of all the roles for the configured applicationName.
+
+
+
+ A string array containing the names of all the roles stored in the data source for the configured applicationName.
+
+
+
+
+
+ Gets an array of user names in a role where the user name contains the specified user name to match.
+
+
+
+ A string array containing the names of all the users where the user name matches usernameToMatch and the user is a member of the specified role.
+
+
+ The user name to search for.
+ The role to search in.
+
+
+
+ Gets the friendly name used to refer to the provider during configuration.
+
+
+
+ The friendly name used to refer to the provider during configuration.
+
+
+
+
+ Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).
+
+
+
+ A brief, friendly description suitable for display in administrative tools or other UIs.
+
+
+
+
+ Gets or sets the name of the application to store and retrieve role information for.
+
+
+
+ The name of the application to store and retrieve role information for.
+
+
+
+
+
+ Wrapper for class.
+
+
+
+ Configuration for this provider requiresproviderId element set in web.config file,
+ as the Id of wrapped provider (defined in the Spring context).
+
+
+ Damjan Tomic
+
+
+
+ Reference to wrapped provider (defined in Spring context).
+
+
+
+
+ Initializes the provider.
+
+
+ A collection of the name/value pairs representing the provider-specific
+ attributes specified in the configuration for this provider.
+ The providerId attribute may be used to override the name being used for looking up an object definition.
+
+ The friendly name of the provider.
+ The or is null.
+ An attempt is made to call on a provider after the provider has already been initialized.
+ The has a length of zero or providerId attribute is not set.
+
+
+
+ Retrieves a object that represents the currently requested page using the specified object.
+
+
+
+ A that represents the currently requested page; otherwise, null, if no corresponding can be found in the or if the page context is null.
+
+
+ The used to match node information with the URL of the requested page.
+
+
+
+ Retrieves a object based on a specified key.
+
+
+
+ A that represents the page identified by key; otherwise, null, if no corresponding is found or if security trimming is enabled and the cannot be returned for the current user. The default is null.
+
+
+ A lookup key with which a is created.
+
+
+
+ When overridden in a derived class, retrieves a object that represents the page at the specified URL.
+
+
+
+ A that represents the page identified by rawURL; otherwise, null, if no corresponding is found or if security trimming is enabled and the cannot be returned for the current user.
+
+
+ A URL that identifies the page for which to retrieve a .
+
+
+
+ When overridden in a derived class, retrieves the child nodes of a specific .
+
+
+
+ A read-only that contains the immediate child nodes of the specified ; otherwise, null or an empty collection, if no child nodes exist.
+
+
+ The for which to retrieve all child nodes.
+
+
+
+ Provides an optimized lookup method for site map providers when retrieving the node for the currently requested page and fetching the parent and ancestor site map nodes for the current page.
+
+
+
+ A that represents the currently requested page; otherwise, null, if the is not found or cannot be returned for the current user.
+
+
+ The number of ancestor site map node generations to get. A value of -1 indicates that all ancestors might be retrieved and cached by the provider.
+ upLevel is less than -1.
+
+
+
+ Provides an optimized lookup method for site map providers when retrieving the node for the currently requested page and fetching the site map nodes in the proximity of the current node.
+
+
+
+ A that represents the currently requested page; otherwise, null, if the is not found or cannot be returned for the current user.
+
+
+ The number of ancestor generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors might be retrieved and cached by the provider.
+ The number of child generations to fetch. 0 indicates no descendant nodes are retrieved and a -1 indicates that all descendant nodes might be retrieved and cached by the provider.
+ upLevel or downLevel is less than -1.
+
+
+
+ When overridden in a derived class, retrieves the parent node of a specific object.
+
+
+
+ A that represents the parent of node; otherwise, null, if the has no parent or security trimming is enabled and the parent node is not accessible to the current user.
+
+
+ The for which to retrieve the parent node.
+
+
+
+ Provides an optimized lookup method for site map providers when retrieving an ancestor node for the currently requested page and fetching the descendant nodes for the ancestor.
+
+
+
+ A that represents an ancestor of the currently requested page; otherwise, null, if the current or ancestor is not found or cannot be returned for the current user.
+
+
+ The number of descendant node levels to retrieve from the target ancestor node.
+ The number of ancestor node levels to traverse when retrieving the requested ancestor node.
+ walkupLevels or relativeDepthFromWalkup is less than 0.
+
+
+
+ Provides an optimized lookup method for site map providers when retrieving an ancestor node for the specified object and fetching its child nodes.
+
+
+
+ A that represents an ancestor of node; otherwise, null, if the current or ancestor is not found or cannot be returned for the current user.
+
+
+ The number of descendant node levels to retrieve from the target ancestor node.
+ The that acts as a reference point for walkupLevels and relativeDepthFromWalkup.
+ The number of ancestor node levels to traverse when retrieving the requested ancestor node.
+ The value specified for walkupLevels or relativeDepthFromWalkup is less than 0.
+ node is null.
+
+
+
+ This method is marked as protected and should never be called.
+
+
+
+ A that represents the root node of the set of nodes that the current provider manages.
+
+
+
+
+
+ Provides a method that site map providers can override to perform an optimized retrieval of one or more levels of parent and ancestor nodes, relative to the specified object.
+
+
+ The number of ancestor generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors might be retrieved and cached.
+ The that acts as a reference point for upLevel.
+ upLevel is less than -1.
+ node is null.
+
+
+
+ Provides a method that site map providers can override to perform an optimized retrieval of nodes found in the proximity of the specified node.
+
+
+ The number of ancestor generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors (and their descendant nodes to the level of node) might be retrieved and cached.
+ The number of descendant generations to fetch. 0 indicates no descendant nodes are retrieved and -1 indicates that all descendant nodes might be retrieved and cached.
+ The that acts as a reference point for upLevel.
+ upLevel or downLevel is less than -1.
+ node is null.
+
+
+
+ Retrieves a Boolean value indicating whether the specified object can be viewed by the user in the specified context.
+
+
+
+ true if security trimming is enabled and node can be viewed by the user or security trimming is not enabled; otherwise, false.
+
+
+ The that contains user information.
+ The that is requested by the user.
+ context is null.- or -node is null.
+
+
+
+ Gets the friendly name used to refer to the provider during configuration.
+
+
+
+ The friendly name used to refer to the provider during configuration.
+
+
+
+
+
+ Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).
+
+
+
+ A brief, friendly description suitable for display in administrative tools or other UIs.
+
+
+
+
+
+ Gets the object that represents the currently requested page.
+
+
+
+ A that represents the currently requested page; otherwise, null, if the is not found or cannot be returned for the current user.
+
+
+
+
+
+ Gets or sets the parent object of the current provider.
+
+
+
+ The parent provider of the current .
+
+
+
+
+
+ Gets the root object in the current provider hierarchy.
+
+
+
+ An that is the top-level site map provider in the provider hierarchy that the current provider belongs to.
+
+
+ There is a circular reference to the current site map provider.
+
+
+
+ Gets the root object of the site map data that the current provider represents.
+
+
+
+ The root of the current site map data provider. The default implementation performs security trimming on the returned node.
+
+
+
+
+
+ Exports an object as a web service.
+
+
+
+ The exporter will create a web service wrapper for the object that is
+ to be exposed and additionally enable its configuration as a web
+ service.
+
+
+ The exported object can be either a standard .NET web service
+ implementation, with methods marked using the standard
+ , or it can be a
+ plain .NET object.
+
+
+ Aleksandar Seovic
+
+
+
+ Holds EXPORTER_ID to WebServiceExporter instance mappings.
+
+
+
+
+ Returns the target object instance exported by the WebServiceExporter identified by .
+
+
+
+
+
+
+ The name of the object in the factory.
+
+
+
+
+ The owning factory.
+
+
+
+
+ The generated web service wrapper type.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Cleanup before GC
+
+
+
+
+ Disconnect the remote object from the registered remoting channels.
+
+
+
+
+ Stops exporting the object identified by .
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Exports specified object as a web service.
+
+
+ In the event of misconfiguration (such as failure to set an essential
+ property) or if initialization fails.
+
+
+
+
+ Returns the Web Service wrapper type for the object that is to be exposed.
+
+
+
+
+
+ Validates the configuration.
+
+
+
+
+ Generates the web service wrapper type.
+
+
+
+
+ Gets or Sets the Web Services Interoperability (WSI) specification
+ to which the Web Service claims to conform.
+
+
+ Default is
+
+
+
+
+ Gets or sets the base type that web service should inherit.
+
+
+ Default is
+
+
+
+
+ Gets or sets the name of the target object that should be exposed as a web service.
+
+
+ The name of the target object that should be exposed as a web service.
+
+
+
+
+ Gets or sets the description of the web service (optional).
+
+
+ The web service description.
+
+
+
+
+ Gets or sets the name of the web service (optional).
+
+
+
+ Defaults to the value of the exporter's object ID.
+
+
+
+ The web service name.
+
+
+
+
+ Gets or sets the web service namespace.
+
+
+ The web service namespace.
+
+
+
+
+ Gets or sets the list of interfaces whose methods should be exposed as web services.
+
+
+ If not set, all the interfaces implemented or inherited
+ by the target type will be used.
+
+ The interfaces.
+
+
+
+ Gets or sets a list of custom attributes
+ that should be applied to a proxy class.
+
+
+
+
+ Gets or sets a dictionary of custom attributes
+ that should be applied to web service members.
+
+
+ Dictionary key is an expression that members can be matched against.
+ Value is a list of attributes that should be applied
+ to each member that matches expression.
+
+
+
+
+ Callback that supplies the owning factory to an object instance.
+
+
+ Owning
+ (may not be ). The object can immediately
+ call methods on the factory.
+
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+ In case of initialization errors.
+
+
+
+
+ Set the name of the object in the object factory that created this object.
+
+
+ The name of the object in the factory.
+
+
+
+ Invoked after population of normal object properties but before an init
+ callback like 's
+
+ method or a custom init-method.
+
+
+
+
+
+ Implements constructors for the proxy class.
+
+
+ This implementation generates an empty noop default constructor
+
+
+ The builder to use.
+
+
+
+
+ An implementation that
+ retrieves configured WebService objects from the Spring.NET web
+ application context.
+
+
+ This handler factory uses web service name from the URL, without the extension,
+ to find web service object in the Spring context.
+
+ Aleksandar Seovic
+
+
+
+ Retrieves instance of the page from Spring web application context.
+
+ current HttpContext
+ type of HTTP request (GET, POST, etc.)
+ requested page URL
+ translated server path for the page
+ instance of the configured page object
+
+
+
+ Provides base functionality for Spring.NET context-aware
+ implementations.
+
+
+
+ Provides derived classes with a default implementation of
+ method.
+
+
+ Aleksandar Seovic
+
+
+
+ Holds all handlers having == true.
+
+
+
+
+ Holds an instance of the instrinsic System.Web.UI.SimpleHandlerFactory
+
+
+
+
+ Holds the shared logger for all factories.
+
+
+
+
+ Creates a new instance of the
+ class.
+
+
+
+
+ Returns an appropriate implementation.
+
+
+ An instance of the class that
+ provides references to intrinsic server objects.
+
+
+ The HTTP method of the request.
+
+ The request URL.
+
+ The physical path of the requested resource.
+
+
+ A new object that processes
+ the request.
+
+
+
+
+ Enables a factory to release an existing
+ instance.
+
+
+ The object to release.
+
+
+
+
+ Create a handler instance for the given URL.
+
+ the application context corresponding to the current request
+ The instance for this request.
+ The HTTP data transfer method (GET, POST, ...)
+ The requested .
+ The physical path of the requested resource.
+ A handler instance for processing the current request.
+
+
+
+ Get the application context instance corresponding to the given absolute url and checks
+ it for contract and being not null.
+
+ the absolute url
+
+ if no context is found
+
+
+ if context is not an
+
+ teh application context instance corresponding to the given absolute url.
+
+ Calls to obtain a context instance.
+
+
+
+
+ Returns the unchecked, raw application context for the given virtual path.
+
+ the virtual path to get the context for.
+ the context or null.
+
+ Subclasses may override this method to change the context source.
+ By default, is used for obtaining context instances.
+
+
+
+
+ DO NOT USE - this is subject to change!
+
+
+
+
+ This method requires registrars to follow the convention of registering web object definitions using their
+ application relative urls (~/mypath/mypage.aspx).
+
+
+ Resolve an object definition by url.
+
+
+
+
+ Apply dependency injection stuff on the handler.
+
+ the handler to be intercepted
+ the context responsible for configuring this handler
+
+
+
+ Get the global instance of System.Web.UI.SimpleHandlerFactory
+
+
+ This factory is a plaform version agnostic way to instantiate
+ arbitrary handlers without the need for additional reflection.
+
+
+
+
+ Holds a named
+
+ Erich Eichinger
+
+
+
+ Creates a new name/objectdefinition pair.
+
+
+
+
+ Get the name of the attached object definition
+
+
+
+
+ Get the .
+
+
+
+
+ implementation that allows users to monitor state
+ of the Spring.NET web application context.
+
+
+
+
+
+
+ Aleksandar Seovic
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Processes HTTP request.
+
+ An object that provides references to the intrinsic server objects (for example, , , , and ) used to service HTTP requests.
+
+
+
+ Gets a value indicating whether another request can use
+ this instance.
+
+ True if this handler is reusable, False otherwise.
+
+
+
+ Helper class for easier access to reflected Control members.
+
+ Erich Eichinger
+
+
+
+ Instantiates a new Accessor.
+
+
+
+
+
+ Returns the underlying ControlCollection instance.
+
+
+
+
+ Gets or sets the ControlCollection of the target without accessing the target's property.
+
+
+ If the underlying collection is null, it is automatically created.
+
+
+
+
+ Helper class for easier access to reflected ControlCollection members.
+
+ Erich Eichinger
+
+
+
+ Returns the underlying ControlCollection instance.
+
+
+
+
+ Returns the type of the underlying ControlCollection instance.
+
+
+
+
+ Creates a new Accessor for a given .
+
+ The to be accessed
+
+
+
+ Gets or sets the owner of the underlying ControlCollection.
+
+
+
+
+ Support Class providing a method to ensure a control has been intercepted
+
+ Erich Eichinger
+
+
+
+ Holds all available interception strategies
+
+
+
+
+ The last resort interception strategy...
+
+
+
+
+ Holds a control.GetType()->IInterceptionStrategy table.
+
+
+
+
+ Holds well-known Type/Strategy mappings.
+
+
+
+
+ Ensures, a control has been intercepted to support Web-DI. If not, the control will be intercepted.
+
+
+
+
+ Any concrete interception strategy must implement this interface
+
+ Erich Eichinger
+
+
+
+ Any implementation must never throw an exception from this method.
+ Instead false must be returned to indicate interception failure.
+
+
+ true, if interception succeeded. false otherwise.
+
+
+
+
+ SimpleHandlerFactory is used to wrap any arbitrary to make it "Spring-aware".
+
+
+ By default, an instance of is used as underlying factory.
+
+ Erich Eichinger
+
+
+
+ Creates a new instance, using a as underlying factory.
+
+
+
+
+ Create a new instance, using an instance of as underlying factory.
+
+ a type that implements
+
+
+
+ Create a new instance, using as underlying factory.
+
+ the factory to be wrapped.
+
+
+
+ Create a handler instance for the given URL.
+
+ the application context corresponding to the current request
+ The instance for this request.
+ The HTTP data transfer method (GET, POST, ...)
+ The requested .
+ The physical path of the requested resource.
+ A handler instance for processing the current request.
+
+
+
+ Enables a factory to release an existing
+ instance.
+
+
+ The object to release.
+
+
+
+
+ This result factory implementation creates instances from a given string representation.
+
+
+ For a larger example illustrating the customization of result processing, .
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ A result factory is responsible for create an instance from a given string representation.
+
+
+ For a larger example illustrating the customization of result processing, .
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ Create an instance from the given string representation.
+
+ the resultMode that caused triggering this factory.
+ the remainder string to be interpreted and converted into an .
+ An instance. Must never be null!
+
+ Note to implementors: This method must never return null. Instead exceptions should be thrown.
+
+
+
+
+ Create a new from the specified .
+
+ the result mode.
+ the string representation of the result.
+ the instance created from .
+
+
+
+ The default implementation of the interface.
+
+
+
+
+ Defines the interface, all hierarchical navigators capable of
+ dealing with instances must implement.
+
+
+
+
+ An extension of that must be implemented by
+ navigators that can be part of a hierarchy.
+
+ Erich Eichinger
+
+
+
+ Any component capable of navigating and participating in the navigation logic must implement this interface.
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ Determines, whether this navigator or one of its parents can
+ navigate to the destination specified in .
+
+ the name of the navigation destination
+ true, if this navigator can navigate to the destination.
+
+
+
+ Instruct the navigator to navigate to the specified navigation destination.
+
+ the destination to navigate to.
+ the sender that issued the navigation request.
+ the context to evaluate this navigation request in.
+ if this navigator cannot navigate to the specified ().
+
+
+
+ Creates an uri poiniting to the specified navigation destination.
+
+ the destination to navigate to.
+ the sender that issued the navigation request.
+ the context to evaluate this navigation request in.
+ if this navigator cannot navigate to the specified ().
+
+
+
+ If any, get the parent navigator of the current navigator instance. May be null.
+
+
+
+
+ Contains the mappings of navigation destination names to
+ instances or their corresponding textual representations.
+ See for more information on how textual representations are resolved.
+
+
+
+
+
+
+
+
+
+ Creates and initializes a new instance.
+
+
+
+
+ Creates and initializes a new instance.
+
+ the parent of this instance. May be null.
+ a dictionary of result name to result mappings. May be null.
+ sets, how this navigator treats case sensitivity of result names
+
+
+
+ Create the dictionary instance to be used by this navigator component.
+
+ a dictionary of intitial result mappings
+ the dictionary, that will be used by this navigator.
+
+ Implementors may override this for creating custom dictionaries.
+
+
+
+
+ Determines, whether this navigator or one of its parents can
+ navigate to the destination specified in .
+
+ the name of the navigation destination
+ true, if this navigator can navigate to the destination.
+
+
+
+ Redirects user to a URL mapped to specified result name.
+
+ Name of the result.
+ the instance that issued this request
+ The context to use for evaluating the SpEL expression in the Result.
+
+
+
+ Returns a redirect url string that points to the
+ defined by this
+ result evaluated using this Page for expression
+
+ Name of the result.
+ the instance that issued this request
+ The context to use for evaluating the SpEL expression in the Result
+ A redirect url string.
+
+
+
+ Obtain the named result instance from the dictionary. If necessary, the actual representation of the result
+ will be converted to an instance by this method.
+
+
+
+
+
+
+ Handle an unknown result object.
+
+ the name of the result
+ the result instance obtained from the dictionary
+
+ By default, this method throws a .
+
+
+
+
+ Handle an unknown destination.
+
+ the destination that could not be resolved.
+ the sender that issued the request
+ the context to be used for evaluating any dynamic parts of the destination
+ the uri as being returned from
+
+ By default, this method throws a .
+
+
+
+
+ Indicates, whether result names are treated case sensitive by this navigator.
+
+
+
+
+ Get/Set the parent of this navigator.
+
+ if this navigator already has a parent.
+
+
+
+ Gets or sets map of result names to instances or their textual representations.
+ See for information on parsing textual representations.
+
+
+
+
+
+
+
+
+ Holds a list of url expressions and their corresponding names of responsible
+ or objects managed by the container.
+
+ Erich Eichinger
+
+
+
+ Maps the specified url pattern expression to an object name denoting a or object.
+
+ the string pattern (see conform to syntax)
+ an object name denoting the spring-managed handler definition
+
+
+
+ Maps the specified url pattern expression to an object name denoting a or object.
+
+ the url pattern
+ an object name denoting the spring-managed handler definition
+
+
+
+ Maps the to a handler object name by matching against all registered patterns.
+
+ the virtual path
+ the object name
+
+
+
+ Add a new mapping
+
+ an url pattern string
+ a handler object name string
+
+
+
+ Clear the mapping table.
+
+
+
+
+ Copies all entries to the specified array.
+
+
+
+
+ Get an enumerator for iterating over the list of registered mappings.
+
+
+
+
+ Not supported by this implementation.
+
+
+
+
+ Not supported by this implementation.
+
+
+
+
+ Not supported by this implementation.
+
+
+
+
+ Add or replace a mapping
+
+
+ Getter will throw a !
+
+ an url pattern string
+
+
+
+ Always returns false.
+
+
+
+
+ Gets a value indicating whether the object has a fixed size.
+
+
+
+ true if the object has a fixed size; otherwise, false.
+
+ 2
+
+
+
+ Get the number of registered mappings.
+
+
+
+
+ Gets an object that can be used to synchronize access.
+
+
+
+
+ Always returns false.
+
+
+
+
+ Not supported by this implementation.
+
+
+
+
+ Not supported by this implementation.
+
+
+
+
+ Holds pairs of (url pattern, handler object name).
+
+
+
+
+ Erich Eichinger
+
+
+
+ Create a new instance.
+
+
+
+
+
+
+ Create a new instance
+
+
+
+
+
+
+ Return a string representation of this entry.
+
+
+
+
+ Get the url pattern
+
+
+
+
+ Get the handler object name
+
+
+
+
+ This strategy replaces the original collection's owner with an intercepting proxy
+
+ Erich Eichinger
+
+
+
+ This strategy enhances a ControlCollection's type by
+ dynamically implementing ISupportsWebDependencyInjection on this type
+
+ Erich Eichinger
+
+
+
+ The list of methods to be intercepted for a ControlCollection
+
+
+
+
+ Holds a table of already known intercepted ControlCollection types
+
+
+
+
+ Intercepts the given by dynamically deriving
+ the original type and let it implement .
+
+ the ApplicationContext to be set on the collection instance.
+ a wrapper around the owner control instance.
+ a wrapper around the collection instance.
+ true, if interception was successful. false otherwise
+
+
+
+ Holds a reference to the static(!) callback-method to be used during generation of intercepted ControlCollection-Types
+
+
+
+
+ An encapsulates concrete navigation logic. Usually executing a
+ result will invoke or .
+
+
+ For a larger example illustrating the customization of result processing .
+
+
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ Execute the result logic within the given .
+
+ the context to evaluate this request in.
+
+
+
+ Returns an url representation of the result logic within the given .
+
+ the context to evaluate this request in.
+ the url corresponding to the result instance.
+
+ The returned url is not necessarily fully qualified nor absolute. Returned urls may be relative to the
+ given context.
+ To produce a client-usable url, consider applying e.g. or
+ before writing the result url to the response.
+
+
+
+
+ "Contract"-interface of the Web-DI infrastructure.
+
+
+ This interface supports Spring's DI infrastructure and normally doesn't need to be implemented
+
+ Any Page, Control or ControlCollection implementing this interface guarantees to
+ call on any control being added
+ before it is actually added to the child-collection.
+
+
+
The following example shows, how to make a Control support the DI-infrastructure:
+
+ class MyControl : Control, ISupportsWebDependencyInjection
+ {
+ private IApplicationContext _defaultApplicationContext;
+
+ public IApplicationContext DefaultApplicationContext
+ {
+ get { return _defaultApplicationContext; }
+ set { _defaultApplicationContext = value; }
+ }
+
+ override protected AddedControl( Control control, int index )
+ {
+ WebUtils.InjectDependenciesRecursive( _defaultApplicationContext, control );
+ base.AddedControl( control, index );
+ }
+ }
+
+
+
+
The following example shows, how to make a ControlCollection support the DI-infrastructure:
+
Note, that you MUST implement the single-argument constructor ControlCollection( Control owner )!
+
+ class MyControlCollection : ControlCollection, ISupportsWebDependencyInjection
+ {
+ private IApplicationContext _defaultApplicationContext;
+
+ public MyControlCollection( Control owner ) : base( owner )
+ {}
+
+ public IApplicationContext DefaultApplicationContext
+ {
+ get { return _defaultApplicationContext; }
+ set { _defaultApplicationContext = value; }
+ }
+
+ override public Add( Control child )
+ {
+ WebUtils.InjectDependenciesRecursive( _defaultApplicationContext, child );
+ base.Add( child );
+ }
+
+ override public AddAt( int index, Control child )
+ {
+ WebUtils.InjectDependenciesRecursive( _defaultApplicationContext, child );
+ base.AddAt( index, child );
+ }
+ }
+
+
+ Erich Eichinger
+
+
+
+ Holds the default instance to be used during injecting a control-tree.
+
+
+
+
+ Any component participating in the navigation infrastructure must implement this interface.
+
+ Erich Eichinger
+
+
+
+ Return the associated with this component.
+
+
+
+
+ This ResourceManager implementation swallows s and
+ simply returns null from if no resource is found.
+
+ Erich Eichinger
+
+
+
+ Avoid beforeFieldInit
+
+
+
+
+ Returns the value of the specified resource.
+
+
+ The value of the resource localized for the caller's current culture settings. If a match is not possible, null is returned. The resource value can be null.
+
+ The name of the resource to get.
+ The name parameter is null.
+
+
+
+ Gets the value of the resource localized for the specified culture.
+
+
+ The value of the resource, localized for the specified culture. If a "best match" is not possible, null is returned.
+
+ The object that represents the culture for which the resource is localized. Note that if the resource is not localized for this culture, the lookup will fall back using the culture's property, stopping after checking in the neutral culture.If this value is null, the is obtained using the culture's property.
+ The name of the resource to get.
+ The name parameter is null.
+
+
+
+ Returns the value of the specified resource.
+
+
+ The value of the resource localized for the caller's current culture settings. If a match is not possible, null is returned. The resource value can be null.
+
+ The name of the resource to get.
+ The name parameter is null.
+
+
+
+ Gets the value of the resource localized for the specified culture.
+
+
+ The value of the resource, localized for the specified culture. If a "best match" is not possible, null is returned.
+
+ The object that represents the culture for which the resource is localized. Note that if the resource is not localized for this culture, the lookup will fall back using the culture's property, stopping after checking in the neutral culture.If this value is null, the is obtained using the culture's property.
+ The name of the resource to get.
+ The name parameter is null.
+
+
+
+ MappingHandleryFactory allows for full Spring-managed <httpHandlers> configuration.
+ It uses regular expressions for url matching.
+
+
+
+ The example below shows, how to map all url requests to spring and let
+ resolve urls to container-managed or objects.
+
+ // web.config
+
+ <httpHandlers>
+ <!-- map all requests to spring (just for demo - don't do this at home!) -->
+ <add verb="*" path="*.*" type="Spring.Web.Support.MappingHandlerFactory, Spring.Web" />
+ </httpHandlers>
+
+ // spring-objects.config
+
+ <object type="Spring.Web.Support.MappingHandlerFactoryConfigurer, Spring.Web">
+ <property name="HandlerMap">
+ <dictionary>
+ <entry key="\.ashx$" value="standardHandlerFactory" />
+ <!-- map any request ending with *.whatever to standardHandlerFactory -->
+ <entry key="\.whatever$" value="specialHandlerFactory" />
+ </dictionary>
+ </property>
+ </object>
+
+ <object name="standardHandlerFactory" type="Spring.Web.Support.DefaultHandlerFactory, Spring.Web" />
+
+ <object name="specialHandlerFactory" type="MySpecialHandlerFactoryImpl" />
+
+
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ Holds the cache of handler/factory pairs handed out by this factory. This is required
+ for proper handling of .
+
+
+
+
+ Create a handler instance for the given URL. Will try to find a match of onto patterns in .
+ If a match is found, delegates the call to the matching method.
+
+ the application context corresponding to the current request
+ The instance for this request.
+ The HTTP data transfer method (GET, POST, ...)
+ The requested .
+ The physical path of the requested resource.
+ A handler instance for processing the current request.
+
+
+
+ Obtains a handler by mapping to the list of patterns in .
+
+ the application context corresponding to the current request
+ The instance for this request.
+ The HTTP data transfer method (GET, POST, ...)
+ The requested .
+ The physical path of the requested resource.
+
+
+ A handler instance for processing the current request.
+
+
+
+ Enables a factory to release an existing
+ instance.
+
+
+ The object to release.
+
+
+
+
+ Removes the handler from the handler/factory dictionary and releases the handler.
+
+ the handler to be released
+ a dictionary containing (, ) entries.
+
+
+
+ Holds the global list of mappings from url patterns to handler names.
+
+
+
+
+ Configures .
+
+ Erich Eichinger
+
+
+
+ Contains mappings of url patterns to handler objects.
+
+
+
+
+ Represents a MIME media type as defined by http://www.iana.org/assignments/media-types/
+
+ Erich Eichinger
+
+
+
+ Parses a string into a instance.
+
+ a valid string representation of a mediaType
+ a new instance
+
+
+
+ Creates a new media type instance representing a generic "application/octet-stream"
+
+
+
+
+ Creates a new media type instance representing a generic content type
+ with an unspecified subtype (e.g. "text/*")
+
+
+
+
+ Creates a new media type instance representing a particular media type
+
+
+
+
+ Returns a string representation of this instance.
+
+
+
+
+ Compares this instance to another
+
+ another instance
+
+
+
+ Determines whether the specified is equal to the current .
+
+
+ true if the specified is equal to the current ; otherwise, false.
+
+ The to compare with the current .
+
+
+
+ Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table.
+
+
+ A hash code for the current .
+
+
+
+
+ Gets the content type of this media type instance
+
+
+
+
+ Gets the subtype of this media type instance
+
+
+
+
+ Predefines common application media types
+
+
+
+
+ Represents "application/octet-stream"
+
+
+
+
+ Represents "application/pdf"
+
+
+
+
+ Represents "application/rtf"
+
+
+
+
+ Represents "application/soap+xml"
+
+
+
+
+ Represents "application/zip"
+
+
+
+
+ Predefines common image media types
+
+
+
+
+ Represents "image/gif"
+
+
+
+
+ Represents "image/jpeg"
+
+
+
+
+ Represents "image/tiff"
+
+
+
+
+ Predefines common text media types
+
+
+
+
+ Represents "text/html"
+
+
+
+
+ Represents "text/plain"
+
+
+
+
+ Represents "text/richtext"
+
+
+
+
+ Represents "text/xml"
+
+
+
+
+ Represents "text/javascript"
+
+
+
+
+ Represents "text/css"
+
+
+
+
+ Implementation of that retrieves
+ configured instances from Spring web application context.
+
+
+
+ This handler factory uses the page name from the URL, without the extension,
+ to find the handler object in the Spring context. This means that the target object
+ definition doesn't need to resolve to an .aspx page -- it can be any valid
+ object that implements interface.
+
+
+ If the specified page is not found in the Spring application context, this
+ handler factory falls back to the standard ASP.NET behavior and tries
+ to find physical page with a given name.
+
+
+ In either case, handlers that implement
+ and will be provided with the references
+ to appropriate Spring.NET application context (based on the request URL)
+ and a that should be used to store the information
+ that needs to be shared by all instances of the handler.
+
+
+ Aleksandar Seovic
+
+
+
+ Retrieves instance of the configured page from Spring web application context,
+ or if page is not defined in Spring config file tries to find it using standard
+ ASP.Net mechanism.
+
+ Current HttpContext
+ Type of HTTP request (GET, POST, etc.)
+ Requested page URL
+ Translated server path for the page
+ Instance of the IHttpHandler object that should be used to process request.
+
+
+
+ Create a handler instance for the given URL.
+
+ the application context corresponding to the current request
+ The instance for this request.
+ The HTTP data transfer method (GET, POST, ...)
+ The requested .
+ The physical path of the requested resource.
+ A handler instance for the current request.
+
+
+
+ Represents the ASPX result page that an operation maps to.
+
+
+
+ Parameters can reference variables accessible from the page using the
+ standard NAnt style property notation, namely ${varName}.
+
+
+ The result that is passed as the sole
+ parameter to the parameterized constructor
+ () must adhere to the
+ following format:
+
+
+ Aleksandar Seovic
+ Matan Shapira
+
+
+
+ The default .
+
+
+
+ Currently defaults to .
+
+
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+
+ Creates a new instance of the class.
+
+
+
+ See both the class documentation ()
+ and the reference documentation for the Spring.Web library for a
+ discussion and examples of what values the supplied
+ can have.
+
+
+ The result descriptor.
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+ if the result mode is unknown.
+
+
+
+ Creates a new instance of the class.
+
+
+
+ See both the class documentation ()
+ and the reference documentation for the Spring.Web library for a
+ discussion and examples of what values the supplied
+ can have.
+
+
+ The desired result mode. May be null to use default mode.
+ The result descriptor (without resultMode prefix!).
+
+ If the supplied is or
+ contains only whitespace character(s).
+
+ if the result mode is unknown.
+
+
+
+ Navigates to the
+ defined by this result.
+
+
+ The context object for parameter resolution. This is typically
+ a .
+
+
+
+
+ Performs a server-side transfer to the
+ defined by this result.
+
+
+ The context object for parameter resolution. This is typically
+ a .
+
+
+
+
+
+ Resolves transfer parameters and stores them into instance.
+
+
+
+
+
+
+ Performs a redirect to the
+ defined by this
+ result.
+
+
+ The context object for parameter resolution. This is typically
+ a .
+
+
+
+
+
+ Returns a redirect url string that points to the
+ defined by this
+ result.
+
+
+ A redirect url string.
+
+
+
+
+ Construct the actual url to be executed or returned.
+
+ the already evaluated
+ the already evaluated parameters.
+ the url to be returned by
+
+
+
+ Append the url parameter to the url being constructed.
+
+ the containing the url constructed so far.
+ the parameter key
+ the parameter value
+ the to use for further url construction.
+
+
+
+ Evaluates within and returns the evaluation result.
+
+ the context to be used for evaluation.
+ the string that might need evaluation
+ the evaluation result. Unodified if no evalution occured.
+
+
+
+ Checks, if value is a SpEL expression ${expression} or %{expression}.
+
+
+
+
+ If is a SpEL expression (${expression} or %{expression}), evaluates
+ the value against .
+
+
+
+
+ Extracts and sets this instance's
+ property from the supplied descriptor.
+
+
+
+ The supplied descriptor is typically
+ something like /Foo.aspx or
+ redirect:http://www.springframework.net/.
+
+
+
+ The result descriptor.
+
+
+ The supplied without the result mode
+ prefix (if any).
+
+
+ If the supplied starts with an illegal
+ result mode (see ).
+
+
+
+
+ Set the actual from the parsed string.
+
+ the parsed result mode
+
+
+
+ Resolves dynamic expression contained in if any by calling .
+
+ the context to be used for evaluating the expression
+ the evaluated expression
+
+
+
+ Parses query parameters from the supplied .
+
+
+ The query string (may be ).
+
+
+
+
+ The . Defines which
+ method will be used to navigate to the
+ .
+
+
+
+
+ The target page.
+
+
+
+ This is the (relative) path to the target page.
+
+
+
+
+
+ The parameters thar are to be passed to the
+ upon
+ navigation.
+
+
+
+
+ Indicates, if should be called with preserveForm='true' | 'false'. Only relevant for ResultMode.TransferXXXX modes.
+
+
+
+
+ Indicates, if should be called with endResponse='true' | 'false'. Only relevant for ResultMode.RedirectXXXX modes.
+
+
+
+
+ A result factory is responsible for create an instance from a given string representation.
+
+
+
+ Factories get registered with the for a certain resultMode string.
+ uses for converting strings into instances
+ implementing the corresponding navigation logic.
+
+
+ Result string representations are always of the form:
+ "<resultmode>:<textual result representation>"
+ Calling on the registry will cause the registry to first extract the leading resultmode to obtain
+ the corresponding instance and handle the actual instantiation by delegating to
+ .
+
+
+ The following example illustrates the usual flow:
+
+ class MySpecialResultLogic : IResult
+ {
+ ...
+ }
+
+ class MySpecialResultLogicFactory : IResultFactory
+ {
+ IResult Create( string mode, string expression ) { /* ... convert 'expression' into
+ MySpecialResultLogic */ }
+ }
+
+ // register with global factory
+ ResultFactoryRegistry.RegisterResultFactory( "mySpecialMode", new MySpecialResultLogicFactory );
+
+ // configure your Results
+ <object type="mypage.aspx">
+ <property name="Results">
+ <dictionary>
+ <entry key="continue" value="mySpecialMode:<some MySpecialResultLogic string representation>" />
+ </dictionary>
+ </property>
+
+ // on your page call
+ myPage.SetResult("continue");
+
+
+
+
+
+
+
+
+
+ Erich Eichinger
+
+
+
+ Resets the factory registry to its defaults. Mainly used for unit testing.
+
+
+
+
+ Set a new default factory
+
+ the new default factory instance. Must not be null.
+ the previous default factory.
+
+
+
+ Registers a for the specified .
+
+ the resultMode. Must not be null.
+ the factory respponsible for handling results. Must not be null.
+ the factory previously registered for the specified , if any.
+
+ See overview for more information.
+
+
+
+
+ Creates a result from the specified by extracting the result mode from
+ the text and delegating to a corresponding , if any.
+
+ the 'resultmode'-prefixed textual representation of the result instance to create.
+
+ the instance corresponding to the textual represenation,
+ created by the
+
+
+ if either is null or returned null.
+
+ This method guarantees that the return value will always be non-null.
+ must always be of the form "<resultmode>:<textual result representation>".
+ The resultmode will be extracted and the corresponding (previously registered
+ using ) is called to actually create the instance. If no factory matches
+ resultmode, the call is handled to the .
+
+
+
+
+ Returns the current set by . Will never be null.
+
+
+ The default factory is responsible for handling any unknown result modes.
+
+
+
+
+ The various result modes.
+
+ Aleksandar Seovic
+
+
+
+
+ A server-side transfer.
+
+
+
+ Issues a server-side transfer using the
+ method.
+
+
+
+
+
+
+ A redirect.
+
+
+
+ Issues a redirect (to the user-agent - typically a browser) using
+ the method.
+
+
+
+
+
+
+ A server-side transfer.
+
+
+
+ Issues a server-side transfer using the
+ method with parameter 'preserveForm=false'.
+
+
+
+
+
+
+ A redirect.
+
+
+
+ Issues a redirect (to the user-agent - typically a browser) using
+ the method.
+
+
+
+
+
+
+ Base class that describes client side script block or file.
+
+
+
+ Classes that extend this class are used by Spring.Web client-side
+ scripting support.
+
+
+ Aleksandar Seovic
+
+
+
+ Initialize a new Script object of the specified language
+
+ Script language.
+
+
+
+ Initialize a new script object of the specified type
+
+ a
+
+
+
+ Gets or sets script language.
+
+
+
+
+ Gets or sets script mime type
+
+
+
+
+ Class that describes client side script block.
+
+
+
+ Script blocks are used to insert script code directly into the page,
+ without references to an external file.
+
+
+ Aleksandar Seovic
+
+
+
+ Default constructor.
+
+ Script language.
+ The script text.
+
+
+
+ Initialize a new script block instance.
+
+ the script language's
+ the script body
+
+
+
+ Gets or sets the script text.
+
+ The script text.
+
+
+
+ Class that describes client side script file.
+
+
+
+ Script file references script code in the external file.
+
+
+ Aleksandar Seovic
+
+
+
+ Initialize a new instance.
+
+ Script language.
+ The name of the script file.
+
+
+
+ Initialize a new instance.
+
+ the script language's
+ the (virtual) path to the script
+
+
+
+ Gets or sets the name of the script file.
+
+ The name of the script file.
+
+
+
+ Class that describes client side script file.
+
+
+
+ Script file references script code in the external file.
+
+
+ Aleksandar Seovic
+
+
+
+ Initialize a new instance.
+
+ Script language.
+ Element ID of the event source.
+ Name of the event to handle.
+ Script text.
+
+
+
+ Initialize a new instance.
+
+ the script language's
+ Element ID of the event source.
+ Name of the event to handle.
+ Script text.
+
+
+
+ Gets or sets the element ID.
+
+ The element ID.
+
+
+
+ Gets or sets the name of the event.
+
+ The name of the event.
+
+
+
+ Resource cache implementation that uses Spring.NET page/handler state to cache resources.
+
+ Aleksandar Seovic
+
+
+
+ Creates a new cache instance and attaches it to the given
+
+ the holder of the shared state dictionary to be used for caching.
+
+
+
+ Gets the list of resources from cache.
+
+ Cache key to use for lookup.
+ A list of cached resources for the specified target object and culture.
+
+
+
+ Puts the list of resources in the cache.
+
+ Cache key to use for the specified resources.
+ A list of resources to cache.
+
+
+
+ This MethodBuilder emits a Callback-call before calling the base method
+
+ Erich Eichinger
+
+
+
+ Initializes a new instance of a SupportsWebDependencyInjectionMethodBuilder
+
+
+
+
+ Inserts a call to a callback-method before actually calling the base-method.
+
+ The IL generator to use
+ The method to proxy
+ The interface definition of this method, if applicable
+
+
+
+ Emits the callback invocation.
+
+
+
+
+ Wraps a ControlCollection.Owner control to make it DI aware
+
+ Erich Eichinger
+
+
+
+ Wraps a control to make it DI aware
+
+
+
+
+
+
+ Performs DI before adding the control to it's parent
+
+
+
+
+
+
+ Delegates call to decorated control
+
+
+
+
+
+ Wraps a ControlCollection.Owner control implementing INamingContainer to make it DI aware
+
+ Erich Eichinger
+
+
+
+ This TypeBuilder dynamically implements the contract on a given type.
+
+ Erich Eichinger
+
+
+
+ Creates a new TypeBuilder instance.
+
+ The base type the proxy shall be derived from
+ The methods to be injected with a call to staticCallbackMethod
+ The static callback method to be injected into methodsToIntercept
+
+
+
+ Creates a proxy that inherits the proxied object's class.
+
+
+ The generated proxy type.
+
+
+
+ Actually implements the interface.
+
+
+
+
+ Declares field that holds the .
+
+
+
+
+ Determines if the specified
+ is one of those generated by this builder.
+
+ The type to check.
+
+ if the type is a SpringAwareControl-based proxy;
+ otherwise .
+
+
+
+
+ Utilities for dependency injection in the web tier.
+
+
+
+
+ Injects dependencies into all controls in the hierarchy
+ based on template definitions in the Spring config file.
+
+ ApplicationContext to be used
+ Control to inject dependencies into.
+
+
+
+ Aquires an ApplicationContext according to a Control's TemplateSourceDirectory
+
+ if availabe, the control's IApplicationContext instance - defaultContext otherwise
+
+
+
+ An implementation of specific for s.
+ The navigator hierarchy equals the control hierarchy when using a .
+
+
+
+ This implementation supports 2 different navigator hierarchies:
+
+
The default hierarchy defined by
+
The hierarchy defined by a web form's hierarchy.
+
+
+
+ This implementation always checks the standard hierarchy first and - if a destination cannot be resolved, falls back
+ to the control hierarchy for resolving a specified navigation destination.
+
+
+
+
+
+ Finds the next up the control hierarchy,
+ starting at the specified .
+
+
+ This method checks both, for controls implementing or . In addition
+ when MasterPages are used, it interprets the control hierarchy as control->page->masterpage. ().
+
+ the control to start the search with.
+ include checking the control itself or start search with its parent.
+ requires s to hold a valid instance.
+ If found, the next or .
+ null otherwise
+
+
+
+ Creates a new instance of a for the specified control.
+
+ the control to be associated with this navigator.
+ the direct parent of this navigator
+ a dictionary containing results
+ specifies how to handle case for destination names.
+
+
+
+ Determines, whether this navigator or one of its parents can
+ navigate to the destination specified in .
+
+ the name of the navigation destination
+ true, if this navigator can navigate to the destination.
+
+
+
+ Check, whether this navigator can navigate to the specified .
+
+ the destination name to check.
+
+ whether the check shall include the control hierarchy or
+ the standard hierarchy only.
+
+
+
+
+ Returns a redirect url string that points to the
+ defined by this
+ result evaluated using this Page for expression
+
+ Name of the result.
+ the instance that issued this request
+ The context to use for evaluating the SpEL expression in the Result
+ A redirect url string.
+
+
+
+ Redirects user to a URL mapped to specified result name.
+
+ Name of the result.
+ the instance that issued this request
+ The context to use for evaluating the SpEL expression in the Result.
+
+
+
+ The that this is associated with.
+
+
+
+
+ Return the next available within
+ this control's parent hierarchy.
+
+
+
+
+ Holds the result match from .
+
+
+
+
+ The matching control
+
+
+
+
+ The instance associated with the control. May be null.
+
+
+
+
+ Initializes the new match instance.
+
+ the matching control. Must not be null!
+
+
+
+ Adapts a concrete instance as a .
+
+ Erich Eichinger
+
+
+
+ Create a new adapter instance, wrapping the specified
+ into a interface.
+
+ the instance to be adapted. May be null.
+
+
+
+ Returns the wrapped that was passed into .
+
+
+
+
+ Provides functions required for implementing validators
+ but are unfortunately not accessible from
+
+ Erich Eichinger
+
+
+
+ Registers a javascript-block to be rendered.
+
+
+
+
+ Checks, if a certain javascript-block is already registered.
+
+
+
+
+ Adds an attribute to be rendered for clientside validation.
+
+
+
+
+ Is "XHTML 1.0 Transitional" rendering allowed?
+
+
+
+
+ Provides common functionality to all validation renderer controls.
+
+ Erich Eichinger
+
+
+
+ Create the default
+ for this ValidationControl if none is configured.
+
+
+
+
+ Gets the MessageSource to be used for resolve error messages
+
+
+ By default, returns 's MessageSource.
+
+ the to resolve message texts. May be null
+
+
+
+ Gets the list of validation errors to render
+
+ the to render. May be null
+
+
+
+ Gets the , who's
+ shall be rendered by this control.
+
+
+ First, it tries to resolve the specified , if any. If no explicit name
+ is set, will probe the control hierarchy for controls implementing .
+
+
+
+
+ Resolves the list of validation errors either explicitely specified using
+ or obtained from the containing
+ resolved by to a list
+ of elements containing the error messages to be rendered.
+
+
+
+ The list of validation errors may either be explicitely specified using
+ or will automatically be obtained from the containing resolved by
+ .
+
+
+ Error Messages are resolved using either an explicitely specified or the
+ obtained from the validation container.
+
+
+ a list containing elements. May return null
+
+
+
+ Renders error messages using the specified .
+
+
+
+
+
+ Set a particular message source to be used for
+ resolving error messages to display texts.
+
+
+ If not set, the control will probe the control hierarchy
+ for containing controls implementing
+ and use the container's .
+
+
+
+
+ Allows to set a particular instance of the validation errors
+ collection to render.
+
+
+ If not set, the control will probe the control hierarchy for
+ containing controls implementing
+ and use the container's
+
+
+
+
+ If set, will resolve to the named control specified
+ by this property. The behavior of name resolution is identical to
+ , except that if the name
+ starts with "::", the resolution will start at the page level instead of relative to this
+ control
+
+
+
+
+ Gets or sets the provider.
+
+ The provider.
+
+
+
+ Gets or sets the validation errors renderer to use.
+
+
+ If not explicitly specified, defaults to .
+
+ The validation errors renderer to use.
+
+
+
+ Displays a pop-up DHTML calendar.
+
+
+
+ Credit: this control uses a slightly modified version of the
+ Dynarch.com DHTML Calendar,
+ written by Mihai Bazon.
+
+
+ Aleksandar Seovic
+
+
+
+ Registers necessary scripts and stylesheet.
+
+
+ An object that contains the event data.
+
+
+
+
+ Renders a hidden input field that stores the value for the radio button group.
+
+
+ to use for rendering.
+
+
+
+
+ Raises the SelectionChanged event.
+
+
+
+
+ Loads postback data into the control.
+
+
+ The key that should be used to retrieve data.
+
+ The postback data collection.
+ if data has changed.
+
+
+
+ The method that is called on postback if the date has changed.
+
+
+ The event argument (empty and unused).
+
+
+
+
+ Gets a reference to the instance that contains the
+ server control.
+
+
+ A reference to the instance that contains the
+ server control.
+
+
+
+
+ The selected date.
+
+ The selected date.
+
+
+
+ The date format that is to be used.
+
+ A valid date format string.
+
+
+
+ Is direct editing of the date allowed?
+
+
+ if direct editing of the date is allowed?
+
+
+
+ The (CSS) style.
+
+ The style for the calendar.
+
+
+
+ Occurs when the value of the radio button group changes between postbacks to the server.
+
+
+
+
+ Adds the property to the framework's control.
+
+
+ When using Spring.Web's DataBinding, you should use this control for easier binding declaration.
+
+ Erich Eichinger
+
+
+
+ Gets or Sets the list of selected values and checks the es accordingly
+
+
+
+
+ This validator allows for validating a CheckBox's "Checked" state.
+
+ Erich Eichinger
+
+
+
+ Validates this validator's properties are set correctly.
+
+
+
+
+
+ Returns the state of the checkbox's Checked property
+
+
+
+
+
+ Adds attributes required for clientside validation
+
+
+
+
+
+ Ensures the evaluation javascript functionblock is registered
+
+
+
+
+
+ Represents Content control that can be used to populate or override placeholders
+ within the master page.
+
+
+ Any content defined within this control will override default content
+ in the matching control
+ within the master page
+
+ Aleksandar Seovic
+
+
+
+ Represents ContentPlaceHolder control that can be used to define placeholders
+ within the master page.
+
+
+ Any content defined within this control will be treated as a default content
+ for the placeholder and will be rendered unless the child page overrides it
+ by defining matching control.
+
+ Aleksandar Seovic
+
+
+
+ Represents Content control that can be used to populate or override placeholders
+ anywhere within the page.
+
+
+
+ Any content defined within this control will override default content
+ in the matching control specified by anywhere
+ within the page.
+
+
+ In contrast to control, ContentReplacer can replace the content of
+ any control within the current page - it is not limited to replacing ContentPlaceholders on master pages.
+
+
+ This technique is useful if you want to group e.g. rendering navigation elements on 1 ascx control, but your
+ design requires navigation elements to be distributed across different places within the HTML code.
+
+
+ Erich Eichinger
+
+
+
+ Overriden to correctly redirect rendermethod calls.
+
+
+
+
+ Renders child controls
+
+
+
+
+ Render nothing.
+
+
+
+
+ Specifies the unique id of the control, who's content is to be replaced.
+
+
+
+
+ May be used to wrap controls for databinding that don't accept unknown attributes.
+
+
+
+
+ Overridden to ensure only 1 control is wrapped by this adapter
+
+
+
+
+
+ Overridden to render wrapped control only.
+
+
+
+
+ Returns the control wrapped by this adapter or null.
+
+
+
+
+ Any WebControl placed on a DataBindingPanel may be bound
+ to a model by adding an attribute "BindingTarget"
+
+ Erich Eichinger
+
+
+
+ This panel provides the same features as , but provides additional means with regards to Spring.
+
+
+ In some cases, automatic dependency injection can cause performance problems. In this case,you can use a Panel for finer-grained control
+ over which controls are to be injected or not.
+
+ Erich Eichinger
+
+
+
+ Overridden to set according to if necessary.
+
+
+
+
+ Renders the HTML opening tag of the control to the specified writer.
+
+ An that represents the output stream to render HTML content on the client.
+
+
+
+ Renders the HTML closing tag of the control to the specified writer.
+
+ An that represents the output stream to render HTML content on the client.
+
+
+
+ This method is invoked right before InitRecursive() is called for this Panel and
+ ensures, that dependencies get injected on child controls before their Init event is raised.
+
+
+
+
+ Injects dependencies into control before adding it.
+
+
+
+
+ Overridden to automatically aquire a reference to
+ root application context to use for DI.
+
+
+
+
+ An optional SpEL expression to control this Panel's state.
+
+
+ This panel instance is the context for evaluating the given expression. If no expression is specified, visibility behavior
+ reverts to standard behavior.
+
+
+
+
+ This flag controls, whether DI on child controls will be done or not
+
+ By default, DI will be done
+
+
+
+ This flag controls, whether this Panel's tag will be rendered.
+
+
+
+
+ Expose the context of this panel for medium trust safe access in e.g. .
+
+
+
+
+ Sets / Gets the ApplicationContext instance used to configure this control
+
+
+
+
+ Registers this control for the event of it's container.
+
+
+
+
+ Overridden to remove custom binding attributes before rendering.
+
+
+
+
+
+ Overriden to suppress rendering this control's tag
+
+
+
+
+
+ Called by the containing if bindings must be initialized.
+
+
+
+
+ Adds all controls on this panel to the containing 's binding collection.
+
+ the usercontrol containing this panel
+ the of controls to be bound
+ action to be performed on matching controls
+
+
+
+ Retrieves custom binding attributes from a webcontrol and adds a new binding
+ instance to the container's if necessary.
+
+
+
+
+ Removes custom binding attributes from a webcontrol to avoid them being rendered.
+
+
+
+
+ Probe for bindingType of know controls
+
+ the control, who's bindingType is to be determined
+ null, if standard binding is to be used or the fully qualified typename of the binding implementation
+
+
+
+ Probes for a few know controls and their properties.
+
+
+ The 'BindingSource' expression to be used for binding this control.
+
+
+
+
+ This control allows for suppressing output of the 'action' attribute.
+
+
+ the 'action' attribute rendered by the default control causes troubles
+ in case of URL-rewriting. See e.g. 'thescripts.com' forum
+ and also JIRA SPRNET-560 for more info.
+
+ Erich Eichinger
+
+
+
+ Renders attributes but performs 'action' suppressing logic.
+
+
+
+
+
+ Sets or Gets a value indicating if the 'action' attribute shall be rendered. Defaults to 'false'
+
+
+ The following possibilites are available:
+
+ If is 'true', rendering of the 'action' attribute is suppressed.
+ If is 'false' and is not set,
+ 'action' attribute will.be rendered to
+
+ If is 'false' and is set,
+ 'action' attribute will.be rendered to
+
+
+
+
+
+
+ Sets or Gets an explicit url to be rendered
+
+
+ The url specified here is only rendered, if is true.
+
+
+
+
+ This wrapper suppresses output of 'action' attributes.
+
+
+
+
+ This control should be used instead of standard HTML head tag
+ in order to render dynamicaly registered head scripts and stylesheets.
+
+
+ If you need to use ASP.NETs built-in <head> tag, you should nest Spring's within ASP.NET's:
+
+ <html>
+ <head>
+ <title>Some Title</title>
+ <spring:head>
+ <-- will render styleblocks etc. here -->
+ </spring:head>
+ </head>
+ </html>
+
+
+ Aleksandar Seovic
+
+
+
+ Sends server control content to a provided object, which writes the content to
+ be rendered on
+ the client.
+
+ The object that receives the server control content.
+
+
+
+ Gets or sets the default mimetype for the <style> element's 'type' attribute
+
+
+ Defaults to "text/css"
+
+
+
+
+ Gets a reference to the instance that contains the
+ server control.
+
+
+
+
+
+ This control should be used instead of standard HTML head tag
+ in order to render dynamicaly registered head scripts and stylesheets.
+
+ Aleksandar Seovic
+
+
+
+ Tries to determine full URL for the localized image before it's rendered.
+
+
+
+
+
+ Name of the image file.
+
+
+
+
+ Gets a reference to the instance that contains the
+ server control.
+
+
+
+
+
+ Groups radio button controls and returns the value of the selected control
+
+
+ This control alows radio buttons to be data-bound to a data model of the page.
+
+ Aleksandar Seovic
+
+
+
+ Overloaded to track addition of contained controls.
+
+
+
+
+ Overloaded to track removal of a RadioButton
+
+
+
+
+
+ Registers the RadioButtonGroup for PostBack.
+
+
+
+
+ Renders only children of this control.
+
+ HtmlTextWriter to use for rendering.
+
+
+
+ Loads postback data into the control.
+
+ Key that should be used to retrieve data.
+ Postback data collection.
+ True if data has changed, false otherwise.
+
+
+
+ Raises SelectionChanged event.
+
+
+
+
+ Method that is called on postback if selected radio button has changed.
+
+ Empty event argument.
+
+
+
+ Gets or sets the ID of the selected radio button.
+
+ ID of the selected radio button.
+
+
+
+ Gets or sets whether form should be posted back on every selection change
+ within the radio group.
+
+
+
+
+ Occurs when the value of the radio button group changes between postbacks to the server.
+
+
+
+
+ Provides information about a command raised from a
+
+ Erich Eichinger
+
+
+
+ Initializes a new instance.
+
+ The name of the command raised by a .
+ The index of the tab that raised this event.
+
+
+
+ Returns the index of the tab that raised this command.
+
+
+
+
+ Represents the method that will handle the TabCommand event.
+
+ The source of the event.
+ A that contains the event data.
+ Erich Eichinger
+
+
+
+ This control is responsible for rendering tabs.
+
+
+ By default, this TabContainer implementation uses controls to
+ render tabs. Override to change this behaviour.
+
+ Erich Eichinger
+
+
+
+ Represents the command name of the tab to be selected.
+
+
+
+
+ Key into the eventhandler table.
+
+
+
+
+ Catches with name '' and
+ raises the event.
+
+ The source of the event.
+ contains event information.
+
+
+
+
+ Raises the event.
+
+
+
+
+ Creates a new tab for the specified view within the given container.
+
+ The containing the view
+ The for which a new tab is to be created.
+ The index of the tab to be created.
+
+ By default, controls are used for rendering tabs. Override this method to
+ change this behaviour.
+
+
+
+
+ Occurs, when a tab control is clicked.
+
+
+
+
+ The control allows you to build ASP.NET Web pages that present
+ the user with content arranged in tabular form.
+
+ Erich Eichinger
+
+
+
+ Initializes a new instance.
+
+
+
+
+ Initializes a new instance with the given container tag to be used for rendering.
+
+
+
+
+ Create the container for tab items.
+
+
+
+
+ Creates TabContainer and MultiView
+
+
+
+
+ keeps parsed views until multiView is created
+
+
+
+
+ Initialize this control.
+
+
+
+
+ Creates child controls.
+
+
+
+
+ Adds the element to the collection of child controls.
+
+
+
+
+ Called if ActiveViewIndex is changed
+
+
+
+
+ Set the style class of the panel containing the Tabs.
+
+
+
+
+ Set the style class of each Tab item.
+
+
+
+
+ Set the style class of the currently selected Tab item.
+
+
+
+
+ Set the style class of the panel containing all controls.
+
+
+
+
+ Gets or sets the index of the active View control within a control.
+
+
+
+
+ Occurs, if the active tab has changed.
+
+
+
+
+ Represents a control that acts as a container for a group of controls within a control.
+
+ Erich Eichinger
+
+
+
+ Indicates if this view is currently active.
+
+
+
+
+ Get or Set the name of the tab item associated with this view.
+
+
+
+
+ Get or Set the tooltip text of the tab item associated with this view.
+
+
+
+
+ Holds the collection of controls in a .
+
+ Erich Eichinger
+
+
+
+ Initialize a new instance.
+
+
+
+
+
+ Add the specified control to the collection.
+
+
+
+
+ Add the specified control to the collection.
+
+
+
+
+ Obtain the specified control from the collection.
+
+
+
+
+ This control should be used to display field-level validation errors.
+
+ Aleksandar Seovic
+ Jonathan Allenby
+
+
+
+ Create the default
+ for this ValidationControl if none is configured.
+
+
+
+
+ This control should be used instead of standard ValidationSummary control
+ to display validation errors identified by the Spring.NET validation framework.
+
+ Aleksandar Seovic
+ Jonathan Allenby
+
+
+
+ Create the default
+ for this ValidationControl if none is configured.
+
+
+
+
+ This class provides common members for all validation errors renderers.
+
+ Aleksandar Seovic
+
+
+
+ This interface should be implemented by all validation errors renderers.
+
+
+
+ Validation errors renderers are used to decouple rendering behavior from the
+ validation errors controls such as and
+ .
+
+
+ This allows users to change how validation errors are rendered by simply pluggin in
+ appropriate renderer implementation into the validation errors controls using
+ Spring.NET dependency injection.
+
+
+ Aleksandar Seovic
+
+
+
+ Renders validation errors using specified .
+
+ Web form instance.
+ An HTML writer to use.
+ The list of validation errors.
+
+
+
+ Renders validation errors using specified .
+
+ Web form instance.
+ An HTML writer to use.
+ The list of validation errors.
+
+
+
+ Gets or sets the name of the CSS class that should be used.
+
+
+ The name of the CSS class that should be used
+
+
+
+
+ Implementation of that renders
+ validation errors within a div element, using breaks between the
+ errors.
+
+
+ This renderer's behavior is consistent with standard ASP.NET behavior of
+ the validation summary, and is used as default renderer for Spring.NET
+ control.
+
+ Aleksandar Seovic
+
+
+
+ Renders validation errors using specified .
+
+ Web form instance.
+ An HTML writer to use.
+ The list of validation errors.
+
+
+
+ Implementation of that
+ displays an error image to let user know there is an error, and
+ tooltip to display actual error messages.
+
+
+
+ This renderer's behavior is similar to Windows Forms error provider.
+
+
+ Aleksandar Seovic
+
+
+
+ Renders validation errors using specified .
+
+ Web form instance.
+ An HTML writer to use.
+ The list of validation errors.
+
+
+
+ Gets or sets the name of the image file to use as an error icon.
+
+
+
+ Image name should be relative to the value of the
+ property, and should not use leading path separator.
+
+
+ The name of the image file to use as an error icon.
+
+
+
+ Implementation of that renders
+ validation errors within a span element, using breaks between the
+ errors.
+
+
+ This renderer's behavior is consistent with standard ASP.NET behavior of
+ the control validators, and is used as the default renderer for Spring.NET
+ control.
+
+ Aleksandar Seovic
+
+
+
+ Renders validation errors using specified .
+
+ Web form instance.
+ An HTML writer to use.
+ The list of validation errors.
+
+
+
+ Convinience implementation of the wizard-like page controller.
+
+
+
+ Wizard steps are encapsulated within custom user controls. Wizard
+ controller takes care of navigation through steps and loading of the
+ appropriate user control.
+
+
+ Developer implementing wizard needs to inherit from this class and implement
+ abstract, read-only StepPanel property that will be used as a container
+ for the wizard steps. Navigation event handlers should call Previous and Next methods
+ from this class to change current step.
+
+
+ Aleksandar Seovic
+
+
+
+ Represents an .aspx file, also known as a Web Forms page, requested from a
+ server that hosts an ASP.NET Web application.
+
+
+
+ The Page class is associated with files that have an .aspx extension.
+ These files are compiled at run time as Page objects and cached in server memory.
+
+
+ This class extends and adds support for master
+ pages similar to upcoming ASP.Net 2.0 master pages feature.
+
+
+ It also adds support for automatic localization using local page resource file, and
+ simplifies access to global resources (resources from the message source for the
+ application context).
+
+
+ Aleksandar Seovic
+
+
+
+ Abstracts access to properties required for
+ handling validation and error rendering
+
+ Erich Eichinger
+
+
+
+ Gets the MessageSource to be used for
+ resolving error ids into messages
+
+
+
+
+ Gets the list of validation errors kept by this container.
+
+
+
+
+ Creates and initializes the new page instance.
+
+
+ Calls .
+
+
+
+
+ Initializes Spring.NET page internals and raises the PreInit event.
+
+ The instance containing the event data.
+
+
+
+ Initializes the culture.
+
+
+
+
+ Initializes data model and controls.
+
+
+
+
+ Raises the event after page initialization.
+
+
+
+
+ Raises the PreLoadViewState event for
+ this page and all contained controls.
+
+
+
+
+ Recursively raises PreLoadViewState event.
+
+
+
+
+ Overridden to add support for
+
+
+ If necessary override instead of this method.
+
+
+
+
+ If ViewState is disabled, calls recursively for all controls.
+
+
+ If ViewState is disabled, DropDownLists etc. might not fire "Changed" events.
+
+
+
+
+ Calls recursively for all controls.
+
+
+
+
+ Recursively calls for all controls.
+
+
+
+
+ If necessary override this method instead of
+
+
+
+
+ Initializes dialog result and unbinds data from the controls
+ into a data model.
+
+ Event arguments.
+
+
+
+ Binds data from the data model into controls and raises
+ PreRender event afterwards.
+
+ Event arguments.
+
+
+
+ Raises InitializeControls event.
+
+ Event arguments.
+
+
+
+ Obtains a object from a user control file
+ and injects dependencies according to Spring config file.
+
+ The virtual path to a user control file.
+
+ Returns the specified object, with dependencies injected.
+
+
+
+
+ Obtains a object by type
+ and injects dependencies according to Spring config file.
+
+ The type of a user control.
+ parameters to pass to the control
+
+ Returns the specified object, with dependencies injected.
+
+
+
+
+ Retrieves data model from a persistence store.
+
+
+ The default implementation uses to store and retrieve
+ the model for the current
+
+
+
+
+ Saves data model to a persistence store.
+
+
+ The default implementation uses to store and retrieve
+ the model for the current
+
+
+
+
+ Initializes data model when the page is first loaded.
+
+
+ This method should be overriden by the developer
+ in order to initialize data model for the page.
+
+
+
+
+ Loads the saved data model on postback.
+
+
+ This method should be overriden by the developer
+ in order to load data model for the page.
+
+
+
+
+ Returns a model object that should be saved.
+
+
+ This method should be overriden by the developer
+ in order to save data model for the page.
+
+
+ A model object that should be saved.
+
+
+
+
+ Stores the controller to be returned by property.
+
+
+ The default implementation uses a field to store the reference. Derived classes may override this behaviour
+ but must ensure to also change the behaviour of accordingly.
+
+ Controller for the page.
+
+
+
+ Returns the controller stored by .
+
+
+ The default implementation uses a field to retrieve the reference. Derived classes may override this behaviour
+ but must ensure to also change the behaviour of accordingly.
+
+
+ The controller for this page.
+
+ If no controller is set, a reference to the page itself is returned.
+
+
+
+
+
+ Registers single CSS style with the page.
+
+ Style name.
+ Style definition.
+
+
+
+ Returns True if specified style is registered, False otherwise.
+
+ Style name.
+ True if specified style is registered, False otherwise.
+
+
+
+ Registers CSS file with the page.
+
+ Style file key.
+ Style file name.
+
+
+
+ Returns True if specified style file is registered, False otherwise.
+
+ Style file key.
+ True if specified style file is registered, False otherwise.
+
+
+
+ Registers script block that should be rendered within the head HTML element.
+
+ Script key.
+ Script text.
+
+
+
+ Registers script block that should be rendered within the head HTML element.
+
+ Script key.
+ Script language.
+ Script text.
+
+
+
+ Registers script block that should be rendered within the head HTML element.
+
+ Script key.
+ Script language MIME type.
+ Script text.
+
+
+
+ Registers script file that should be referenced within the head HTML element.
+
+ Script key.
+ Script file name.
+
+
+
+ Registers script file that should be referenced within the head HTML element.
+
+ Script key.
+ Script language.
+ Script file name.
+
+
+
+ Registers script file that should be referenced within the head HTML element.
+
+ Script key.
+ Script language MIME type.
+ Script file name.
+
+
+
+ Registers script block that should be rendered within the head HTML element.
+
+ Script key.
+ Element ID of the event source.
+ Name of the event to handle.
+ Script text.
+
+
+
+ Registers script block that should be rendered within the head HTML element.
+
+ Script key.
+ Script language.
+ Element ID of the event source.
+ Name of the event to handle.
+ Script text.
+
+
+
+ Registers script block that should be rendered within the head HTML element.
+
+ Script key.
+ The scripting language's MIME type.
+ Element ID of the event source.
+ Name of the event to handle.
+ Script text.
+
+
+
+ Returns True if specified head script is registered, False otherwise.
+
+ Script key.
+ True if specified head script is registered, False otherwise.
+
+
+
+ Ensure, that is set to a valid instance.
+
+
+ If is not already set, creates and sets a new instance.
+ Override this method if you don't want to inject a navigator, but need a different default.
+
+
+
+
+ Redirects user to a URL mapped to specified result name.
+
+ Result name.
+
+
+
+ Redirects user to a URL mapped to specified result name.
+
+ Name of the result.
+ The context to use for evaluating the SpEL expression in the Result.
+
+
+
+ Returns a redirect url string that points to the
+ defined by this
+ result evaluated using this Page for expression
+
+ Name of the result.
+ A redirect url string.
+
+
+
+ Returns a redirect url string that points to the
+ defined by this
+ result evaluated using this Page for expression
+
+ Name of the result.
+ The context to use for evaluating the SpEL expression in the Result
+ A redirect url string.
+
+
+
+ Instructs any validation controls included on the page to validate their assigned information.
+
+
+
+
+
+ Instructs the validation controls in the specified validation group to validate their assigned information.
+
+
+ The validation group name of the controls to validate.
+
+
+
+ Evaluates specified validators and returns True if all of them are valid.
+
+
+
+ Each validator can itself represent a collection of other validators if it is
+ an instance of or one of its derived types.
+
+
+ Please see the Validation Framework section in the documentation for more info.
+
+
+ Object to validate.
+ Validators to evaluate.
+
+ True if all of the specified validators are valid, False otherwise.
+
+
+
+
+ Creates the validator parameters.
+
+
+
+ This method can be overriden if you want to pass additional parameters
+ to the validation framework, but you should make sure that you call
+ this base implementation in order to add page, session, application,
+ request, response and context to the variables collection.
+
+
+
+ Dictionary containing parameters that should be passed to
+ the data validation framework.
+
+
+
+
+ Initializes the data bindings.
+
+
+
+
+ Returns the key to be used for looking up a cached
+ BindingManager instance in .
+
+ a unique key identifying the instance in the dictionary.
+
+
+
+ Creates a new instance.
+
+
+ This factory method is called if no could be found in
+ using the key returned by .
+
+
+
+ a instance to be used for DataBinding
+
+
+
+ Initializes binding manager and data bindings if necessary.
+
+
+
+
+ Raises the event.
+
+
+
+
+ Bind data from model to form.
+
+
+
+
+ Unbind data from form to model.
+
+
+
+
+ Raises DataBound event.
+
+ Event arguments.
+
+
+
+ Raises DataBound event.
+
+ Event arguments.
+
+
+
+ Initializes local message source
+
+
+
+
+ Creates and returns local ResourceManager for this page.
+
+
+
+ In ASP.NET 1.1, this method loads local resources from the web application assembly.
+
+
+ However, in ASP.NET 2.0, local resources are compiled into a dynamic assembly,
+ so we need to find that assembly and load the resources from it.
+
+
+ Local ResourceManager instance.
+
+
+
+ Returns message for the specified resource name.
+
+ Resource name.
+ Message text.
+
+
+
+ Returns message for the specified resource name.
+
+ Resource name.
+ Message arguments that will be used to format return value.
+ Formatted message text.
+
+
+
+ Returns resource object for the specified resource name.
+
+ Resource name.
+ Resource object.
+
+
+
+ Raises UserLocaleChanged event.
+
+ Event arguments.
+
+
+
+ Creates a key for shared state, taking into account whether
+ this page belongs to a process or not.
+
+ Key suffix
+ Generated unique shared state key.
+
+
+
+ Injects dependencies into control before adding it.
+
+
+
+
+ PreLoadViewState event.
+
+
+
+ This event is raised if is true
+ immediately before state is restored from ViewState.
+
+
+ NOTE: Different from , this event
+ will also be raised if the control has no ViewState or ViewState is disabled.
+
+
+
+
+
+ This event is raised before Init event and should be used to initialize
+ controls as necessary.
+
+
+
+
+ Set the strategy for storing model
+ instances between requests.
+
+
+ By default the strategy is used.
+
+
+
+
+ Gets or sets controller for the page.
+
+
+
+ Application pages should shadow this property and change its type
+ in order to make calls to controller within the page as simple as possible.
+
+
+ If external controller is not specified, page will serve as its own controller,
+ which will allow data binding to work properly.
+
+
+ Controller for the page. Defaults to the page itself.
+
+
+
+ Returns a thread-safe dictionary that contains state that is shared by
+ all instances of this page.
+
+
+
+
+ Overrides the default PreviousPage property to return an instance of ,
+ and to work properly during server-side transfers and executes.
+
+
+
+
+ Publish associated with this page for convenient usage in Binding Expressions
+
+
+
+
+ Gets the master page that determines the overall look of the page.
+
+
+
+
+ Returns true if page uses master page, false otherwise.
+
+
+
+
+ Gets a dictionary of registered styles.
+
+ Registered styles.
+
+
+
+ Gets a dictionary of registered style files.
+
+ Registered style files.
+
+
+
+ Gets a dictionary of registered head scripts.
+
+ Registered head scripts.
+
+
+
+ Gets or sets the CSS root.
+
+ The CSS root.
+
+
+
+ Gets or sets the scripts root.
+
+ The scripts root.
+
+
+
+ Gets or sets the images root.
+
+ The images root.
+
+
+
+ Gets/Sets the navigator to be used for handling calls.
+
+
+
+
+ Gets or sets map of result names to target URLs
+
+
+ Using requires to implement .
+
+
+
+
+ A convenience, case-insensitive table that may be used to e.g. pass data into SpEL expressions"/>.
+
+
+ By default, e.g. passes the control instance into an expression. Using
+ is an easy way to pass additional parameters into the expression
+
+ This example shows how to pass an arbitrary value 'age' into a result expression.
+
+ // config:
+
+ <property Name="Results">
+ <dictionary>
+ <entry key="ok_clicked" value="redirect:~/ShowResult.aspx?age=%{Args['age']}" />
+ </dictionary>
+ </property>
+
+ // code:
+
+ void OnOkClicked(object sender, EventArgs e)
+ {
+ Args["result"] = txtAge.Text;
+ SetResult("ok_clicked");
+ }
+
+
+
+
+
+
+ Gets or sets the validation errors container.
+
+ The validation errors container.
+
+
+
+ Expose BindingManager via IDataBound interface
+
+
+
+
+ Gets the binding manager.
+
+ The binding manager.
+
+
+
+ This event is raised after as been initialized.
+
+
+
+
+ This event is raised after all controls have been populated with values
+ from the data model.
+
+
+
+
+ This event is raised after data model has been populated with values from
+ web controls.
+
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Gets or sets the localizer.
+
+ The localizer.
+
+
+
+ Gets or sets the culture resolver.
+
+ The culture resolver.
+
+
+
+ Gets or sets the local message source.
+
+ The local message source.
+
+
+
+ Gets or sets user's culture
+
+
+
+
+ This event is raised when the value of UserLocale property changes.
+
+
+
+
+ Holds default ApplicationContext instance to be used during DI.
+
+
+
+
+ Moves to the previous step in the list, if one exists.
+
+
+
+
+ Moves to the next step in the list, if one exists.
+
+
+
+
+ Initializes wizard steps.
+
+ Event arguments.
+
+
+
+
+
+
+
+
+
+ Loads new step into a step panel if step has changed.
+
+ Event arguments.
+
+
+
+ Initializes all the steps.
+
+ List of step control names.
+ List of step control instances.
+
+
+
+ Loads step control.
+
+
+
+
+ Gets or sets a list of user controls representing wizard steps.
+
+
+
+
+ Gets or sets current step using step index.
+
+
+
+
+ Returns true if there are no steps before the current step.
+
+
+
+
+ Returns true if there are no steps after the current step.
+
+
+
+
+ Panel that should serve as a container for wizard steps.
+
+
+
+
+ Specifies that page should be treated as a dialog, meaning that after processing
+ is over user should return to the referring page.
+
+
+
+ Pages marked with this attribute will have "close" result predefined.
+
+
+ Developers should call SetResult("close") from the event handler
+ in order to return control back to the calling page.
+
+
+ Aleksandar Seovic
+
+
+
+ Abstracts storage strategy for storing model instances between requests.
+ All storage providers participating in UI model management must implement this interface.
+
+
+ Erich Eichinger
+
+
+
+ Load the model for the specified control context.
+
+ the control context.
+ the model for the specified control context.
+
+
+
+ Save the specified model object.
+
+ the control context.
+ the model to save.
+
+
+
+ Spring.NET Master Page implementation for ASP.NET 2.0
+
+ Aleksandar Seovic
+
+
+
+ Initialize a new MasterPage instance.
+
+
+
+
+ Initializes user control.
+
+
+
+
+ Binds data from the data model into controls and raises
+ PreRender event afterwards.
+
+ Event arguments.
+
+
+
+ Raises InitializeControls event.
+
+ Event arguments.
+
+
+
+ Obtains a object from a user control file
+ and injects dependencies according to Spring config file.
+
+ The virtual path to a user control file.
+
+ Returns the specified object, with dependencies injected.
+
+
+
+
+ Obtains a object by type
+ and injects dependencies according to Spring config file.
+
+ The type of a user control.
+ parameters to pass to the control
+
+ Returns the specified object, with dependencies injected.
+
+
+
+
+ Raises DataBound event.
+
+ Event arguments.
+
+
+
+ Raises DataBound event.
+
+ Event arguments.
+
+
+
+ Initializes local message source
+
+
+
+
+ Creates and returns local ResourceManager for this page.
+
+
+
+ In ASP.NET 1.1, this method loads local resources from the web application assembly.
+
+
+ However, in ASP.NET 2.0, local resources are compiled into the dynamic assembly,
+ so we need to find that assembly instead and load the resources from it.
+
+
+ Local ResourceManager instance.
+
+
+
+ Returns message for the specified resource name.
+
+ Resource name.
+ Message text.
+
+
+
+ Returns message for the specified resource name.
+
+ Resource name.
+ Message arguments that will be used to format return value.
+ Formatted message text.
+
+
+
+ Returns resource object for the specified resource name.
+
+ Resource name.
+ Resource object.
+
+
+
+ Ensure, that is set to a valid instance.
+
+
+ If is not already set, creates and sets a new instance.
+ Override this method if you don't want to inject a navigator, but need a different default.
+
+
+
+
+ Redirects user to a URL mapped to specified result name.
+
+ Result name.
+
+
+
+ Redirects user to a URL mapped to specified result name.
+
+ Name of the result.
+ The context to use for evaluating the SpEL expression in the Result.
+
+
+
+ Returns a redirect url string that points to the
+ defined by this
+ result evaluated using this Page for expression
+
+ Name of the result.
+ A redirect url string.
+
+
+
+ Returns a redirect url string that points to the
+ defined by this
+ result evaluated using this Page for expression
+
+ Name of the result.
+ The context to use for evaluating the SpEL expression in the Result
+ A redirect url string.
+
+
+
+ Evaluates specified validators and returns True if all of them are valid.
+
+
+
+ Each validator can itself represent a collection of other validators if it is
+ an instance of or one of its derived types.
+
+
+ Please see the Validation Framework section in the documentation for more info.
+
+
+ Object to validate.
+ Validators to evaluate.
+
+ True if all of the specified validators are valid, False otherwise.
+
+
+
+
+ Creates the validator parameters.
+
+
+
+ This method can be overriden if you want to pass additional parameters
+ to the validation framework, but you should make sure that you call
+ this base implementation in order to add page, session, application,
+ request, response and context to the variables collection.
+
+
+
+ Dictionary containing parameters that should be passed to
+ the data validation framework.
+
+
+
+
+ Injects dependencies before adding the control.
+
+
+
+
+ This event is raised before Load event and should be used to initialize
+ controls as necessary.
+
+
+
+
+ This event is raised after all controls have been populated with values
+ from the data model.
+
+
+
+
+ This event is raised after data model has been populated with values from
+ web controls.
+
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Gets or sets the localizer.
+
+ The localizer.
+
+
+
+ Gets or sets the local message source.
+
+ The local message source.
+
+
+
+ Gets or sets user's culture
+
+
+
+
+ Gets/Sets the navigator to be used for handling calls.
+
+
+
+
+ Gets or sets map of result names to target URLs
+
+
+ Using requires to implement .
+
+
+
+
+ A convenience, case-insensitive table that may be used to e.g. pass data into SpEL expressions"/>.
+
+
+ By default, e.g. passes the control instance into an expression. Using
+ is an easy way to pass additional parameters into the expression
+
+ // config:
+
+ <property Name="Results">
+ <dictionary>
+ <entry key="ok_clicked" value="redirect:~/ShowResult.aspx?result=%{Args['result']}" />
+ </dictionary>
+ </property>
+
+ // code:
+
+ void OnOkClicked(object sender, EventArgs e)
+ {
+ Args["result"] = txtUserInput.Text;
+ SetResult("ok_clicked");
+ }
+
+
+
+
+
+ Gets the validation errors container.
+
+ The validation errors container.
+
+
+
+ Overrides Page property to return
+ instead of .
+
+
+
+
+ Holds the default ApplicationContext to be used during DI.
+
+
+
+
+ implements -based storage for
+ UI model management.
+
+ Erich Eichinger
+
+
+
+ Load the model for the specified control context.
+
+
+ The key used for loading the model from the session dictionary is obtained by calling
+
+ the control context.
+ the model for the specified control context.
+
+
+
+
+ Save the specified model object to session.
+
+
+ The key used for storing the model into the session dictionary is obtained by calling
+
+ the control context.
+ the model to save.
+
+
+
+
+ Create the key to be used for accessing the dictionary.
+
+
+
+
+
+
+ Abstracts session access for unit testing.
+
+
+
+
+ Abstracts session access for unit testing.
+
+
+
+
+ Extends standard .Net user control by adding data binding and localization functionality.
+
+ Aleksandar Seovic
+
+
+
+ Initialize a new UserControl instance.
+
+
+
+
+ Initializes user control.
+
+
+
+
+ Raises the event after page initialization.
+
+
+
+
+ This method is called during a postback if this control has been visible when being rendered to the client.
+
+
+ If the controls has been visible when being rendering to the client,
+ has been called during
+
+ true if the server control's state changes as a result of the post back; otherwise false.
+
+
+
+ This method is called during a postback if this control has been visible when being rendered to the client.
+
+ true if the server control's state changes as a result of the post back; otherwise false.
+
+
+
+ When implemented by a class, signals the server control object to notify the
+ ASP.NET application that the state of the control has changed.
+
+
+
+
+ When implemented by a class, signals the server control object to notify the
+ ASP.NET application that the state of the control has changed.
+
+
+
+
+ First unbinds data from the controls into a data model and
+ then raises Load event in order to execute all associated handlers.
+
+ Event arguments.
+
+
+
+ Binds data from the data model into controls and raises
+ PreRender event afterwards.
+
+ Event arguments.
+
+
+
+ Raises InitializeControls event.
+
+ Event arguments.
+
+
+
+ Obtains a object from a user control file
+ and injects dependencies according to Spring config file.
+
+ The virtual path to a user control file.
+
+ Returns the specified object, with dependencies injected.
+
+
+
+
+ Obtains a object by type
+ and injects dependencies according to Spring config file.
+
+ The type of a user control.
+ parameters to pass to the control
+
+ Returns the specified object, with dependencies injected.
+
+
+
+
+ Retrieves data model from a persistence store.
+
+
+ The default implementation uses to store and retrieve
+ the model for the current
+
+
+
+
+ Saves data model to a persistence store.
+
+
+ The default implementation uses to store and retrieve
+ the model for the current
+
+
+
+
+ Initializes data model when the page is first loaded.
+
+
+ This method should be overriden by the developer
+ in order to initialize data model for the page.
+
+
+
+
+ Loads the saved data model on postback.
+
+
+ This method should be overriden by the developer
+ in order to load data model for the page.
+
+
+
+
+ Returns a model object that should be saved.
+
+
+ This method should be overriden by the developer
+ in order to save data model for the page.
+
+
+ A model object that should be saved.
+
+
+
+
+ Stores the controller to be returned by property.
+
+
+ The default implementation uses a field to store the reference. Derived classes may override this behaviour
+ but must ensure to also change the behaviour of accordingly.
+
+ Controller for the control.
+
+
+
+ Returns the controller stored by .
+
+
+
+ The default implementation uses a field to retrieve the reference.
+
+
+ If external controller is not specified, control will serve as its own controller,
+ which will allow data binding to work properly.
+
+
+ You may override this method e.g. to return in order to
+ have your control bind to the same controller as your page. When overriding this behaviour, derived classes
+ must ensure to also change the behaviour of accordingly.
+
+
+
+ The controller for this control.
+ If no controller is set, a reference to the control itself is returned.
+
+
+
+
+ Ensure, that is set to a valid instance.
+
+
+ If is not already set, creates and sets a new instance.
+ Override this method if you don't want to inject a navigator, but need a different default.
+
+
+
+
+ Redirects user to a URL mapped to specified result name.
+
+ Result name.
+
+
+
+ Redirects user to a URL mapped to specified result name.
+
+ Name of the result.
+ The context to use for evaluating the SpEL expression in the Result.
+
+
+
+ Returns a redirect url string that points to the
+ defined by this
+ result evaluated using this Page for expression
+
+ Name of the result.
+ A redirect url string.
+
+
+
+ Returns a redirect url string that points to the
+ defined by this
+ result evaluated using this Page for expression
+
+ Name of the result.
+ The context to use for evaluating the SpEL expression in the Result
+ A redirect url string.
+
+
+
+ Evaluates specified validators and returns True if all of them are valid.
+
+
+
+ Each validator can itself represent a collection of other validators if it is
+ an instance of or one of its derived types.
+
+
+ Please see the Validation Framework section in the documentation for more info.
+
+
+ Object to validate.
+ Validators to evaluate.
+
+ True if all of the specified validators are valid, False otherwise.
+
+
+
+
+ Creates the validator parameters.
+
+
+
+ This method can be overriden if you want to pass additional parameters
+ to the validation framework, but you should make sure that you call
+ this base implementation in order to add page, session, application,
+ request, response and context to the variables collection.
+
+
+
+ Dictionary containing parameters that should be passed to
+ the data validation framework.
+
+
+
+
+ Initializes the data bindings.
+
+
+
+
+ Returns the key to be used for looking up a cached
+ BindingManager instance in .
+
+ a unique key identifying the instance in the dictionary.
+
+
+
+ Creates a new instance.
+
+
+ This factory method is called if no could be found in
+ using the key returned by .
+
+
+
+ a instance to be used for DataBinding
+
+
+
+ Initializes binding manager and data bindings if necessary.
+
+
+
+
+ Raises the event.
+
+
+
+
+ Bind data from model to form.
+
+
+
+
+ Unbind data from form to model.
+
+
+
+
+ Raises DataBound event.
+
+ Event arguments.
+
+
+
+ Raises DataBound event.
+
+ Event arguments.
+
+
+
+ Initializes local message source
+
+
+
+
+ Creates and returns local ResourceManager for this page.
+
+
+
+ In ASP.NET 1.1, this method loads local resources from the web application assembly.
+
+
+ However, in ASP.NET 2.0, local resources are compiled into the dynamic assembly,
+ so we need to find that assembly instead and load the resources from it.
+
+
+ Local ResourceManager instance.
+
+
+
+ Returns message for the specified resource name.
+
+ Resource name.
+ Message text.
+
+
+
+ Returns message for the specified resource name.
+
+ Resource name.
+ Message arguments that will be used to format return value.
+ Formatted message text.
+
+
+
+ Returns resource object for the specified resource name.
+
+ Resource name.
+ Resource object.
+
+
+
+ Creates a key for shared state, taking into account whether
+ this page belongs to a process or not.
+
+ Key suffix
+ Generated unique shared state key.
+
+
+
+ Injects dependencies into control before adding it.
+
+
+
+
+ PreLoadViewState event.
+
+
+
+ This event is raised if is true
+ immediately before state is restored from ViewState.
+
+
+ NOTE: Different from , this event will always be raised!
+
+
+
+
+
+ This event is raised before Load event and should be used to initialize
+ controls as necessary.
+
+
+
+
+ Set the strategy for storing model
+ instances between requests.
+
+
+ By default the strategy is used.
+
+
+
+
+ Gets or sets controller for the control.
+
+
+
+ Internally calls are delegated to and .
+
+
+ Controller for the control.
+
+
+
+ Returns a thread-safe dictionary that contains state that is shared by
+ all instances of this control.
+
+
+
+
+ Gets/Sets the navigator to be used for handling calls.
+
+
+
+
+ Gets or sets map of result names to target URLs
+
+
+ Using requires to implement .
+
+
+
+
+ A convenience, case-insensitive table that may be used to e.g. pass data into SpEL expressions"/>.
+
+
+ By default, e.g. passes the control instance into an expression. Using
+ is an easy way to pass additional parameters into the expression
+
+ // config:
+
+ <property Name="Results">
+ <dictionary>
+ <entry key="ok_clicked" value="redirect:~/ShowResult.aspx?result=%{Args['result']}" />
+ </dictionary>
+ </property>
+
+ // code:
+
+ void OnOkClicked(object sender, EventArgs e)
+ {
+ Args["result"] = txtUserInput.Text;
+ SetResult("ok_clicked");
+ }
+
+
+
+
+
+ Gets or sets the validation errors container.
+
+ The validation errors container.
+
+
+
+ Gets the binding manager for this control.
+
+ The binding manager.
+
+
+
+ This event is raised after as been initialized.
+
+
+
+
+ This event is raised after all controls have been populated with values
+ from the data model.
+
+
+
+
+ This event is raised after data model has been populated with values from
+ web controls.
+
+
+
+
+ Gets or sets the that this
+ object runs in.
+
+
+
+
+ Normally this call will be used to initialize the object.
+
+
+ Invoked after population of normal object properties but before an
+ init callback such as
+ 's
+
+ or a custom init-method. Invoked after the setting of any
+ 's
+
+ property.
+
+
+
+ In the case of application context initialization errors.
+
+
+ If thrown by any application context methods.
+
+
+
+
+
+ Gets or sets the localizer.
+
+ The localizer.
+
+
+
+ Gets or sets the local message source.
+
+ The local message source.
+
+
+
+ Gets or sets user's culture
+
+
+
+
+ Overrides Page property to return
+ instead of .
+
+
+
+
+ Publish associated with this page for convenient usage in Binding Expressions
+
+
+
+
+ Holds the default ApplicationContext to be used during DI.
+
+
+
+
diff --git a/Resources/Libraries/ZXing/zxing.dll b/Resources/Libraries/ZXing/zxing.dll
new file mode 100644
index 00000000..709a55ab
Binary files /dev/null and b/Resources/Libraries/ZXing/zxing.dll differ
diff --git a/Resources/Libraries/ZXing/zxing.pdb b/Resources/Libraries/ZXing/zxing.pdb
new file mode 100644
index 00000000..73a01156
Binary files /dev/null and b/Resources/Libraries/ZXing/zxing.pdb differ
diff --git a/Resources/Libraries/fastJSON/fastJSON-SL.dll b/Resources/Libraries/fastJSON/fastJSON-SL.dll
new file mode 100644
index 00000000..50b6c6af
Binary files /dev/null and b/Resources/Libraries/fastJSON/fastJSON-SL.dll differ
diff --git a/Resources/Libraries/fastJSON/fastJSON-SL.pdb b/Resources/Libraries/fastJSON/fastJSON-SL.pdb
new file mode 100644
index 00000000..bd845c61
Binary files /dev/null and b/Resources/Libraries/fastJSON/fastJSON-SL.pdb differ
diff --git a/Resources/Libraries/fastJSON/fastJSON.dll b/Resources/Libraries/fastJSON/fastJSON.dll
new file mode 100644
index 00000000..b7ee2f3d
Binary files /dev/null and b/Resources/Libraries/fastJSON/fastJSON.dll differ
diff --git a/Resources/Libraries/fastJSON/fastJSON.pdb b/Resources/Libraries/fastJSON/fastJSON.pdb
new file mode 100644
index 00000000..1405a0be
Binary files /dev/null and b/Resources/Libraries/fastJSON/fastJSON.pdb differ
diff --git a/Resources/Libraries/iTextSharp/itextsharp.dll b/Resources/Libraries/iTextSharp/itextsharp.dll
new file mode 100644
index 00000000..d094db4b
Binary files /dev/null and b/Resources/Libraries/iTextSharp/itextsharp.dll differ