コード例 #1
0
 public virtual void ManageDeleteTriggerAfter(string className, object @object, NeoDatis.Odb.OID
                                              oid)
 {
     if (HasDeleteTriggersFor(className))
     {
         NeoDatis.Odb.Core.Trigger.DeleteTrigger trigger  = null;
         System.Collections.IEnumerator          iterator = GetListOfDeleteTriggersFor(className).GetEnumerator
                                                                ();
         while (iterator.MoveNext())
         {
             trigger = (NeoDatis.Odb.Core.Trigger.DeleteTrigger)iterator.Current;
             if (trigger.GetOdb() == null)
             {
                 trigger.SetOdb(new NeoDatis.Odb.Impl.Main.ODBForTrigger(storageEngine));
             }
             try
             {
                 trigger.AfterDelete(Transform(@object), oid);
             }
             catch (System.Exception e)
             {
                 NeoDatis.Odb.Core.IError warning = NeoDatis.Odb.Core.NeoDatisError.AfterDeleteTriggerHasThrownException
                                                    .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 AddDeleteTrigger(System.Type clazz, NeoDatis.Odb.Core.Trigger.DeleteTrigger
                                      trigger)
 {
     if (trigger is NeoDatis.Odb.Core.Server.Trigger.ServerDeleteTrigger)
     {
         throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.CanNotAssociateServerTriggerToLocalOrClientOdb
                                                    .AddParameter(trigger.GetType().FullName));
     }
     storageEngine.AddDeleteTriggerFor(clazz.FullName, trigger);
 }
コード例 #3
0
 public virtual void AddDeleteTriggerFor(string className, NeoDatis.Odb.Core.Trigger.DeleteTrigger
                                         trigger)
 {
     if (className == null)
     {
         className = AllClassTrigger;
     }
     NeoDatis.Tool.Wrappers.List.IOdbList <NeoDatis.Odb.Core.Trigger.Trigger> c = listOfDeleteTriggers
                                                                                  [className];
     if (c == null)
     {
         c = new NeoDatis.Tool.Wrappers.List.OdbArrayList <NeoDatis.Odb.Core.Trigger.Trigger
                                                           >();
         listOfDeleteTriggers.Add(className, c);
     }
     c.Add(trigger);
 }
コード例 #4
0
 public abstract void AddDeleteTrigger(System.Type clazz, NeoDatis.Odb.Core.Trigger.DeleteTrigger
                                       trigger);
コード例 #5
0
 public virtual void AddDeleteTriggerFor(string className, NeoDatis.Odb.Core.Trigger.DeleteTrigger
                                         trigger)
 {
     triggerManager.AddDeleteTriggerFor(className, trigger);
 }
コード例 #6
0
 public virtual void AddDeleteTrigger(NeoDatis.Odb.Core.Trigger.DeleteTrigger trigger
                                      )
 {
     throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.OperationNotAllowedInTrigger
                                                );
 }
コード例 #7
0
 public abstract void AddDeleteTriggerFor(string arg1, NeoDatis.Odb.Core.Trigger.DeleteTrigger
                                          arg2);