Class ESalesIngestor


  • public class ESalesIngestor
    extends Object
    • Constructor Detail

      • ESalesIngestor

        public ESalesIngestor()
    • Method Detail

      • setInputStream

        public void setInputStream​(InputStream is)
      • setAccountDAO

        public void setAccountDAO​(AccountDAO accountDAO)
      • ingest

        public void ingest()
                    throws javax.xml.bind.JAXBException,
                           XMLStreamException
        This method will ingest the input data by reading in external DTOs in from the parser, instantiating project business objects, and inserting into database. Note that the XML Schema is organized such that object references are fully resolved. Therefore, there is no specific need to process the addresses as they come in. They can be stored once we get the accounts they are related to.
        Throws:
        javax.xml.bind.JAXBException
        XMLStreamException
      • createAccount

        private void createAccount​(Account accountDTO)
        This method is called by the main ingest processing loop. The JAXB/StAX parser will already have the Account populated with Address information.
        Parameters:
        accountDTO -