Class RosterGenerator
- java.lang.Object
-
- org.optaweb.employeerostering.service.roster.RosterGenerator
-
- All Implemented Interfaces:
org.springframework.boot.ApplicationRunner
@Component public class RosterGenerator extends Object implements org.springframework.boot.ApplicationRunner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRosterGenerator.GeneratorType
-
Constructor Summary
Constructors Constructor Description RosterGenerator()RosterGenerator(javax.persistence.EntityManager entityManager)For benchmark only
-
Method Summary
-
-
-
Method Detail
-
run
@Transactional public void run(org.springframework.boot.ApplicationArguments args)
- Specified by:
runin interfaceorg.springframework.boot.ApplicationRunner
-
checkForExistingData
@Transactional public void checkForExistingData()
-
setUpGeneratedData
@Transactional public void setUpGeneratedData()
-
generateRoster
@Transactional public Roster generateRoster(int spotListSize, int lengthInDays, RosterGenerator.GeneratorType generatorType, ZoneId zoneId)
-
generateRoster
@Transactional public Roster generateRoster(int spotListSize, int lengthInDays)
-
createTenant
@Transactional public Tenant createTenant(RosterGenerator.GeneratorType generatorType, int employeeListSize)
-
createTenantConfiguration
@Transactional public RosterConstraintConfiguration createTenantConfiguration(RosterGenerator.GeneratorType generatorType, Integer tenantId, ZoneId zoneId)
-
createRosterState
@Transactional public RosterState createRosterState(RosterGenerator.GeneratorType generatorType, Tenant tenant, ZoneId zoneId, int lengthInDays)
-
createSkillList
@Transactional public List<Skill> createSkillList(RosterGenerator.GeneratorType generatorType, Integer tenantId, int size)
-
createSpotList
@Transactional public List<Spot> createSpotList(RosterGenerator.GeneratorType generatorType, Integer tenantId, int size, List<Skill> skillList)
-
createEmployeeList
@Transactional public List<Employee> createEmployeeList(RosterGenerator.GeneratorType generatorType, Integer tenantId, int size, List<Contract> contractList, List<Skill> generalSkillList)
-
createTimeBucketList
@Transactional public List<TimeBucket> createTimeBucketList(RosterGenerator.GeneratorType generatorType, Integer tenantId, DayOfWeek startOfWeek, RosterState rosterState, List<Spot> spotList, List<Employee> employeeList, List<Skill> skillList)
-
createShiftList
@Transactional public List<Shift> createShiftList(RosterGenerator.GeneratorType generatorType, Integer tenantId, RosterConstraintConfiguration rosterConstraintConfiguration, RosterState rosterState, List<Spot> spotList, List<TimeBucket> timeBucketList)
-
createEmployeeAvailabilityList
@Transactional public List<EmployeeAvailability> createEmployeeAvailabilityList(RosterGenerator.GeneratorType generatorType, Integer tenantId, RosterConstraintConfiguration rosterConstraintConfiguration, RosterState rosterState, List<Employee> employeeList, List<Shift> shiftList)
-
-