First version with ability to create database for new season

This commit is contained in:
2020-09-27 19:05:20 +02:00
parent b97e15be7d
commit 283efc775b
75 changed files with 106536 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
package de.jeyp91;
import de.jeyp91.tippliga.*;
/**
* Hello world!
*
*/
public class App {
public static void main(String[] args) throws Exception {
//getMatchesFromDatabase();
//updateMatchesFromOpenLigaDB();
//con.close();
System.out.println("done");
}
/*
public static void getMatchesFromDatabase() throws SQLException {
String queryString = "SELECT * FROM `phpbb_footb_matches` WHERE season = 2019 AND league = 1";
Statement stmt = con.createStatement();
ResultSet rset = stmt.executeQuery(queryString);
ArrayList<Match> matches = new ArrayList<Match>();
while (rset.next()) {
matches.add(new Match(rset));
}
}
*/
/*
public static void updateMatchesFromOpenLigaDB() throws Exception {
String queryString = "SELECT * FROM `phpbb_footb_matches` WHERE season = 2018 AND league = 48";
Statement stmt = con.createStatement();
ResultSet rset = stmt.executeQuery(queryString);
ArrayList<Match> matchesTLW = new ArrayList<Match>();
while (rset.next()) {
matchesTLW.add(new Match(rset));
}
// Download data from OpenLigaDB
JSONArray matchDBJson = new JSONArray();
OpenLigaDB openLigaDB = new OpenLigaDB();
for (int i = 1; i <= 6; i++) {
// matchDBJson.put(OpenLigaDB.downloadMatchday(2020, "bl1", i));
// matchDBJson.put(OpenLigaDB.downloadMatchday(2020, "bl2", i));
// matchDBJson.put(OpenLigaDB.downloadMatchday(2020, "bl3", i));
matchDBJson.add(openLigaDB.getMatchesOfMatchdayAsJSONArray(2018, "dfb", i));
}
for (Match match : matchesTLW) {
match.updateDataFromOpenLigaDb(matchDBJson);
}
}*/
}