Ejemplo n.º 1
0
        private FilterTranslator CreateFilterTranslator(string filterString, FilterCacheKey cacheKey)
        {
            FilterTranslator filter = new FilterTranslator(filterString);

            Put(cacheKey, filter);
            return(filter);
        }
Ejemplo n.º 2
0
            public override bool Equals(object obj)
            {
                FilterCacheKey other = obj as FilterCacheKey;

                if (other == null)
                {
                    return(false);
                }

                return(Equals(other));
            }
Ejemplo n.º 3
0
        public FilterTranslator GetFilter(string filterString, string collectionRole, bool scalar)
        {
            FilterCacheKey cacheKey = new FilterCacheKey(collectionRole, filterString, scalar);

            FilterTranslator filter = ( FilterTranslator )Get(cacheKey);

            if (filter == null)
            {
                filter = CreateFilterTranslator(filterString, cacheKey);
            }

            filter.Compile(collectionRole, this, settings.QuerySubstitutions, scalar);
            return(filter);
        }
Ejemplo n.º 4
0
		public IFilterTranslator GetFilter(string filterString, string collectionRole, bool scalar, IDictionary<string, IFilter> enabledFilters)
		{
			FilterCacheKey cacheKey = new FilterCacheKey(collectionRole, filterString, scalar);

			IFilterTranslator filter = (IFilterTranslator) Get(cacheKey);
			if (filter == null)
			{
				filter = CreateFilterTranslator(filterString, filterString, cacheKey, enabledFilters);
			}

			filter.Compile(collectionRole, settings.QuerySubstitutions, scalar);
			return filter;
		}
Ejemplo n.º 5
0
		private IFilterTranslator CreateFilterTranslator(string hql, string filterString, FilterCacheKey cacheKey, IDictionary<string, IFilter> enabledFilters)
		{
			IFilterTranslator filter =
				settings.QueryTranslatorFactory.CreateFilterTranslator(hql, filterString, enabledFilters, this);
			Put(cacheKey, filter);
			return filter;
		}
Ejemplo n.º 6
0
			public bool Equals(FilterCacheKey obj)
			{
				return Role.Equals(obj.Role) && Query.Equals(obj.Query) && Scalar == obj.Scalar;
			}
		private IFilterTranslator CreateFilterTranslator(string filterString, FilterCacheKey cacheKey)
		{
			IFilterTranslator filter = settings.QueryTranslatorFactory.CreateFilterTranslator(filterString, filters, this);
			Put(cacheKey, filter);
			return filter;
		}
Ejemplo n.º 8
0
 public bool Equals(FilterCacheKey obj)
 {
     return(this.Role.Equals(obj.Role) && this.Query.Equals(obj.Query) && this.Scalar == obj.Scalar);
 }
		public FilterTranslator GetFilter( string filterString, string collectionRole, bool scalar )
		{
			FilterCacheKey cacheKey = new FilterCacheKey( collectionRole, filterString, scalar );

			FilterTranslator filter = ( FilterTranslator ) Get( cacheKey );
			if( filter == null )
			{
				filter = CreateFilterTranslator( filterString, cacheKey );
			}

			filter.Compile( collectionRole, this, settings.QuerySubstitutions, scalar );
			return filter;
		}
		private FilterTranslator CreateFilterTranslator( string filterString, FilterCacheKey cacheKey )
		{
			FilterTranslator filter = new FilterTranslator( filterString );
			Put( cacheKey, filter );
			return filter;
		}