///
- /// Mark Pollack (.NET)
- public class HibernateTemplate : HibernateAccessor, IHibernateOperations
- {
- #region Fields
+ /// Mark Pollack (.NET)
+ public class HibernateTemplate : HibernateAccessor, IHibernateOperations
+ {
+ #region Fields
///
/// The instance for this class.
///
- private readonly ILog log = LogManager.GetLogger(typeof(HibernateTemplate));
+ private readonly ILog log = LogManager.GetLogger(typeof (HibernateTemplate));
private bool checkWriteOperations = true;
-
private bool exposeNativeSession = false;
private bool alwaysUseNewSession = false;
@@ -90,26 +93,26 @@ namespace Spring.Data.NHibernate
private bool allowCreate = true;
private ISessionFactory sessionFactory;
private object entityInterceptor;
- private IObjectFactory objectFactory;
+ private IObjectFactory objectFactory;
private bool cacheQueries = false;
private string queryCacheRegion;
private int fetchSize = 0;
private IAdoExceptionTranslator adoExceptionTranslator;
-
+
private readonly object syncRoot = new object();
private ProxyFactory sessionProxyFactory;
#endregion
#region Constructor (s)
- ///
- /// Initializes a new instance of the class.
- ///
- public HibernateTemplate()
- {
- }
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public HibernateTemplate()
+ {
+ }
///
/// Initializes a new instance of the class.
@@ -118,7 +121,7 @@ namespace Spring.Data.NHibernate
/// session when no transactional Session can be found for the current thread
/// is set to true.
/// The session factory to create sessions.
- public HibernateTemplate(ISessionFactory sessionFactory)
+ public HibernateTemplate(ISessionFactory sessionFactory)
{
SessionFactory = sessionFactory;
AfterPropertiesSet();
@@ -137,9 +140,10 @@ namespace Spring.Data.NHibernate
AllowCreate = allowCreate;
AfterPropertiesSet();
}
- #endregion
- #region Properties
+ #endregion
+
+ #region Properties
///
/// Gets or sets if a new Session should be created when no transactional Session
@@ -159,11 +163,7 @@ namespace Spring.Data.NHibernate
///
public override bool AllowCreate
{
- get
- {
-
- return allowCreate;
- }
+ get { return allowCreate; }
set { allowCreate = value; }
}
@@ -193,7 +193,6 @@ namespace Spring.Data.NHibernate
set { alwaysUseNewSession = value; }
}
-
///
/// Gets or sets the template flush mode.
///
@@ -233,16 +232,14 @@ namespace Spring.Data.NHibernate
{
throw new InvalidOperationException("Cannot get entity interceptor via object name if no object factory set");
}
- return (IInterceptor)this.objectFactory.GetObject((String)this.entityInterceptor, typeof(IInterceptor));
+ return (IInterceptor) this.objectFactory.GetObject((String) this.entityInterceptor, typeof (IInterceptor));
}
- return (IInterceptor)entityInterceptor;
- }
- set
- {
- entityInterceptor = value;
+ return (IInterceptor) entityInterceptor;
}
+ set { entityInterceptor = value; }
}
+
///
/// Gets or sets the name of the cache region for queries executed by this template.
///
@@ -260,7 +257,6 @@ namespace Spring.Data.NHibernate
set { queryCacheRegion = value; }
}
-
///
/// Gets or sets a value indicating whether to
/// cache all queries executed by this template.
@@ -310,6 +306,7 @@ namespace Spring.Data.NHibernate
get { return exposeNativeSession; }
set { exposeNativeSession = value; }
}
+
///
/// Gets or sets whether to check that the Hibernate Session is not in read-only mode
/// in case of write operations (save/update/delete).
@@ -346,10 +343,7 @@ namespace Spring.Data.NHibernate
/// The name of the entity interceptor in the object factory/application context.
public override string EntityInterceptorObjectName
{
- set
- {
- this.entityInterceptor = value;
- }
+ set { this.entityInterceptor = value; }
}
///
@@ -358,10 +352,7 @@ namespace Spring.Data.NHibernate
/// The object factory instance
public override IObjectFactory ObjectFactory
{
- set
- {
- objectFactory = value;
- }
+ set { objectFactory = value; }
}
///
@@ -372,10 +363,7 @@ namespace Spring.Data.NHibernate
public override ISessionFactory SessionFactory
{
get { return sessionFactory; }
- set
- {
- sessionFactory = value;
- }
+ set { sessionFactory = value; }
}
///
@@ -394,7 +382,6 @@ namespace Spring.Data.NHibernate
set { fetchSize = value; }
}
-
///
/// Gets or sets the proxy factory.
///
@@ -407,7 +394,7 @@ namespace Spring.Data.NHibernate
/// The proxy factory.
public virtual ProxyFactory ProxyFactory
{
- get { return sessionProxyFactory; }
+ get { return sessionProxyFactory; }
set { sessionProxyFactory = value; }
}
@@ -433,12 +420,11 @@ namespace Spring.Data.NHibernate
if (adoExceptionTranslator == null)
{
adoExceptionTranslator = SessionFactoryUtils.NewAdoExceptionTranslator(SessionFactory);
- }
+ }
return adoExceptionTranslator;
}
}
-
///
/// Delegate function that clears the session.
///
@@ -496,8 +482,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public object Get(Type type, object id, LockMode lockMode)
{
- return Execute(new GetByTypeHibernateCallback(type, id, lockMode),true);
-
+ return Execute(new GetByTypeHibernateCallback(type, id, lockMode), true);
}
///
@@ -527,8 +512,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public object Load(Type entityType, object id, LockMode lockMode)
{
- return Execute(new LoadByTypeHibernateCallback(entityType, id, lockMode),true);
-
+ return Execute(new LoadByTypeHibernateCallback(entityType, id, lockMode), true);
}
///
@@ -541,7 +525,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public void Load(object entity, object id)
{
- Execute(new LoadByEntityHibernateCallback(entity, id),true);
+ Execute(new LoadByEntityHibernateCallback(entity, id), true);
}
///
@@ -553,7 +537,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public IList LoadAll(Type entityType)
{
- return (IList)Execute(new LoadAllByTypeHibernateCallback(this, entityType),true);
+ return (IList) Execute(new LoadAllByTypeHibernateCallback(this, entityType), true);
}
///
@@ -575,7 +559,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public void Refresh(object entity, LockMode lockMode)
{
- Execute(new RefreshHibernateCallback(entity, lockMode),true);
+ Execute(new RefreshHibernateCallback(entity, lockMode), true);
}
///
@@ -589,7 +573,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public void Lock(object entity, LockMode lockMode)
{
- Execute(new LockHibernateCallback(entity, lockMode),true);
+ Execute(new LockHibernateCallback(entity, lockMode), true);
}
///
@@ -600,7 +584,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public object Save(object entity)
{
- return Execute(new SaveObjectHibernateCallback(this, entity),true);
+ return Execute(new SaveObjectHibernateCallback(this, entity), true);
}
///
@@ -611,7 +595,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public void Save(object entity, object id)
{
- Execute(new SaveObjectWithIdHibernateCallback(this, entity, id),true);
+ Execute(new SaveObjectWithIdHibernateCallback(this, entity, id), true);
}
///
@@ -635,7 +619,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public void Update(object entity, LockMode lockMode)
{
- Execute(new UpdateObjectHibernateCallback(this, entity, lockMode),true);
+ Execute(new UpdateObjectHibernateCallback(this, entity, lockMode), true);
}
///
@@ -647,7 +631,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public void SaveOrUpdate(object entity)
{
- Execute(new SaveOrUpdateObjectHibernateCallback(this, entity),true);
+ Execute(new SaveOrUpdateObjectHibernateCallback(this, entity), true);
}
///
@@ -659,9 +643,10 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public void SaveOrUpdateAll(ICollection entities)
{
- Execute(new SaveOrUpdateAllHibernateCallback(this, entities), true);
+ Execute(new SaveOrUpdateAllHibernateCallback(this, entities), true);
}
+#if !NH_4_0
///
/// Save or update the contents of given persistent object,
/// according to its id (matching the configured "unsaved-value"?).
@@ -676,10 +661,10 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public object SaveOrUpdateCopy(object entity)
{
- return Execute(new SaveOrUpdateCopyHibernateCallback(this, entity),true);
+ return Execute(new SaveOrUpdateCopyHibernateCallback(this, entity), true);
}
+#endif
-#if !NH_1_2
///
/// 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.
@@ -698,7 +683,6 @@ namespace Spring.Data.NHibernate
{
return Execute(new MergeHibernateCallback(this, entity), true);
}
-#endif
///
/// Remove all objects from the Session cache, and cancel all pending saves,
@@ -709,8 +693,6 @@ namespace Spring.Data.NHibernate
Execute(new HibernateDelegate(ClearAction), true);
}
-
-
///
/// Determines whether the given object is in the Session cache.
///
@@ -721,7 +703,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public bool Contains(object entity)
{
- return (bool)Execute(new ContainsHibernateCallback(entity));
+ return (bool) Execute(new ContainsHibernateCallback(entity));
}
///
@@ -732,11 +714,8 @@ namespace Spring.Data.NHibernate
public void Evict(object entity)
{
Execute(new EvictHibernateCallback(entity), true);
-
}
-
-
///
/// Delete the given persistent instance.
///
@@ -747,7 +726,6 @@ namespace Spring.Data.NHibernate
Delete(entity, null);
}
-
///
/// Delete the given persistent instance.
///
@@ -761,7 +739,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public void Delete(object entity, LockMode lockMode)
{
- Execute(new DeleteLockModeHibernateCallback(this, entity, lockMode), true);
+ Execute(new DeleteLockModeHibernateCallback(this, entity, lockMode), true);
}
///
@@ -799,15 +777,13 @@ namespace Spring.Data.NHibernate
/// If length for argument values and types are not equal.
public int Delete(String queryString, Object[] values, IType[] types)
{
- if (values != null && types != null && values.Length != types.Length)
+ if (values != null && types != null && values.Length != types.Length)
{
throw new ArgumentOutOfRangeException("values", "Length of values array must match length of types array");
}
- return (int)Execute(new DeletebyQueryHibernateCallback(this, queryString, values, types),true);
-
+ return (int) Execute(new DeletebyQueryHibernateCallback(this, queryString, values, types), true);
}
-
///
/// Delete all given persistent instances.
///
@@ -818,11 +794,10 @@ namespace Spring.Data.NHibernate
///
/// In case of Hibernate errors
public void DeleteAll(ICollection entities)
- {
- Execute(new DeleteAllHibernateCallback(this, entities),true);
+ {
+ Execute(new DeleteAllHibernateCallback(this, entities), true);
}
-
///
/// Execute the action specified by the given action object within a Session.
///
@@ -897,12 +872,13 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public IList ExecuteFind(IHibernateCallback action)
{
- Object result = Execute(action, ExposeNativeSession);
- if (result != null && !(result is IList)) {
- throw new InvalidDataAccessApiUsageException(
- "Result object returned from HibernateCallback isn't a List: [" + result + "]");
- }
- return (IList) result;
+ Object result = Execute(action, ExposeNativeSession);
+ if (result != null && !(result is IList))
+ {
+ throw new InvalidDataAccessApiUsageException(
+ "Result object returned from HibernateCallback isn't a List: [" + result + "]");
+ }
+ return (IList) result;
}
///
@@ -917,15 +893,18 @@ namespace Spring.Data.NHibernate
public object Execute(IHibernateCallback action, bool exposeNativeSession)
{
ISession session = Session;
-
+
bool existingTransaction = SessionFactoryUtils.IsSessionTransactional(session, SessionFactory);
- if (existingTransaction)
+ if (existingTransaction)
{
- if(log.IsDebugEnabled) log.Debug("Found thread-bound Session for HibernateTemplate");
+ if (log.IsDebugEnabled)
+ {
+ log.Debug("Found thread-bound Session for HibernateTemplate");
+ }
}
FlushModeHolder previousFlushModeHolder = new FlushModeHolder();
- try
+ try
{
previousFlushModeHolder = ApplyFlushMode(session, existingTransaction);
ISession sessionToExpose = (exposeNativeSession ? session : CreateSessionProxy(session));
@@ -945,11 +924,11 @@ namespace Spring.Data.NHibernate
throw new HibernateSystemException(ex);
}
}
- catch (HibernateException ex)
+ catch (HibernateException ex)
{
throw ConvertHibernateAccessException(ex);
}
- catch (Exception ex)
+ catch (Exception ex)
{
IDbProvider dbProvider = SessionFactoryUtils.GetDbProvider(SessionFactory);
if (dbProvider != null && dbProvider.IsDataAccessException(ex))
@@ -962,27 +941,30 @@ namespace Spring.Data.NHibernate
throw;
}
}
- finally
+ finally
{
- if (existingTransaction)
+ if (existingTransaction)
{
- if (log.IsDebugEnabled) log.Debug("Not closing pre-bound Hibernate Session after HibernateTemplate");
- if (previousFlushModeHolder.ModeWasSet)
+ if (log.IsDebugEnabled)
+ {
+ log.Debug("Not closing pre-bound Hibernate Session after HibernateTemplate");
+ }
+ if (previousFlushModeHolder.ModeWasSet)
{
session.FlushMode = previousFlushModeHolder.Mode;
}
}
- else
+ else
{
- // Never use deferred close for an explicitly new Session.
+ // Never use deferred close for an explicitly new Session.
if (AlwaysUseNewSession)
{
SessionFactoryUtils.CloseSession(session);
}
else
{
- SessionFactoryUtils.CloseSessionOrRegisterDeferredClose(session, SessionFactory);
- }
+ SessionFactoryUtils.CloseSessionOrRegisterDeferredClose(session, SessionFactory);
+ }
}
}
}
@@ -997,7 +979,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public IList Find(string queryString)
{
- return Find(queryString, (object[])null, (IType[])null );
+ return Find(queryString, (object[]) null, (IType[]) null);
}
///
@@ -1041,7 +1023,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public IList Find(string queryString, object[] values)
{
- return Find(queryString, values, (IType[]) null);
+ return Find(queryString, values, (IType[]) null);
}
///
@@ -1058,11 +1040,11 @@ namespace Spring.Data.NHibernate
/// If values and types are not null and their lengths are not equal
public IList Find(string queryString, object[] values, IType[] types)
{
- if (values != null && types != null && values.Length != types.Length)
+ if (values != null && types != null && values.Length != types.Length)
{
- throw new ArgumentException("Length of values array must match length of types array");
+ throw new ArgumentException("Length of values array must match length of types array");
}
- return (IList)Execute(new FindHibernateCallback(this, queryString, values, types),true);
+ return (IList) Execute(new FindHibernateCallback(this, queryString, values, types), true);
}
///
@@ -1091,7 +1073,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public IList FindByNamedParam(string queryName, string paramName, object value, IType type)
{
- return FindByNamedParam(queryName, new string[] {paramName}, new object[] {value}, new IType[] {type});
+ return FindByNamedParam(queryName, new string[] {paramName}, new object[] {value}, new IType[] {type});
}
///
@@ -1122,17 +1104,16 @@ namespace Spring.Data.NHibernate
/// if paramNames length is not equal to types length (when types is not null)
public IList FindByNamedParam(string queryString, string[] paramNames, object[] values, IType[] types)
{
- if (paramNames.Length != values.Length)
+ if (paramNames.Length != values.Length)
{
- throw new ArgumentOutOfRangeException("paramNames","Length of paramNames array must match length of values array");
+ throw new ArgumentOutOfRangeException("paramNames", "Length of paramNames array must match length of values array");
}
- if (types != null && paramNames.Length != types.Length)
+ if (types != null && paramNames.Length != types.Length)
{
- throw new ArgumentOutOfRangeException("paramNames","Length of paramNames array must match length of types array");
+ throw new ArgumentOutOfRangeException("paramNames", "Length of paramNames array must match length of types array");
}
- return (IList)Execute(new FindByNamedParamHibernateCallback(this, queryString, paramNames, values, types),true);
-
+ return (IList) Execute(new FindByNamedParamHibernateCallback(this, queryString, paramNames, values, types), true);
}
///
@@ -1173,7 +1154,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public IList FindByNamedQuery(string queryName, object value, IType type)
{
- return FindByNamedQuery(queryName, new object[] { value }, new IType[] { type });
+ return FindByNamedQuery(queryName, new object[] {value}, new IType[] {type});
}
///
@@ -1203,13 +1184,11 @@ namespace Spring.Data.NHibernate
/// If values and types are not null and their lengths differ.
public IList FindByNamedQuery(string queryName, object[] values, IType[] types)
{
- if (values != null && types != null && values.Length != types.Length)
+ if (values != null && types != null && values.Length != types.Length)
{
throw new ArgumentOutOfRangeException("Length of values array must match length of types array");
}
- return (IList)Execute(new FindByNamedQueryHibernateCallback(this, queryName, values, types),true);
-
-
+ return (IList) Execute(new FindByNamedQueryHibernateCallback(this, queryName, values, types), true);
}
///
@@ -1225,7 +1204,6 @@ namespace Spring.Data.NHibernate
public IList FindByNamedQueryAndNamedParam(string queryName, string paramName, object value)
{
return FindByNamedQueryAndNamedParam(queryName, paramName, value, null);
-
}
///
@@ -1242,7 +1220,6 @@ namespace Spring.Data.NHibernate
{
return FindByNamedQueryAndNamedParam(
queryName, new string[] {paramName}, new object[] {value}, new IType[] {type});
-
}
///
@@ -1258,7 +1235,6 @@ namespace Spring.Data.NHibernate
public IList FindByNamedQueryAndNamedParam(string queryName, string[] paramNames, object[] values)
{
return FindByNamedQueryAndNamedParam(queryName, paramNames, values, null);
-
}
///
@@ -1276,16 +1252,15 @@ namespace Spring.Data.NHibernate
/// if paramNames length is not equal to types length (when types is not null)
public IList FindByNamedQueryAndNamedParam(string queryName, string[] paramNames, object[] values, IType[] types)
{
- if (paramNames != null && values != null && paramNames.Length != values.Length)
+ if (paramNames != null && values != null && paramNames.Length != values.Length)
{
- throw new ArgumentOutOfRangeException("paramNames","Length of paramNames array must match length of values array");
+ throw new ArgumentOutOfRangeException("paramNames", "Length of paramNames array must match length of values array");
}
- if (paramNames != null && types != null && paramNames.Length != types.Length)
+ if (paramNames != null && types != null && paramNames.Length != types.Length)
{
- throw new ArgumentOutOfRangeException("paramNams","Length of paramNames array must match length of types array");
+ throw new ArgumentOutOfRangeException("paramNams", "Length of paramNames array must match length of types array");
}
- return (IList)Execute(new FindByNamedQueryAndNamedParamHibernateCallback(this, queryName, paramNames, values, types),true);
-
+ return (IList) Execute(new FindByNamedQueryAndNamedParamHibernateCallback(this, queryName, paramNames, values, types), true);
}
///
@@ -1299,8 +1274,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public IList FindByNamedQueryAndValueObject(string queryName, object valueObject)
{
- return (IList)Execute(new FindByNamedQueryAndValueObjectHibernateCallback(this, queryName, valueObject),true);
-
+ return (IList) Execute(new FindByNamedQueryAndValueObjectHibernateCallback(this, queryName, valueObject), true);
}
///
@@ -1313,14 +1287,13 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
public IList FindByValueObject(string queryString, object valueObject)
{
- return (IList)Execute(new FindByValueObjectHibernateCallback(this, queryString, valueObject), true);
+ return (IList) Execute(new FindByValueObjectHibernateCallback(this, queryString, valueObject), true);
}
#endregion
#region Methods
-
///
/// Create a close-suppressing proxy for the given Hibernate Session.
/// The proxy also prepares returned Query and Criteria objects.
@@ -1343,10 +1316,10 @@ namespace Spring.Data.NHibernate
sessionProxyFactory.Target = session;
- return (ISession)sessionProxyFactory.GetProxy();
+ return (ISession) sessionProxyFactory.GetProxy();
}
}
-
+
///
/// Check whether write operations are allowed on the given Session.
///
@@ -1357,19 +1330,17 @@ namespace Spring.Data.NHibernate
/// The current Hibernate session.
/// If write operation is attempted in read-only mode
///
- public virtual void CheckWriteOperationAllowed(ISession session)
+ public virtual void CheckWriteOperationAllowed(ISession session)
{
- if (CheckWriteOperations && TemplateFlushMode != TemplateFlushMode.Eager &&
- AreEqualFlushMode(TemplateFlushMode.Never, session.FlushMode))
+ if (CheckWriteOperations && TemplateFlushMode != TemplateFlushMode.Eager &&
+ AreEqualFlushMode(TemplateFlushMode.Never, session.FlushMode))
{
throw new InvalidDataAccessApiUsageException(
- "Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session " +
- "into FlushMode.AUTO or remove 'readOnly' marker from transaction definition");
+ "Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session " +
+ "into FlushMode.AUTO or remove 'readOnly' marker from transaction definition");
}
}
-
-
///
/// Compares if the flush mode enumerations, Spring's
/// TemplateFlushMode and NHibernates FlushMode have equal
@@ -1383,9 +1354,9 @@ namespace Spring.Data.NHibernate
///
protected bool AreEqualFlushMode(TemplateFlushMode tfm, FlushMode fm)
{
- if ( (tfm ==TemplateFlushMode.Never && fm == FlushMode.Never) ||
- (tfm ==TemplateFlushMode.Auto && fm == FlushMode.Auto) ||
- (tfm ==TemplateFlushMode.Commit && fm == FlushMode.Commit) )
+ if ((tfm == TemplateFlushMode.Never && fm == FlushMode.Never) ||
+ (tfm == TemplateFlushMode.Auto && fm == FlushMode.Auto) ||
+ (tfm == TemplateFlushMode.Commit && fm == FlushMode.Commit))
{
return true;
}
@@ -1398,7 +1369,7 @@ namespace Spring.Data.NHibernate
#endregion
}
-
+
#region Internal Supporting Callback Classes
//TODO see if can create common base class for some callbacks.
@@ -1406,6 +1377,7 @@ namespace Spring.Data.NHibernate
internal class ContainsHibernateCallback : IHibernateCallback
{
private object entity;
+
public ContainsHibernateCallback(object entity)
{
this.entity = entity;
@@ -1417,12 +1389,12 @@ namespace Spring.Data.NHibernate
}
}
-
internal class DeleteLockModeHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
private object entity;
private LockMode lockMode;
+
public DeleteLockModeHibernateCallback(HibernateTemplate template, object entity, LockMode lockMode)
{
this.outer = template;
@@ -1433,7 +1405,7 @@ namespace Spring.Data.NHibernate
public object DoInHibernate(ISession session)
{
outer.CheckWriteOperationAllowed(session);
- if (lockMode != null)
+ if (lockMode != null)
{
session.Lock(entity, lockMode);
}
@@ -1442,7 +1414,6 @@ namespace Spring.Data.NHibernate
}
}
-
internal class DeletebyQueryHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
@@ -1473,29 +1444,26 @@ namespace Spring.Data.NHibernate
public object DoInHibernate(ISession session)
{
outer.CheckWriteOperationAllowed(session);
- if (values != null)
+ if (values != null)
{
return session.Delete(queryString, values, types);
}
- else
+ else
{
return session.Delete(queryString);
}
}
}
-
-
internal class DeleteAllHibernateCallback : IHibernateCallback
{
- HibernateTemplate outer;
+ private HibernateTemplate outer;
private ICollection entities;
public DeleteAllHibernateCallback(HibernateTemplate template, ICollection entities)
{
this.outer = template;
this.entities = entities;
-
}
///
@@ -1519,12 +1487,8 @@ namespace Spring.Data.NHibernate
}
return null;
}
-
-
-
}
-
internal class EvictHibernateCallback : IHibernateCallback
{
private object entity;
@@ -1532,7 +1496,6 @@ namespace Spring.Data.NHibernate
public EvictHibernateCallback(object entity)
{
this.entity = entity;
-
}
///
@@ -1552,12 +1515,8 @@ namespace Spring.Data.NHibernate
session.Evict(entity);
return null;
}
-
-
-
}
-
internal class FindHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
@@ -1589,29 +1548,28 @@ namespace Spring.Data.NHibernate
{
IQuery queryObject = session.CreateQuery(queryString);
outer.PrepareQuery(queryObject);
- if (values != null)
+ if (values != null)
{
- for (int i = 0; i < values.Length; i++)
+ for (int i = 0; i < values.Length; i++)
{
- if (types != null && types[i] != null)
+ if (types != null && types[i] != null)
{
queryObject.SetParameter(i, values[i], types[i]);
}
- else
+ else
{
queryObject.SetParameter(i, values[i]);
}
}
}
-
+
return queryObject.List();
}
}
-
internal class FindByNamedParamHibernateCallback : IHibernateCallback
{
- HibernateTemplate outer;
+ private HibernateTemplate outer;
private string queryString;
private string[] paramNames;
private object[] values;
@@ -1642,22 +1600,20 @@ namespace Spring.Data.NHibernate
{
IQuery queryObject = session.CreateQuery(queryString);
outer.PrepareQuery(queryObject);
- if (values != null)
+ if (values != null)
{
- for (int i = 0; i < values.Length; i++)
+ for (int i = 0; i < values.Length; i++)
{
outer.ApplyNamedParameterToQuery(queryObject, paramNames[i], values[i], (types != null ? types[i] : null));
}
}
return queryObject.List();
-
}
}
-
internal class FindByNamedQueryHibernateCallback : IHibernateCallback
{
- HibernateTemplate outer;
+ private HibernateTemplate outer;
private string queryName;
private object[] values;
private IType[] types;
@@ -1686,29 +1642,27 @@ namespace Spring.Data.NHibernate
{
IQuery queryObject = session.GetNamedQuery(queryName);
outer.PrepareQuery(queryObject);
- if (values != null)
+ if (values != null)
{
- for (int i = 0; i < values.Length; i++)
+ for (int i = 0; i < values.Length; i++)
{
- if (types != null && types[i] != null)
+ if (types != null && types[i] != null)
{
queryObject.SetParameter(i, values[i], types[i]);
}
- else
+ else
{
queryObject.SetParameter(i, values[i]);
}
}
}
return queryObject.List();
-
}
}
-
internal class FindByNamedQueryAndNamedParamHibernateCallback : IHibernateCallback
{
- HibernateTemplate outer;
+ private HibernateTemplate outer;
private string queryName;
private string[] paramNames;
private object[] values;
@@ -1739,22 +1693,20 @@ namespace Spring.Data.NHibernate
{
IQuery queryObject = session.GetNamedQuery(queryName);
outer.PrepareQuery(queryObject);
- if (values != null)
+ if (values != null)
{
- for (int i = 0; i < values.Length; i++)
+ for (int i = 0; i < values.Length; i++)
{
outer.ApplyNamedParameterToQuery(queryObject, paramNames[i], values[i], (types != null ? types[i] : null));
}
}
return queryObject.List();
-
}
}
-
internal class FindByNamedQueryAndValueObjectHibernateCallback : IHibernateCallback
{
- HibernateTemplate outer;
+ private HibernateTemplate outer;
private string queryName;
private object valueObject;
@@ -1763,7 +1715,6 @@ namespace Spring.Data.NHibernate
this.outer = template;
this.queryName = queryName;
this.valueObject = valueObject;
-
}
///
@@ -1784,16 +1735,12 @@ namespace Spring.Data.NHibernate
outer.PrepareQuery(queryObject);
queryObject.SetProperties(valueObject);
return queryObject.List();
-
}
-
-
-
}
internal class FindByValueObjectHibernateCallback : IHibernateCallback
{
- HibernateTemplate outer;
+ private HibernateTemplate outer;
private string queryString;
private object valueObject;
@@ -1802,7 +1749,6 @@ namespace Spring.Data.NHibernate
this.outer = template;
this.queryString = queryString;
this.valueObject = valueObject;
-
}
public object DoInHibernate(ISession session)
@@ -1811,11 +1757,9 @@ namespace Spring.Data.NHibernate
outer.PrepareQuery(queryObject);
queryObject.SetProperties(valueObject);
return queryObject.List();
-
}
-
}
-
+
internal class ExecuteHibernateCallbackUsingDelegate : IHibernateCallback
{
private HibernateDelegate del;
@@ -1831,7 +1775,6 @@ namespace Spring.Data.NHibernate
}
}
-
internal class GetByTypeHibernateCallback : IHibernateCallback
{
private Type entityType;
@@ -1843,7 +1786,6 @@ namespace Spring.Data.NHibernate
this.entityType = entityType;
this.id = id;
this.lockMode = lockMode;
-
}
///
@@ -1860,21 +1802,17 @@ namespace Spring.Data.NHibernate
///
public object DoInHibernate(ISession session)
{
- if (lockMode != null)
+ if (lockMode != null)
{
return session.Get(entityType, id, lockMode);
}
- else
+ else
{
return session.Get(entityType, id);
}
}
-
-
-
}
-
internal class LoadByTypeHibernateCallback : IHibernateCallback
{
private Type entityType;
@@ -1886,7 +1824,6 @@ namespace Spring.Data.NHibernate
this.entityType = entityType;
this.id = id;
this.lockMode = lockMode;
-
}
///
@@ -1903,21 +1840,17 @@ namespace Spring.Data.NHibernate
///
public object DoInHibernate(ISession session)
{
- if (lockMode != null)
+ if (lockMode != null)
{
return session.Load(entityType, id, lockMode);
}
- else
+ else
{
return session.Load(entityType, id);
}
}
-
-
-
}
-
internal class LoadByEntityHibernateCallback : IHibernateCallback
{
private object entity;
@@ -1946,12 +1879,8 @@ namespace Spring.Data.NHibernate
session.Load(entity, id);
return null;
}
-
-
-
}
-
internal class LoadAllByTypeHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
@@ -1983,7 +1912,6 @@ namespace Spring.Data.NHibernate
}
}
-
internal class LockHibernateCallback : IHibernateCallback
{
private object entity;
@@ -2010,11 +1938,10 @@ namespace Spring.Data.NHibernate
public object DoInHibernate(ISession session)
{
session.Lock(entity, lockMode);
- return null;
+ return null;
}
}
-
internal class RefreshHibernateCallback : IHibernateCallback
{
private object entity;
@@ -2040,11 +1967,11 @@ namespace Spring.Data.NHibernate
///
public object DoInHibernate(ISession session)
{
- if (lockMode != null)
+ if (lockMode != null)
{
session.Refresh(entity, lockMode);
}
- else
+ else
{
session.Refresh(entity);
}
@@ -2052,7 +1979,6 @@ namespace Spring.Data.NHibernate
}
}
-
internal class SaveObjectHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
@@ -2061,7 +1987,7 @@ namespace Spring.Data.NHibernate
public SaveObjectHibernateCallback(HibernateTemplate template, object entity)
{
this.outer = template;
- this.entity = entity;
+ this.entity = entity;
}
///
@@ -2083,7 +2009,6 @@ namespace Spring.Data.NHibernate
}
}
-
internal class SaveObjectWithIdHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
@@ -2093,7 +2018,7 @@ namespace Spring.Data.NHibernate
public SaveObjectWithIdHibernateCallback(HibernateTemplate template, object entity, object id)
{
this.outer = template;
- this.entity = entity;
+ this.entity = entity;
this.id = id;
}
@@ -2117,7 +2042,6 @@ namespace Spring.Data.NHibernate
}
}
-
internal class UpdateObjectHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
@@ -2127,7 +2051,7 @@ namespace Spring.Data.NHibernate
public UpdateObjectHibernateCallback(HibernateTemplate template, object entity, LockMode lockMode)
{
this.outer = template;
- this.entity = entity;
+ this.entity = entity;
this.lockMode = lockMode;
}
@@ -2147,7 +2071,7 @@ namespace Spring.Data.NHibernate
{
outer.CheckWriteOperationAllowed(session);
session.Update(entity);
- if (lockMode != null)
+ if (lockMode != null)
{
session.Lock(entity, lockMode);
}
@@ -2155,7 +2079,6 @@ namespace Spring.Data.NHibernate
}
}
-
internal class SaveOrUpdateObjectHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
@@ -2164,7 +2087,7 @@ namespace Spring.Data.NHibernate
public SaveOrUpdateObjectHibernateCallback(HibernateTemplate template, object entity)
{
this.outer = template;
- this.entity = entity;
+ this.entity = entity;
}
///
@@ -2220,6 +2143,8 @@ namespace Spring.Data.NHibernate
return null;
}
}
+
+#if !NH_4_0
internal class SaveOrUpdateCopyHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
@@ -2228,7 +2153,7 @@ namespace Spring.Data.NHibernate
public SaveOrUpdateCopyHibernateCallback(HibernateTemplate template, object entity)
{
this.outer = template;
- this.entity = entity;
+ this.entity = entity;
}
///
@@ -2249,8 +2174,8 @@ namespace Spring.Data.NHibernate
return session.SaveOrUpdateCopy(entity);
}
}
+#endif
-#if !NH_1_2
internal class MergeHibernateCallback : IHibernateCallback
{
private HibernateTemplate outer;
@@ -2280,9 +2205,6 @@ namespace Spring.Data.NHibernate
return session.Merge(entity);
}
}
-#endif
#endregion
-
-
-}
+}
\ No newline at end of file
diff --git a/src/Spring/Spring.Data.NHibernate/Data/NHibernate/ICommonHibernateOperations.cs b/src/Spring/Spring.Data.NHibernate/Data/NHibernate/ICommonHibernateOperations.cs
index 2e065643..1966fccf 100644
--- a/src/Spring/Spring.Data.NHibernate/Data/NHibernate/ICommonHibernateOperations.cs
+++ b/src/Spring/Spring.Data.NHibernate/Data/NHibernate/ICommonHibernateOperations.cs
@@ -222,6 +222,7 @@ namespace Spring.Data.NHibernate
/// In case of Hibernate errors
void SaveOrUpdate(object entity);
+#if !NH_4_0
///
/// Save or update the contents of given persistent object,
/// according to its id (matching the configured "unsaved-value"?).
@@ -235,8 +236,8 @@ namespace Spring.Data.NHibernate
/// (either an already loaded instance with the same id, or the given object)
/// In case of Hibernate errors
object SaveOrUpdateCopy(object entity);
+#endif
-#if !NH_1_2
///
/// 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.
@@ -252,7 +253,6 @@ namespace Spring.Data.NHibernate
/// An updated persistent instance
/// In case of Hibernate errors
object Merge(object entity);
-#endif
#endregion
}
diff --git a/src/Spring/Spring.Data.NHibernate33/AssemblyInfo.cs b/src/Spring/Spring.Data.NHibernate3/AssemblyInfo.cs
similarity index 100%
rename from src/Spring/Spring.Data.NHibernate33/AssemblyInfo.cs
rename to src/Spring/Spring.Data.NHibernate3/AssemblyInfo.cs
diff --git a/src/Spring/Spring.Data.NHibernate32/Data/NHibernate/Bytecode/dontdelete.txt b/src/Spring/Spring.Data.NHibernate3/Data/NHibernate/Bytecode/dontdelete.txt
similarity index 100%
rename from src/Spring/Spring.Data.NHibernate32/Data/NHibernate/Bytecode/dontdelete.txt
rename to src/Spring/Spring.Data.NHibernate3/Data/NHibernate/Bytecode/dontdelete.txt
diff --git a/src/Spring/Spring.Data.NHibernate32/Data/NHibernate/Generic/dontdelete.txt b/src/Spring/Spring.Data.NHibernate3/Data/NHibernate/Generic/dontdelete.txt
similarity index 100%
rename from src/Spring/Spring.Data.NHibernate32/Data/NHibernate/Generic/dontdelete.txt
rename to src/Spring/Spring.Data.NHibernate3/Data/NHibernate/Generic/dontdelete.txt
diff --git a/src/Spring/Spring.Data.NHibernate32/Data/NHibernate/Support/dontdelete.txt b/src/Spring/Spring.Data.NHibernate3/Data/NHibernate/Support/dontdelete.txt
similarity index 100%
rename from src/Spring/Spring.Data.NHibernate32/Data/NHibernate/Support/dontdelete.txt
rename to src/Spring/Spring.Data.NHibernate3/Data/NHibernate/Support/dontdelete.txt
diff --git a/src/Spring/Spring.Data.NHibernate33/Spring.Data.NHibernate33.2010.csproj b/src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.2010.csproj
similarity index 97%
rename from src/Spring/Spring.Data.NHibernate33/Spring.Data.NHibernate33.2010.csproj
rename to src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.2010.csproj
index 6110c87a..d4bb758e 100644
--- a/src/Spring/Spring.Data.NHibernate33/Spring.Data.NHibernate33.2010.csproj
+++ b/src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.2010.csproj
@@ -9,7 +9,7 @@
LibraryPropertiesSpring
- Spring.Data.NHibernate33
+ Spring.Data.NHibernate3v4.0
@@ -38,22 +38,22 @@
truefullfalse
- ..\..\..\build\VS.Net.2010\Spring.Data.NHibernate33\Debug\
+ ..\..\..\build\VS.Net.2010\Spring.Data.NHibernate3\Debug\TRACE;DEBUG;NET_4_0prompt4
- Spring.Data.NHibernate33.xml
+ Spring.Data.NHibernate3.xmltrue0618pdbonlytrue
- ..\..\..\build\VS.Net.2010\Spring.Data.NHibernate33\Release\
+ ..\..\..\build\VS.Net.2010\Spring.Data.NHibernate3\Release\TRACE;NET_4_0prompt4
- Spring.Data.NHibernate33.xml
+ Spring.Data.NHibernate3.xmltrue0618
@@ -70,6 +70,7 @@
..\..\..\packages\NHibernate.3.3.3.4001\lib\Net35\NHibernate.dll
+
diff --git a/src/Spring/Spring.Data.NHibernate33/Spring.Data.NHibernate33.build b/src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.build
similarity index 87%
rename from src/Spring/Spring.Data.NHibernate33/Spring.Data.NHibernate33.build
rename to src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.build
index 19efa788..5b70b163 100644
--- a/src/Spring/Spring.Data.NHibernate33/Spring.Data.NHibernate33.build
+++ b/src/Spring/Spring.Data.NHibernate3/Spring.Data.NHibernate3.build
@@ -1,5 +1,5 @@
-
+
-
+
-
+
-
+
-
+
-
+
- Spring.Data.NHibernate33
+ Spring.Data.NHibernate3Spring.Net NHibernate 3.3 supporthttp://www.springframework.net/http://www.springframework.net/license.html
@@ -21,14 +21,14 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Spring/Spring.Data.NHibernate33/packages.config b/src/Spring/Spring.Data.NHibernate3/packages.config
similarity index 100%
rename from src/Spring/Spring.Data.NHibernate33/packages.config
rename to src/Spring/Spring.Data.NHibernate3/packages.config
diff --git a/src/Spring/Spring.Data.NHibernate32/AssemblyInfo.cs b/src/Spring/Spring.Data.NHibernate32/AssemblyInfo.cs
deleted file mode 100644
index 48331a47..00000000
--- a/src/Spring/Spring.Data.NHibernate32/AssemblyInfo.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-using System;
-using System.Reflection;
-
-[assembly: AssemblyTitle("Spring.Net NHibernate 3.2 support")]
-[assembly: AssemblyDescription("Interfaces and classes that provide NHibernate 3.2 support in Spring.Net")]
\ No newline at end of file
diff --git a/src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.nuspec b/src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.nuspec
deleted file mode 100644
index 1cfcb7e9..00000000
--- a/src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.nuspec
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
- Spring.Data.NHibernate32
- Spring.Net NHibernate 3.2 support
- http://www.springframework.net/
- http://www.springframework.net/license.html
- http://springframework.net/images/SpringSource_Leaves32x32.png
- 0.0.0
-
- SpringSource
- Interfaces and classes that provide NHibernate 3.2 support in Spring.Net
- Interfaces and classes that provide NHibernate 3.2 support in Spring.Net
- en-US
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Spring/Spring.Data.NHibernate4/AssemblyInfo.cs b/src/Spring/Spring.Data.NHibernate4/AssemblyInfo.cs
new file mode 100644
index 00000000..4a4c8ccf
--- /dev/null
+++ b/src/Spring/Spring.Data.NHibernate4/AssemblyInfo.cs
@@ -0,0 +1,5 @@
+using System;
+using System.Reflection;
+
+[assembly: AssemblyTitle("Spring.Net NHibernate 3.3 support")]
+[assembly: AssemblyDescription("Interfaces and classes that provide NHibernate 3.3 support in Spring.Net")]
\ No newline at end of file
diff --git a/src/Spring/Spring.Data.NHibernate33/Data/NHibernate/Bytecode/dontdelete.txt b/src/Spring/Spring.Data.NHibernate4/Data/NHibernate/Bytecode/dontdelete.txt
similarity index 100%
rename from src/Spring/Spring.Data.NHibernate33/Data/NHibernate/Bytecode/dontdelete.txt
rename to src/Spring/Spring.Data.NHibernate4/Data/NHibernate/Bytecode/dontdelete.txt
diff --git a/src/Spring/Spring.Data.NHibernate33/Data/NHibernate/Generic/dontdelete.txt b/src/Spring/Spring.Data.NHibernate4/Data/NHibernate/Generic/dontdelete.txt
similarity index 100%
rename from src/Spring/Spring.Data.NHibernate33/Data/NHibernate/Generic/dontdelete.txt
rename to src/Spring/Spring.Data.NHibernate4/Data/NHibernate/Generic/dontdelete.txt
diff --git a/src/Spring/Spring.Data.NHibernate33/Data/NHibernate/Support/dontdelete.txt b/src/Spring/Spring.Data.NHibernate4/Data/NHibernate/Support/dontdelete.txt
similarity index 100%
rename from src/Spring/Spring.Data.NHibernate33/Data/NHibernate/Support/dontdelete.txt
rename to src/Spring/Spring.Data.NHibernate4/Data/NHibernate/Support/dontdelete.txt
diff --git a/src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.2010.csproj b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.2010.csproj
similarity index 90%
rename from src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.2010.csproj
rename to src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.2010.csproj
index 3e0a6a40..0cf6a168 100644
--- a/src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.2010.csproj
+++ b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.2010.csproj
@@ -1,255 +1,254 @@
-
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}
- Library
- Properties
- Spring
- Spring.Data.NHibernate32
- v4.0
-
-
- 3.5
-
-
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
- ..\..\..\
- true
-
-
- true
- full
- false
- ..\..\..\build\VS.Net.2010\Spring.Data.NHibernate32\Debug\
- TRACE;DEBUG;NET_4_0
- prompt
- 4
- Spring.Data.NHibernate32.xml
- true
- 0618
-
-
- pdbonly
- true
- ..\..\..\build\VS.Net.2010\Spring.Data.NHibernate32\Release\
- TRACE;NET_4_0
- prompt
- 4
- Spring.Data.NHibernate32.xml
- true
- 0618
-
-
-
- ..\..\..\packages\Common.Logging.2.1.2\lib\net40\Common.Logging.dll
-
-
- False
- ..\..\..\packages\Iesi.Collections.3.2.0.4000\lib\Net35\Iesi.Collections.dll
-
-
- False
- ..\..\..\packages\NHibernate.3.2.0.4000\lib\Net35\NHibernate.dll
-
-
-
-
-
-
-
-
-
- CommonAssemblyInfo.cs
-
-
- Data\NHibernate\Bytecode\BytecodeProvider.cs
-
-
- Data\NHibernate\Bytecode\LazyInitializer.cs
-
-
- Data\NHibernate\Bytecode\ObjectsFactory.cs
-
-
- Data\NHibernate\Bytecode\ProxyFactory.cs
-
-
- Data\NHibernate\Bytecode\ProxyFactoryFactory.cs
-
-
- Data\NHibernate\Bytecode\ReflectionOptimizer.cs
-
-
- Data\NHibernate\DelegatingLocalSessionFactoryObject.cs
-
-
- Data\NHibernate\DelegatingSessionFactory.cs
-
-
- Data\NHibernate\FilterDefinitionFactoryObject.cs
-
-
- Data\NHibernate\Generic\FindHibernateDelegate.cs
-
-
- Data\NHibernate\Generic\HibernateDaoSupport.cs
-
-
- Data\NHibernate\Generic\HibernateDelegate.cs
-
-
- Data\NHibernate\Generic\HibernateTemplate.cs
-
-
- Data\NHibernate\Generic\IFindHibernateCallback.cs
-
-
- Data\NHibernate\Generic\IHibernateCallback.cs
-
-
- Data\NHibernate\Generic\IHibernateOperations.cs
-
-
- Data\NHibernate\HibernateAccessor.cs
-
-
- Data\NHibernate\HibernateAdoException.cs
-
-
- Data\NHibernate\HibernateDelegate.cs
-
-
- Data\NHibernate\HibernateObjectRetrievalFailureException.cs
-
-
- Data\NHibernate\HibernateOptimisticLockingFailureException.cs
-
-
- Data\NHibernate\HibernateQueryException.cs
-
-
- Data\NHibernate\HibernateSystemException.cs
-
-
- Data\NHibernate\HibernateTemplate.cs
-
-
- Data\NHibernate\HibernateTransactionManager.cs
-
-
- Data\NHibernate\HibernateTxScopeTransactionManager.cs
-
-
- Data\NHibernate\ICommonHibernateOperations.cs
-
-
- Data\NHibernate\IHibernateCallback.cs
-
-
- Data\NHibernate\IHibernateOperations.cs
-
-
- Data\NHibernate\LocalSessionFactoryObject.cs
-
-
- Data\NHibernate\SessionFactoryUtils.cs
-
-
- Data\NHibernate\SessionHolder.cs
-
-
- Data\NHibernate\SimpleDelegatingSessionFactory.cs
-
-
- Data\NHibernate\SpringSessionContext.cs
-
-
- Data\NHibernate\SpringSessionSynchronization.cs
-
-
- Data\NHibernate\Support\ConfigSectionSessionScopeSettings.cs
-
-
- Data\NHibernate\Support\HibernateDaoSupport.cs
-
-
- Data\NHibernate\Support\OpenSessionInViewModule.cs
-
-
- Data\NHibernate\Support\SessionScope.cs
-
-
- Data\NHibernate\Support\SessionScopeSettings.cs
-
-
- Data\NHibernate\TemplateFlushMode.cs
-
-
-
-
-
- {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}
- Spring.Aop.2010
-
-
- {710961A3-0DF4-49E4-A26E-F5B9C044AC84}
- Spring.Core.2010
-
-
- {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}
- Spring.Data.2010
-
-
-
-
- False
- Microsoft .NET Framework 4 %28x86 and x64%29
- true
-
-
- False
- .NET Framework 3.5 SP1 Client Profile
- false
-
-
- False
- .NET Framework 3.5 SP1
- false
-
-
- False
- Windows Installer 3.1
- true
-
-
-
-
-
-
-
-
+
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {D9C45177-0D80-4133-AB46-58F142DB92AA}
+ Library
+ Properties
+ Spring
+ Spring.Data.NHibernate4
+ v4.0
+
+
+ 3.5
+
+
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
+ ..\..\..\
+ true
+
+
+ true
+ full
+ false
+ ..\..\..\build\VS.Net.2010\Spring.Data.NHibernate4\Debug\
+ TRACE;DEBUG;NET_4_0,NH_4_0
+ prompt
+ 4
+ Spring.Data.NHibernate4.xml
+ true
+ 0618
+
+
+ pdbonly
+ true
+ ..\..\..\build\VS.Net.2010\Spring.Data.NHibernate4\Release\
+ TRACE;NET_4_0,NH_4_0
+ prompt
+ 4
+ Spring.Data.NHibernate4.xml
+ true
+ 0618
+
+
+
+ ..\..\..\packages\Common.Logging.2.1.2\lib\net40\Common.Logging.dll
+
+
+ ..\..\..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll
+
+
+ ..\..\..\packages\NHibernate.4.0.0.4000\lib\net40\NHibernate.dll
+
+
+
+
+
+
+
+
+
+
+ CommonAssemblyInfo.cs
+
+
+ Data\NHibernate\Bytecode\BytecodeProvider.cs
+
+
+ Data\NHibernate\Bytecode\LazyInitializer.cs
+
+
+ Data\NHibernate\Bytecode\ObjectsFactory.cs
+
+
+ Data\NHibernate\Bytecode\ProxyFactory.cs
+
+
+ Data\NHibernate\Bytecode\ProxyFactoryFactory.cs
+
+
+ Data\NHibernate\Bytecode\ReflectionOptimizer.cs
+
+
+ Data\NHibernate\DelegatingLocalSessionFactoryObject.cs
+
+
+ Data\NHibernate\DelegatingSessionFactory.cs
+
+
+ Data\NHibernate\FilterDefinitionFactoryObject.cs
+
+
+ Data\NHibernate\Generic\FindHibernateDelegate.cs
+
+
+ Data\NHibernate\Generic\HibernateDaoSupport.cs
+
+
+ Data\NHibernate\Generic\HibernateDelegate.cs
+
+
+ Data\NHibernate\Generic\HibernateTemplate.cs
+
+
+ Data\NHibernate\Generic\IFindHibernateCallback.cs
+
+
+ Data\NHibernate\Generic\IHibernateCallback.cs
+
+
+ Data\NHibernate\Generic\IHibernateOperations.cs
+
+
+ Data\NHibernate\HibernateAccessor.cs
+
+
+ Data\NHibernate\HibernateAdoException.cs
+
+
+ Data\NHibernate\HibernateDelegate.cs
+
+
+ Data\NHibernate\HibernateObjectRetrievalFailureException.cs
+
+
+ Data\NHibernate\HibernateOptimisticLockingFailureException.cs
+
+
+ Data\NHibernate\HibernateQueryException.cs
+
+
+ Data\NHibernate\HibernateSystemException.cs
+
+
+ Data\NHibernate\HibernateTemplate.cs
+
+
+ Data\NHibernate\HibernateTransactionManager.cs
+
+
+ Data\NHibernate\HibernateTxScopeTransactionManager.cs
+
+
+ Data\NHibernate\ICommonHibernateOperations.cs
+
+
+ Data\NHibernate\IHibernateCallback.cs
+
+
+ Data\NHibernate\IHibernateOperations.cs
+
+
+ Data\NHibernate\LocalSessionFactoryObject.cs
+
+
+ Data\NHibernate\SessionFactoryUtils.cs
+
+
+ Data\NHibernate\SessionHolder.cs
+
+
+ Data\NHibernate\SimpleDelegatingSessionFactory.cs
+
+
+ Data\NHibernate\SpringSessionContext.cs
+
+
+ Data\NHibernate\SpringSessionSynchronization.cs
+
+
+ Data\NHibernate\Support\ConfigSectionSessionScopeSettings.cs
+
+
+ Data\NHibernate\Support\HibernateDaoSupport.cs
+
+
+ Data\NHibernate\Support\OpenSessionInViewModule.cs
+
+
+ Data\NHibernate\Support\SessionScope.cs
+
+
+ Data\NHibernate\Support\SessionScopeSettings.cs
+
+
+ Data\NHibernate\TemplateFlushMode.cs
+
+
+
+
+
+ {3A3A4E65-45A6-4B20-B460-0BEDC302C02C}
+ Spring.Aop.2010
+
+
+ {710961A3-0DF4-49E4-A26E-F5B9C044AC84}
+ Spring.Core.2010
+
+
+ {AE00E5AB-C39A-436F-86D2-33BFE33E2E40}
+ Spring.Data.2010
+
+
+
+
+ False
+ Microsoft .NET Framework 4 %28x86 and x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+ False
+ Windows Installer 3.1
+ true
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.build b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.build
similarity index 64%
rename from src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.build
rename to src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.build
index cec33052..6d5b7f6d 100644
--- a/src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.build
+++ b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.build
@@ -1,64 +1,62 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.nuspec b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.nuspec
new file mode 100644
index 00000000..5de17ea0
--- /dev/null
+++ b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.nuspec
@@ -0,0 +1,31 @@
+
+
+
+ Spring.Data.NHibernate4
+ Spring.Net NHibernate 4 support
+ http://www.springframework.net/
+ http://www.springframework.net/license.html
+ http://springframework.net/images/SpringSource_Leaves32x32.png
+ 0.0.0
+
+ SpringSource
+ Interfaces and classes that provide NHibernate 4 support in Spring.Net
+ Interfaces and classes that provide NHibernate 4 support in Spring.Net
+ en-US
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.xml b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.xml
new file mode 100644
index 00000000..06f5ae0c
--- /dev/null
+++ b/src/Spring/Spring.Data.NHibernate4/Spring.Data.NHibernate4.xml
@@ -0,0 +1,6660 @@
+
+
+
+ Spring.Data.NHibernate4
+
+
+
+
+ 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
+
+
+
+
+ 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.
+
+
+
+
+ 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)
+
+
+
+ Base class for HibernateTemplate defining common
+ properties like SessionFactory and flushing behavior.
+
+
+
Not intended to be used directly. See HibernateTemplate.
+
+
+ Mark Pollack (.NET)
+
+
+
+ The instance for this class.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Apply the flush mode that's been specified for this accessor
+ to the given Session.
+
+ The current Hibernate Session.
+ if set to true
+ if executing within an existing transaction.
+
+ the previous flush mode to restore after the operation,
+ or null if none
+
+
+
+
+ Flush the given Hibernate Session if necessary.
+
+ The current Hibernate Session.
+ if set to true
+ if executing within an existing transaction.
+
+
+
+ Convert the given HibernateException to an appropriate exception from the
+ org.springframework.dao hierarchy. Will automatically detect
+ wrapped ADO.NET Exceptions and convert them accordingly.
+
+ HibernateException that occured.
+
+ The corresponding DataAccessException instance
+
+
+ The default implementation delegates to SessionFactoryUtils
+ and convertAdoAccessException. Can be overridden in subclasses.
+
+
+
+
+ Converts the ADO.NET access exception to an appropriate exception from the
+ org.springframework.dao hierarchy. Can be overridden in subclasses.
+
+ ADOException that occured, wrapping underlying ADO.NET exception.
+
+ the corresponding DataAccessException instance
+
+
+
+
+ Converts the ADO.NET access exception to an appropriate exception from the
+ org.springframework.dao hierarchy. Can be overridden in subclasses.
+
+
+
+ Note that a direct SQLException can just occur when callback code
+ performs direct ADO.NET access via ISession.Connection().
+
+
+ The ADO.NET exception.
+ The corresponding DataAccessException instance
+
+
+
+ Prepare the given IQuery object, applying cache settings and/or
+ a transaction timeout.
+
+ The query object to prepare.
+
+
+
+ Apply the given name parameter to the given Query object.
+
+ The query object.
+ Name of the parameter
+ The value of the parameter
+ The NHibernate type of the parameter (or null if none specified)
+
+
+
+ Prepare the given Criteria object, applying cache settings and/or
+ a transaction timeout.
+
+
+ Note that for NHibernate 1.2 this only works if the
+ implementation is of the type CriteriaImpl, which should generally
+ be the case. The SetFetchSize method is not available on the
+ ICriteria interface
+
+ This is a no-op for NHibernate 1.0.x since
+ the SetFetchSize method is not on the ICriteria interface and
+ the implementation class is has internal access.
+
+ To remove the method completely for Spring's NHibernate 1.0
+ support while reusing code for NHibernate 1.2 would not be
+ possible. So now this ineffectual operation is left in tact for
+ NHibernate 1.0.2 support.
+
+ The criteria object to prepare
+
+
+
+ Ensure SessionFactory is not null
+
+ If SessionFactory property is null.
+
+
+
+ Gets or sets if a new Session should be created when no transactional Session
+ can be found for the current thread.
+
+
+ true if allowed to create non-transaction session;
+ otherwise, false.
+
+
+
HibernateTemplate is aware of a corresponding Session bound to the
+ current thread, for example when using HibernateTransactionManager.
+ If allowCreate is true, a new non-transactional Session will be created
+ if none found, which needs to be closed at the end of the operation.
+ If false, an InvalidOperationException will get thrown in this case.
+
+
+
+
+
+ Gets or sets a value indicating whether to always
+ use a new Hibernate Session for this template.
+
+ true if always use new session; otherwise, false.
+
+
+ Default is "false"; if activated, all operations on this template will
+ work on a new NHibernate ISession even in case of a pre-bound ISession
+ (for example, within a transaction).
+
+
Within a transaction, a new NHibernate ISession used by this template
+ will participate in the transaction through using the same ADO.NET
+ Connection. In such a scenario, multiple Sessions will participate
+ in the same database transaction.
+
+
Turn this on for operations that are supposed to always execute
+ independently, without side effects caused by a shared NHibernate ISession.
+
+
+
+
+
+ Set whether to expose the native Hibernate Session to IHibernateCallback
+ code. Default is "false": a Session proxy will be returned,
+ suppressing close calls and automatically applying
+ query cache settings and transaction timeouts.
+
+ true if expose native session; otherwise, false.
+
+
+
+ Gets or sets the template flush mode.
+
+
+ Default is Auto. Will get applied to any new ISession
+ created by the template.
+
+ The template flush mode.
+
+
+
+ Gets or sets the entity interceptor that allows to inspect and change
+ property values before writing to and reading from the database.
+
+
+ Will get applied to any new ISession created by this object.
+
Such an interceptor can either be set at the ISessionFactory level,
+ i.e. on LocalSessionFactoryObject, or at the ISession level, i.e. on
+ HibernateTemplate, HibernateInterceptor, and HibernateTransactionManager.
+ It's preferable to set it on LocalSessionFactoryObject or HibernateTransactionManager
+ to avoid repeated configuration and guarantee consistent behavior in transactions.
+
+
+ The interceptor.
+
+
+
+ Set the object name of a Hibernate entity interceptor that allows to inspect
+ and change property values before writing to and reading from the database.
+
+
+ Will get applied to any new Session created by this transaction manager.
+
Requires the object factory to be known, to be able to resolve the object
+ name to an interceptor instance on session creation. Typically used for
+ prototype interceptors, i.e. a new interceptor instance per session.
+
+
Can also be used for shared interceptor instances, but it is recommended
+ to set the interceptor reference directly in such a scenario.
+
+
+ The name of the entity interceptor in the object factory/application context.
+
+
+
+ Gets or sets the session factory that should be used to create
+ NHibernate ISessions.
+
+ The session factory.
+
+
+
+ Set the object factory instance.
+
+ The object factory instance.
+
+
+
+ Gets or sets a value indicating whether to
+ cache all queries executed by this template.
+
+
+ If this is true, all IQuery and ICriteria objects created by
+ this template will be marked as cacheable (including all
+ queries through find methods).
+
To specify the query region to be used for queries cached
+ by this template, set the QueryCacheRegion property.
+
+
+ true if cache queries; otherwise, false.
+
+
+
+ Gets or sets the name of the cache region for queries executed by this template.
+
+
+ If this is specified, it will be applied to all IQuery and ICriteria objects
+ created by this template (including all queries through find methods).
+
The cache region will not take effect unless queries created by this
+ template are configured to be cached via the CacheQueries property.
+
+
+ The query cache region.
+
+
+
+ Gets or sets the fetch size for this HibernateTemplate.
+
+ The size of the fetch.
+ This is important for processing
+ large result sets: Setting this higher than the default value will increase
+ processing speed at the cost of memory consumption; setting this lower can
+ avoid transferring row data that will never be read by the application.
+
Default is 0, indicating to use the driver's default.
+
+
+
+
+ Gets or sets the maximum number of rows for this HibernateTemplate.
+
+ The max results.
+
+ This is important
+ for processing subsets of large result sets, avoiding to read and hold
+ the entire result set in the database or in the ADO.NET driver if we're
+ never interested in the entire result in the first place (for example,
+ when performing searches that might return a large number of matches).
+
Default is 0, indicating to use the driver's default.
+
+
+
+
+ Set the ADO.NET exception translator for this instance.
+ Applied to System.Data.Common.DbException (or provider specific exception type
+ in .NET 1.1) thrown by callback code, be it direct
+ DbException or wrapped Hibernate ADOExceptions.
+
The default exception translator is either a ErrorCodeExceptionTranslator
+ if a DbProvider is available, or a FalbackExceptionTranslator otherwise
+
+
+ The ADO exception translator.
+
+
+
+ Gets a Session for use by this template.
+
+ The session.
+
+ - Returns a new Session in case of "alwaysUseNewSession" (using the same ADO.NET connection as a transaction Session, if applicable)
+ - a pre-bound Session in case of "AllowCreate" is set to false (not the default)
+ - or a pre-bound Session or new Session if no transactional or other pre-bound Session exists.
+
+
+
+
+ Helper class to determine if the FlushMode enumeration
+ was changed from its default value
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The flush mode.
+
+
+
+ Gets or sets a value indicating whether the FlushMode
+ property was set..
+
+ true if FlushMode was set; otherwise, false.
+
+
+
+ Gets or sets the FlushMode.
+
+ The FlushMode.
+
+
+
+ Interface that specifies a basic set of Hibernate operations.
+
+
+ Implemented by HibernateTemplate. Not often used, but a useful option
+ to enhance testability, as it can easily be mocked or stubbed.
+
Provides HibernateTemplate's data access methods that mirror
+ various Session methods. See the NHibernate ISession documentation
+ for details on those methods.
+
+
+
+ Sree Nivask (.NET)
+ Mark Pollack (.NET)
+
+
+
+ Interface that specifies a set of Hibernate operations that
+ are common across versions of Hibernate.
+
+
+ Base interface for generic and non generic IHibernateOperations interfaces
+ Not often used, but a useful option
+ to enhance testability, as it can easily be mocked or stubbed.
+
Provides HibernateTemplate's data access methods that mirror
+ various Session methods. See the NHibernate ISession documentation
+ for details on those methods.
+
+
+ Mark Pollack (.NET)
+
+
+
+
+ Remove all objects from the Session cache, and cancel all pending saves,
+ updates and deletes.
+
+ In case of Hibernate errors
+
+
+
+ Delete the given persistent instance.
+
+ The persistent instance to delete.
+ In case of Hibernate errors
+
+
+
+ Delete the given persistent instance.
+
+
+ Obtains the specified lock mode if the instance exists, implicitly
+ checking whether the corresponding database entry still exists
+ (throwing an OptimisticLockingFailureException if not found).
+
+ Tthe persistent instance to delete.
+ The lock mode to obtain.
+ In case of Hibernate errors
+
+
+
+ Delete all objects returned by the query.
+
+ a query expressed in Hibernate's query language.
+ The number of entity instances deleted.
+ In case of Hibernate errors
+
+
+
+ Delete all objects returned by the query.
+
+ a query expressed in Hibernate's query language.
+ The value of the parameter.
+ The Hibernate type of the parameter (or null).
+ The number of entity instances deleted.
+ In case of Hibernate errors
+
+
+
+ Delete all objects returned by the query.
+
+ a query expressed in Hibernate's query language.
+ The values of the parameters.
+ Hibernate types of the parameters (or null)
+ The number of entity instances deleted.
+ In case of Hibernate errors
+
+
+
+ Flush all pending saves, updates and deletes to the database.
+
+
+ Only invoke this for selective eager flushing, for example when ADO.NET code
+ needs to see certain changes within the same transaction. Else, it's preferable
+ to rely on auto-flushing at transaction completion.
+
+ In case of Hibernate errors
+
+
+
+ Load the persistent instance with the given identifier
+ into the given object, throwing an exception if not found.
+
+ Entity the object (of the target class) to load into.
+ An identifier of the persistent instance.
+ If object not found.
+ In case of Hibernate errors
+
+
+
+ Re-read the state of the given persistent instance.
+
+ The persistent instance to re-read.
+ In case of Hibernate errors
+
+
+
+ Re-read the state of the given persistent instance.
+ Obtains the specified lock mode for the instance.
+
+ The persistent instance to re-read.
+ The lock mode to obtain.
+ In case of Hibernate errors
+
+
+
+ Determines whether the given object is in the Session cache.
+
+ the persistence instance to check.
+
+ true if session cache contains the specified entity; otherwise, false.
+
+ In case of Hibernate errors
+
+
+
+ Remove the given object from the Session cache.
+
+ The persistent instance to evict.
+ In case of Hibernate errors
+
+
+
+ Obtain the specified lock level upon the given object, implicitly
+ checking whether the corresponding database entry still exists
+ (throwing an OptimisticLockingFailureException if not found).
+
+ The he persistent instance to lock.
+ The lock mode to obtain.
+ If not found
+ In case of Hibernate errors
+
+
+
+ Persist the given transient instance.
+
+ The transient instance to persist.
+ The generated identifier.
+ In case of Hibernate errors
+
+
+
+ Persist the given transient instance with the given identifier.
+
+ The transient instance to persist.
+ The identifier to assign.
+ In case of Hibernate errors
+
+
+
+ Update the given persistent instance.
+
+ The persistent instance to update.
+ In case of Hibernate errors
+
+
+
+ Update the given persistent instance.
+ Obtains the specified lock mode if the instance exists, implicitly
+ checking whether the corresponding database entry still exists
+ (throwing an OptimisticLockingFailureException if not found).
+
+ The persistent instance to update.
+ The lock mode to obtain.
+ In case of Hibernate errors
+
+
+
+ Save or update the given persistent instance,
+ according to its id (matching the configured "unsaved-value"?).
+
+ Tthe persistent instance to save or update
+ (to be associated with the Hibernate Session).
+ In case of Hibernate errors
+
+
+
+ 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 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
+
+
+
+ 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.
+
+
+
+
+
+ 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 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.
+
+
+
+
+ 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)
+
+
+
+ Interface that specifies a basic set of Hibernate operations.
+
+
+ Implemented by HibernateTemplate. Not often used, but a useful option
+ to enhance testability, as it can easily be mocked or stubbed.
+
Provides HibernateTemplate's data access methods that mirror
+ various Session methods. See the NHibernate ISession documentation
+ for details on those methods.
+
+
+
+ Mark Pollack (.NET)
+
+
+
+ Delete all given persistent instances.
+
+ The persistent instances to delete.
+
+ This can be combined with any of the find methods to delete by query
+ in two lines of code, similar to Session's delete by query methods.
+
+ In case of Hibernate errors
+
+
+
+ Execute the action specified by the given action object within a Session.
+
+
+ Application exceptions thrown by the action object get propagated to the
+ caller (can only be unchecked). Hibernate exceptions are transformed into
+ appropriate DAO ones. Allows for returning a result object, i.e. a domain
+ object or a collection of domain objects.
+
Note: Callback code is not supposed to handle transactions itself!
+ Use an appropriate transaction manager like HibernateTransactionManager.
+ Generally, callback code must not touch any Session lifecycle methods,
+ like close, disconnect, or reconnect, to let the template do its work.
+
+
+ The delegate callback object that specifies the Hibernate action.
+ a result object returned by the action, or null
+
+ In case of Hibernate errors
+
+
+
+ Execute the action specified by the given action object within a Session.
+
+
+ Application exceptions thrown by the action object get propagated to the
+ caller (can only be unchecked). Hibernate exceptions are transformed into
+ appropriate DAO ones. Allows for returning a result object, i.e. a domain
+ object or a collection of domain objects.
+
Note: Callback code is not supposed to handle transactions itself!
+ Use an appropriate transaction manager like HibernateTransactionManager.
+ Generally, callback code must not touch any Session lifecycle methods,
+ like close, disconnect, or reconnect, to let the template do its work.
+
+
+ The callback object that specifies the Hibernate action.
+ a result object returned by the action, or null
+
+ In case of Hibernate errors
+
+
+
+ Execute the specified action assuming that the result object is a List.
+
+
+ This is a convenience method for executing Hibernate find calls or
+ queries within an action.
+
+ The calback object that specifies the Hibernate action.
+ A IList returned by the action, or null
+
+ In case of Hibernate errors
+
+
+
+ Execute a query for persistent instances.
+
+ a query expressed in Hibernate's query language
+ a List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a query for persistent instances, binding
+ one value to a "?" parameter in the query string.
+
+ a query expressed in Hibernate's query language
+ the value of the parameter
+ a List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a query for persistent instances, binding one value
+ to a "?" parameter of the given type in the query string.
+
+ a query expressed in Hibernate's query language
+ The value of the parameter.
+ Hibernate type of the parameter (or null)
+ a List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a query for persistent instances, binding a
+ number of values to "?" parameters in the query string.
+
+ a query expressed in Hibernate's query language
+ the values of the parameters
+ a List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a query for persistent instances, binding a number of
+ values to "?" parameters of the given types in the query string.
+
+ A query expressed in Hibernate's query language
+ The values of the parameters
+ Hibernate types of the parameters (or null)
+ a List containing 0 or more persistent instances
+ In case of Hibernate errors
+ If values and types are not null and their lengths are not equal
+
+
+
+ Execute a query for persistent instances, binding
+ one value to a named parameter in the query string.
+
+ The name of a Hibernate query in a mapping file
+ The name of the parameter
+ The value of the parameter
+ a List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a query for persistent instances, binding
+ one value to a named parameter in the query string.
+
+ The name of a Hibernate query in a mapping file
+ The name of the parameter
+ The value of the parameter
+ Hibernate type of the parameter (or null)
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a query for persistent instances, binding a
+ number of values to named parameters in the query string.
+
+ A query expressed in Hibernate's query language
+ The names of the parameters
+ The values of the parameters
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a query for persistent instances, binding a
+ number of values to named parameters in the query string.
+
+ A query expressed in Hibernate's query language
+ The names of the parameters
+ The values of the parameters
+ Hibernate types of the parameters (or null)
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+ If paramNames length is not equal to values length or
+ if paramNames length is not equal to types length (when types is not null)
+
+
+
+ Execute a named query for persistent instances.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a named query for persistent instances, binding
+ one value to a "?" parameter in the query string.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ The value of the parameter
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a named query for persistent instances, binding
+ one value to a "?" parameter in the query string.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ The value of the parameter
+ Hibernate type of the parameter (or null)
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a named query for persistent instances, binding a
+ number of values to "?" parameters in the query string.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ The values of the parameters
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a named query for persistent instances, binding a
+ number of values to "?" parameters in the query string.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ The values of the parameters
+ Hibernate types of the parameters (or null)
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+ If values and types are not null and their lengths differ.
+
+
+
+ Execute a named query for persistent instances, binding
+ one value to a named parameter in the query string.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ Name of the parameter
+ The value of the parameter
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a named query for persistent instances, binding
+ one value to a named parameter in the query string.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ Name of the parameter
+ The value of the parameter
+ The Hibernate type of the parameter (or null)
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a named query for persistent instances, binding
+ number of values to named parameters in the query string.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ The names of the parameters
+ The values of the parameters.
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a named query for persistent instances, binding
+ number of values to named parameters in the query string.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ The names of the parameters
+ The values of the parameters.
+ Hibernate types of the parameters (or null)
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+ If paramNames length is not equal to values length or
+ if paramNames length is not equal to types length (when types is not null)
+
+
+
+ Execute a named query for persistent instances, binding the properties
+ of the given object to named parameters in the query string.
+ A named query is defined in a Hibernate mapping file.
+
+ The name of a Hibernate query in a mapping file
+ The values of the parameters
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Execute a query for persistent instances, binding the properties
+ of the given object to named parameters in the query string.
+
+ A query expressed in Hibernate's query language
+ The values of the parameters
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Return the persistent instance of the given entity type
+ with the given identifier, or null if not found.
+
+ a persistent type.
+ An identifier of the persistent instance.
+ the persistent instance, or null if not found
+ In case of Hibernate errors
+
+
+
+ Return the persistent instance of the given entity type
+ with the given identifier, or null if not found.
+ Obtains the specified lock mode if the instance exists.
+
+ A persistent class.
+ An identifier of the persistent instance.
+ The lock mode.
+ the persistent instance, or null if not found
+ the persistent instance, or null if not found
+ In case of Hibernate errors
+
+
+
+ Return the persistent instance of the given entity class
+ with the given identifier, throwing an exception if not found.
+
+ Type of the entity.
+ An identifier of the persistent instance.
+ The persistent instance
+ If not found
+ In case of Hibernate errors
+
+
+
+ Return the persistent instance of the given entity class
+ with the given identifier, throwing an exception if not found.
+ Obtains the specified lock mode if the instance exists.
+
+ Type of the entity.
+ An identifier of the persistent instance.
+ The lock mode.
+ The persistent instance
+ If not found
+ In case of Hibernate errors
+
+
+
+ Return all persistent instances of the given entity class.
+ Note: Use queries or criteria for retrieving a specific subset.
+
+ Type of the entity.
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Save or update all given persistent instances,
+ according to its id (matching the configured "unsaved-value"?).
+
+ Tthe persistent instances to save or update
+ (to be associated with the Hibernate Session)he entities.
+ In case of Hibernate errors
+
+
+
+ The instance for this class.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The default for creating a new non-transactional
+ session when no transactional Session can be found for the current thread
+ is set to true.
+ The session factory to create sessions.
+
+
+
+ Initializes a new instance of the class.
+
+ The session factory to create sessions.
+ if set to true allow creation
+ of a new non-transactional when no transactional Session can be found
+ for the current thread.
+
+
+
+ Delegate function that clears the session.
+
+ The hibernate session.
+ null
+
+
+
+ Flush all pending saves, updates and deletes to the database.
+
+
+ Only invoke this for selective eager flushing, for example when ADO.NET code
+ needs to see certain changes within the same transaction. Else, it's preferable
+ to rely on auto-flushing at transaction completion.
+
+ In case of Hibernate errors
+
+
+
+ Return the persistent instance of the given entity type
+ with the given identifier, or null if not found.
+
+ The type.
+ An identifier of the persistent instance.
+ The persistent instance, or null if not found
+ In case of Hibernate errors
+
+
+
+ Return the persistent instance of the given entity type
+ with the given identifier, or null if not found.
+ Obtains the specified lock mode if the instance exists.
+
+ The type.
+ The lock mode to obtain.
+ The lock mode.
+ the persistent instance, or null if not found
+ the persistent instance, or null if not found
+ In case of Hibernate errors
+
+
+
+ Return the persistent instance of the given entity class
+ with the given identifier, throwing an exception if not found.
+
+ Type of the entity.
+ An identifier of the persistent instance.
+ The persistent instance
+ If not found
+ In case of Hibernate errors
+
+
+
+ Return the persistent instance of the given entity class
+ with the given identifier, throwing an exception if not found.
+ Obtains the specified lock mode if the instance exists.
+
+ Type of the entity.
+ An identifier of the persistent instance.
+ The lock mode.
+ The persistent instance
+ If not found
+ In case of Hibernate errors
+
+
+
+ Load the persistent instance with the given identifier
+ into the given object, throwing an exception if not found.
+
+ Entity the object (of the target class) to load into.
+ An identifier of the persistent instance.
+ If object not found.
+ In case of Hibernate errors
+
+
+
+ Return all persistent instances of the given entity class.
+ Note: Use queries or criteria for retrieving a specific subset.
+
+ Type of the entity.
+ A List containing 0 or more persistent instances
+ In case of Hibernate errors
+
+
+
+ Re-read the state of the given persistent instance.
+
+ The persistent instance to re-read.
+ In case of Hibernate errors
+
+
+
+ Re-read the state of the given persistent instance.
+ Obtains the specified lock mode for the instance.
+
+ The persistent instance to re-read.
+ The lock mode to obtain.
+ In case of Hibernate errors
+
+
+
+ Obtain the specified lock level upon the given object, implicitly
+ checking whether the corresponding database entry still exists
+ (throwing an OptimisticLockingFailureException if not found).
+
+ The he persistent instance to lock.
+ The lock mode to obtain.
+ If not found
+ In case of Hibernate errors
+
+
+
+ Persist the given transient instance.
+
+ The transient instance to persist.
+ The generated identifier.
+ In case of Hibernate errors
+
+
+
+ Persist the given transient instance with the given identifier.
+
+ The transient instance to persist.
+ The identifier to assign.
+ In case of Hibernate errors
+
+
+
+ Update the given persistent instance.
+
+ The persistent instance to update.
+ In case of Hibernate errors
+
+
+
+ Update the given persistent instance.
+ Obtains the specified lock mode if the instance exists, implicitly
+ checking whether the corresponding database entry still exists
+ (throwing an OptimisticLockingFailureException if not found).
+
+ The persistent instance to update.
+ The lock mode to obtain.
+ In case of Hibernate errors
+
+
+
+ Save or update the given persistent instance,
+ according to its id (matching the configured "unsaved-value"?).
+
+ Tthe persistent instance to save or update
+ (to be associated with the Hibernate Session).
+ In case of Hibernate errors
+
+
+
+ Save or update all given persistent instances,
+ according to its id (matching the configured "unsaved-value"?).
+
+ Tthe persistent instances to save or update
+ (to be associated with the Hibernate Session)he entities.
+ In case of Hibernate errors
+
+
+
+ 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.
+
+
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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
+
+
+
+ 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.
+
+
+
+ SimpleDelegatingSessionFactory class
+
+
+
+
+ Connection string config element name
+
+
+
+
+ Cache region prefix config element name
+
+
+
+
+ public Constructor
+
+
+
+
+
+ TargetSessionFactory
+
+
+
+
+ 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.
+
+
+
+ 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)
+
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+
+
+
diff --git a/src/Spring/Spring.Data.NHibernate32/packages.config b/src/Spring/Spring.Data.NHibernate4/packages.config
similarity index 56%
rename from src/Spring/Spring.Data.NHibernate32/packages.config
rename to src/Spring/Spring.Data.NHibernate4/packages.config
index 1fdb3673..6a1fa4dc 100644
--- a/src/Spring/Spring.Data.NHibernate32/packages.config
+++ b/src/Spring/Spring.Data.NHibernate4/packages.config
@@ -1,6 +1,6 @@

-
-
+
+
\ No newline at end of file
diff --git a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs
index eae3b710..cc4bd79b 100644
--- a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs
+++ b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs
@@ -83,7 +83,7 @@ namespace Spring.Testing.Microsoft
///
///
///
The default implementation populates protected variables if the
- /// property is set, else
+ /// 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.
diff --git a/src/Spring/Spring.Web.Conversation.NHibernate33/AssemblyInfo.cs b/src/Spring/Spring.Web.Conversation.NHibernate3/AssemblyInfo.cs
similarity index 63%
rename from src/Spring/Spring.Web.Conversation.NHibernate33/AssemblyInfo.cs
rename to src/Spring/Spring.Web.Conversation.NHibernate3/AssemblyInfo.cs
index d5d05ee6..212c536e 100644
--- a/src/Spring/Spring.Web.Conversation.NHibernate33/AssemblyInfo.cs
+++ b/src/Spring/Spring.Web.Conversation.NHibernate3/AssemblyInfo.cs
@@ -1,5 +1,5 @@
using System;
using System.Reflection;
-[assembly: AssemblyTitle("Spring.Web.Conversation.NHibernate33. NHibernate 3.3 support.")]
+[assembly: AssemblyTitle("Spring.Web.Conversation.NHibernate3. NHibernate 3.3 support.")]
[assembly: AssemblyDescription("Interfaces and classes that provide 'Long-Running Conversation' support in Spring.Net")]
\ No newline at end of file
diff --git a/src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationScope.cs b/src/Spring/Spring.Web.Conversation.NHibernate3/Data/NHibernate/Support/SessionPerConversationScope.cs
similarity index 100%
rename from src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationScope.cs
rename to src/Spring/Spring.Web.Conversation.NHibernate3/Data/NHibernate/Support/SessionPerConversationScope.cs
diff --git a/src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationSettings.cs b/src/Spring/Spring.Web.Conversation.NHibernate3/Data/NHibernate/Support/SessionPerConversationSettings.cs
similarity index 100%
rename from src/Spring/Spring.Web.Conversation.NHibernate32/Data/NHibernate/Support/SessionPerConversationSettings.cs
rename to src/Spring/Spring.Web.Conversation.NHibernate3/Data/NHibernate/Support/SessionPerConversationSettings.cs
diff --git a/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.Web.Conversation.NHibernate32.2010.csproj b/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.2010.csproj
similarity index 80%
rename from src/Spring/Spring.Web.Conversation.NHibernate32/Spring.Web.Conversation.NHibernate32.2010.csproj
rename to src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.2010.csproj
index e43cff33..9a5e7535 100644
--- a/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.Web.Conversation.NHibernate32.2010.csproj
+++ b/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.2010.csproj
@@ -1,21 +1,21 @@

-
+DebugAnyCPU9.0.307292.0
- {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}
+ {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}LibraryPropertiesSpring
- Spring.Web.Conversation.NHibernate32
+ Spring.Web.Conversation.NHibernate33
+ v4.0
+ 5123.5
- v4.0
-
-
+ ..\..\..\true
@@ -23,17 +23,17 @@
truefullfalse
- ..\..\..\build\VS.Net.2010\Spring.Web.Conversation.NHibernate32\Debug\
+ ..\..\..\build\VS.Net.2010\Spring.Web.Conversation.NHibernate33\Debug\DEBUG;TRACEprompt4
- Spring.Web.Conversation.NHibernate32.xml
+ Spring.Web.Conversation.NHibernate33.XMLtruepdbonlytrue
- ..\..\..\build\VS.Net.2010\Spring.Web.Conversation.NHibernate32\Release\
+ ..\..\..\build\VS.Net.2010\Spring.Web.Conversation.NHibernate33\Release\TRACEprompt4
@@ -45,11 +45,11 @@
False
- ..\..\..\packages\Iesi.Collections.3.2.0.4000\lib\Net35\Iesi.Collections.dll
+ ..\..\..\packages\Iesi.Collections.3.3.3.4001\lib\Net35\Iesi.Collections.dll
-
+ False
- ..\..\..\packages\NHibernate.3.2.0.4000\lib\Net35\NHibernate.dll
+ ..\..\..\packages\NHibernate.3.3.3.4001\lib\Net35\NHibernate.dll
@@ -71,9 +71,6 @@
-
- nant.xsd
-
@@ -82,9 +79,9 @@
{710961A3-0DF4-49E4-A26E-F5B9C044AC84}Spring.Core.2010
-
- {1C8E0481-A70D-445E-AB4D-4A963CF7DC83}
- Spring.Data.NHibernate32.2010
+
+ {d546efb7-9f6c-4c11-b2f8-b85fad135399}
+ Spring.Data.NHibernate3.2010{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}
@@ -94,7 +91,7 @@
-
+
-
+
-
+
-
+
-
+
@@ -37,10 +37,10 @@
-
-
-
-
+
+
+
+
@@ -54,7 +54,7 @@
-
+
diff --git a/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.Web.Conversation.NHibernate32.nuspec b/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.nuspec
similarity index 75%
rename from src/Spring/Spring.Web.Conversation.NHibernate32/Spring.Web.Conversation.NHibernate32.nuspec
rename to src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.nuspec
index 23baee1c..1cdd9f0d 100644
--- a/src/Spring/Spring.Web.Conversation.NHibernate32/Spring.Web.Conversation.NHibernate32.nuspec
+++ b/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate3.nuspec
@@ -1,7 +1,7 @@
- Spring.Web.Conversation.NHibernate32
+ Spring.Web.Conversation.NHibernate3http://www.springframework.net/http://www.springframework.net/license.htmlhttp://springframework.net/images/SpringSource_Leaves32x32.png
@@ -13,18 +13,18 @@
en-US
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate33.XML b/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate33.XML
new file mode 100644
index 00000000..4e9087fd
--- /dev/null
+++ b/src/Spring/Spring.Web.Conversation.NHibernate3/Spring.Web.Conversation.NHibernate33.XML
@@ -0,0 +1,953 @@
+
+
+
+ Spring.Web.Conversation.NHibernate33
+
+
+
+
+ Based on
+ for support of 'session-per-conversation' pattern.
+
+ Hailton de Castro
+
+
+
+ The logging instance.
+
+
+
+
+ Initializes a new instance of the class.
+ Uses default values for
+
+
+
+
+ Initializes a new instance of the class.
+
+ Specify the to be set on each session provided by this instance.
+ Specify the flushmode to be applied on each session provided by this instance.
+
+
+
+
+ Initializes a new instance of the class.
+
+ An instance holding the scope configuration
+
+
+
+ Sets a flag, whether this scope is in "open" state on the current logical thread.
+
+
+
+
+
+ NOOP.
+
+
+
+
+ Open a new session or reconect the
+ in .
+ Participating in an existing session registed with
+ is not alowed.
+
+
+
+
+
+ If there is another conversation with a with opened
+ .
+ If attempting to participate in an existing NHibernate
+ managed by .
+
+
+
+
+
+
+ Close the current view's session and unregisters
+ from .
+
+ The session factory that on use
+ A list of conversations which the session can be closed or disconnected
+
+
+ If start/resume a conversation from a
+ when exists a different
+ with open registered on
+
+ If the holder on , is not a .
+
+
+
+
+
+ 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 the configured EntityInterceptor
+
+
+
+
+ Id for conversation that open the Session.
+
+
+
+
+ Gets a flag, whether this scope is in "open" state on the current logical thread.
+
+
+
+
+ This sessionHolder creates a session for the active conversation only if it is
+ needed ().
+
+
+ Although a NHibernateSession defers creation of db-connections until they are really
+ needed, instantiation a session is still more expensive than using LazySessionHolder.
+
+
+
+
+ Initialize a new instance.
+
+
+
+
+ Create a new session on demand
+
+
+
+
+ Setting for
+
+ Hailton de Castro
+
+
+
+ Default value for property.
+
+
+
+
+ Initialize a new instance of with default values.
+
+
+ Calling this constructor from your derived class leaves
+ uninitialized. See for more.
+
+
+
+
+ Initialize a new instance of with the given values and references.
+
+
+ Specify the to be set on each session provided by the instance.
+
+
+ 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.
+
+
+
+
+ Gets the configured instance to be used.
+
+
+
+
+
+
+ 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.
+
+
+
+
+ HttpModule for ending Conversations with Timeout exceeded.
+
+ Hailton de Castro
+
+
+
+ Add PostRequestHandlerExecute event to clear conversations with timeout exceeded.
+
+
+
+
+
+ Disposes of the resources (other than memory) used by the module that implements .
+
+
+
+
+ Handles the Unload event of the page control.
+
+ The source of the event.
+ The instance containing the event data.
+
+ Necessary for Redirect or Abort for any reason.
+
+
+
+
+ The Names of the s in the
+
+
+
+
+ Sets the that this
+ object runs in.
+
+
+
+
+ Used to obtain the instances of
+
+
+ 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.
+