initial commit
This commit is contained in:
+35
-1
@@ -1,2 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4" />
|
||||
<module version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.zk:zkbind:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.18.2-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.zk:zul:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.zk:zk:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.common:zweb:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.common:zcommon:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.common:zel:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache-extras.beanshell:bsh:2.0b6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.zk:zkwebfragment:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.zk:zkplus:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.zk:zhtml:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss:zsoup:1.8.2.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: mysql:mysql-connector-java:8.0.17" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.google.protobuf:protobuf-java:3.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.theme:breeze:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.theme:atlantic:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.theme:sapphire:9.5.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.zkoss.theme:silvertail:9.5.0.1" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,87 @@
|
||||
package at.windesign.application.serie;
|
||||
|
||||
import java.sql.Date;
|
||||
|
||||
public class episodeData
|
||||
{
|
||||
private int m_episodeID;
|
||||
private int m_episodeNumber;
|
||||
private String m_episodeName;
|
||||
private Date m_episodeAirDate;
|
||||
private String m_episodeGuestStars;
|
||||
private String m_episodeOverview;
|
||||
private String m_episodeProductionCode;
|
||||
private int m_seasonNumber;
|
||||
private int m_seasonID;
|
||||
private int m_seriesID;
|
||||
private String m_episodeStillPath;
|
||||
private double m_episodeVoteAverage;
|
||||
private int m_episodeVoteCount;
|
||||
private String m_episodeCrew;
|
||||
private int m_episodeState;
|
||||
private serieData m_serie;
|
||||
private seasonData m_season;
|
||||
|
||||
public int getEpisodeID() { return m_episodeID; }
|
||||
public void setEpisodeID(int episodeID) { m_episodeID = episodeID; }
|
||||
|
||||
public int getEpisodeNumber() { return m_episodeNumber; }
|
||||
public void setEpisodeNumber(int episodeNumber) { m_episodeNumber = episodeNumber; }
|
||||
|
||||
public String getEpisodeName() { return m_episodeName; }
|
||||
public void setEpisodeName(String episodeName) { m_episodeName = episodeName; }
|
||||
|
||||
public Date getEpisodeAirDate() { return m_episodeAirDate; }
|
||||
public void setEpisodeAirDate(Date episodeAirDate) { m_episodeAirDate = episodeAirDate; }
|
||||
|
||||
public String getEpisodeGuestStars() { return m_episodeGuestStars; }
|
||||
public void setEpisodeGuestStars(String episodeGuestStars) { m_episodeGuestStars = episodeGuestStars; }
|
||||
|
||||
public String getEpisodeOverview() { return m_episodeOverview; }
|
||||
public void setEpisodeOverview(String episodeOverview) { m_episodeOverview = episodeOverview; }
|
||||
|
||||
public String getEpisodeProductionCode() { return m_episodeProductionCode; }
|
||||
public void setEpisodeProductionCode(String episodeProductionCode) { m_episodeProductionCode = episodeProductionCode; }
|
||||
|
||||
public int getSeasonNumber() { return m_seasonNumber; }
|
||||
public void setSeasonNumber(int seasonNumber) { m_seasonNumber = seasonNumber; }
|
||||
|
||||
public int getSeasonID() { return m_seasonID; }
|
||||
public void setSeasonID(int seasonID) { m_seasonID = seasonID; }
|
||||
|
||||
public int getSeriesID() { return m_seriesID; }
|
||||
public void setSeriesID(int seriesID) { m_seriesID = seriesID; }
|
||||
|
||||
public String getEpisodeStillPath() { return m_episodeStillPath; }
|
||||
public void setEpisodeStillPath(String episodeStillPath) { m_episodeStillPath = episodeStillPath; }
|
||||
|
||||
public double getEpisodeVoteAverage() { return m_episodeVoteAverage; }
|
||||
public void setEpisodeVoteAverage(double episodeVoteAverage) { m_episodeVoteAverage = episodeVoteAverage; }
|
||||
|
||||
public int getEpisodeVoteCount() { return m_episodeVoteCount; }
|
||||
public void setEpisodeVoteCount(int episodeVoteCount) { m_episodeVoteCount = episodeVoteCount; }
|
||||
|
||||
public String getEpisodeCrew() { return m_episodeCrew; }
|
||||
public void setEpisodeCrew(String episodeCrew) { m_episodeCrew = episodeCrew; }
|
||||
|
||||
public int getEpisodeState() { return m_episodeState; }
|
||||
public void setEpisodeState(int episodeState) { m_episodeState = episodeState; }
|
||||
|
||||
public serieData getSerie()
|
||||
{
|
||||
return m_serie;
|
||||
}
|
||||
public void setSerie(serieData serie)
|
||||
{
|
||||
m_serie = serie;
|
||||
}
|
||||
|
||||
public seasonData getSeason()
|
||||
{
|
||||
return m_season;
|
||||
}
|
||||
public void setSeason(seasonData season)
|
||||
{
|
||||
m_season = season;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package at.windesign.application.serie;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.util.SortedMap;
|
||||
|
||||
public class seasonData
|
||||
{
|
||||
private int m_seasonID;
|
||||
private int m_season_ID;
|
||||
private Date m_seasonAirDate;
|
||||
private String m_seasonName;
|
||||
private String m_seasonOverview;
|
||||
private String m_seasonPosterPath;
|
||||
private int m_seasonNumber;
|
||||
private serieData m_serie;
|
||||
private SortedMap<Integer, episodeData> m_episodes;
|
||||
|
||||
public seasonData()
|
||||
{
|
||||
}
|
||||
|
||||
public int getSeasonID()
|
||||
{
|
||||
return m_seasonID;
|
||||
}
|
||||
|
||||
public void setSeasonID(int seasonID)
|
||||
{
|
||||
m_seasonID = seasonID;
|
||||
}
|
||||
|
||||
public int getSeason_ID()
|
||||
{
|
||||
return m_season_ID;
|
||||
}
|
||||
|
||||
public void setSeason_ID(int season_ID)
|
||||
{
|
||||
m_season_ID = season_ID;
|
||||
}
|
||||
|
||||
public Date getSeasonAirDate()
|
||||
{
|
||||
return m_seasonAirDate;
|
||||
}
|
||||
|
||||
public void setSeasonAirDate(Date seasonAirDate)
|
||||
{
|
||||
m_seasonAirDate = seasonAirDate;
|
||||
}
|
||||
|
||||
public String getSeasonName()
|
||||
{
|
||||
return m_seasonName;
|
||||
}
|
||||
|
||||
public void setSeasonName(String seasonName)
|
||||
{
|
||||
m_seasonName = seasonName;
|
||||
}
|
||||
|
||||
public String getSeasonOverview()
|
||||
{
|
||||
return m_seasonOverview;
|
||||
}
|
||||
|
||||
public void setSeasonOverview(String seasonOverview)
|
||||
{
|
||||
m_seasonOverview = seasonOverview;
|
||||
}
|
||||
|
||||
public String getSeasonPosterPath()
|
||||
{
|
||||
return m_seasonPosterPath;
|
||||
}
|
||||
|
||||
public void setSeasonPosterPath(String seasonPosterPath)
|
||||
{
|
||||
m_seasonPosterPath = seasonPosterPath;
|
||||
}
|
||||
|
||||
public int getSeasonNumber()
|
||||
{
|
||||
return m_seasonNumber;
|
||||
}
|
||||
|
||||
public void setSeasonNumber(int seasonNumber)
|
||||
{
|
||||
m_seasonNumber = seasonNumber;
|
||||
}
|
||||
|
||||
public serieData getSerie()
|
||||
{
|
||||
return m_serie;
|
||||
}
|
||||
|
||||
public void setSerie(serieData serie)
|
||||
{
|
||||
m_serie = serie;
|
||||
}
|
||||
|
||||
public SortedMap<Integer, episodeData> getEpisodes()
|
||||
{
|
||||
return m_episodes;
|
||||
}
|
||||
|
||||
public void setEpisodes(SortedMap<Integer, episodeData> episodes)
|
||||
{
|
||||
m_episodes = episodes;
|
||||
}
|
||||
|
||||
public void setEpisode(int episode, episodeData data)
|
||||
{
|
||||
m_episodes.put(episode, data);
|
||||
}
|
||||
}
|
||||
@@ -1,52 +1,46 @@
|
||||
package at.windesign.application.serie;
|
||||
|
||||
import java.awt.*;
|
||||
import java.sql.Date;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.time.LocalDate;
|
||||
import java.sql.*;
|
||||
import java.util.Objects;
|
||||
import java.util.SortedMap;
|
||||
|
||||
import static org.zkoss.zk.ui.util.Clients.alert;
|
||||
|
||||
class serieData
|
||||
{
|
||||
private int m_seriesID;
|
||||
private String m_seriesName;
|
||||
private String m_seriesOriginalName;
|
||||
private String m_seriesBackdrop;
|
||||
private String m_seriesCreatedBy;
|
||||
private String m_seriesHomepage;
|
||||
private Date m_seriesLastAired;
|
||||
private String m_seriesLanguages;
|
||||
private String m_seriesNetworks;
|
||||
private int m_seriesNrEpisodes;
|
||||
private int m_seriesNrSeasons;
|
||||
private String m_seriesOriginCountries;
|
||||
private String m_seriesOriginalLanguage;
|
||||
private int m_seriesPopularity;
|
||||
private String m_seriesPoster;
|
||||
private String m_seriesProductionCompanies;
|
||||
private String m_seriesType;
|
||||
private double m_seriesVoteAverage;
|
||||
private int m_seriesVoteCount;
|
||||
private String m_seriesOverview;
|
||||
private Date m_seriesFirstAired;
|
||||
private String m_seriesCast;
|
||||
private String m_seriesCrew;
|
||||
private String m_seriesGenre;
|
||||
private String m_seriesIMDBID;
|
||||
private String m_seriesFreebaseMID;
|
||||
private String m_seriesFreebaseID;
|
||||
private String m_seriesTVDBID;
|
||||
private String m_seriesTVRageID;
|
||||
private String m_seriesStatus;
|
||||
private String m_seriesDownload;
|
||||
private String m_seriesLocalPath;
|
||||
private String m_seriesResolution;
|
||||
private boolean m_seriesCliffhanger;
|
||||
private int m_seriesID;
|
||||
private String m_seriesName;
|
||||
private String m_seriesOriginalName;
|
||||
private String m_seriesBackdrop;
|
||||
private String m_seriesCreatedBy;
|
||||
private String m_seriesHomepage;
|
||||
private Date m_seriesLastAired;
|
||||
private String m_seriesLanguages;
|
||||
private String m_seriesNetworks;
|
||||
private int m_seriesNrEpisodes;
|
||||
private int m_seriesNrSeasons;
|
||||
private String m_seriesOriginCountries;
|
||||
private String m_seriesOriginalLanguage;
|
||||
private int m_seriesPopularity;
|
||||
private String m_seriesPoster;
|
||||
private String m_seriesProductionCompanies;
|
||||
private String m_seriesType;
|
||||
private double m_seriesVoteAverage;
|
||||
private int m_seriesVoteCount;
|
||||
private String m_seriesOverview;
|
||||
private Date m_seriesFirstAired;
|
||||
private String m_seriesCast;
|
||||
private String m_seriesCrew;
|
||||
private String m_seriesGenre;
|
||||
private String m_seriesIMDBID;
|
||||
private String m_seriesFreebaseMID;
|
||||
private String m_seriesFreebaseID;
|
||||
private String m_seriesTVDBID;
|
||||
private String m_seriesTVRageID;
|
||||
private String m_seriesStatus;
|
||||
private String m_seriesDownload;
|
||||
private String m_seriesLocalPath;
|
||||
private String m_seriesResolution;
|
||||
private boolean m_seriesCliffhanger;
|
||||
private SortedMap<Integer, seasonData> m_seasons;
|
||||
|
||||
private SortedMap<Integer, Integer> m_episodeState;
|
||||
|
||||
@@ -402,6 +396,21 @@ class serieData
|
||||
m_seriesCliffhanger = seriesCliffhanger;
|
||||
}
|
||||
|
||||
public SortedMap<Integer, seasonData> getSeasons()
|
||||
{
|
||||
return m_seasons;
|
||||
}
|
||||
|
||||
public void setSeasons(SortedMap<Integer, seasonData> seasons)
|
||||
{
|
||||
m_seasons = seasons;
|
||||
}
|
||||
|
||||
public void setSeason(int season, seasonData data)
|
||||
{
|
||||
m_seasons.put(season, data);
|
||||
}
|
||||
|
||||
public SortedMap<Integer, Integer> getEpisodeState()
|
||||
{
|
||||
return m_episodeState;
|
||||
@@ -496,6 +505,95 @@ class serieData
|
||||
try
|
||||
{
|
||||
Statement stmt = ds.getStatement();
|
||||
stmt.execute("DELETE FROM serie WHERE seriesID=" + m_seriesID + ";");
|
||||
}
|
||||
catch(SQLException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
ds.close();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Connection conn = ds.getConnection();
|
||||
PreparedStatement ps = conn.prepareStatement("INSERT INTO serie (" +
|
||||
"seriesID, " +
|
||||
"seriesName, " +
|
||||
"originalName, " +
|
||||
"backdropPath, " +
|
||||
"createdBy, " +
|
||||
"homepage, " +
|
||||
"lastAired, " +
|
||||
"languages, " +
|
||||
"networks, " +
|
||||
"nrEpisodes, " +
|
||||
"nrSeasons, " +
|
||||
"originCountries, " +
|
||||
"originalLanguage, " +
|
||||
"popularity, " +
|
||||
"posterPath, " +
|
||||
"productionCompanies, " +
|
||||
"type, " +
|
||||
"voteAverage, " +
|
||||
"voteCount, " +
|
||||
"overview, " +
|
||||
"firstAired, " +
|
||||
"cast, " +
|
||||
"crew, " +
|
||||
"genre, " +
|
||||
"imdbid, " +
|
||||
"freebasemid, " +
|
||||
"freebaseid, " +
|
||||
"tvdbid, " +
|
||||
"tvrageid, " +
|
||||
"status, " +
|
||||
"download, " +
|
||||
"localPath, " +
|
||||
"resolution, " +
|
||||
"cliffhanger" +
|
||||
") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);"
|
||||
);
|
||||
ps.setInt(1, m_seriesID);
|
||||
ps.setString(2, m_seriesName);
|
||||
ps.setString(3, m_seriesOriginalName);
|
||||
ps.setString(4, m_seriesBackdrop);
|
||||
ps.setString(5, m_seriesCreatedBy);
|
||||
ps.setString(6, m_seriesHomepage);
|
||||
ps.setDate(7, m_seriesLastAired);
|
||||
ps.setString(8, m_seriesLanguages);
|
||||
ps.setString(9, m_seriesNetworks);
|
||||
ps.setInt(10, m_seriesNrEpisodes);
|
||||
ps.setInt(11, m_seriesNrSeasons);
|
||||
ps.setString(12, m_seriesOriginCountries);
|
||||
ps.setString(13, m_seriesOriginalLanguage);
|
||||
ps.setInt(14, m_seriesPopularity);
|
||||
ps.setString(15, m_seriesPoster);
|
||||
ps.setString(16, m_seriesProductionCompanies);
|
||||
ps.setString(17, m_seriesType);
|
||||
ps.setDouble(18, m_seriesVoteAverage);
|
||||
ps.setInt(19, m_seriesVoteCount);
|
||||
ps.setString(20, m_seriesOverview);
|
||||
ps.setDate(21, m_seriesFirstAired);
|
||||
ps.setString(22, m_seriesCast);
|
||||
ps.setString(23, m_seriesCrew);
|
||||
ps.setString(24, m_seriesGenre);
|
||||
ps.setString(25, m_seriesIMDBID);
|
||||
ps.setString(26, m_seriesFreebaseMID);
|
||||
ps.setString(27, m_seriesFreebaseID);
|
||||
ps.setString(28, m_seriesTVDBID);
|
||||
ps.setString(29, m_seriesTVRageID);
|
||||
ps.setString(30, m_seriesStatus);
|
||||
ps.setString(31, m_seriesDownload);
|
||||
ps.setString(32, m_seriesLocalPath);
|
||||
ps.setString(33, m_seriesResolution);
|
||||
ps.setBoolean(34, m_seriesCliffhanger);
|
||||
|
||||
boolean ret = ps.execute();
|
||||
/*
|
||||
int cnt = stmt.executeUpdate(
|
||||
"UPDATE serie" +
|
||||
" SET seriesName='" + m_seriesName + "'," +
|
||||
@@ -532,10 +630,12 @@ class serieData
|
||||
" resolution='" + m_seriesResolution + "'," +
|
||||
" cliffhanger=" + m_seriesCliffhanger +
|
||||
" WHERE seriesID=" + m_seriesID + ";");
|
||||
*/
|
||||
}
|
||||
catch(SQLException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -55,6 +55,12 @@ public enum serieDataSource
|
||||
return stmt;
|
||||
}
|
||||
|
||||
public Connection getConnection() throws SQLException
|
||||
{
|
||||
conn = DriverManager.getConnection(url, user, pwd);
|
||||
return conn;
|
||||
}
|
||||
|
||||
public void close()
|
||||
{
|
||||
try
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user