minor improvements

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2024-12-31 01:06:07 +01:00
parent 33a337829f
commit f60bd90283
13 changed files with 300 additions and 327 deletions
@@ -16,7 +16,7 @@ public interface Database {
* @param appointment the appointment to store
* @return a clone of the provided appointment with id field set
*/
public Result<Appointment> add(Appointment appointment);
Result<Appointment> add(Appointment appointment);
Result<List<String>> findTags(String infix);
@@ -28,7 +28,7 @@ public interface Database {
* @param till restrict appointments to times before this date time
* @return list of appointments in this time span
*/
public Result<List<Appointment>> list(LocalDateTime from, LocalDateTime till, Integer count, Integer offset);
Result<List<Appointment>> list(LocalDateTime from, LocalDateTime till, Integer count, Integer offset);
/**
* list appointments
@@ -37,7 +37,7 @@ public interface Database {
* @param offset the number of appointments to skip
* @return the list of appointments fetched from the db
*/
public List<Appointment> listByTags(Set<String> tags, Integer count, Integer offset);
List<Appointment> listByTags(Set<String> tags, Integer count, Integer offset);
Result<Appointment> loadEvent(long id);
@@ -58,7 +58,6 @@ public class MariaDB implements Database {
throw new RuntimeException("%s.createTables() not implemented!");
}
@Override
public Result<Appointment> add(Appointment appointment) {
try {
@@ -290,7 +289,6 @@ public class MariaDB implements Database {
return Payload.of(appointment);
}
@Override
public List<Appointment> listByTags(Set<String> tags, Integer count, Integer offset) {
return List.of();
@@ -14,7 +14,6 @@ public class NotFound<None> extends Error<None> {
return new NotFound<>(message.formatted(fills), null, null);
}
@Override
public <NewType> NotFound<NewType> transform() {
return new NotFound<>(message(), data(), exceptions());