What would be the Datanucleus/JDO implementation to this:
Suppose I have a POJO, Hub
which represents a place/location:
class Hub {
List<Schedule> schedules;
}
And a Schedule
class to represent a specific day schedule of opening and closing of that place:
class Schedule {
String day;
LocalTime opens;
LocalTime closes;
}
And then a query to those Hubs to find which opens and closes during a specific day, say, query with this constraint:
new Schedule().builder()
.day("Monday")
.opens(LocalTime.parse("09:00")
.close(LocalTime.parse("17:00").build();
Note that LocalTime is not Date
So in this case we want to query for Hubs that are open on Mondays at 9am to 5pm.
- What would be the Datanucleus/JDO implementation for the
Hub
? - What would be the query implementation to achieve the desired result as described?