Пример #1
0
 private void Clear()
 {
     _oids.Clear();
     _modifiedObjectOids.Clear();
     _modifiedObjectOidList.Clear();
 }
Пример #2
0
        /// <summary>
        ///   Returns the list of involved fields for this query.
        /// </summary>
        /// <remarks>
        ///   Returns the list of involved fields for this query. List of String <pre>If query must return sum("value") and field("name"), involvedField will contain "value","name"</pre>
        /// </remarks>
        public override IOdbList <string> GetAllInvolvedFields()
        {
            IOdbList <string> list = new OdbList <string>();

            // To check field duplicity
            IDictionary <string, string> map = new OdbHashMap <string, string>();

            list.AddAll(base.GetAllInvolvedFields());

            if (!list.IsNullOrEmpty())
            {
                foreach (var value in list)
                {
                    map.Add(value, value);
                }
            }

            var    iterator = _objectActions.GetEnumerator();
            string name;

            while (iterator.MoveNext())
            {
                var queryFieldAction = iterator.Current;
                if (queryFieldAction is CountAction)
                {
                    continue;
                }

                name = queryFieldAction.GetAttributeName();
                if (map.ContainsKey(name))
                {
                    continue;
                }

                list.Add(name);
                map.Add(name, name);
            }

            if (_hasGroupBy)
            {
                foreach (var groupByField in _groupByFieldList)
                {
                    name = groupByField;

                    if (map.ContainsKey(name))
                    {
                        continue;
                    }

                    list.Add(name);
                    map.Add(name, name);
                }
            }

            if (HasOrderBy())
            {
                foreach (var field in OrderByFields)
                {
                    name = field;
                    if (map.ContainsKey(name))
                    {
                        continue;
                    }

                    list.Add(name);
                    map.Add(name, name);
                }
            }
            map.Clear();

            return(list);
        }
Пример #3
0
 public void ResetChangedClasses()
 {
     _changedClasses.Clear();
     _hasChanged = false;
 }