OverviewDoc overviewDoc = new OverviewDoc();
overviewDoc.setOverviewURL(
"http://www.steveviens.com/overviewdoc.html");
String tModelKey = uuidgen.uuidgen();
TModel tModel = new TModel();
tModel.setTModelKey(tModelKey);
tModel.setAuthorizedName("sviens");
tModel.setOperator("WebServiceRegistry.com");
tModel.setName("Tuscany Web Service Company");
tModel.setOverviewDoc(overviewDoc);
Vector keyRefs = new Vector();
keyRefs.add(new KeyedReference(uuidgen.uuidgen(), "blah, blah, blah"));
keyRefs.add(
new KeyedReference(uuidgen.uuidgen(), "Yadda, Yadda, Yadda"));
keyRefs.add(
new KeyedReference(uuidgen.uuidgen(), "WhoobWhoobWhoobWhoob"));
keyRefs.add(new KeyedReference(uuidgen.uuidgen(), "Haachachachacha"));
String authorizedUserID = "sviens";
// begin a new transaction
txn.begin(connection);
// insert a new TModel
TModelTable.insert(tModel, authorizedUserID, connection);
// insert a Collection of new Identifier KeyedReference objects
TModelIdentifierTable.insert(tModelKey, keyRefs, connection);
// insert another new TModel
tModel.setTModelKey(uuidgen.uuidgen());
TModelTable.insert(tModel, authorizedUserID, connection);
// insert another Collection of new Identifier KeyedReference objects
TModelIdentifierTable.insert(
tModel.getTModelKey(),
keyRefs,
connection);
// select a Collection of Identifier KeyedReference objects
keyRefs = TModelIdentifierTable.select(tModelKey, connection);