Skip to content

Commit 7627887

Browse files
authored
feat: video contribution event (#2306)
2 parents 9e5618d + e5440f0 commit 7627887

27 files changed

+235
-222
lines changed

pom-dependency-tree.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ai.elimu:webapp:war:2.6.102-SNAPSHOT
1+
ai.elimu:webapp:war:2.6.103-SNAPSHOT
22
+- ai.elimu:model:jar:model-2.0.114:compile
33
| \- com.google.code.gson:gson:jar:2.13.1:compile
44
| \- com.google.errorprone:error_prone_annotations:jar:2.38.0:compile

src/main/java/ai/elimu/dao/ImageContributionEventDao.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ public interface ImageContributionEventDao extends GenericDao<ImageContributionE
1313

1414
List<ImageContributionEvent> readAll(Contributor contributor) throws DataAccessException;
1515

16-
List<ImageContributionEvent> readMostRecent(int maxResults) throws DataAccessException;
17-
1816
Long readCount(Contributor contributor) throws DataAccessException;
1917
}

src/main/java/ai/elimu/dao/LetterContributionEventDao.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,5 @@ public interface LetterContributionEventDao extends GenericDao<LetterContributio
1515

1616
List<LetterContributionEvent> readAll(Contributor contributor) throws DataAccessException;
1717

18-
List<LetterContributionEvent> readMostRecent(int maxResults) throws DataAccessException;
19-
20-
List<LetterContributionEvent> readMostRecentPerLetter() throws DataAccessException;
21-
2218
Long readCount(Contributor contributor) throws DataAccessException;
2319
}

src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ public interface LetterSoundContributionEventDao extends GenericDao<LetterSoundC
1414
List<LetterSoundContributionEvent> readAll(LetterSound letterSound) throws DataAccessException;
1515

1616
List<LetterSoundContributionEvent> readAll(Contributor contributor) throws DataAccessException;
17-
18-
List<LetterSoundContributionEvent> readMostRecentPerLetterSound() throws DataAccessException;
1917

2018
Long readCount(Contributor contributor) throws DataAccessException;
2119
}

src/main/java/ai/elimu/dao/NumberContributionEventDao.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,5 @@ public interface NumberContributionEventDao extends GenericDao<NumberContributio
1313

1414
List<NumberContributionEvent> readAll(Contributor contributor) throws DataAccessException;
1515

16-
List<NumberContributionEvent> readMostRecent(int maxResults) throws DataAccessException;
17-
18-
List<NumberContributionEvent> readMostRecentPerNumber() throws DataAccessException;
19-
2016
Long readCount(Contributor contributor) throws DataAccessException;
2117
}

src/main/java/ai/elimu/dao/SoundContributionEventDao.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,5 @@ public interface SoundContributionEventDao extends GenericDao<SoundContributionE
1515

1616
List<SoundContributionEvent> readAll(Contributor contributor) throws DataAccessException;
1717

18-
List<SoundContributionEvent> readMostRecent(int maxResults) throws DataAccessException;
19-
20-
List<SoundContributionEvent> readMostRecentPerSound() throws DataAccessException;
21-
2218
Long readCount(Contributor contributor) throws DataAccessException;
2319
}

src/main/java/ai/elimu/dao/StoryBookContributionEventDao.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,5 @@ public interface StoryBookContributionEventDao extends GenericDao<StoryBookContr
1515

1616
List<StoryBookContributionEvent> readAll(Contributor contributor) throws DataAccessException;
1717

18-
List<StoryBookContributionEvent> readMostRecent(int maxResults) throws DataAccessException;
19-
20-
List<StoryBookContributionEvent> readMostRecentPerStoryBook() throws DataAccessException;
21-
2218
Long readCount(Contributor contributor) throws DataAccessException;
2319
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package ai.elimu.dao;
2+
3+
import java.util.List;
4+
import org.springframework.dao.DataAccessException;
5+
6+
import ai.elimu.entity.content.multimedia.Video;
7+
import ai.elimu.entity.contributor.Contributor;
8+
import ai.elimu.entity.contributor.VideoContributionEvent;
9+
10+
public interface VideoContributionEventDao extends GenericDao<VideoContributionEvent> {
11+
12+
List<VideoContributionEvent> readAll(Video video) throws DataAccessException;
13+
14+
List<VideoContributionEvent> readAll(Contributor contributor) throws DataAccessException;
15+
16+
Long readCount(Contributor contributor) throws DataAccessException;
17+
}

src/main/java/ai/elimu/dao/WordContributionEventDao.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@ public interface WordContributionEventDao extends GenericDao<WordContributionEve
1515

1616
List<WordContributionEvent> readAll(Contributor contributor) throws DataAccessException;
1717

18-
List<WordContributionEvent> readMostRecent(int maxResults) throws DataAccessException;
19-
2018
Long readCount(Contributor contributor) throws DataAccessException;
2119
}

src/main/java/ai/elimu/dao/jpa/ImageContributionEventDaoJpa.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@ public List<ImageContributionEvent> readAll(Contributor contributor) throws Data
3232
.getResultList();
3333
}
3434

35-
@Override
36-
public List<ImageContributionEvent> readMostRecent(int maxResults) throws DataAccessException {
37-
return em.createQuery(
38-
"SELECT ice " +
39-
"FROM ImageContributionEvent ice " +
40-
"ORDER BY ice.timestamp DESC")
41-
.setMaxResults(maxResults)
42-
.getResultList();
43-
}
44-
4535
@Override
4636
public Long readCount(Contributor contributor) throws DataAccessException {
4737
return (Long) em.createQuery("SELECT COUNT(ice) " +

0 commit comments

Comments
 (0)