Interface UserProvider


public interface UserProvider
The User interface provides methods for managing user data in a database. It allows checking for user existence, creating and deleting users, and retrieving user information. This interface is designed to be implemented by classes that provide specific database interactions.
  • Method Details

    • refreshCache

      void refreshCache()
    • findById

      @NotNull @NotNull Optional<User> findById(int userId)
    • findByMojangId

      @NotNull @NotNull Optional<User> findByMojangId(@NotNull @NotNull UUID uuid)
    • findByUsername

      @NotNull @NotNull Optional<User> findByUsername(@NotNull @NotNull String username)
    • findAll

      @NotNull @NotNull @Unmodifiable List<User> findAll()
    • findMojangIds

      @NotNull @NotNull @Unmodifiable List<UUID> findMojangIds()
    • findUsernames

      @NotNull @NotNull @Unmodifiable List<String> findUsernames()
    • create

      @NotNull @NotNull Optional<User> create(@NotNull @NotNull UUID uuid, @NotNull @NotNull String username)
    • delete

      int delete(int userId)
    • update

      @NotNull @NotNull Optional<User> update(int userId, @NotNull @NotNull String username, @Nullable @Nullable LocalDateTime firstLogin, boolean debugUser, boolean debugEnabled, int languageId)
    • of

      @Internal @NotNull static @NotNull UserProvider of(de.murmelmeister.library.database.Database database, com.google.gson.Gson gson, RefreshProvider refreshProvider, Long fetchLimit, long cacheCapacity, Duration refreshInterval)