org.apache.turbine.services.schedule

## Class JobEntryNonPersistent

- java.lang.Object
- - org.apache.turbine.services.schedule.AbstractJobEntry
  - - org.apache.turbine.services.schedule.JobEntryNonPersistent

- All Implemented Interfaces:
    Comparable<JobEntry>, JobEntry

      public class JobEntryNonPersistent
      extends AbstractJobEntry

  This is an implementation of a JobEntry with no persistence. It is used by the `TurbineNonPersistentSchedulerService`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.turbine.services.schedule.AbstractJobEntry

      `AbstractJobEntry.ScheduleType`

  - ### Field Summary

    - ### Fields inherited from class org.apache.turbine.services.schedule.AbstractJobEntry

      `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JobEntryNonPersistent()` Default constructor
    `JobEntryNonPersistent(int sec, int min, int hour, int wd, int day_mo, String task)` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `int` | `getDayOfMonth()` Get the value of dayOfMonth.
    `int` | `getHour()` Get the value of hour.
    `int` | `getJobId()` Get the value of jobId.
    `int` | `getMinute()` Get the value of minute.
    `int` | `getSecond()` Get the value of second.
    `String` | `getTask()` Get the value of task.
    `int` | `getWeekDay()` Get the value of weekDay.
    `int` | `hashCode()`
    `boolean` | `isNew()` Return true, if the entry is not yet persisted
    `void` | `setDayOfMonth(int v)` Set the value of dayOfMonth.
    `void` | `setHour(int v)` Set the value of hour.
    `void` | `setJobId(int v)` Set the value of jobId.
    `void` | `setMinute(int v)` Set the value of minute.
    `void` | `setSecond(int v)` Set the value of second.
    `void` | `setTask(String v)` Set the value of task.
    `void` | `setWeekDay(int v)` Set the value of weekDay.

    - ### Methods inherited from class org.apache.turbine.services.schedule.AbstractJobEntry

      `calcRunTime, compareTo, getNextRunAsString, getNextRunDate, getNextRuntime, isActive, setActive`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JobEntryNonPersistent

          public JobEntryNonPersistent()

      Default constructor

    - #### JobEntryNonPersistent

          public JobEntryNonPersistent(int sec,
                               int min,
                               int hour,
                               int wd,
                               int day_mo,
                               String task)
                                throws TurbineException

      Constructor. Schedule a job to run on a certain point of time.
      Example 1: Run the DefaultScheduledJob at 8:00am every 15th of the month -
      JobEntry je = new JobEntry(0,0,8,15,"DefaultScheduledJob");
      Example 2: Run the DefaultScheduledJob at 8:00am every day -
      JobEntry je = new JobEntry(0,0,8,-1,"DefaultScheduledJob");
      Example 3: Run the DefaultScheduledJob every 2 hours. -
      JobEntry je = new JobEntry(0,120,-1,-1,"DefaultScheduledJob");
      Example 4: Run the DefaultScheduledJob every 30 seconds. -
      JobEntry je = new JobEntry(30,-1,-1,-1,"DefaultScheduledJob");
      Parameters:
        `sec` - Value for entry "seconds".
        `min` - Value for entry "minutes".
        `hour` - Value for entry "hours".
        `wd` - Value for entry "week days".
        `day_mo` - Value for entry "month days".
        `task` - Task to execute.
      Throws:
        `TurbineException` - a generic exception.

  - ### Method Detail

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`
      See Also:
        `Object.hashCode()`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`
      See Also:
        `Object.equals(java.lang.Object)`

    - #### isNew

          public boolean isNew()

      Return true, if the entry is not yet persisted
      Returns:
        true if job is not yet saved, otherwise false

    - #### getJobId

          public int getJobId()

      Get the value of jobId.
      Specified by:
        `getJobId` in interface `JobEntry`
      Specified by:
        `getJobId` in class `AbstractJobEntry`
      Returns:
        int

    - #### setJobId

          public void setJobId(int v)

      Set the value of jobId.
      Specified by:
        `setJobId` in interface `JobEntry`
      Specified by:
        `setJobId` in class `AbstractJobEntry`
      Parameters:
        `v` - new value

    - #### getSecond

          public int getSecond()

      Get the value of second.
      Specified by:
        `getSecond` in class `AbstractJobEntry`
      Returns:
        int

    - #### setSecond

          public void setSecond(int v)

      Set the value of second.
      Specified by:
        `setSecond` in class `AbstractJobEntry`
      Parameters:
        `v` - new value

    - #### getMinute

          public int getMinute()

      Get the value of minute.
      Specified by:
        `getMinute` in class `AbstractJobEntry`
      Returns:
        int

    - #### setMinute

          public void setMinute(int v)

      Set the value of minute.
      Specified by:
        `setMinute` in class `AbstractJobEntry`
      Parameters:
        `v` - new value

    - #### getHour

          public int getHour()

      Get the value of hour.
      Specified by:
        `getHour` in class `AbstractJobEntry`
      Returns:
        int

    - #### setHour

          public void setHour(int v)

      Set the value of hour.
      Specified by:
        `setHour` in class `AbstractJobEntry`
      Parameters:
        `v` - new value

    - #### getWeekDay

          public int getWeekDay()

      Get the value of weekDay.
      Specified by:
        `getWeekDay` in class `AbstractJobEntry`
      Returns:
        int

    - #### setWeekDay

          public void setWeekDay(int v)

      Set the value of weekDay.
      Specified by:
        `setWeekDay` in class `AbstractJobEntry`
      Parameters:
        `v` - new value

    - #### getDayOfMonth

          public int getDayOfMonth()

      Get the value of dayOfMonth.
      Specified by:
        `getDayOfMonth` in class `AbstractJobEntry`
      Returns:
        int

    - #### setDayOfMonth

          public void setDayOfMonth(int v)

      Set the value of dayOfMonth.
      Specified by:
        `setDayOfMonth` in class `AbstractJobEntry`
      Parameters:
        `v` - new value

    - #### getTask

          public String getTask()

      Get the value of task.
      Specified by:
        `getTask` in interface `JobEntry`
      Specified by:
        `getTask` in class `AbstractJobEntry`
      Returns:
        String

    - #### setTask

          public void setTask(String v)

      Set the value of task.
      Specified by:
        `setTask` in interface `JobEntry`
      Specified by:
        `setTask` in class `AbstractJobEntry`
      Parameters:
        `v` - new value

Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.