public override NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo CreateCopy (System.Collections.Generic.IDictionary <NeoDatis.Odb.OID, NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo > cache, bool onlyData) { System.Collections.ICollection c = (System.Collections.ICollection)theObject; System.Collections.Generic.ICollection <NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo > newCollection = new NeoDatis.Tool.Wrappers.List.OdbArrayList <NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo >(); // To keep track of non native objects NeoDatis.Tool.Wrappers.List.IOdbList <NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo > nonNatives = new NeoDatis.Tool.Wrappers.List.OdbArrayList <NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo >(); System.Collections.IEnumerator iterator = c.GetEnumerator(); while (iterator.MoveNext()) { NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo aoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo )iterator.Current; // create copy aoi = aoi.CreateCopy(cache, onlyData); newCollection.Add(aoi); if (aoi.IsNonNativeObject()) { nonNatives.Add((NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo)aoi); } } NeoDatis.Odb.Core.Layers.Layer2.Meta.CollectionObjectInfo coi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.CollectionObjectInfo (newCollection, odbType, nonNatives); coi.SetRealCollectionClassName(realCollectionClassName); return(coi); }
/// <summary>An abstract criterion only restrict one field => it returns a list of one field! /// </summary> /// <returns>The list of involved field of the criteria</returns> public virtual NeoDatis.Tool.Wrappers.List.IOdbList <string> GetAllInvolvedFields( ) { NeoDatis.Tool.Wrappers.List.IOdbList <string> l = new NeoDatis.Tool.Wrappers.List.OdbArrayList <string>(1); l.Add(attributeName); return(l); }
/// <summary>An abstract criterion only restrict one field => it returns a list of one field! /// </summary> /// <returns>The list of involved field of the criteria</returns> public virtual NeoDatis.Tool.Wrappers.List.IOdbList<string> GetAllInvolvedFields( ) { NeoDatis.Tool.Wrappers.List.IOdbList<string> l = new NeoDatis.Tool.Wrappers.List.OdbArrayList <string>(1); l.Add(attributeName); return l; }
public override NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo CreateCopy (System.Collections.Generic.IDictionary<NeoDatis.Odb.OID, NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo > cache, bool onlyData) { System.Collections.ICollection c = (System.Collections.ICollection)theObject; System.Collections.Generic.ICollection<NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo > newCollection = new NeoDatis.Tool.Wrappers.List.OdbArrayList<NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo >(); // To keep track of non native objects NeoDatis.Tool.Wrappers.List.IOdbList<NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo > nonNatives = new NeoDatis.Tool.Wrappers.List.OdbArrayList<NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo >(); System.Collections.IEnumerator iterator = c.GetEnumerator(); while (iterator.MoveNext()) { NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo aoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo )iterator.Current; // create copy aoi = aoi.CreateCopy(cache, onlyData); newCollection.Add(aoi); if (aoi.IsNonNativeObject()) { nonNatives.Add((NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo)aoi); } } NeoDatis.Odb.Core.Layers.Layer2.Meta.CollectionObjectInfo coi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.CollectionObjectInfo (newCollection, odbType, nonNatives); coi.SetRealCollectionClassName(realCollectionClassName); return coi; }
static ODBType() { // Not used in Java, for .Net compatibility // Not used in Java, for .Net compatibility //public final static ODBType MAP = new ODBType(false,MAP_ID, "java.util.AbstractMap", 0, AbstractMap.class); NeoDatis.Tool.Wrappers.List.IOdbList<ODBType > allTypes = new NeoDatis.Tool.Wrappers.List.OdbArrayList<ODBType >(100); //// DO NOT FORGET DO ADD THE TYPE IN THIS LIST WHEN CREATING A NEW ONE!!! allTypes.Add(Null); allTypes.Add(NativeBoolean); allTypes.Add(NativeByte); allTypes.Add(NativeChar); allTypes.Add(NativeShort); allTypes.Add(NativeInt); allTypes.Add(NativeLong); allTypes.Add(NativeFloat); allTypes.Add(NativeDouble); allTypes.Add(Byte); allTypes.Add(Short); allTypes.Add(Integer); allTypes.Add(Long); allTypes.Add(Float); allTypes.Add(Double); allTypes.Add(BigDecimal); allTypes.Add(BigInteger); allTypes.Add(Character); allTypes.Add(Boolean); allTypes.Add(Date); allTypes.Add(DateSql); allTypes.Add(DateTimestamp); allTypes.Add(String); allTypes.Add(Enum); allTypes.Add(Collection); allTypes.Add(CollectionGeneric); allTypes.Add(Array); allTypes.Add(Map); allTypes.Add(Oid); allTypes.Add(ObjectOid); allTypes.Add(ClassOid); allTypes.Add(NonNative); ODBType type = null; for (int i = 0; i < allTypes.Count; i++) { type = allTypes[i]; typesByName[type.GetName()] = type; typesById[type.GetId()] = type; } }
static ODBType() { // Not used in Java, for .Net compatibility // Not used in Java, for .Net compatibility //public final static ODBType MAP = new ODBType(false,MAP_ID, "java.util.AbstractMap", 0, AbstractMap.class); NeoDatis.Tool.Wrappers.List.IOdbList <ODBType > allTypes = new NeoDatis.Tool.Wrappers.List.OdbArrayList <ODBType >(100); //// DO NOT FORGET DO ADD THE TYPE IN THIS LIST WHEN CREATING A NEW ONE!!! allTypes.Add(Null); allTypes.Add(NativeBoolean); allTypes.Add(NativeByte); allTypes.Add(NativeChar); allTypes.Add(NativeShort); allTypes.Add(NativeInt); allTypes.Add(NativeLong); allTypes.Add(NativeFloat); allTypes.Add(NativeDouble); allTypes.Add(Byte); allTypes.Add(Short); allTypes.Add(Integer); allTypes.Add(Long); allTypes.Add(Float); allTypes.Add(Double); allTypes.Add(BigDecimal); allTypes.Add(BigInteger); allTypes.Add(Character); allTypes.Add(Boolean); allTypes.Add(Date); allTypes.Add(DateSql); allTypes.Add(DateTimestamp); allTypes.Add(String); allTypes.Add(Enum); allTypes.Add(Collection); allTypes.Add(CollectionGeneric); allTypes.Add(Array); allTypes.Add(Map); allTypes.Add(Oid); allTypes.Add(ObjectOid); allTypes.Add(ClassOid); allTypes.Add(NonNative); ODBType type = null; for (int i = 0; i < allTypes.Count; i++) { type = allTypes[i]; typesByName[type.GetName()] = type; typesById[type.GetId()] = type; } }
/// <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 NeoDatis.Tool.Wrappers.List.IOdbList<string> GetAllInvolvedFields () { NeoDatis.Tool.Wrappers.List.IOdbList<string> l = new NeoDatis.Tool.Wrappers.List.OdbArrayList <string>(); // To check field duplicity System.Collections.Generic.IDictionary<string, string> map = new NeoDatis.Tool.Wrappers.Map.OdbHashMap <string, string>(); l.AddAll(base.GetAllInvolvedFields()); if (!l.IsEmpty()) { for (int i = 0; i < l.Count; i++) { map.Add(l[i], l[i]); } } System.Collections.Generic.IEnumerator<NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction > iterator = objectActions.GetEnumerator(); NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction oa = null; string name = null; while (iterator.MoveNext()) { oa = iterator.Current; if (oa.GetType() != typeof(NeoDatis.Odb.Impl.Core.Query.Values.CountAction)) { name = oa.GetAttributeName(); if (!map.ContainsKey(name)) { l.Add(name); map.Add(name, name); } } } if (hasGroupBy) { for (int i = 0; i < groupByFieldList.Length; i++) { name = groupByFieldList[i]; if (!map.ContainsKey(name)) { l.Add(name); map.Add(name, name); } } } if (HasOrderBy()) { for (int i = 0; i < orderByFields.Length; i++) { name = orderByFields[i]; if (!map.ContainsKey(name)) { l.Add(name); map.Add(name, name); } } } map.Clear(); map = null; return l; }
/// <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 NeoDatis.Tool.Wrappers.List.IOdbList <string> GetAllInvolvedFields () { NeoDatis.Tool.Wrappers.List.IOdbList <string> l = new NeoDatis.Tool.Wrappers.List.OdbArrayList <string>(); // To check field duplicity System.Collections.Generic.IDictionary <string, string> map = new NeoDatis.Tool.Wrappers.Map.OdbHashMap <string, string>(); l.AddAll(base.GetAllInvolvedFields()); if (!l.IsEmpty()) { for (int i = 0; i < l.Count; i++) { map.Add(l[i], l[i]); } } System.Collections.Generic.IEnumerator <NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction > iterator = objectActions.GetEnumerator(); NeoDatis.Odb.Core.Query.Execution.IQueryFieldAction oa = null; string name = null; while (iterator.MoveNext()) { oa = iterator.Current; if (oa.GetType() != typeof(NeoDatis.Odb.Impl.Core.Query.Values.CountAction)) { name = oa.GetAttributeName(); if (!map.ContainsKey(name)) { l.Add(name); map.Add(name, name); } } } if (hasGroupBy) { for (int i = 0; i < groupByFieldList.Length; i++) { name = groupByFieldList[i]; if (!map.ContainsKey(name)) { l.Add(name); map.Add(name, name); } } } if (HasOrderBy()) { for (int i = 0; i < orderByFields.Length; i++) { name = orderByFields[i]; if (!map.ContainsKey(name)) { l.Add(name); map.Add(name, name); } } } map.Clear(); map = null; return(l); }