atg.svc.repository.service
Class RepositoryService.SaveCollectionRunner

java.lang.Object
  extended by atg.svc.repository.service.CollectionRunner
      extended by atg.svc.repository.service.RepositoryService.SaveCollectionRunner
All Implemented Interfaces:
TransactionRunner
Enclosing class:
RepositoryService

protected class RepositoryService.SaveCollectionRunner
extends CollectionRunner

Save Runner that creates a collection of new repository objects from a collection of new beans.


Field Summary
 
Fields inherited from class atg.svc.repository.service.CollectionRunner
CLASS_VERSION
 
Constructor Summary
RepositoryService.SaveCollectionRunner(java.util.Collection pObjects)
           
 
Method Summary
 void runTransaction(java.lang.Object pObject)
          Iterates through the collection of bean objects and saves each one.
 
Methods inherited from class atg.svc.repository.service.CollectionRunner
runTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryService.SaveCollectionRunner

public RepositoryService.SaveCollectionRunner(java.util.Collection pObjects)
Method Detail

runTransaction

public void runTransaction(java.lang.Object pObject)
                    throws TransactionException
Iterates through the collection of bean objects and saves each one. If the object is new a new repository impl is created and the bean properties are copied into it before save. If the object exists, the corresponding repository impl is found, the bean properties are copied into it before save. Finally, the object is saved.

Specified by:
runTransaction in class CollectionRunner
Throws:
TransactionException - If an exception occurs during the run.