public override void OnDropEntity(Net.Vpc.Upa.Callbacks.EntityEvent @event)
 {
     Net.Vpc.Upa.Entity e = @event.GetEntity();
     if (filter.Accept(e))
     {
         added.Add(e.GetName());
         configurator.Uninstall(@event.GetEntity());
         if (oneShot && (added).Count == 0)
         {
             u.RemoveDefinitionListener(this);
         }
     }
 }
 public virtual void OnCreateEntity(Net.Vpc.Upa.Callbacks.EntityEvent @event)
 {
     Net.Vpc.Upa.Entity e = @event.GetEntity();
     if (IsDetailOrMasterEntity(e))
     {
         ProcessRelation(false);
     }
 }
 public override void OnCreateEntity(Net.Vpc.Upa.Callbacks.EntityEvent @event)
 {
     Net.Vpc.Upa.Entity e = @event.GetEntity();
     if (filter.Accept(e))
     {
         if (!added.Contains(e.GetName()))
         {
             added.Add(e.GetName());
             configurator.Install(e);
         }
     }
 }
 public static System.Collections.Generic.IList <object> ResolveIdListUtility(Net.Vpc.Upa.Callbacks.EntityEvent @event, Net.Vpc.Upa.Expressions.Expression whereExpression) /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     Net.Vpc.Upa.Persistence.EntityExecutionContext executionContext = @event.GetContext();
     if (whereExpression is Net.Vpc.Upa.Expressions.IdExpression)
     {
         object id = ((Net.Vpc.Upa.Expressions.IdExpression)whereExpression).GetId();
         return(id == null ? new System.Collections.Generic.List <object>() : new System.Collections.Generic.List <object>(new[] { id }));
     }
     else
     {
         if (!executionContext.IsSet("ALL_IDS"))
         {
             if (@event.GetPhase() == Net.Vpc.Upa.EventPhase.AFTER)
             {
                 throw new Net.Vpc.Upa.Exceptions.UPAException("SingleEntityEventCalledInPostProcessButNeverInPreProcess");
             }
             System.Collections.Generic.IList <object> idList = @event.GetEntity().CreateQueryBuilder().ByExpression(whereExpression).GetIdList <K>();
             executionContext.SetObject("ALL_IDS", idList);
         }
         return((System.Collections.Generic.IList <object>)executionContext.GetObject <T>("ALL_IDS"));
     }
 }
예제 #5
0
 public override void OnCreateEntity(Net.Vpc.Upa.Callbacks.EntityEvent @event)
 {
     Net.Vpc.Upa.Impl.DefaultPersistenceUnit defaultPersistenceUnit = (Net.Vpc.Upa.Impl.DefaultPersistenceUnit)@event.GetPersistenceUnit();
     defaultPersistenceUnit.PostponeCommit(new Net.Vpc.Upa.Impl.Persistence.DefaultOnHoldCommitAction(@event.GetEntity(), Net.Vpc.Upa.Impl.OnHoldCommitActionType.CREATE, Net.Vpc.Upa.Impl.DefaultPersistenceUnit.COMMIT_ORDER_ENTITY));
 }
 public override void OnCreateEntity(Net.Vpc.Upa.Callbacks.EntityEvent @event)
 {
     BindRelation(@event.GetEntity());
 }