public virtual void End() { NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction qfa = null; NeoDatis.Odb.Impl.Core.Query.List.Values.DefaultObjectValues dov = null; if (!query.IsMultiRow()) { dov = new NeoDatis.Odb.Impl.Core.Query.List.Values.DefaultObjectValues(returnArraySize ); } for (int i = 0; i < returnArraySize; i++) { qfa = queryFieldActions[i]; qfa.End(); if (!query.IsMultiRow()) { object o = qfa.GetValue(); // When Values queries return objects, they actually return the oid of the object // So we must load it here if (o != null && o is NeoDatis.Odb.OID) { NeoDatis.Odb.Impl.Core.Oid.OdbObjectOID oid = (NeoDatis.Odb.Impl.Core.Oid.OdbObjectOID )o; o = engine.GetObjectFromOid(oid); } // Sets the values now dov.Set(i, qfa.GetAlias(), o); } } if (!query.IsMultiRow()) { result.Add(dov); } }
private NeoDatis.Odb.ObjectValues ConvertObject(NeoDatis.Odb.Core.Layers.Layer2.Meta.AttributeValuesMap values) { NeoDatis.Odb.Impl.Core.Query.List.Values.DefaultObjectValues dov = new NeoDatis.Odb.Impl.Core.Query.List.Values.DefaultObjectValues (returnArraySize); NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction qfa = null; for (int i = 0; i < returnArraySize; i++) { qfa = queryFieldActions[i]; qfa.Execute(values.GetObjectInfoHeader().GetOid(), values); object o = qfa.GetValue(); // When Values queries return objects, they actually return the oid of the object // So we must load it here if (o != null && o is NeoDatis.Odb.OID) { NeoDatis.Odb.Impl.Core.Oid.OdbObjectOID oid = (NeoDatis.Odb.Impl.Core.Oid.OdbObjectOID )o; o = engine.GetObjectFromOid(oid); } dov.Set(i, qfa.GetAlias(), o); } return(dov); }