Changes between Version 8 and Version 9 of LEGACY - CaTissueClientAPI


Ignore:
Timestamp:
11/26/10 12:19:05 (14 years ago)
Author:
jeff.lusted
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LEGACY - CaTissueClientAPI

    v8 v9  
    3232This is partly an extension of the above points on Domain Objects.[[BR]]
    3333Normally, a business action within an application is defined by one or more transactions. I cannot see a clear transaction boundary yet in the API.
     34
     35{{{
     36private static void updateSCG() throws Exception {
     37
     38        Participant participant = new Participant();
     39        participant.setLastName(PSRTICIPANT_LAST_NAME);
     40        String query = "some query stuff here";
     41        List scgList = appService.search( query, participant );
     42
     43        Iterator<SpecimenCollectionGroup> scgItr = scgList.iterator();
     44        SpecimenCollectionGroup sprObj = null;
     45        Site site = BaseTestCaseUtility.initSite();
     46        site = (Site) appService.createObject(site);
     47        //
     48        // Here is a loop with an update invocation embedded within it.
     49        // Is each update a separate transaction?
     50        //
     51        while (scgItr.hasNext()) {
     52                sprObj = (SpecimenCollectionGroup) scgItr.next();
     53                sprObj.setCollectionStatus("Complete");
     54                sprObj.setSpecimenCollectionSite(site);
     55                setEventParameters(sprObj);
     56                //
     57                // Note that this update is within a loop!
     58                // Where is the transaction boundary?...
     59                SpecimenCollectionGroup scg =
     60                         (SpecimenCollectionGroup) appService.updateObject( sprObj ) ;
     61        }
     62
     63}
     64}}}