org.azzyzt.jee.runtime.eao
Class MultiObjectSaver
java.lang.Object
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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiObjectSaver
public MultiObjectSaver()
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 EAOinvocationRegistry
- an InvocationRegistry
tmi
- type meta information generated by Azzyzt JEE Toolsdtos
- 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