Package org.jsefa

Examples of org.jsefa.Deserializer


      addColumn("schedule", "holidaysallowance", "int4");
      addColumn("schedule", "holidayscountry", "varchar(8)");
      addColumn("schedule", "holidaysprovince", "varchar(8)");

      // Create the standard holidays
      Deserializer holidayReader = CsvIOFactory.createFactory(Holiday.class).createDeserializer();

      holidayReader.open(new InputStreamReader(this.getClass().getResourceAsStream("holidays_de.csv")));

      while (holidayReader.hasNext())
      {
        Holiday holiday = holidayReader.next();

        update("INSERT INTO holiday (id,name,country,province,day,month,year) values (?,?,?,?,?,?,?)",
                new Object[]
                {
                        createKeelId("Holiday"), holiday.getName(), holiday.getCountry(),
View Full Code Here


  @Override
  public void createData(PersistentFactory persistentFactory, Connection connection, Logger logger,
          ModelRequest request) throws ModelException, PersistenceException, SQLException
  {
    // Create the standard holidays
    Deserializer holidayReader = CsvIOFactory.createFactory(Holiday.class).createDeserializer();

    holidayReader.open(new InputStreamReader(this.getClass().getResourceAsStream("holidays_de.csv")));

    while (holidayReader.hasNext())
    {
      Holiday holiday = holidayReader.next();

      if (holiday.getYear() != null)
      {
        update("INSERT INTO holiday (name, country, province, day, month, year) values (?, ?, ?, ?, ?, ?)",
                new Object[]
View Full Code Here

TOP

Related Classes of org.jsefa.Deserializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.