Creating Instances in Java
The following code shows an example of createXXX methods generated to cover the set of entities defined in the tutorial:
public interface CapacityPlanning extends DbDomCollector {
Activity createActivity();
GeneIssue createGeneIssue();
GeneParameter createGeneParameter();
Precedence createPrecedence();
Requirement createRequirement();
Resource createResource();
ResourceCapacity createResourceCapacity();
ResourceUsagePerDay createResourceUsagePerDay();
Schedule createSchedule();
SolutionSummary createSolutionSummary();
...
}
To create a resource, one would declare the following:
Resource res1 = coll.createResource();
Each instance is linked with its collector which can be accessed using the getCollector() method.
res1.getCollector() == coll; // TRUE