protected SubqueryExpression(String op, String quantifier, DetachedCriteria dc, bool prefixOp)
		{
			criteriaImpl = dc.GetCriteriaImpl();
			this.quantifier = quantifier;
			this.prefixOp = prefixOp;
			this.op = op;
		}
Пример #2
0
 ///<summary>
 /// Returns a clone of the original criteria, which will return the count 
 /// of rows that are returned by the original criteria query.
 ///</summary>
 public static DetachedCriteria TransformToRowCount(DetachedCriteria criteria)
 {
     ICriteria clonedCriteria = TransformToRowCount(criteria.GetCriteriaImpl());
     DetachedCriteria detachedCriteria = DetachedCriteria.For(clonedCriteria.CriteriaClass, clonedCriteria.Alias);
     detachedCriteria.SetCriteriaImpl((CriteriaImpl) clonedCriteria);
     return detachedCriteria;
 }
 private static CriteriaBatchItem <TResult> For <TResult>(DetachedCriteria query)
 {
     if (query == null)
     {
         throw new ArgumentNullException(nameof(query));
     }
     return(new CriteriaBatchItem <TResult>(query.GetCriteriaImpl()));
 }
 /// <summary>
 /// Applies a select mode for the given aliased criteria or the current criteria
 /// </summary>
 /// <param name="criteria">The current criteria.</param>
 /// <param name="mode">The select mode to apply.</param>
 /// <param name="associationPath">The association path for the given <paramref name="alias"/> criteria.</param>
 /// <param name="alias">The criteria alias. If null or empty, the current criteria will be used.</param>
 /// <returns>The current criteria.</returns>
 public static DetachedCriteria Fetch(this DetachedCriteria criteria, SelectMode mode, string associationPath, string alias = null)
 {
     Fetch(criteria.GetCriteriaImpl(), mode, associationPath, alias);
     return(criteria);
 }
Пример #5
0
		/// <summary>
		/// Creates an exact clone of the criteria
		/// </summary>
		/// <returns></returns>
		public static DetachedCriteria Clone(DetachedCriteria criteria)
		{
			CriteriaImpl clonedCriteria = (CriteriaImpl) criteria.GetCriteriaImpl().Clone();
			return new DetachedCriteria(clonedCriteria);
		}
Пример #6
0
		///<summary>
		/// Returns a clone of the original criteria, which will return the count 
		/// of rows that are returned by the original criteria query.
		///</summary>
		public static DetachedCriteria TransformToRowCount(DetachedCriteria criteria)
		{
			CriteriaImpl clonedCriteria = TransformToRowCount((CriteriaImpl)criteria.GetCriteriaImpl().Clone());
			return new DetachedCriteria(clonedCriteria);
		}
Пример #7
0
 /// <summary>
 /// Creates an exact clone of the criteria
 /// </summary>
 /// <returns></returns>
 public static DetachedCriteria Clone(DetachedCriteria criteria)
 {
     CriteriaImpl clonedCriteria = (CriteriaImpl)Clone(criteria.GetCriteriaImpl());
     DetachedCriteria detachedCriteria = new DetachedCriteria(clonedCriteria);
     return detachedCriteria;
 }
Пример #8
0
        /// <summary>
        /// Creates an exact clone of the criteria
        /// </summary>
        /// <returns></returns>
        public static DetachedCriteria Clone(DetachedCriteria criteria)
        {
            CriteriaImpl clonedCriteria = (CriteriaImpl)criteria.GetCriteriaImpl().Clone();

            return(new DetachedCriteria(clonedCriteria));
        }
Пример #9
0
        ///<summary>
        /// Returns a clone of the original criteria, which will return the count
        /// of rows that are returned by the original criteria query.
        ///</summary>
        public static DetachedCriteria TransformToRowCount(DetachedCriteria criteria)
        {
            CriteriaImpl clonedCriteria = TransformToRowCount((CriteriaImpl)criteria.GetCriteriaImpl().Clone());

            return(new DetachedCriteria(clonedCriteria));
        }