|
| 1 | +package tech.ydb.jdbc.failsafe; |
| 2 | + |
| 3 | +import java.sql.Date; |
| 4 | +import java.time.LocalDate; |
| 5 | +import java.util.Arrays; |
| 6 | +import java.util.List; |
| 7 | + |
| 8 | +final class AppData { |
| 9 | + public static final List<Series> SERIES = Arrays.asList( |
| 10 | + new Series( |
| 11 | + 1, "IT Crowd", date("2006-02-03"), |
| 12 | + "The IT Crowd is a British sitcom produced by Channel 4, written by Graham Linehan, produced by " + |
| 13 | + "Ash Atalla and starring Chris O'Dowd, Richard Ayoade, Katherine Parkinson, and Matt Berry."), |
| 14 | + new Series( |
| 15 | + 2, "Silicon Valley", date("2014-04-06"), |
| 16 | + "Silicon Valley is an American comedy television series created by Mike Judge, John Altschuler and " + |
| 17 | + "Dave Krinsky. The series focuses on five young men who founded a startup company in Silicon Valley.") |
| 18 | + ); |
| 19 | + |
| 20 | + public static final List<Season> SEASONS = Arrays.asList( |
| 21 | + new Season(1, 1, "Season 1", date("2006-02-03"), date("2006-03-03")), |
| 22 | + new Season(1, 2, "Season 2", date("2007-08-24"), date("2007-09-28")), |
| 23 | + new Season(1, 3, "Season 3", date("2008-11-21"), date("2008-12-26")), |
| 24 | + new Season(1, 4, "Season 4", date("2010-06-25"), date("2010-07-30")), |
| 25 | + new Season(2, 1, "Season 1", date("2014-04-06"), date("2014-06-01")), |
| 26 | + new Season(2, 2, "Season 2", date("2015-04-12"), date("2015-06-14")), |
| 27 | + new Season(2, 3, "Season 3", date("2016-04-24"), date("2016-06-26")), |
| 28 | + new Season(2, 4, "Season 4", date("2017-04-23"), date("2017-06-25")), |
| 29 | + new Season(2, 5, "Season 5", date("2018-03-25"), date("2018-05-13")) |
| 30 | + ); |
| 31 | + |
| 32 | + public static final List<Episode> EPISODES = Arrays.asList( |
| 33 | + new Episode(1, 1, 1, "Yesterday's Jam", date("2006-02-03")), |
| 34 | + new Episode(1, 1, 2, "Calamity Jen", date("2006-02-03")), |
| 35 | + new Episode(1, 1, 3, "Fifty-Fifty", date("2006-02-10")), |
| 36 | + new Episode(1, 1, 4, "The Red Door", date("2006-02-17")), |
| 37 | + new Episode(1, 1, 5, "The Haunting of Bill Crouse", date("2006-02-24")), |
| 38 | + new Episode(1, 1, 6, "Aunt Irma Visits", date("2006-03-03")), |
| 39 | + new Episode(1, 2, 1, "The Work Outing", date("2006-08-24")), |
| 40 | + new Episode(1, 2, 2, "Return of the Golden Child", date("2007-08-31")), |
| 41 | + new Episode(1, 2, 3, "Moss and the German", date("2007-09-07")), |
| 42 | + new Episode(1, 2, 4, "The Dinner Party", date("2007-09-14")), |
| 43 | + new Episode(1, 2, 5, "Smoke and Mirrors", date("2007-09-21")), |
| 44 | + new Episode(1, 2, 6, "Men Without Women", date("2007-09-28")), |
| 45 | + new Episode(1, 3, 1, "From Hell", date("2008-11-21")), |
| 46 | + new Episode(1, 3, 2, "Are We Not Men?", date("2008-11-28")), |
| 47 | + new Episode(1, 3, 3, "Tramps Like Us", date("2008-12-05")), |
| 48 | + new Episode(1, 3, 4, "The Speech", date("2008-12-12")), |
| 49 | + new Episode(1, 3, 5, "Friendface", date("2008-12-19")), |
| 50 | + new Episode(1, 3, 6, "Calendar Geeks", date("2008-12-26")), |
| 51 | + new Episode(1, 4, 1, "Jen The Fredo", date("2010-06-25")), |
| 52 | + new Episode(1, 4, 2, "The Final Countdown", date("2010-07-02")), |
| 53 | + new Episode(1, 4, 3, "Something Happened", date("2010-07-09")), |
| 54 | + new Episode(1, 4, 4, "Italian For Beginners", date("2010-07-16")), |
| 55 | + new Episode(1, 4, 5, "Bad Boys", date("2010-07-23")), |
| 56 | + new Episode(1, 4, 6, "Reynholm vs Reynholm", date("2010-07-30")), |
| 57 | + new Episode(2, 1, 1, "Minimum Viable Product", date("2014-04-06")), |
| 58 | + new Episode(2, 1, 2, "The Cap Table", date("2014-04-13")), |
| 59 | + new Episode(2, 1, 3, "Articles of Incorporation", date("2014-04-20")), |
| 60 | + new Episode(2, 1, 4, "Fiduciary Duties", date("2014-04-27")), |
| 61 | + new Episode(2, 1, 5, "Signaling Risk", date("2014-05-04")), |
| 62 | + new Episode(2, 1, 6, "Third Party Insourcing", date("2014-05-11")), |
| 63 | + new Episode(2, 1, 7, "Proof of Concept", date("2014-05-18")), |
| 64 | + new Episode(2, 1, 8, "Optimal Tip-to-Tip Efficiency", date("2014-06-01")), |
| 65 | + new Episode(2, 2, 1, "Sand Hill Shuffle", date("2015-04-12")), |
| 66 | + new Episode(2, 2, 2, "Runaway Devaluation", date("2015-04-19")), |
| 67 | + new Episode(2, 2, 3, "Bad Money", date("2015-04-26")), |
| 68 | + new Episode(2, 2, 4, "The Lady", date("2015-05-03")), |
| 69 | + new Episode(2, 2, 5, "Server Space", date("2015-05-10")), |
| 70 | + new Episode(2, 2, 6, "Homicide", date("2015-05-17")), |
| 71 | + new Episode(2, 2, 7, "Adult Content", date("2015-05-24")), |
| 72 | + new Episode(2, 2, 8, "White Hat/Black Hat", date("2015-05-31")), |
| 73 | + new Episode(2, 2, 9, "Binding Arbitration", date("2015-06-07")), |
| 74 | + new Episode(2, 2, 10, "Two Days of the Condor", date("2015-06-14")), |
| 75 | + new Episode(2, 3, 1, "Founder Friendly", date("2016-04-24")), |
| 76 | + new Episode(2, 3, 2, "Two in the Box", date("2016-05-01")), |
| 77 | + new Episode(2, 3, 3, "Meinertzhagen's Haversack", date("2016-05-08")), |
| 78 | + new Episode(2, 3, 4, "Maleant Data Systems Solutions", date("2016-05-15")), |
| 79 | + new Episode(2, 3, 5, "The Empty Chair", date("2016-05-22")), |
| 80 | + new Episode(2, 3, 6, "Bachmanity Insanity", date("2016-05-29")), |
| 81 | + new Episode(2, 3, 7, "To Build a Better Beta", date("2016-06-05")), |
| 82 | + new Episode(2, 3, 8, "Bachman's Earnings Over-Ride", date("2016-06-12")), |
| 83 | + new Episode(2, 3, 9, "Daily Active Users", date("2016-06-19")), |
| 84 | + new Episode(2, 3, 10, "The Uptick", date("2016-06-26")), |
| 85 | + new Episode(2, 4, 1, "Success Failure", date("2017-04-23")), |
| 86 | + new Episode(2, 4, 2, "Terms of Service", date("2017-04-30")), |
| 87 | + new Episode(2, 4, 3, "Intellectual Property", date("2017-05-07")), |
| 88 | + new Episode(2, 4, 4, "Teambuilding Exercise", date("2017-05-14")), |
| 89 | + new Episode(2, 4, 5, "The Blood Boy", date("2017-05-21")), |
| 90 | + new Episode(2, 4, 6, "Customer Service", date("2017-05-28")), |
| 91 | + new Episode(2, 4, 7, "The Patent Troll", date("2017-06-04")), |
| 92 | + new Episode(2, 4, 8, "The Keenan Vortex", date("2017-06-11")), |
| 93 | + new Episode(2, 4, 9, "Hooli-Con", date("2017-06-18")), |
| 94 | + new Episode(2, 4, 10, "Server Error", date("2017-06-25")), |
| 95 | + new Episode(2, 5, 1, "Grow Fast or Die Slow", date("2018-03-25")), |
| 96 | + new Episode(2, 5, 2, "Reorientation", date("2018-04-01")), |
| 97 | + new Episode(2, 5, 3, "Chief Operating Officer", date("2018-04-08")), |
| 98 | + new Episode(2, 5, 4, "Tech Evangelist", date("2018-04-15")), |
| 99 | + new Episode(2, 5, 5, "Facial Recognition", date("2018-04-22")), |
| 100 | + new Episode(2, 5, 6, "Artificial Emotional Intelligence", date("2018-04-29")), |
| 101 | + new Episode(2, 5, 7, "Initial Coin Offering", date("2018-05-06")), |
| 102 | + new Episode(2, 5, 8, "Fifty-One Percent", date("2018-05-13")) |
| 103 | + ); |
| 104 | + |
| 105 | + private AppData() { } |
| 106 | + |
| 107 | + private static Date date(String str) { |
| 108 | + return Date.valueOf(LocalDate.parse(str)); |
| 109 | + } |
| 110 | + |
| 111 | + public static class Series { |
| 112 | + private final long seriesID; |
| 113 | + private final String title; |
| 114 | + private final Date releaseDate; |
| 115 | + private final String seriesInfo; |
| 116 | + |
| 117 | + public Series(long seriesID, String title, Date releaseDate, String seriesInfo) { |
| 118 | + this.seriesID = seriesID; |
| 119 | + this.title = title; |
| 120 | + this.releaseDate = releaseDate; |
| 121 | + this.seriesInfo = seriesInfo; |
| 122 | + } |
| 123 | + |
| 124 | + public long seriesID() { |
| 125 | + return seriesID; |
| 126 | + } |
| 127 | + |
| 128 | + public String title() { |
| 129 | + return title; |
| 130 | + } |
| 131 | + |
| 132 | + public Date releaseDate() { |
| 133 | + return releaseDate; |
| 134 | + } |
| 135 | + |
| 136 | + public String seriesInfo() { |
| 137 | + return seriesInfo; |
| 138 | + } |
| 139 | + } |
| 140 | + |
| 141 | + public static class Season { |
| 142 | + private final long seriesID; |
| 143 | + private final long seasonID; |
| 144 | + private final String title; |
| 145 | + private final Date firstAired; |
| 146 | + private final Date lastAired; |
| 147 | + |
| 148 | + public Season(long seriesID, long seasonID, String title, Date firstAired, Date lastAired) { |
| 149 | + this.seriesID = seriesID; |
| 150 | + this.seasonID = seasonID; |
| 151 | + this.title = title; |
| 152 | + this.firstAired = firstAired; |
| 153 | + this.lastAired = lastAired; |
| 154 | + } |
| 155 | + |
| 156 | + public long seriesID() { |
| 157 | + return this.seriesID; |
| 158 | + } |
| 159 | + |
| 160 | + public long seasonID() { |
| 161 | + return this.seasonID; |
| 162 | + } |
| 163 | + |
| 164 | + public String title() { |
| 165 | + return this.title; |
| 166 | + } |
| 167 | + |
| 168 | + public Date firstAired() { |
| 169 | + return this.firstAired; |
| 170 | + } |
| 171 | + |
| 172 | + public Date lastAired() { |
| 173 | + return this.lastAired; |
| 174 | + } |
| 175 | + } |
| 176 | + |
| 177 | + public static class Episode { |
| 178 | + private final long seriesID; |
| 179 | + private final long seasonID; |
| 180 | + private final long episodeID; |
| 181 | + private final String title; |
| 182 | + private final Date airDate; |
| 183 | + |
| 184 | + public Episode(long seriesID, long seasonID, long episodeID, String title, Date airDate) { |
| 185 | + this.seriesID = seriesID; |
| 186 | + this.seasonID = seasonID; |
| 187 | + this.episodeID = episodeID; |
| 188 | + this.title = title; |
| 189 | + this.airDate = airDate; |
| 190 | + } |
| 191 | + |
| 192 | + public long seriesID() { |
| 193 | + return seriesID; |
| 194 | + } |
| 195 | + |
| 196 | + public long seasonID() { |
| 197 | + return seasonID; |
| 198 | + } |
| 199 | + |
| 200 | + public long episodeID() { |
| 201 | + return episodeID; |
| 202 | + } |
| 203 | + |
| 204 | + public String title() { |
| 205 | + return title; |
| 206 | + } |
| 207 | + |
| 208 | + public Date airDate() { |
| 209 | + return airDate; |
| 210 | + } |
| 211 | + } |
| 212 | +} |
0 commit comments