Class BpRelation

  • All Implemented Interfaces:
    com._1c.g5.v8.dt.diagram.framework.IRelation
    Direct Known Subclasses:
    CaseRelation, ConditionRelation

    public class BpRelation
    extends com._1c.g5.v8.dt.diagram.framework.model.Relation
    Bp implementation of relation
    • Field Detail

      • DEFAULT_SOURCE_ANCHOR_POSITION

        protected static final int DEFAULT_SOURCE_ANCHOR_POSITION
        See Also:
        Constant Field Values
      • DEFAULT_TARGET_ANCHOR_POSITION

        protected static final int DEFAULT_TARGET_ANCHOR_POSITION
        See Also:
        Constant Field Values
    • Constructor Detail

      • BpRelation

        public BpRelation​(com._1c.g5.v8.dt.diagram.framework.IEntity source,
                          com._1c.g5.v8.dt.diagram.framework.IEntity target,
                          String name)
        Constructor.
        Parameters:
        source - - source. Can be null.
        target - - target. Can be null.
        name - - relation name. Can't be null.
      • BpRelation

        public BpRelation​(com._1c.g5.v8.dt.diagram.framework.IEntity source,
                          com._1c.g5.v8.dt.diagram.framework.IEntity target,
                          GraphicalSchemeConnection modelObject)
        Constructor.
        Parameters:
        source - - source. Can be null.
        target - - target. Can be null.
        modelObject - - associated with this relation model object. Can't be null.
      • BpRelation

        public BpRelation​(com._1c.g5.v8.dt.diagram.framework.IEntity source,
                          com._1c.g5.v8.dt.diagram.framework.IEntity target,
                          String name,
                          int sourceAnchorPosition,
                          int targetAnchorPosition)
        Constructor.
        Parameters:
        source - - source. Can be null.
        target - - target. Can be null.
        name - - relation name. Can't be null.
        sourceAnchorPosition - - source anchor position.
        targetAnchorPosition - - target anchor position.
        See Also:
        IAnchorTypes.TOP, IAnchorTypes.BOTTOM, IAnchorTypes.LEFT, IAnchorTypes.RIGHT
    • Method Detail

      • getModelObject

        public GraphicalSchemeConnection getModelObject()
        Returns model object.
        Returns:
        model object. Can return null.
      • getModelObjectId

        public long getModelObjectId()
        Returns model object bm id.
        Returns:
        model object bm id.
      • setModelObjectId

        public void setModelObjectId​(long modelObjectId)
        Sets model object bm id.
        Parameters:
        modelObjectId - - model object bm id.
      • getName

        public String getName()
        Returns relation name.
        Returns:
        relation name. Can't return null.
      • setName

        public void setName​(String name)
        Sets relation name.
        Parameters:
        name - - new name. Can't be null.
      • getInitialSourceAnchorPosition

        public int getInitialSourceAnchorPosition()
        Returns initial source anchor position.
        Returns:
        initial source anchor position.
      • getInitialTargetAnchorPosition

        public int getInitialTargetAnchorPosition()
        Returns initial target anchor position.
        Returns:
        initial target anchor position.
      • isDecorative

        public boolean isDecorative()
        Returns:
        true if relation is decorative.
      • setDecorative

        public void setDecorative​(boolean isDecorative)
        Sets is this relation is decorative.
        Parameters:
        isDecorative - - true if relation is decorative.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object