}
public static void test(Connection connection) throws Exception
{
Transaction txn = new Transaction();
UUIDGen uuidgen = UUIDGenFactory.getUUIDGen();
if (connection != null)
{
try
{
String businessKey = uuidgen.uuidgen();
BusinessEntity business = new BusinessEntity();
business.setBusinessKey(businessKey);
business.setAuthorizedName("sviens");
business.setOperator("WebServiceRegistry.com");
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 BusinessEntity
BusinessEntityTable.insert(business, authorizedUserID, connection);
// insert a Collection of new Identifier KeyedReference objects
BusinessIdentifierTable.insert(businessKey, keyRefs, connection);
// insert another new BusinessEntity
business.setBusinessKey(uuidgen.uuidgen());
BusinessEntityTable.insert(business, authorizedUserID, connection);
// insert another Collection of new Identifier KeyedReference objects
BusinessIdentifierTable.insert(
business.getBusinessKey(),