예제 #1
0
        public void SubordinateFilters(FilterListClass ThisFilters)
        {
            RemoveFilters();

                if (ThisFilters != null)
                {
                    this.F_Filters = ThisFilters;
                    this.IsFiltersManaged = true;
                } // if (ThisFilters != null)
        }
예제 #2
0
        // ...
        public override Int64 Create()
        {
            Int64 Result = 0;

                // --> execute inherited constructor
                Result = base.Create();

                // --> allocate fields
                if (Result == 0)
                {
                    this.F_Filters = null;
                } // if (Result == 0)

                // --> update status
                F_ORMQueryParamsClass_IsReady = true;

                return Result;
        }
예제 #3
0
        // ...
        public void RemoveFilters()
        {
            if (this.IsFiltersManaged)
                {
                    if (this.F_Filters != null)
                    {
                        FilterListClass.Disposer(ref this.F_Filters);
                    }
                } // if (this.IsFiltersManaged)

                this.F_Filters = null;
                this.IsFiltersManaged = false;
        }
예제 #4
0
        public virtual bool Restore(
                string ATableID,
                Dictionary<string, Object> ARecord,
                FilterListClass Filters,
                string AFlagField, string AFlagValue
            )
        {
            bool Result = false;

                if (this.IsReady())
                {
                    this.DoNothing();
                } // if (this.IsReady())

                return Result;
        }
예제 #5
0
        public void AssociateFilters(FilterListClass ThisFilters)
        {
            RemoveFilters();

                if (ThisFilters != null)
                {
                    this.F_Filters = ThisFilters;
                } // if (EstaPersona != null)

                this.IsFiltersManaged = false;
        }
예제 #6
0
        // ...
        // ...
        /// <summary>
        /// Regresa una lista de registros, como pares llave-valor,
        /// de una consulta S.Q.L., que cumplan,
        /// con la lista de predicados proporcionada.
        /// </summary>
        /// <param name="ASQLCommand">Consulta S.Q.L.</param>
        /// <param name="Filters">Lista de Predicados</param>
        /// <returns></returns>
        public virtual List<Dictionary<string, Object>> Join(string ASQLCommand, FilterListClass Filters)
        {
            List<Dictionary<string, Object>> Result = new List<Dictionary<string, Object>>();

                if (this.IsReady())
                {
                    this.DoNothing();
                } // if (this.IsReady())

                return Result;
        }
예제 #7
0
        public virtual List<Dictionary<string, Object>> Where(FilterListClass APredicateList)
        {
            List<Dictionary<string, Object>> Result = new List<Dictionary<string, Object>>();

                if (this.IsReady())
                {
                    foreach (Dictionary<string, Object> EachRow in this.F_Rows)
                    {
                        if (RowMatchesList(EachRow, APredicateList))
                        {
                            // make a "shallow" copy of each record,
                            // we don't want to access them directly,
                            // because we will modify the database table directly
                            Dictionary<string, Object> EachRowCopy = new Dictionary<string, object>();

                            foreach (KeyValuePair<string, Object> EachFieldValue in EachRow)
                            {
                                // add a copy of each field-value to the new row
                                EachRowCopy.Add(EachFieldValue.Key, EachFieldValue.Value);
                            } // foreach

                            // add clone of each row to result list
                            Result.Add(EachRowCopy);
                        }  // if
                    } // foreach
                } // if (this.IsReady())

                return Result;
        }
예제 #8
0
        public bool RowMatchesList(Dictionary<string, Object> EachRow, FilterListClass APredicateList)
        {
            bool Result = true;

                if (APredicateList.Count() == 1)
                {
                    FilterClass EachPredicate = APredicateList.getItemAt(0);
                    Result = RowMatches(EachRow, EachPredicate);
                }
                else
                {
                    /*
                    bool IsFirst = true;
                    bool PrevResult = true;
                    foreach (FilterClass EachPredicate in APredicateList)
                    {
                        if (RowMatches(EachRow, EachPredicate))
                        {
                            this.DoNothing();
                        }
                    } // foreach
                    */
                }

                return Result;
        }
예제 #9
0
        // ...
        /// <summary>
        /// Construye un nuevo objeto de la clase <code>FilterListClass</code>,
        /// que desciende de <code>ObjectClass</code>,
        /// y ejecuta el inicializador virtual, por-de-facto.
        /// Para ejecutar otro inicializador,
        /// se tiene que realizar estas operaciones como pasos separados.
        /// </summary>
        /// <returns>Nuevo objeto</returns>
        public static new FilterListClass Factory()
        {
            FilterListClass Result = new FilterListClass();
                Result.Create();

                return Result;
        }
예제 #10
0
 /// <summary>
 /// Desecha objeto de la clase <code>FilterListClass</code>,
 /// que desciende de <code>ObjectClass</code>,
 /// ejecutando el metodo finalizador, por-de-facto.
 /// Para ejecutar otro finalizador,
 /// se tiene que realizar estas operaciones como pasos separados.
 /// </summary>
 /// <param name="AObject">Objeto que se desechara de memoria</param>
 public static void Disposer(ref FilterListClass AObject)
 {
     if (AObject != null)
         {
             AObject.Destroy();
             AObject = null;
         } // if (AObject != null)
 }