public void SubordinateFilters(FilterListClass ThisFilters) { RemoveFilters(); if (ThisFilters != null) { this.F_Filters = ThisFilters; this.IsFiltersManaged = true; } // if (ThisFilters != null) }
// ... 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; }
// ... 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; }
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; }
public void AssociateFilters(FilterListClass ThisFilters) { RemoveFilters(); if (ThisFilters != null) { this.F_Filters = ThisFilters; } // if (EstaPersona != null) this.IsFiltersManaged = false; }
// ... // ... /// <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; }
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; }
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; }
// ... /// <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; }
/// <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) }