Interface PunishmentReasonProvider
public interface PunishmentReasonProvider
-
Method Summary
Modifier and TypeMethodDescriptionintdelete(int id) @NotNull @Unmodifiable List<PunishmentReason> findAll()@NotNull Optional<PunishmentReason> findReason(int id) @NotNull @Unmodifiable List<PunishmentReason> findReasons(int typeId) static @NotNull PunishmentReasonProviderof(de.murmelmeister.library.database.Database database, com.google.gson.Gson gson, RefreshProvider refreshProvider, Long fetchLimit, long cacheCapacity, Duration refreshInterval) void@NotNull Optional<PunishmentReason> upsert(int id, int typeId, @NotNull String reasonText, @Nullable Long durationSecs, boolean autoFlagIp, int executorId) @NotNull Optional<PunishmentReason> upsert(@NotNull PunishmentReason reason, int executorId)
-
Method Details
-
refreshCache
void refreshCache() -
findReason
-
findReasons
-
findAll
-
upsert
@NotNull @NotNull Optional<PunishmentReason> upsert(int id, int typeId, @NotNull @NotNull String reasonText, @Nullable @Nullable Long durationSecs, boolean autoFlagIp, int executorId) -
upsert
@NotNull @NotNull Optional<PunishmentReason> upsert(@NotNull @NotNull PunishmentReason reason, int executorId) -
delete
int delete(int id) -
of
@Internal @NotNull static @NotNull PunishmentReasonProvider of(de.murmelmeister.library.database.Database database, com.google.gson.Gson gson, RefreshProvider refreshProvider, Long fetchLimit, long cacheCapacity, Duration refreshInterval)
-