Search in sources :

Example 1 with SqlRunner

use of infoeval.main.mysql.SqlRunner in project Info-Evaluation by TechnionYP5777.

the class InfoevalServiceImp method getBornInPlaceYear.

@Override
@RequestMapping(path = "Queries/Query2", method = RequestMethod.GET)
public ArrayList<TableEntry> getBornInPlaceYear(String place, String year) throws Exception {
    SqlRunner runner = new SqlRunner();
    ArrayList<TableEntry> $ = runner.getBornInPlaceBeforeYear(place, year);
    logger.log(Level.INFO, "Born in place before year was called.\n Parameters:" + "Place:" + place + ", Year:" + year);
    logger.log(Level.INFO, "list size:" + $.size());
    return $;
}
Also used : TableEntry(infoeval.main.mysql.TableEntry) SqlRunner(infoeval.main.mysql.SqlRunner) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with SqlRunner

use of infoeval.main.mysql.SqlRunner in project Info-Evaluation by TechnionYP5777.

the class InfoevalServiceImp method differentDeathPlace.

@Override
@RequestMapping(path = "Queries/Query1", method = RequestMethod.GET)
public ArrayList<TableEntry> differentDeathPlace() throws Exception {
    logger.log(Level.INFO, "Born and died in different place was called");
    //ArrayList<TableEntry> $ = new ArrayList<>();
    //
    //java.sql.Date utilDate1 = java.sql.Date.valueOf( LocalDate.of(1912, 6, 23) );
    //	java.sql.Date utilDate2 = java.sql.Date.valueOf( LocalDate.of(1954, 6, 7) );
    //
    //	TableEntry entry = new TableEntry(null, "Alan Turing", "Maida Vale", "Wilmslow", utilDate1, utilDate2,"","","");
    //$.add(entry);
    //
    //utilDate1 = java.sql.Date.valueOf((LocalDate.of(1886, 10, 16)));
    //utilDate2 = java.sql.Date.valueOf(LocalDate.of(1973, 12, 1));
    //
    //entry = new TableEntry(null, "David Ben-Gurion", "plonsk", "Ramat Gan", utilDate1, utilDate2,"","","");
    //$.add(entry);
    //return $;
    //This is the code that should really run. The code above is just a stub. We don't run the actual Java code to find real resultsbecause the server is too slow for now ...
    /*
		 * TODO: DO NOT REMOVE THE CODE BELOW !!!! @MOSHIKO
		 * 
		 */
    SqlRunner runner = new SqlRunner();
    ArrayList<TableEntry> $ = runner.getDifferentDeathPlace();
    logger.log(Level.INFO, "list size:" + $.size());
    return $;
}
Also used : TableEntry(infoeval.main.mysql.TableEntry) SqlRunner(infoeval.main.mysql.SqlRunner) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

SqlRunner (infoeval.main.mysql.SqlRunner)2 TableEntry (infoeval.main.mysql.TableEntry)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2