All Implemented Interfaces:
Serializable, DbEntity, DbEntityLifecycleAware, HasDbReferences, HasDbRevision, Job

public class TimerEntity extends JobEntity
Author:
Tom Baeyens
See Also:
  • Field Details

    • CYCLE_EXPRESSION_START_TYPE_1

      protected static final String CYCLE_EXPRESSION_START_TYPE_1
    • CYCLE_EXPRESSION_START_TYPE_2

      protected static final String CYCLE_EXPRESSION_START_TYPE_2
    • SIMPLE_DATE_FORMAT

      public static final SimpleDateFormat SIMPLE_DATE_FORMAT
    • TYPE

      public static final String TYPE
      See Also:
    • repeat

      protected String repeat
    • repeatOffset

      protected long repeatOffset
  • Constructor Details

    • TimerEntity

      public TimerEntity()
    • TimerEntity

      public TimerEntity(TimerDeclarationImpl timerDeclaration)
    • TimerEntity

      protected TimerEntity(TimerEntity te)
  • Method Details

    • preExecute

      protected void preExecute(CommandContext commandContext)
      Overrides:
      preExecute in class JobEntity
    • parseExpression

      protected String parseExpression(CommandContext commandContext)
    • isReevaluateTimeCycleWhenDue

      protected boolean isReevaluateTimeCycleWhenDue(CommandContext commandContext)
    • isCycleExpression

      protected boolean isCycleExpression()
    • adjustRepeatBasedOnNewExpression

      protected String adjustRepeatBasedOnNewExpression(String expressionValue)
    • isSameRepeatCycle

      protected boolean isSameRepeatCycle(String expressionValue)
    • replaceRepeatCycleAndDate

      public static String replaceRepeatCycleAndDate(String repeatExpression)
    • createRepeatingFailedJobListener

      protected RepeatingFailedJobListener createRepeatingFailedJobListener(CommandExecutor commandExecutor)
    • createNewTimerJob

      public void createNewTimerJob(Date dueDate)
    • calculateNewDueDate

      public Date calculateNewDueDate()
    • getRepeat

      public String getRepeat()
    • setRepeat

      public void setRepeat(String repeat)
    • getRepeatOffset

      public long getRepeatOffset()
    • setRepeatOffset

      public void setRepeatOffset(long repeatOffset)
    • getType

      public String getType()
      Specified by:
      getType in class JobEntity
    • getPersistentState

      public Object getPersistentState()
      Description copied from interface: DbEntity
      Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.
      Specified by:
      getPersistentState in interface DbEntity
      Overrides:
      getPersistentState in class JobEntity
    • toString

      public String toString()
      Overrides:
      toString in class JobEntity