Referencing Another SQLContainer
SQLContainer offers limited support for this kind of referencing relation, although all referencing is currently done on the Java side so no constraints need to be made in the database. A new reference can be created by calling the following method:
Note: For any SQLContainer, all the referenced target containers must be different. You can not reference the same container from the same source twice.
The setter method should be given three parameters: itemId is the ID of the referencing item (from the source container), refdItemId is the referenced itemID (from the target container) and refdCont is a reference to the target container that identifies the reference. This method returns true if the setting of the referenced item was successful. After setting the referenced item you must normally call commit() on the source container to persist the changes to the database.
Finally, the referencing can be removed from the source container by calling the removeReference() method with the target container as parameter. Note that this does not actually change anything in the database; it merely removes the logical relation that exists only on the Java-side.