Пример #1
0
 public override string GetAbsoluteName()
 {
     Net.Vpc.Upa.EntityPart parentSchemaItem = GetParent();
     if (parentSchemaItem == null)
     {
         return(GetEntity().GetAbsoluteName() + "." + GetName());
     }
     return(parentSchemaItem.GetAbsoluteName() + "/" + GetName());
 }
Пример #2
0
 public FieldEvent(Net.Vpc.Upa.Field field, Net.Vpc.Upa.PersistenceUnit persistenceUnit, Net.Vpc.Upa.Entity entity, Net.Vpc.Upa.EntityPart parent, int index, Net.Vpc.Upa.EntityPart oldParent, int oldIndex, Net.Vpc.Upa.EventPhase phase)
 {
     this.persistenceUnit = persistenceUnit;
     this.field           = field;
     this.parent          = parent;
     this.index           = index;
     this.oldParent       = oldParent;
     this.oldIndex        = oldIndex;
     this.entity          = entity;
     this.phase           = phase;
 }
Пример #3
0
 public virtual void After(Net.Vpc.Upa.PrimitiveField child, int index)
 {
     Net.Vpc.Upa.EntityPart oldParent = child.GetParent();
     if (oldParent != null && oldParent != defaultCompoundField)
     {
         if (oldParent is Net.Vpc.Upa.Section)
         {
             Net.Vpc.Upa.Section x = (Net.Vpc.Upa.Section)oldParent;
             x.RemovePartAt(x.IndexOfPart(child));
         }
         else if (oldParent is Net.Vpc.Upa.CompoundField)
         {
             Net.Vpc.Upa.CompoundField x = (Net.Vpc.Upa.CompoundField)oldParent;
             ((Net.Vpc.Upa.Impl.DefaultCompoundField)x).DropFieldAt(x.IndexOfField(child));
         }
     }
     if (oldParent != defaultCompoundField)
     {
         Net.Vpc.Upa.Impl.Util.DefaultBeanAdapter adapter = new Net.Vpc.Upa.Impl.Util.DefaultBeanAdapter(child);
         adapter.SetProperty("parent", defaultCompoundField);
     }
 }
Пример #4
0
 public virtual void Add(Net.Vpc.Upa.EntityPart part)
 {
     path.Add(part);
 }
Пример #5
0
 public virtual Net.Vpc.Upa.EntityPart RemovePartAt(int index) /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     Net.Vpc.Upa.EntityPart child = Net.Vpc.Upa.Impl.Util.ListUtils.Remove <Net.Vpc.Upa.EntityPart>(parts, index, this, new Net.Vpc.Upa.Impl.DefaultSectionPrivateRemoveItemInterceptor());
     return(child);
 }
Пример #6
0
 public virtual void AddPart(Net.Vpc.Upa.EntityPart child, int index) /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     Net.Vpc.Upa.Impl.Util.ListUtils.Add <Net.Vpc.Upa.EntityPart>(parts, child, index, this, this, new Net.Vpc.Upa.Impl.DefaultSectionPrivateAddItemInterceptor(this));
 }
Пример #7
0
 public virtual void AddPart(Net.Vpc.Upa.EntityPart child) /* throws Net.Vpc.Upa.Exceptions.UPAException */
 {
     AddPart(child, -1);
 }
Пример #8
0
 public DefaultSection()  : base()
 {
     this.parent = null;
     this.parts  = new System.Collections.Generic.List <Net.Vpc.Upa.EntityPart>(3);
     childrenMap = new System.Collections.Generic.Dictionary <string, Net.Vpc.Upa.EntityPart>();
 }
Пример #9
0
 public virtual string GetPath()
 {
     Net.Vpc.Upa.EntityPart parent = GetParent();
     return(parent == null ? ("/" + GetName()) : (parent.GetPath() + "/" + GetName()));
 }
Пример #10
0
 public virtual void SetParent(Net.Vpc.Upa.EntityPart item)
 {
     Net.Vpc.Upa.EntityPart old = this.parent;
     this.parent = item;
     propertyChangeSupport.FirePropertyChange("parent", old, parent);
 }
Пример #11
0
 public virtual int IndexOfPart(Net.Vpc.Upa.EntityPart child)
 {
     return(parts.IndexOf(child));
 }