refactored channel exception to have a unified interface to form the exception message

replaced getOne with findById in order to get optionals and handle those
some places still have the general abstracto run time exception
This commit is contained in:
Sheldan
2020-05-13 12:49:08 +02:00
parent 5755d033eb
commit c429aa882b
52 changed files with 501 additions and 344 deletions

View File

@@ -3,6 +3,7 @@ package dev.sheldan.abstracto.experience.service.management;
import dev.sheldan.abstracto.experience.models.database.AExperienceLevel;
import java.util.List;
import java.util.Optional;
/**
* Service responsible to create and retrieve {@link AExperienceLevel} objects in the database.
@@ -26,9 +27,9 @@ public interface ExperienceLevelManagementService {
/**
* Retrieves a {@link AExperienceLevel} according to the given level.
* @param level The level of the wanted {@link AExperienceLevel} to look for
* @return If the level exists, returns the {@link AExperienceLevel}, if it does not exists, returns null.
* @return Returns an optional containing the {@link AExperienceLevel} if it exists, and null otherwise
*/
AExperienceLevel getLevel(Integer level);
Optional<AExperienceLevel> getLevel(Integer level);
/**
* Loads the complete level configuration and returns all found {@link AExperienceLevel} objects from the database.