Load list of private groups in a single DB transaction

This commit is contained in:
Torsten Grote
2020-12-17 13:11:13 -03:00
parent 9048392d4e
commit fd86b73626
4 changed files with 87 additions and 46 deletions

View File

@@ -66,6 +66,11 @@ public interface PrivateGroupManager {
*/
void markGroupDissolved(Transaction txn, GroupId g) throws DbException;
/**
* Returns true if the given private group has been dissolved.
*/
boolean isDissolved(Transaction txn, GroupId g) throws DbException;
/**
* Returns true if the given private group has been dissolved.
*/
@@ -91,6 +96,12 @@ public interface PrivateGroupManager {
*/
Collection<PrivateGroup> getPrivateGroups() throws DbException;
/**
* Returns all private groups the user is a member of.
*/
Collection<PrivateGroup> getPrivateGroups(Transaction txn)
throws DbException;
/**
* Returns the text of the private group message with the given ID.
*/
@@ -111,6 +122,11 @@ public interface PrivateGroupManager {
*/
boolean isMember(Transaction txn, GroupId g, Author a) throws DbException;
/**
* Returns the group count for the given private group.
*/
GroupCount getGroupCount(Transaction txn, GroupId g) throws DbException;
/**
* Returns the group count for the given private group.
*/