# HG changeset patch # User cli # Date 1251299044 -7200 # Node ID 2ff819fa5be1dff181c126cc2a32ed73bf32765e # Parent e4345a26f81f094efd3a71a30956ad63dc6aa3ec Some changes to storage interface. diff -r e4345a26f81f -r 2ff819fa5be1 org/sonews/storage/Storage.java --- a/org/sonews/storage/Storage.java Wed Aug 26 10:55:59 2009 +0200 +++ b/org/sonews/storage/Storage.java Wed Aug 26 17:04:04 2009 +0200 @@ -135,6 +135,15 @@ void setConfigValue(String key, String value) throws StorageBackendException; + /** + * Updates headers and channel references of the given article. + * @param article + * @return + * @throws StorageBackendException + */ + boolean update(Article article) + throws StorageBackendException; + boolean update(Group group) throws StorageBackendException; diff -r e4345a26f81f -r 2ff819fa5be1 org/sonews/storage/impl/JDBCDatabase.java --- a/org/sonews/storage/impl/JDBCDatabase.java Wed Aug 26 10:55:59 2009 +0200 +++ b/org/sonews/storage/impl/JDBCDatabase.java Wed Aug 26 17:04:04 2009 +0200 @@ -1743,6 +1743,17 @@ } } + @Override + public boolean update(Article article) + throws StorageBackendException + { + // DELETE FROM headers WHERE article_id = ? + + // INSERT INTO headers ... + + // SELECT * FROM postings WHERE article_id = ? AND group_id = ? + } + /** * Writes the flags and the name of the given group to the database. * @param group