From 364ae6da148ee4a5d0c2bc77450d5fed6fbb9f74 Mon Sep 17 00:00:00 2001 From: Aayush Agnihotri Date: Sun, 3 Nov 2024 18:14:10 -0500 Subject: [PATCH] Reducing workload on init --- .../java/com/appdev/allin/Application.java | 432 +++++++++--------- .../playerData/util/PopulatePlayerData.java | 9 +- 2 files changed, 222 insertions(+), 219 deletions(-) diff --git a/src/main/java/com/appdev/allin/Application.java b/src/main/java/com/appdev/allin/Application.java index 5e621da..cbe88de 100644 --- a/src/main/java/com/appdev/allin/Application.java +++ b/src/main/java/com/appdev/allin/Application.java @@ -39,224 +39,224 @@ public CommandLineRunner populatePlayers(PlayerRepo playerRepo, PlayerDataRepo p "New Milford, N.J.", "Saint Joseph Regional HS", baseUrl + "chris_manon.jpeg"); - Player nazir_williams = - new Player( - "Nazir", - "Williams", - new Position[] {Position.Guard}, - 1, - "6'3", - 180, - "Nyack, N.Y.", - "South Kent School", - baseUrl + "nazir.jpeg"); - Player isaiah_gray = - new Player( - "Isaiah", - "Gray", - new Position[] {Position.Guard}, - 13, - "6'3", - 219, - "Brooklyn, N.Y.", - "Martin Luther King HS", - baseUrl + "isaiah.jpeg"); - Player guy_ragland = - new Player( - "Guy", - "Ragland Jr.", - new Position[] {Position.Forward}, - 21, - "6'8", - 246, - "West Hartford, Conn.", - "Northwest Catholic HS", - baseUrl + "guy.jpeg"); - Player sean_hansen = - new Player( - "Sean", - "Hansen", - new Position[] {Position.Forward}, - 20, - "6'9", - 246, - "Ramsey, N.J.", - "Ramsey HS", - baseUrl + "sean.jpeg"); - Player cooper_noard = - new Player( - "Cooper", - "Noard", - new Position[] {Position.Guard}, - 31, - "6'2", - 190, - "Glenview, Ill.", - "Glenbrook South HS", - baseUrl + "cooper.jpeg"); - Player ak_okereke = - new Player( - "AK", - "Okereke", - new Position[] {Position.Forward}, - 12, - "6'7", - 235, - "Clovis, Calif.", - "Clovis North HS", - baseUrl + "ak.jpeg"); - Player keller_boothby = - new Player( - "Keller", - "Boothby", - new Position[] {Position.Forward}, - 15, - "6'7", - 223, - "Plano, Texas", - "Prestonwood Christian Academy", - baseUrl + "keller.jpeg"); - Player ian_imegwu = - new Player( - "Ian", - "Imegwu", - new Position[] {Position.Forward}, - 2, - "6'9", - 226, - "Short Hills, N.J.", - "Blair Academy", - baseUrl + "ian.jpeg"); - Player jake_fiegen = - new Player( - "Jake", - "Fiegen", - new Position[] {Position.Guard}, - 22, - "6'4", - 205, - "Wilmette, Ill.", - "New Trier HS", - baseUrl + "jake.jpeg"); - Player jacob_beccles = - new Player( - "Jacob", - "Beccles", - new Position[] {Position.Guard}, - 5, - "6'3", - 178, - "Philadelphia, Pa.", - "Constitution HS", - baseUrl + "jacob.jpeg"); - Player max_watson = - new Player( - "Max", - "Watson", - new Position[] {Position.Guard}, - 25, - "6'4", - 195, - "Brigham City, Utah", - "Box Elder HS", - baseUrl + "max.jpeg"); - Player chris_cain = - new Player( - "Chris", - "Cain", - new Position[] {Position.Forward}, - 33, - "6'8", - 223, - "Middletown, N.Y.", - "Pine Bush HS", - baseUrl + "chris.jpeg"); - Player evan_williams = - new Player( - "Evan", - "Williams", - new Position[] {Position.Forward}, - 0, - "6'7", - 220, - "Murphy, Texas", - "Plane East Senior HS", - baseUrl + "evan.jpeg"); - Player adam_hinton = - new Player( - "Adam", - "Tsang Hinton", - new Position[] {Position.Guard}, - 11, - "6'5", - 213, - "Studio City, Calif.", - "Harvard-Westlake School", - baseUrl + "adam.jpeg"); - Player dj_nix = - new Player( - "DJ", - "Nix", - new Position[] {Position.Forward}, - 23, - "6'6", - 216, - "Harrisburg, N.C.", - "Cannon School", - baseUrl + "dj.jpeg"); - Player ryan_kiachian = - new Player( - "Ryan", - "Kiachian", - new Position[] {Position.Forward, Position.Center}, - 3, - "6'10", - 228, - "Los Altos Hills, Calif.", - "Bellarmine College Preparatory", - baseUrl + "ryan.jpeg"); - Player darius_ervin = - new Player( - "Darius", - "Ervin", - new Position[] {Position.Guard}, - 14, - "5'8", - 170, - "Brooklyn, N.Y.", - "Northfield Mount Hermon School", - baseUrl + "darius.jpeg"); - Player hayden_franson = - new Player( - "Hayden", - "Franson", - new Position[] {Position.Forward}, - 10, - "6'8", - 218, - "American Fork, Utah", - "American Fork HS", - baseUrl + "hayden.jpeg"); + // Player nazir_williams = + // new Player( + // "Nazir", + // "Williams", + // new Position[] {Position.Guard}, + // 1, + // "6'3", + // 180, + // "Nyack, N.Y.", + // "South Kent School", + // baseUrl + "nazir.jpeg"); + // Player isaiah_gray = + // new Player( + // "Isaiah", + // "Gray", + // new Position[] {Position.Guard}, + // 13, + // "6'3", + // 219, + // "Brooklyn, N.Y.", + // "Martin Luther King HS", + // baseUrl + "isaiah.jpeg"); + // Player guy_ragland = + // new Player( + // "Guy", + // "Ragland Jr.", + // new Position[] {Position.Forward}, + // 21, + // "6'8", + // 246, + // "West Hartford, Conn.", + // "Northwest Catholic HS", + // baseUrl + "guy.jpeg"); + // Player sean_hansen = + // new Player( + // "Sean", + // "Hansen", + // new Position[] {Position.Forward}, + // 20, + // "6'9", + // 246, + // "Ramsey, N.J.", + // "Ramsey HS", + // baseUrl + "sean.jpeg"); + // Player cooper_noard = + // new Player( + // "Cooper", + // "Noard", + // new Position[] {Position.Guard}, + // 31, + // "6'2", + // 190, + // "Glenview, Ill.", + // "Glenbrook South HS", + // baseUrl + "cooper.jpeg"); + // Player ak_okereke = + // new Player( + // "AK", + // "Okereke", + // new Position[] {Position.Forward}, + // 12, + // "6'7", + // 235, + // "Clovis, Calif.", + // "Clovis North HS", + // baseUrl + "ak.jpeg"); + // Player keller_boothby = + // new Player( + // "Keller", + // "Boothby", + // new Position[] {Position.Forward}, + // 15, + // "6'7", + // 223, + // "Plano, Texas", + // "Prestonwood Christian Academy", + // baseUrl + "keller.jpeg"); + // Player ian_imegwu = + // new Player( + // "Ian", + // "Imegwu", + // new Position[] {Position.Forward}, + // 2, + // "6'9", + // 226, + // "Short Hills, N.J.", + // "Blair Academy", + // baseUrl + "ian.jpeg"); + // Player jake_fiegen = + // new Player( + // "Jake", + // "Fiegen", + // new Position[] {Position.Guard}, + // 22, + // "6'4", + // 205, + // "Wilmette, Ill.", + // "New Trier HS", + // baseUrl + "jake.jpeg"); + // Player jacob_beccles = + // new Player( + // "Jacob", + // "Beccles", + // new Position[] {Position.Guard}, + // 5, + // "6'3", + // 178, + // "Philadelphia, Pa.", + // "Constitution HS", + // baseUrl + "jacob.jpeg"); + // Player max_watson = + // new Player( + // "Max", + // "Watson", + // new Position[] {Position.Guard}, + // 25, + // "6'4", + // 195, + // "Brigham City, Utah", + // "Box Elder HS", + // baseUrl + "max.jpeg"); + // Player chris_cain = + // new Player( + // "Chris", + // "Cain", + // new Position[] {Position.Forward}, + // 33, + // "6'8", + // 223, + // "Middletown, N.Y.", + // "Pine Bush HS", + // baseUrl + "chris.jpeg"); + // Player evan_williams = + // new Player( + // "Evan", + // "Williams", + // new Position[] {Position.Forward}, + // 0, + // "6'7", + // 220, + // "Murphy, Texas", + // "Plane East Senior HS", + // baseUrl + "evan.jpeg"); + // Player adam_hinton = + // new Player( + // "Adam", + // "Tsang Hinton", + // new Position[] {Position.Guard}, + // 11, + // "6'5", + // 213, + // "Studio City, Calif.", + // "Harvard-Westlake School", + // baseUrl + "adam.jpeg"); + // Player dj_nix = + // new Player( + // "DJ", + // "Nix", + // new Position[] {Position.Forward}, + // 23, + // "6'6", + // 216, + // "Harrisburg, N.C.", + // "Cannon School", + // baseUrl + "dj.jpeg"); + // Player ryan_kiachian = + // new Player( + // "Ryan", + // "Kiachian", + // new Position[] {Position.Forward, Position.Center}, + // 3, + // "6'10", + // 228, + // "Los Altos Hills, Calif.", + // "Bellarmine College Preparatory", + // baseUrl + "ryan.jpeg"); + // Player darius_ervin = + // new Player( + // "Darius", + // "Ervin", + // new Position[] {Position.Guard}, + // 14, + // "5'8", + // 170, + // "Brooklyn, N.Y.", + // "Northfield Mount Hermon School", + // baseUrl + "darius.jpeg"); + // Player hayden_franson = + // new Player( + // "Hayden", + // "Franson", + // new Position[] {Position.Forward}, + // 10, + // "6'8", + // 218, + // "American Fork, Utah", + // "American Fork HS", + // baseUrl + "hayden.jpeg"); playerRepo.save(chris_manon); - playerRepo.save(nazir_williams); - playerRepo.save(isaiah_gray); - playerRepo.save(guy_ragland); - playerRepo.save(sean_hansen); - playerRepo.save(cooper_noard); - playerRepo.save(ak_okereke); - playerRepo.save(keller_boothby); - playerRepo.save(ian_imegwu); - playerRepo.save(jake_fiegen); - playerRepo.save(jacob_beccles); - playerRepo.save(max_watson); - playerRepo.save(chris_cain); - playerRepo.save(evan_williams); - playerRepo.save(adam_hinton); - playerRepo.save(dj_nix); - playerRepo.save(ryan_kiachian); - playerRepo.save(darius_ervin); - playerRepo.save(hayden_franson); + // playerRepo.save(nazir_williams); + // playerRepo.save(isaiah_gray); + // playerRepo.save(guy_ragland); + // playerRepo.save(sean_hansen); + // playerRepo.save(cooper_noard); + // playerRepo.save(ak_okereke); + // playerRepo.save(keller_boothby); + // playerRepo.save(ian_imegwu); + // playerRepo.save(jake_fiegen); + // playerRepo.save(jacob_beccles); + // playerRepo.save(max_watson); + // playerRepo.save(chris_cain); + // playerRepo.save(evan_williams); + // playerRepo.save(adam_hinton); + // playerRepo.save(dj_nix); + // playerRepo.save(ryan_kiachian); + // playerRepo.save(darius_ervin); + // playerRepo.save(hayden_franson); PopulatePlayerData populatePlayerData = new PopulatePlayerData(playerRepo, playerDataRepo); diff --git a/src/main/java/com/appdev/allin/playerData/util/PopulatePlayerData.java b/src/main/java/com/appdev/allin/playerData/util/PopulatePlayerData.java index 82d9566..93876c4 100644 --- a/src/main/java/com/appdev/allin/playerData/util/PopulatePlayerData.java +++ b/src/main/java/com/appdev/allin/playerData/util/PopulatePlayerData.java @@ -21,9 +21,12 @@ public class PopulatePlayerData { String baseUrl = "https://cornellbigred.com/boxscore.aspx?id="; int[] ids = { - 58875, 59093, 59018, 58876, 59200, 59057, 58877, 58878, 58874, 58879, 59092, 58881, 58882, - 57826, 57827, 57828, 59255, 57829, 57830, 57831, 57832, 57833, 57834, 57835, 57836, 57837, - 57838, 57839, 59254 + 58875, + // 59093, 59018, 58876, 59200, 59057, 58877, 58878, 58874, 58879, 59092, 58881, + // 58882, + // 57826, 57827, 57828, 59255, 57829, 57830, 57831, 57832, 57833, 57834, 57835, + // 57836, 57837, + // 57838, 57839, 59254 }; public PopulatePlayerData(PlayerRepo playerRepo, PlayerDataRepo playerDataRepo) {