public class DayPlan
extends java.lang.Object
A bidimensional array with daily scheduled meeting in quarters of an hour.
Constructor and Description |
---|
DayPlan()
Default constructor
Creates a day plan with a maximun of eight concurrent meetings
and the day divided in 96 slices of 15 minutes each
|
DayPlan(short iMaxConcurMeetings)
Constructor
Creates a day plan dividing the day in 96 slices of 15 minutes each
|
Modifier and Type | Method and Description |
---|---|
int |
concurrentMeetings(int slice)
Get count of concurrent meetings at a given slice
|
Meeting |
getMeeting(int slice,
int slot)
Get meeting information
Each meeting is asoociated with one or more day slices by having a list
at the slice that point to every meeting taking place on the slice.
|
void |
load(JDCConnection oConn,
java.lang.String sFellowId,
java.util.Date dtToday)
A shortcut for load scheduled meetings for a given Fellow.
|
void |
loadMeetingsForAddress(JDCConnection oConn,
int iDomainId,
java.lang.String sWorkAreaId,
java.lang.String sAddressId,
java.util.Date dtToday)
Load scheduled meetings for a given Address.
|
void |
loadMeetingsForFellow(JDCConnection oConn,
int iDomainId,
java.lang.String sWorkAreaId,
java.lang.String sFellowId,
java.util.Date dtToday)
Load scheduled meetings for a given Fellow.
|
void |
loadMeetingsForRoom(JDCConnection oConn,
int iDomainId,
java.lang.String sWorkAreaId,
java.lang.String sNmRoom,
java.util.Date dtToday)
Load scheduled meetings for a given Room.
|
Meeting |
seekMeeting(java.lang.String sMeeting)
Lookup a meeting given its unique identifier
|
int |
sliceCount()
Slice count per day.
|
int |
slotsPerSlice() |
public DayPlan()
Default constructor
Creates a day plan with a maximun of eight concurrent meetings and the day divided in 96 slices of 15 minutes eachpublic DayPlan(short iMaxConcurMeetings) throws java.lang.NegativeArraySizeException
Constructor
Creates a day plan dividing the day in 96 slices of 15 minutes eachiMaxConcurMeetingsiMaxConcurMeetings
- short Maximum concurrent meetingsjava.lang.NegativeArraySizeException
- if iMaxConcurMeetings is less than onepublic void loadMeetingsForFellow(JDCConnection oConn, int iDomainId, java.lang.String sWorkAreaId, java.lang.String sFellowId, java.util.Date dtToday) throws java.sql.SQLException
Load scheduled meetings for a given Fellow.
oConn
- Database ConnectioniDomainId
- Domain Unique IdentifiersWorkAreaId
- WorkArea Global Unique IdentifiersFellowId
- Fellow Unique IdentifierdtToday
- Date for witch meeting are to be retrievedjava.sql.SQLException
Fellow}
public void loadMeetingsForRoom(JDCConnection oConn, int iDomainId, java.lang.String sWorkAreaId, java.lang.String sNmRoom, java.util.Date dtToday) throws java.sql.SQLException
Load scheduled meetings for a given Room.
oConn
- Database ConnectioniDomainId
- Domain Unique IdentifiersWorkAreaId
- WorkArea Global Unique IdentifiersNmRoom
- Room NamedtToday
- Date for witch meeting are to be retrievedjava.sql.SQLException
Fellow}
public void loadMeetingsForAddress(JDCConnection oConn, int iDomainId, java.lang.String sWorkAreaId, java.lang.String sAddressId, java.util.Date dtToday) throws java.sql.SQLException
Load scheduled meetings for a given Address.
oConn
- Database ConnectioniDomainId
- Domain Unique IdentifiersWorkAreaId
- WorkArea Global Unique IdentifiersAddressId
- Address Global Unique IdentifierdtToday
- Date for witch meeting are to be retrievedjava.sql.SQLException
Fellow}
public void load(JDCConnection oConn, java.lang.String sFellowId, java.util.Date dtToday) throws java.sql.SQLException
A shortcut for load scheduled meetings for a given Fellow.
oConn
- Database ConnectionsFellowId
- Fellow Unique IdentifierdtToday
- Date for witch meeting are to be retrievedjava.sql.SQLException
Fellow}
public int sliceCount()
Slice count per day.
96 is the default and equals a day divided in 15 minutes slices
public int slotsPerSlice()
public int concurrentMeetings(int slice) throws java.lang.ArrayIndexOutOfBoundsException
Get count of concurrent meetings at a given slice
slice
- [0...sliceCount()-1]java.lang.ArrayIndexOutOfBoundsException
- If slice<0 or slice>=sliceCount()public Meeting getMeeting(int slice, int slot) throws java.lang.ArrayIndexOutOfBoundsException
Get meeting information
Each meeting is asoociated with one or more day slices by having a list at the slice that point to every meeting taking place on the slice.
Thus for retriving a meeting both the slice number and the relative ordinal position of the meeting at the slice are needed.
slice
- [0...sliceCount()-1]slot
- [0...slotsPerSlice()-1]Meeting
or null if no meeting was found at the given (slice,slot) pair.java.lang.ArrayIndexOutOfBoundsException
- If slice<0 or slice>=sliceCount() or slot<0 or slot>=slotsPerSlice()