diff --git a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/DomainObjectFactory.java b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/DomainObjectFactory.java
index b0540dec3c5..a61df1e749f 100755
--- a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/DomainObjectFactory.java
+++ b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/DomainObjectFactory.java
@@ -28,10 +28,19 @@ public interface DomainObjectFactory {
RaceIdentifier loadRaceIdentifier(DBObject dbObject);
+ /**
+ * @return The group with the name name, or null if no such group exists.
+ */
LeaderboardGroup loadLeaderboardGroup(String name);
+ /**
+ * @return All groups in the database.
+ */
Iterable getAllLeaderboardGroups();
+ /**
+ * @return All leaderboards in the database, which aren't contained by a leaderboard group
+ */
Iterable getLeaderboardsNotInGroup();
}
diff --git a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/MongoObjectFactory.java b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/MongoObjectFactory.java
index 9dec8f8f312..742620d580b 100755
--- a/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/MongoObjectFactory.java
+++ b/java/com.sap.sailing.domain.persistence/src/com/sap/sailing/domain/persistence/MongoObjectFactory.java
@@ -43,10 +43,20 @@ public interface MongoObjectFactory {
void storeRaceIdentifier(RaceIdentifier raceIdentifier, DBObject dbObject);
+ /**
+ * Stores the group, if it doesn't exist or updates it.
+ * Leaderboards in the group, which aren't stored in the database, will be stored.
+ */
void storeLeaderboardGroup(LeaderboardGroup leaderboardGroup);
+ /**
+ * Removes the group with the name groupName from the database.
+ */
void removeLeaderboardGroup(String groupName);
-
+
+ /**
+ * Renames the group with the name oldName.
+ */
void renameLeaderboardGroup(String oldName, String newName);
}