/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.optaplanner.examples.meetingscheduling.domain; import java.util.List; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamConverter; import org.optaplanner.core.api.domain.solution.PlanningEntityCollectionProperty; import org.optaplanner.core.api.domain.solution.PlanningScore; import org.optaplanner.core.api.domain.solution.PlanningSolution; import org.optaplanner.core.api.domain.solution.drools.ProblemFactCollectionProperty; import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider; import org.optaplanner.core.api.score.buildin.hardmediumsoft.HardMediumSoftScore; import org.optaplanner.examples.common.domain.AbstractPersistable; import org.optaplanner.persistence.xstream.api.score.buildin.hardmediumsoft.HardMediumSoftScoreXStreamConverter; @PlanningSolution @XStreamAlias("MsMeetingSchedule") public class MeetingSchedule extends AbstractPersistable { private List<Meeting> meetingList; private List<Day> dayList; private List<TimeGrain> timeGrainList; private List<Room> roomList; private List<Person> personList; private List<Attendance> attendanceList; private List<MeetingAssignment> meetingAssignmentList; @XStreamConverter(HardMediumSoftScoreXStreamConverter.class) private HardMediumSoftScore score; @ProblemFactCollectionProperty public List<Meeting> getMeetingList() { return meetingList; } public void setMeetingList(List<Meeting> meetingList) { this.meetingList = meetingList; } @ProblemFactCollectionProperty public List<Day> getDayList() { return dayList; } public void setDayList(List<Day> dayList) { this.dayList = dayList; } @ValueRangeProvider(id = "timeGrainRange") @ProblemFactCollectionProperty public List<TimeGrain> getTimeGrainList() { return timeGrainList; } public void setTimeGrainList(List<TimeGrain> timeGrainList) { this.timeGrainList = timeGrainList; } @ValueRangeProvider(id = "roomRange") @ProblemFactCollectionProperty public List<Room> getRoomList() { return roomList; } public void setRoomList(List<Room> roomList) { this.roomList = roomList; } @ProblemFactCollectionProperty public List<Person> getPersonList() { return personList; } public void setPersonList(List<Person> personList) { this.personList = personList; } @ProblemFactCollectionProperty public List<Attendance> getAttendanceList() { return attendanceList; } public void setAttendanceList(List<Attendance> attendanceList) { this.attendanceList = attendanceList; } @PlanningEntityCollectionProperty public List<MeetingAssignment> getMeetingAssignmentList() { return meetingAssignmentList; } public void setMeetingAssignmentList(List<MeetingAssignment> meetingAssignmentList) { this.meetingAssignmentList = meetingAssignmentList; } @PlanningScore public HardMediumSoftScore getScore() { return score; } public void setScore(HardMediumSoftScore score) { this.score = score; } // ************************************************************************ // Complex methods // ************************************************************************ }