Ejemplo n.º 1
0
        public JEVisRelationship BuildRelationship(JEVisObject otherObj, int type, int direction)
        {
            JEVisRelationship rel;

            if (direction == JEVisConstants.Direction.FORWARD)
            {
                rel = this.ds.BuildRelationship(GetId(), otherObj.SetId(), type);

                if (type == JEVisConstants.ObjectRelationship.PARENT)
                {
                    otherObj.NotifyListeners(new JEVisEvent(rel.GetEndObject(), JEVisEvent.TYPE.OBJECT_NEW_CHILD, rel.GetStartObject()));
                }
            }
            else
            {
                rel = otherObj.BuildRelationship(this, type, JEVisConstants.Direction.FORWARD);
            }


            return(rel);
        }