com.prozima.pengine
Class Relationship

java.lang.Object
  extended by com.prozima.pengine.Relationship

public class Relationship
extends java.lang.Object

Represents a relationship between two nodes in a schedule. When a relationship exists between two nodes, it means that the start or finish of one node depends on the start or finish of another node. Nodes may have relationships with multiple other nodes. It is also possible for a node to have more than one relationship with another node, with some restrictions.


Nested Class Summary
static class Relationship.RelationshipType
          Defines the type of relationshipType which a schedule node can have with other nodes.
 
Constructor Summary
Relationship(Relationship.RelationshipType inRelType, ScheduleNode.PredecessorType inPredType, java.lang.Integer inPredID)
          Create a Relationship and initialise its state.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Two Relationships are equal if the type is the same and the predecessors are the same.
 java.lang.Integer getPredecessorID()
          Query the ID of the predecessor node.
 ScheduleNode.PredecessorType getPredecessorType()
          Query whether the predecessor node is an activity or a milestone.
 Relationship.RelationshipType getType()
          Query the type of relationship a schedule node has with a predecessor node.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Relationship

public Relationship(Relationship.RelationshipType inRelType,
                    ScheduleNode.PredecessorType inPredType,
                    java.lang.Integer inPredID)
Create a Relationship and initialise its state.

Parameters:
inRelType - Type of relationship with predecessor node. Cannot be null.
inPredType - Type of the predecessor node. Cannot be null.
inPredID - ID of the predecessor node. Cannot be null.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Two Relationships are equal if the type is the same and the predecessors are the same.

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getPredecessorID

public java.lang.Integer getPredecessorID()
Query the ID of the predecessor node.

Returns:
ID of the predecessor schedule node. null should not be returned.

getPredecessorType

public ScheduleNode.PredecessorType getPredecessorType()
Query whether the predecessor node is an activity or a milestone.

Returns:
Type of schedule node.

getType

public Relationship.RelationshipType getType()
Query the type of relationship a schedule node has with a predecessor node.

Returns:
Type of relationship with a predecessor schedule node.