Skip to content
Snippets Groups Projects
Verified Commit b7874365 authored by akwizgran's avatar akwizgran
Browse files

Expose getMessageIds() through DatabaseComponent interface.

parent 196caa7b
No related branches found
No related tags found
No related merge requests found
......@@ -266,6 +266,14 @@ public interface DatabaseComponent {
*/
Collection<LocalAuthor> getLocalAuthors(Transaction txn) throws DbException;
/**
* Returns the IDs of all messages in the given group.
* <p/>
* Read-only.
*/
Collection<MessageId> getMessageIds(Transaction txn, GroupId g)
throws DbException;
/**
* Returns the IDs of any messages that need to be validated.
* <p/>
......
......@@ -466,6 +466,15 @@ class DatabaseComponentImpl<T> implements DatabaseComponent {
return db.getLocalAuthors(txn);
}
@Override
public Collection<MessageId> getMessageIds(Transaction transaction,
GroupId g) throws DbException {
T txn = unbox(transaction);
if (!db.containsGroup(txn, g))
throw new NoSuchGroupException();
return db.getMessageIds(txn, g);
}
@Override
public Collection<MessageId> getMessagesToValidate(Transaction transaction)
throws DbException {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment