Class GenerateEducationalObjectiveServiceImpl
java.lang.Object
ch.tocco.nice2.optional.reservation.impl.GenerateEducationalObjectiveServiceImpl
- All Implemented Interfaces:
GenerateEducationalObjectiveService
@Component
public class GenerateEducationalObjectiveServiceImpl
extends Object
implements GenerateEducationalObjectiveService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongenerateEducationalObjectives
(int amount, Optional<Integer> start) generates multiple educational objectives by using generateSingleEducationalObjectivegenerateSingleEducationalObjective
(int sorting) generates a single educational objectivegets you the current highest sorting of all connected educational objectivesorders all educational objectives by sorting and returns them in descending order
-
Constructor Details
-
GenerateEducationalObjectiveServiceImpl
-
-
Method Details
-
generateSingleEducationalObjective
public Entity generateSingleEducationalObjective(int sorting) throws PersistException, InterruptedException Description copied from interface:GenerateEducationalObjectiveService
generates a single educational objective- Specified by:
generateSingleEducationalObjective
in interfaceGenerateEducationalObjectiveService
- Parameters:
sorting
- sorting will be set to number * 10 and label to number- Returns:
- created educational objective
- Throws:
PersistException
InterruptedException
-
generateEducationalObjectives
public List<Entity> generateEducationalObjectives(int amount, Optional<Integer> start) throws PersistException, InterruptedException Description copied from interface:GenerateEducationalObjectiveService
generates multiple educational objectives by using generateSingleEducationalObjective- Specified by:
generateEducationalObjectives
in interfaceGenerateEducationalObjectiveService
- Parameters:
amount
- how many to create- Returns:
- list of all created entities
- Throws:
PersistException
InterruptedException
-
getHighestEducationalObjectiveSorting
public Optional<Integer> getHighestEducationalObjectiveSorting(Entity event) throws PersistException Description copied from interface:GenerateEducationalObjectiveService
gets you the current highest sorting of all connected educational objectives- Specified by:
getHighestEducationalObjectiveSorting
in interfaceGenerateEducationalObjectiveService
- Parameters:
event
- the event- Returns:
- the highest sorting, absent when there are none
- Throws:
PersistException
-
getOrderedEducationalObjectives
Description copied from interface:GenerateEducationalObjectiveService
orders all educational objectives by sorting and returns them in descending order- Specified by:
getOrderedEducationalObjectives
in interfaceGenerateEducationalObjectiveService
- Parameters:
event
- the event- Returns:
- ordered entity list, highest sorting at the top
- Throws:
PersistException
-