Exemplo n.º 1
0
 public ChangedNativeAttributeAction(NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
                                     oldNnoi, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo newNnoi, long
                                     position, NeoDatis.Odb.Core.Layers.Layer2.Meta.NativeObjectInfo newNoi, int recursionLevel
                                     , bool canDoInPlaceUpdate, string attributeName)
 {
     this.oldNnoi                   = oldNnoi;
     this.newNoi                    = newNnoi;
     this.updatePosition            = position;
     this.noiWithNewValue           = newNoi;
     this.recursionLevel            = recursionLevel;
     this.reallyCantDoInPlaceUpdate = canDoInPlaceUpdate;
     this.attributeName             = attributeName;
 }
 public override bool Equals(object obj)
 {
     if (obj == null)
     {
         return(false);
     }
     NeoDatis.Odb.Core.Layers.Layer2.Meta.NativeObjectInfo noi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.NativeObjectInfo
                                                                  )obj;
     if (theObject == noi.GetObject())
     {
         return(true);
     }
     return(theObject.Equals(noi.GetObject()));
 }
Exemplo n.º 3
0
 public override string ToString()
 {
     System.Text.StringBuilder buffer = new System.Text.StringBuilder(classInfo.GetFullClassName
                                                                          ()).Append("(").Append(GetOid()).Append(")=");
     if (attributeValues == null)
     {
         buffer.Append("null attribute values");
         return(buffer.ToString());
     }
     for (int i = 0; i < attributeValues.Length; i++)
     {
         if (i != 0)
         {
             buffer.Append(",");
         }
         string attributeName = (classInfo != null ? (classInfo.GetAttributeInfo(i)).GetName
                                     () : "?");
         buffer.Append(attributeName).Append("=");
         object @object = attributeValues[i];
         if (@object == null)
         {
             buffer.Append(" null java object - should not happen , ");
         }
         else
         {
             NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType type = NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
                                                                 .GetFromClass(attributeValues[i].GetType());
             if (@object is NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeNullObjectInfo)
             {
                 buffer.Append("null");
                 continue;
             }
             if (@object is NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeDeletedObjectInfo)
             {
                 buffer.Append("deleted object");
                 continue;
             }
             if (@object is NeoDatis.Odb.Core.Layers.Layer2.Meta.NativeObjectInfo)
             {
                 NeoDatis.Odb.Core.Layers.Layer2.Meta.NativeObjectInfo noi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.NativeObjectInfo
                                                                              )@object;
                 buffer.Append(noi.ToString());
                 continue;
             }
             if (@object is NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo)
             {
                 NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo nnoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
                                                                                  )@object;
                 buffer.Append("@").Append(nnoi.GetClassInfo().GetFullClassName()).Append("(id=").
                 Append(nnoi.GetOid()).Append(")");
                 continue;
             }
             if (@object is NeoDatis.Odb.Core.Layers.Layer2.Meta.ObjectReference)
             {
                 buffer.Append(@object.ToString());
                 continue;
             }
             buffer.Append("@").Append(NeoDatis.Tool.Wrappers.OdbClassUtil.GetClassName(type.GetName
                                                                                            ()));
         }
     }
     return(buffer.ToString());
 }