Class BmList<T>

    • Constructor Detail

      • BmList

        public BmList​(org.eclipse.emf.ecore.EObject object,
                      org.eclipse.emf.ecore.EStructuralFeature feature)
        Instantiates a new BM list.
        Parameters:
        object - the object.
        feature - the object feature.
    • Method Detail

      • getChange

        public IChange getChange()
        Specified by:
        getChange in interface IModel
        Returns:
        change describing the modifications done to the model.
      • dispose

        public void dispose()
        Description copied from interface: IModel
        Disposes this model.
        Specified by:
        dispose in interface IModel
        Overrides:
        dispose in class ListModel<T>
      • getObject

        public IBmObject getObject()
        Description copied from interface: IAttribute
        Returns the object that keeps the attribute.
        Specified by:
        getObject in interface IAttribute<IBmObject,​org.eclipse.emf.ecore.EStructuralFeature>
        Returns:
        the object that keeps the attribute.
      • getProperty

        public org.eclipse.emf.ecore.EStructuralFeature getProperty()
        Description copied from interface: IAttribute
        Returns the property.
        Specified by:
        getProperty in interface IAttribute<IBmObject,​org.eclipse.emf.ecore.EStructuralFeature>
        Returns:
        the property.
      • createTask

        protected IModelApiTaskN<Void> createTask​(IBmObject object,
                                                  org.eclipse.emf.ecore.EStructuralFeature feature,
                                                  List<T> valueToApply)
        Creates an IModelApiTaskN that executes during applying changes.
        Parameters:
        object - the object to change, cannot be null.
        feature - the feature the feature to change, cannot be null.
        valueToApply - the value to apply.
        Returns:
        the created IModelApiTaskN.
      • setObjectValue

        protected void setObjectValue​(org.eclipse.emf.ecore.EObject object,
                                      org.eclipse.emf.ecore.EStructuralFeature feature,
                                      List<T> newValue)
        Sets the new value of the provided model object feature during the commit.
        The method is invoked within the task, so the given objects have the relevant state (e.g. attached to transaction).
        Parameters:
        object - the object to set new value, cannot be null.
        feature - the feture to set, cannot be null.
        newValue - the new value to set, can be null.
      • adapt

        protected static IModelApiTaskN<Void> adapt​(IBmTask<?> bmTask)
        Converts the specified BM task to IModelApiTaskN.

        NOTE: this method is required until exists the API (tasks) that encapsulates the business logic in the BM task manner.

        Parameters:
        bmTask - the BM task, cannot be null.
        Returns:
        model api task, never null.