Skip to content

Commit

Permalink
Added some javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
rossdrew committed Nov 15, 2024
1 parent 2d7cc9f commit 5368be7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/com/rox/journal/entry/JournalEntriesService.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public class JournalEntriesService {
private static final Pattern starting = Pattern.compile("_([^_]*)_");
private static final Pattern completing = Pattern.compile("--([^--]*)--");

/**
* Append a {@link JournalEntry}
*
* @param entry the {@link JournalEntry} to append
* @return the provided {@link JournalEntry}
*/
public JournalEntry append(JournalEntry entry){
entry = entry.at(new java.util.Date());

Expand All @@ -41,6 +47,12 @@ public JournalEntry append(JournalEntry entry){
return entry;
}

/**
* List all {@link JournalEntry} that match the provided {@link EntriesQuery}
*
* @param query {@link EntriesQuery} to run over all entries
* @return all matching {@link JournalEntry} objects wrapped in {@link PageWrapper}
*/
public PageWrapper<JournalEntry> list(final EntriesQuery query){
if (testEntries.size() <= query.getStart())
return PageWrapper.around(Collections.emptyList());
Expand Down

0 comments on commit 5368be7

Please sign in to comment.