summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/WeblogSummary.java
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2011-08-28 22:35:34 +0200
committerDavid A. Madore <david+git@madore.org>2011-08-28 22:35:34 +0200
commit1710554809835a82415a1f8789bed3016c58fc96 (patch)
tree5fb7c9d65874e0157c06b79d24b679b3c1b233ff /org/madore/damlengine/WeblogSummary.java
parenta0a7d6212299a1723cf6c0666f9838136934cc07 (diff)
downloaddamlengine-1710554809835a82415a1f8789bed3016c58fc96.tar.gz
damlengine-1710554809835a82415a1f8789bed3016c58fc96.tar.bz2
damlengine-1710554809835a82415a1f8789bed3016c58fc96.zip
Handling of weblog index (including killing nested a elements).
Diffstat (limited to 'org/madore/damlengine/WeblogSummary.java')
-rw-r--r--org/madore/damlengine/WeblogSummary.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/org/madore/damlengine/WeblogSummary.java b/org/madore/damlengine/WeblogSummary.java
index ceaf28e..babfcf5 100644
--- a/org/madore/damlengine/WeblogSummary.java
+++ b/org/madore/damlengine/WeblogSummary.java
@@ -11,11 +11,15 @@ public final class WeblogSummary {
public static final class EntrySummary {
int id;
String date;
- String title;
- public EntrySummary(int id, String date, String title) {
+ String lang;
+ String title; String titleXml;
+ public EntrySummary(int id, String date, String lang,
+ String title, String titleXml) {
this.id = id;
this.date = date;
+ this.lang = lang;
this.title = title;
+ this.titleXml = titleXml;
}
}
@@ -34,18 +38,19 @@ public final class WeblogSummary {
try {
final Connection conn = WeblogDatabaseConnection.getConnection();
final PreparedStatement selSt
- = conn.prepareStatement("SELECT id , edate , title FROM entries");
+ = conn.prepareStatement("SELECT id , edate , lang , title , title_xml FROM entries");
final ResultSet selRes = selSt.executeQuery();
while ( selRes.next() ) {
int id = selRes.getInt(1);
String date = selRes.getString(2);
- String title = selRes.getString(3);
- singleton.entries.put(new Integer(id), new EntrySummary(id, date, title));
+ String lang = selRes.getString(3);
+ String title = selRes.getString(4);
+ String titleXml = selRes.getString(5);
+ singleton.entries.put(new Integer(id), new EntrySummary(id, date, lang, title, titleXml));
}
} catch (SQLException e) {
- throw new RuntimeException(e);
// Well, we'll have no summary. Too bad, but better than abort.
- // singleton = null;
+ singleton = null;
}
return singleton;
}