public virtual void ManageUpdateTriggerAfter(string className, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
                                              oldNnoi, object newObject, NeoDatis.Odb.OID oid)
 {
     if (HasUpdateTriggersFor(className))
     {
         NeoDatis.Odb.Core.Trigger.UpdateTrigger trigger  = null;
         System.Collections.IEnumerator          iterator = GetListOfUpdateTriggersFor(className).GetEnumerator
                                                                ();
         while (iterator.MoveNext())
         {
             trigger = (NeoDatis.Odb.Core.Trigger.UpdateTrigger)iterator.Current;
             if (trigger.GetOdb() == null)
             {
                 trigger.SetOdb(new NeoDatis.Odb.Impl.Main.ODBForTrigger(storageEngine));
             }
             try
             {
                 trigger.AfterUpdate(new NeoDatis.Odb.Impl.Core.Server.Trigger.DefaultObjectRepresentation
                                         (oldNnoi), Transform(newObject), oid);
             }
             catch (System.Exception e)
             {
                 NeoDatis.Odb.Core.IError warning = NeoDatis.Odb.Core.NeoDatisError.AfterUpdateTriggerHasThrownException
                                                    .AddParameter(trigger.GetType().FullName).AddParameter(NeoDatis.Tool.Wrappers.OdbString
                                                                                                           .ExceptionToString(e, false));
                 if (NeoDatis.Odb.OdbConfiguration.DisplayWarnings())
                 {
                     NeoDatis.Tool.DLogger.Info(warning);
                 }
             }
         }
     }
 }
Пример #2
0
 public virtual void AddUpdateTrigger(System.Type clazz, NeoDatis.Odb.Core.Trigger.UpdateTrigger
                                      trigger)
 {
     if (trigger is NeoDatis.Odb.Core.Server.Trigger.ServerUpdateTrigger)
     {
         throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.CanNotAssociateServerTriggerToLocalOrClientOdb
                                                    .AddParameter(trigger.GetType().FullName));
     }
     storageEngine.AddUpdateTriggerFor(clazz.FullName, trigger);
 }
 public virtual void AddUpdateTriggerFor(string className, NeoDatis.Odb.Core.Trigger.UpdateTrigger
                                         trigger)
 {
     if (className == null)
     {
         className = AllClassTrigger;
     }
     NeoDatis.Tool.Wrappers.List.IOdbList <NeoDatis.Odb.Core.Trigger.Trigger> c = listOfUpdateTriggers
                                                                                  [className];
     if (c == null)
     {
         c = new NeoDatis.Tool.Wrappers.List.OdbArrayList <NeoDatis.Odb.Core.Trigger.Trigger
                                                           >();
         listOfUpdateTriggers.Add(className, c);
     }
     c.Add(trigger);
 }
 public abstract void AddUpdateTrigger(System.Type clazz, NeoDatis.Odb.Core.Trigger.UpdateTrigger
                                       trigger);
 public virtual void AddUpdateTriggerFor(string className, NeoDatis.Odb.Core.Trigger.UpdateTrigger
                                         trigger)
 {
     triggerManager.AddUpdateTriggerFor(className, trigger);
 }
Пример #6
0
 public virtual void AddUpdateTrigger(NeoDatis.Odb.Core.Trigger.UpdateTrigger trigger
                                      )
 {
     throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.OperationNotAllowedInTrigger
                                                );
 }
 public abstract void AddUpdateTriggerFor(string arg1, NeoDatis.Odb.Core.Trigger.UpdateTrigger
                                          arg2);