package org.azzyzt.jee.runtime.conv;
import org.azzyzt.jee.runtime.eao.MultiObjectDeleter;
import org.azzyzt.jee.runtime.eao.MultiObjectSaver;
import org.azzyzt.jee.runtime.entity.EntityBase;
import org.azzyzt.jee.runtime.exception.DuplicateProxyIdException;
import org.azzyzt.jee.runtime.exception.EntityInstantiationException;
import org.azzyzt.jee.runtime.exception.EntityNotFoundException;
import org.azzyzt.jee.runtime.exception.InvalidIdException;
import org.azzyzt.jee.runtime.exception.InvalidProxyIdException;
/**
* One of the service beans generated by Azzyzt JEE Tools, <code>ModifyMultiBean</code>,
* needs to deal with polymorphic lists of DTOs. In order to store the associated
* entities, <code>ModifyMultiBean</code> uses a <code>MultiObjectSaver</code>.
*
* <code>MultiObjectSaver</code> utilizes meta information generated by Azzyzt
* JEE Tools to find out about the correct class for converting between DTOs and
* entities. Because the information about the exact converter class to be used
* is only available at runtime, we need an interface common to all converters.
* In contrast to the normal, typed interface, this is a raw interface dealing with
* <code>EntityBase</code>, the base class common to all entities, and with <code>Object</code>.
*
* @see MultiObjectSaver
* @see MultiObjectDeleter
*/
public interface ConverterRawInterface {
/**
* converts a DTO to the associated entity
* @param in a DTO
* @return an entity
* @throws EntityNotFoundException
* @throws EntityInstantiationException
* @throws InvalidIdException
* @throws DuplicateProxyIdException
* @throws InvalidProxyIdException
*/
@SuppressWarnings("rawtypes")
public EntityBase fromRawDto(Object in)
throws EntityNotFoundException, EntityInstantiationException, InvalidIdException,
DuplicateProxyIdException, InvalidProxyIdException;
public Object fromEntityBase(@SuppressWarnings("rawtypes") EntityBase in);
}