Package com._1c.g5.v8.dt.md.api
Class BasicDbObjectBasedOnTask
java.lang.Object
com._1c.g5.v8.bm.integration.AbstractBmTask<org.eclipse.core.runtime.IStatus>
com._1c.g5.v8.bm.integration.BmBasicTask
com._1c.g5.v8.bm.integration.BmBasicTask2Collection<P1,P2>
com._1c.g5.v8.dt.md.api.AbstractMdObjectCollectionTask<MdObject,MdObject>
com._1c.g5.v8.dt.md.api.BasicDbObjectBasedOnTask
- All Implemented Interfaces:
IBmTask<org.eclipse.core.runtime.IStatus>
public abstract class BasicDbObjectBasedOnTask
extends AbstractMdObjectCollectionTask<MdObject,MdObject>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BasicDbObjectBasedOnTask
(MdObject object, Collection<MdObject> objects, String template) Creates a newIBmTask
successor instance -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addBasedOn
(MdObject target, Collection<MdObject> sources) Adds based-on objects to a target object.protected void
addBasisFor
(MdObject source, Collection<MdObject> targets) Adds a source object to each of specified targets.static BasicDbObjectBasedOnTask
createBasedOnAddTask
(MdObject dbObject, Collection<MdObject> dbObjects) Creates a newIBmTask
that adds the givenBasicDbObject
s to the based on collection.static BasicDbObjectBasedOnTask
createBasedOnRemoveTask
(MdObject dbObject, Collection<MdObject> dbObjects) Creates a newIBmTask
that removes the givenBasicDbObject
s from the based on collection.static BasicDbObjectBasedOnTask
createBasisForAddTask
(MdObject dbObject, Collection<MdObject> dbObjects) Creates a newIBmTask
that adds the givenBasicDbObject
to each element of the collection.static BasicDbObjectBasedOnTask
createBasisForRemoveTask
(MdObject dbObject, Collection<MdObject> dbObjects) Creates a newIBmTask
that removes the givenBasicDbObject
from the each element of the collection.protected void
removeBasedOn
(MdObject target, Collection<MdObject> sources) Removes based-on objects from a target object.protected void
removeBasisFor
(MdObject source, Collection<MdObject> targets) Removes based-on objects from a target object.Methods inherited from class com._1c.g5.v8.dt.md.api.AbstractMdObjectCollectionTask
doExecute, execute, getName
Methods inherited from class com._1c.g5.v8.bm.integration.BmBasicTask2Collection
execute
Methods inherited from class com._1c.g5.v8.bm.integration.BmBasicTask
execute, getTransaction
Methods inherited from class com._1c.g5.v8.bm.integration.AbstractBmTask
getId, getName, getServiceId
-
Constructor Details
-
BasicDbObjectBasedOnTask
Creates a newIBmTask
successor instance- Parameters:
object
- is theBasicDbObject
objects
- is the collection ofBasicDbObject
stemplate
- is template message for task naming purposes
-
-
Method Details
-
createBasedOnAddTask
public static BasicDbObjectBasedOnTask createBasedOnAddTask(MdObject dbObject, Collection<MdObject> dbObjects) Creates a newIBmTask
that adds the givenBasicDbObject
s to the based on collection.- Parameters:
dbObject
- is theBasicDbObject
dbObjects
- is the collection ofBasicDbObject
- Returns:
- the created task
-
createBasisForAddTask
public static BasicDbObjectBasedOnTask createBasisForAddTask(MdObject dbObject, Collection<MdObject> dbObjects) Creates a newIBmTask
that adds the givenBasicDbObject
to each element of the collection.- Parameters:
dbObject
- is theBasicDbObject
dbObjects
- is the collection ofBasicDbObject
- Returns:
- the created task
-
createBasedOnRemoveTask
public static BasicDbObjectBasedOnTask createBasedOnRemoveTask(MdObject dbObject, Collection<MdObject> dbObjects) Creates a newIBmTask
that removes the givenBasicDbObject
s from the based on collection.- Parameters:
dbObject
- is theBasicDbObject
that is based on the specified objects indbObjects
based, cannot benull
dbObjects
- is the collection ofBasicDbObject
, cannot benull
or empty- Returns:
- the created task, never
null
-
createBasisForRemoveTask
public static BasicDbObjectBasedOnTask createBasisForRemoveTask(MdObject dbObject, Collection<MdObject> dbObjects) Creates a newIBmTask
that removes the givenBasicDbObject
from the each element of the collection.- Parameters:
dbObject
- is theBasicDbObject
that is basis for the specified objects indbObjects
, cannot benull
dbObjects
- is the collection ofBasicDbObject
, cannot benull
or empty- Returns:
- the created task, never
null
-
addBasedOn
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 benull
sources
- The collection of objects to add. Cannot benull
-
addBasisFor
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 benull
targets
- The collection of objects to add. Cannot benull
-
removeBasedOn
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 benull
sources
- The collection of objects to add. Cannot benull
-
removeBasisFor
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 benull
targets
- The collection of objects to remove source from. Cannot benull
-