org.azzyzt.jee.runtime.eao
Class MultiObjectSaver

java.lang.Object
  extended by org.azzyzt.jee.runtime.eao.MultiObjectSaver

public class MultiObjectSaver
extends java.lang.Object

One of the service beans generated by Azzyzt JEE Tools, ModifyMultiBean, needs to deal with polymorphic lists of DTOs. In order to store the associated entities, ModifyMultiBean uses a MultiObjectSaver. MultiObjectSaver utilizes meta information generated by Azzyzt JEE Tools to find out about the correct class for converting between DTOs and entities. The converters are called via their ConverterRawInterface, an interface that all generated converters implement.

See Also:
MultiObjectDeleter, TypeMetaInfoInterface, IdTranslator, ConverterRawInterface

Constructor Summary
MultiObjectSaver()
           
 
Method Summary
 java.lang.Object[] store(EaoBase eao, InvocationRegistryInterface invocationRegistry, TypeMetaInfoInterface tmi, java.util.List dtos)
          Uses an EAO and type meta information to persist the entities corresponding to a list of DTOs.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiObjectSaver

public MultiObjectSaver()
Method Detail

store

public java.lang.Object[] store(EaoBase eao,
                                InvocationRegistryInterface invocationRegistry,
                                TypeMetaInfoInterface tmi,
                                java.util.List dtos)
                         throws EntityNotFoundException,
                                AccessDeniedException,
                                InvalidArgumentException,
                                InvalidIdException,
                                DuplicateProxyIdException,
                                InvalidProxyIdException,
                                EntityInstantiationException
Uses an EAO and type meta information to persist the entities corresponding to a list of DTOs. If necessary, an Invocation Registry is used to set automatically filled create / modification timestamp fields to the exact timestamp when the transaction was started.

Parameters:
eao - an EAO
invocationRegistry - an InvocationRegistry
tmi - type meta information generated by Azzyzt JEE Tools
dtos - a list of DTOs
Returns:
a list of DTOs in the same order as the input, but enriched with IDs and dynamically created content
Throws:
EntityNotFoundException
AccessDeniedException
InvalidArgumentException
InvalidIdException
DuplicateProxyIdException
InvalidProxyIdException
EntityInstantiationException