Package ejava.projects.eleague.blimpl
Class LeagueIngestor
- java.lang.Object
-
- ejava.projects.eleague.blimpl.LeagueIngestor
-
public class LeagueIngestor extends Object
-
-
Field Summary
Fields Modifier and Type Field Description private ClubDAO
clubDAO
private InputStream
is
private static org.slf4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description LeagueIngestor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkSeason(Season season)
private void
createVenue(Club clubDTO)
This method is called by the main ingest processing loop.void
ingest()
This method will ingest the input data by reading in external DTOs in from the parser, instantiating project business objects, and inserting into database.void
setClubDAO(ClubDAO clubDAO)
void
setInputStream(InputStream is)
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
is
private InputStream is
-
clubDAO
private ClubDAO clubDAO
-
-
Method Detail
-
setInputStream
public void setInputStream(InputStream is)
-
setClubDAO
public void setClubDAO(ClubDAO clubDAO)
-
ingest
public void ingest() throws javax.xml.bind.JAXBException, XMLStreamException, IOException
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
IOException
-
checkSeason
private void checkSeason(Season season)
-
createVenue
private void createVenue(Club clubDTO)
This method is called by the main ingest processing loop. The JAXB/StAX parser will already have the Venue populated with Address information.- Parameters:
clubDTO
-
-
-