Changeset 9858 for branches/ant-install-branch/gsdl3/src/java/org/greenstone/gsdl3/gs3build/notifier/NotifierManager.java
- Timestamp:
- 2005-05-12T14:52:45+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ant-install-branch/gsdl3/src/java/org/greenstone/gsdl3/gs3build/notifier/NotifierManager.java
r9848 r9858 27 27 String lastBuild = dateToSqlString(collManager.getBuildDate()); 28 28 System.out.println("last build was " + lastBuild); 29 Statement statement = collManager.getDatabase().createStatement();30 29 try { 30 Statement statement = collManager.getDatabase().createStatement(); 31 31 // detect all new documents. A document is new if and only if 32 32 // AccessionDate >= CollectionLastRebuiltDate … … 130 130 private String getDocumentTitle(String documentID, GS3SQLConnection database) { 131 131 System.out.println("getting title for document " + documentID + " from database"); 132 Statement statement = database.createStatement();133 132 134 ResultSet results;135 133 try { 134 Statement statement = database.createStatement(); 136 135 String sqlString = "SELECT mdvalues.value " + 137 136 "FROM structure s JOIN divisions d ON (s.structureref = d.parentref) " + … … 144 143 " AND d.parenttype = 'Structure' " + 145 144 " AND m.docID = s.docid;"; 146 results = statement.executeQuery(sqlString);147 if (results. next()) {145 ResultSet results = statement.executeQuery(sqlString); 146 if (results.first()) { 148 147 String title = results.getString("value"); 149 148 System.out.println("title is " + title);
Note:
See TracChangeset
for help on using the changeset viewer.