Class BasicDbObjectBasedOnTask

All Implemented Interfaces:
IBmTask<org.eclipse.core.runtime.IStatus>

public abstract class BasicDbObjectBasedOnTask extends AbstractMdObjectCollectionTask<MdObject,MdObject>
An IBmTask abstract implementation for manipulation with basedOn basedOn and fields that is used to override by specifying concrete action (add or remove).
  • Constructor Details

  • Method Details

    • createBasedOnAddTask

      public static BasicDbObjectBasedOnTask createBasedOnAddTask(MdObject dbObject, Collection<MdObject> dbObjects)
      Creates a new IBmTask that adds the given BasicDbObjects to the based on collection.
      Parameters:
      dbObject - is the BasicDbObject
      dbObjects - is the collection of BasicDbObject
      Returns:
      the created task
    • createBasisForAddTask

      public static BasicDbObjectBasedOnTask createBasisForAddTask(MdObject dbObject, Collection<MdObject> dbObjects)
      Creates a new IBmTask that adds the given BasicDbObject to each element of the collection.
      Parameters:
      dbObject - is the BasicDbObject
      dbObjects - is the collection of BasicDbObject
      Returns:
      the created task
    • createBasedOnRemoveTask

      public static BasicDbObjectBasedOnTask createBasedOnRemoveTask(MdObject dbObject, Collection<MdObject> dbObjects)
      Creates a new IBmTask that removes the given BasicDbObjects from the based on collection.
      Parameters:
      dbObject - is the BasicDbObject that is based on the specified objects in dbObjects based, cannot be null
      dbObjects - is the collection of BasicDbObject, cannot be null or empty
      Returns:
      the created task, never null
    • createBasisForRemoveTask

      public static BasicDbObjectBasedOnTask createBasisForRemoveTask(MdObject dbObject, Collection<MdObject> dbObjects)
      Creates a new IBmTask that removes the given BasicDbObject from the each element of the collection.
      Parameters:
      dbObject - is the BasicDbObject that is basis for the specified objects in dbObjects, cannot be null
      dbObjects - is the collection of BasicDbObject, cannot be null or empty
      Returns:
      the created task, never null
    • addBasedOn

      protected void addBasedOn(MdObject target, Collection<MdObject> sources)
      Adds based-on objects to a target object. Both source and target objects must be the one that supports based on functionality (BasicDbObject or Table)
      Parameters:
      target - The target object to add. Cannot be null
      sources - The collection of objects to add. Cannot be null
    • addBasisFor

      protected void addBasisFor(MdObject source, Collection<MdObject> targets)
      Adds a source object to each of specified targets. Both source and target objecgts must be the one that supports based on functionality (BasicDbObject or Table)
      Parameters:
      source - The target object to add. Cannot be null
      targets - The collection of objects to add. Cannot be null
    • removeBasedOn

      protected void removeBasedOn(MdObject target, Collection<MdObject> sources)
      Removes based-on objects from a target object. A target object must be the one that supports based on functionality (BasicDbObject or Table)
      Parameters:
      target - The target object to add. Cannot be null
      sources - The collection of objects to add. Cannot be null
    • removeBasisFor

      protected void removeBasisFor(MdObject source, Collection<MdObject> targets)
      Removes based-on objects from a target object. A target object must be the one that supports based on functionality (BasicDbObject or Table)
      Parameters:
      source - The source object to remove. Cannot be null
      targets - The collection of objects to remove source from. Cannot be null