Class RelationshipUtil
com.matrixone.apps.common.util.RelationshipUtil
public class RelationshipUtil extends java.lang.Object
The RelationshipUtil class provides tools to float objects.
Method Summary
access | Method Name | Description |
---|---|---|
static void | connected(matrix.db.Context context, java.lang.Object objectId,java.lang.String relPattern, java.lang.String typePattern, java.lang.String expandDir, java.util.Map policyStateMap) | Floats the specified relationships to this object. |
static void | connected(matrix.db.Context context, java.lang.Object objectId, java.lang.String relPattern, java.lang.String typePattern, java.lang.String expandDir, java.lang.String floatExpression) | Floats the specified relationships to this object. |
Method Detail
connected
1 | public static void connected(matrix.db.Context context, |
Floats the specified relationships to this object. The objects connected to the previous revision of the given object and that meet the specified criteria are disconnected from the previous revision and connected to the given object. To meet the specified criteria, the objects must be connected to the previous revision of the given object through the relationship and type patterns, in the specified direction, and must be editable. To be editable, the object’s state must be one of the states listed in the policy-state map, or the object must not be in it’s last state.
Example:
1 | BusinessObject mc = new BusinessObject("Microcomputer", "Q Prom", |
Parameters:
- context - The matrix context object.
- objectId - The object to float relationships to.
- relPattern - The relationships to expand.
- expandDir - The direction to expand. This can be “from” or “to”. Anything else will expand in both directions.
- policyStateMap - A map from policy names to a list of the editable states in that policy.
Throws:
java.lang.Exception - if float failed.
connected
1 | public static void connected(matrix.db.Context context, |