Ejemplo n.º 1
0
 public virtual int LockValue(string name, string pattern) /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     Net.Vpc.Upa.Impl.PrivateSequence r = GetSequence(name, pattern);
     if (r.IsLocked())
     {
         throw new Net.Vpc.Upa.Exceptions.UPAException("Already locked");
     }
     r.SetLocked(true);
     r.SetLockUserId(entity.GetPersistenceUnit().GetUserPrincipal().GetName());
     r.SetLockDate(new Net.Vpc.Upa.Types.DateTime());
     entity.CreateUpdateQuery().SetValues(r).ById(entity.CreateId(name, pattern));
     return(r.GetValue());
 }
Ejemplo n.º 2
0
 public override void AfterPersistHelper(Net.Vpc.Upa.Callbacks.PersistEvent @event, Net.Vpc.Upa.Expressions.Expression translatedExpression) /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     Net.Vpc.Upa.Entity entity = @event.GetEntity();
     entity.CreateUpdateQuery().Validate(GetFields(entity)).ByExpression(translatedExpression).Execute();
 }