I have a db table(Hibernate conf all done),
ResourceRequest( resource, startTime, endTime, status )
between the startTime and endTime the resource is occupied.
Problem Statement:
For a input of inStartTime and inEndTime, I have to find the next available slot if it is already occupied in the given slot.
Have to write a hibernate query for this.
One quick solution that I could think of is:
Querying the resourcerequests for the given resource into a collection and then manipulating it to get the next available slot.
But I want have that as my last resort. Any help is appreciated.
thanks.
in sql
hope it helps