Class ScheduleManager


  • public class ScheduleManager
    extends BaseTable
    This class manages the "schedules" table, which contains the automatic execution schedule for each job. It's separated from the main jobs table because we will need multiple timeslots per job.

    schedules
    FieldTypeDescription        
    owneridBIGINTReference:jobs.id
    ordinalBIGINT
    dayofweekVARCHAR(255)
    dayofmonthVARCHAR(255)
    monthofyearVARCHAR(255)
    yearlistVARCHAR(255)
    hourofdayVARCHAR(255)
    minutesofhourVARCHAR(255)
    timezoneVARCHAR(32)
    windowlengthBIGINT
    requestminimumCHAR(1)


    • Method Detail

      • install

        public void install​(java.lang.String ownerTable,
                            java.lang.String owningTablePrimaryKey)
                     throws ManifoldCFException
        Install or upgrade.
        Parameters:
        ownerTable - is the name of the table that owns this one.
        owningTablePrimaryKey - is the primary key of the owning table.
        Throws:
        ManifoldCFException
      • getRows

        public void getRows​(java.util.Map<java.lang.Long,​JobDescription> returnValues,
                            java.lang.String ownerIDList,
                            java.util.ArrayList ownerIDParams)
                     throws ManifoldCFException
        Fill in a set of schedules corresponding to a set of owner id's.
        Parameters:
        returnValues - is a map keyed by ownerID, with value of JobDescription.
        ownerIDList - is the list of owner id's.
        ownerIDParams - is the corresponding set of owner id parameters.
        Throws:
        ManifoldCFException
      • maxClauseGetRowsAlternate

        public int maxClauseGetRowsAlternate()
        Get the max clauses that can be used with getRowsAlternate.
      • getRowsAlternate

        public void getRowsAlternate​(java.util.Map returnValues,
                                     java.util.ArrayList ownerIDParams)
                              throws ManifoldCFException
        Fill in a set of schedules corresponding to a set of owner id's.
        Parameters:
        returnValues - is a map keyed by ownerID, with a value that is an ArrayList of ScheduleRecord objects.
        ownerIDParams - is the corresponding set of owner id parameters.
        Throws:
        ManifoldCFException
      • writeRows

        public void writeRows​(java.lang.Long ownerID,
                              IJobDescription list)
                       throws ManifoldCFException
        Write a schedule list into the database.
        Parameters:
        ownerID - is the owning identifier.
        list - is the job description that is the source of the schedule.
        Throws:
        ManifoldCFException
      • deleteRows

        public void deleteRows​(java.lang.Long ownerID)
                        throws ManifoldCFException
        Delete rows.
        Parameters:
        ownerID - is the owner whose rows to delete.
        Throws:
        ManifoldCFException
      • enumeratedValueToString

        public static java.lang.String enumeratedValueToString​(EnumeratedValues values)
        Go from enumerated value to string.
        Parameters:
        values - is the enumerated value.
        Returns:
        the string value.
      • requestMinimumValueToString

        public static java.lang.String requestMinimumValueToString​(boolean requestMinimum)