public class AvailCalc
extends java.lang.Object
Constructor and Description |
---|
AvailCalc() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
checkAvailableCalendar(java.util.Date fromDate,
java.util.Date toDate,
java.lang.String shiftnum)
Returns the available calendar between the given the dates.
|
double |
checkAvailableHours(java.util.Date workdate,
PersonCalRemote personCal)
Get either the number of workhours for this day, either from the modavail table, if there is an entry, or from the workperiod table.
|
MboRemote |
checkAvailableMbo(java.util.Date workdate,
PersonCalRemote personCal)
Get either the WorkPeriod mbo or the ModAvail mbo if there is one.
|
java.util.List<MboRemote> |
checkAvailableMboList(java.util.Date workdate,
PersonCalRemote personCal)
Get either the WorkPeriod mbo or the ModAvail mbo if there is one.
|
double |
checkAvailableWorkHrs(java.util.Date fromDate,
java.util.Date toDate,
java.lang.String shiftnum)
Returns the available Work Hrs between the given the dates.
|
MboRemote |
checkWorkPeriodMbo(java.util.Date workdate,
PersonCalRemote personCal)
Return the workperiod mbo for this date, calendar, shift and org.
|
java.util.Date |
getCalDate(java.util.Date actualDate)
Returns date only field from the given date and time
|
java.util.Date |
getCalTime(java.util.Date actualDate,
java.lang.String defDate)
Returns date and time field from the given date and time by
changing the date to a static date value
|
java.util.Date |
getCalTime(java.lang.String defDate,
boolean isstart)
Returns date and time field for the given setting
|
MboRemote |
getCompositeWP(java.util.List<MboRemote> modAvailList,
java.util.Date workDate,
PersonRemote person,
java.lang.String orgid)
This takes a List of ModAvail mbos and combines them with the WorkPeriod of the same workdate,
if any, into a single "composite" workperiod.
|
MboRemote |
getCompositeWP(java.util.List<MboRemote> modAvailList,
java.util.Date workDate,
PersonRemote person,
java.lang.String orgid,
boolean isCreateAMGrid) |
java.util.Date |
getDateTime(java.util.Date workdt,
java.util.Date sttime) |
java.util.Date |
getNextWorkDate(java.util.Date fromDate)
Returns the next available workdate from the given date.
|
java.util.Date |
getNextWorkDateForCal(java.util.Date workdate,
java.lang.String person,
java.lang.String calnum,
java.lang.String shiftnum,
java.lang.String orgid)
Returns the next working date for this date, calendar, shift and org combination.
|
PersonCalRemote |
getPersonCal(PersonRemote person,
java.lang.String orgid)
Fetches the Personcal for the passed person and orgid.
|
java.lang.String |
getSqlSqfFormat(java.lang.String strValue,
java.util.Date AvailDate,
java.lang.String orgid)
This method sets the values in the sql variables.
|
java.lang.String |
getSqlString(boolean istodate,
java.lang.String str1,
java.lang.String str2,
java.lang.String shiftnum)
Create sql string for the given date range.
|
java.util.Date |
getStartDateTime(java.util.Date workdate,
PersonCalRemote personCal)
Take the workdate and set its time to the beginning of the shift.
|
java.util.Date |
getToDate(java.util.Date fromDate) |
java.util.Date |
getToDateOneYear(java.util.Date fromDate)
IV44545: return a date one year after the passed date - user may have many workperiod records
instead of processing the entire workperiod - we process one year at a time
|
java.lang.String |
getWPSQL(java.util.Date fromDate,
java.util.Date toDate)
Returns the Sql string to find available workperiod between the given the dates.
|
public java.lang.String checkAvailableCalendar(java.util.Date fromDate, java.util.Date toDate, java.lang.String shiftnum) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public java.lang.String getWPSQL(java.util.Date fromDate, java.util.Date toDate) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public double checkAvailableWorkHrs(java.util.Date fromDate, java.util.Date toDate, java.lang.String shiftnum) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public java.lang.String getSqlString(boolean istodate, java.lang.String str1, java.lang.String str2, java.lang.String shiftnum)
public java.util.Date getCalDate(java.util.Date actualDate)
public java.util.Date getCalTime(java.util.Date actualDate, java.lang.String defDate)
public java.util.Date getCalTime(java.lang.String defDate, boolean isstart)
public java.util.Date getNextWorkDate(java.util.Date fromDate) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public java.util.Date getToDate(java.util.Date fromDate) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public java.util.Date getDateTime(java.util.Date workdt, java.util.Date sttime)
public double checkAvailableHours(java.util.Date workdate, PersonCalRemote personCal) throws MXException, java.rmi.RemoteException
workdate
- calnum
- shiftnum
- orgid
- MXException
java.rmi.RemoteException
public java.util.List<MboRemote> checkAvailableMboList(java.util.Date workdate, PersonCalRemote personCal) throws MXException, java.rmi.RemoteException
workdate
- calnum
- shiftnum
- orgid
- MXException
java.rmi.RemoteException
public MboRemote checkAvailableMbo(java.util.Date workdate, PersonCalRemote personCal) throws MXException, java.rmi.RemoteException
workdate
- calnum
- shiftnum
- orgid
- MXException
java.rmi.RemoteException
public MboRemote checkWorkPeriodMbo(java.util.Date workdate, PersonCalRemote personCal) throws MXException, java.rmi.RemoteException
workdate
- calnum
- shiftnum
- orgid
- MXException
java.rmi.RemoteException
public java.util.Date getStartDateTime(java.util.Date workdate, PersonCalRemote personCal) throws MXException, java.rmi.RemoteException
workdate
- calnum
- shiftnum
- orgid
- MXException
java.rmi.RemoteException
public java.util.Date getNextWorkDateForCal(java.util.Date workdate, java.lang.String person, java.lang.String calnum, java.lang.String shiftnum, java.lang.String orgid) throws MXException, java.rmi.RemoteException
workdate
- calnum
- shiftnum
- orgid
- MXException
java.rmi.RemoteException
public java.lang.String getSqlSqfFormat(java.lang.String strValue, java.util.Date AvailDate, java.lang.String orgid) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
getSqlString
public MboRemote getCompositeWP(java.util.List<MboRemote> modAvailList, java.util.Date workDate, PersonRemote person, java.lang.String orgid) throws MXException, java.rmi.RemoteException
modAvailList
- A list of ModAvail mbos for the given WorkDate, or a list containing a
single workperiod, if no ModAvail rows were defined, or a list with a
single null entry, if no workperiod was defined.workDate
- The date in question.person
- The person for whom the Modavail objects were defined.orgid
- The OrgID.MXException
java.rmi.RemoteException
public MboRemote getCompositeWP(java.util.List<MboRemote> modAvailList, java.util.Date workDate, PersonRemote person, java.lang.String orgid, boolean isCreateAMGrid) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public PersonCalRemote getPersonCal(PersonRemote person, java.lang.String orgid) throws MXException, java.rmi.RemoteException
person
- The person whose personcal we wish.orgid
- The OrgIDMXException
java.rmi.RemoteException
public java.util.Date getToDateOneYear(java.util.Date fromDate) throws MXException, java.rmi.RemoteException
fromDate
- MXException
java.rmi.RemoteException