// This method os not used in Values Query API public virtual void ObjectMatch(NeoDatis.Odb.OID oid, object @object, NeoDatis.Tool.Wrappers.OdbComparable orderByKey) { NeoDatis.Odb.Core.Layers.Layer2.Meta.AttributeValuesMap values = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AttributeValuesMap )@object; NeoDatis.Tool.Wrappers.OdbComparable groupByKey = NeoDatis.Odb.Core.Query.Execution.IndexTool .BuildIndexKey("GroupBy", values, groupByFieldList); NeoDatis.Odb.Impl.Core.Query.Values.ValuesQueryResultAction result = groupByResult [groupByKey]; if (result == null) { result = new NeoDatis.Odb.Impl.Core.Query.Values.ValuesQueryResultAction(query, null , instanceBuilder); result.Start(); groupByResult.Add(groupByKey, result); } result.ObjectMatch(oid, @object, orderByKey); }
// Nothing to do public virtual void End() { if (query != null && query.HasOrderBy()) { result = new NeoDatis.Odb.Impl.Core.Query.List.Values.InMemoryBTreeCollectionForValues ((int)nbObjects, query.GetOrderByType()); } else { result = new NeoDatis.Odb.Impl.Core.Query.List.Values.SimpleListForValues((int)nbObjects ); } System.Collections.IEnumerator iterator = groupByResult.Keys.GetEnumerator(); NeoDatis.Odb.Impl.Core.Query.Values.ValuesQueryResultAction vqra = null; NeoDatis.Tool.Wrappers.OdbComparable key = null; while (iterator.MoveNext()) { key = (NeoDatis.Tool.Wrappers.OdbComparable)iterator.Current; vqra = (NeoDatis.Odb.Impl.Core.Query.Values.ValuesQueryResultAction)groupByResult [key]; vqra.End(); Merge(key, vqra.GetValues()); } }