Class MSchedule

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_AD_Schedule, I_Persistent, Evaluatee, ImmutablePOSupport

public class MSchedule extends X_AD_Schedule implements ImmutablePOSupport
Schedule model for scheduler
See Also:
  • Constructor Details

    • MSchedule

      public MSchedule(Properties ctx, String AD_Schedule_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      AD_Schedule_UU - UUID key
      trxName - Transaction
    • MSchedule

      public MSchedule(Properties ctx, int AD_Schedule_ID, String trxName)
      Parameters:
      ctx -
      AD_Schedule_ID -
      trxName -
    • MSchedule

      public MSchedule(Properties ctx, ResultSet rs, String trxName)
      Parameters:
      ctx -
      rs -
      trxName -
    • MSchedule

      public MSchedule(MSchedule copy)
      Copy constructor
      Parameters:
      copy -
    • MSchedule

      public MSchedule(Properties ctx, MSchedule copy)
      Copy constructor
      Parameters:
      ctx -
      copy -
    • MSchedule

      public MSchedule(Properties ctx, MSchedule copy, String trxName)
      Copy constructor
      Parameters:
      ctx -
      copy -
      trxName -
  • Method Details

    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - new record
      Returns:
      true if record can be saved
    • isOKtoRunOnIP

      public boolean isOKtoRunOnIP()
      Is it OK to Run process on this server based on server IP verification.
      Returns:
      true if it is ok to run
    • get

      public static MSchedule get(int AD_Schedule_ID)
      Get MSchedule from cache (immutable)
      Parameters:
      AD_Schedule_ID -
      Returns:
      MSchedule
    • get

      public static MSchedule get(Properties ctx, int AD_Schedule_ID)
      Get MSchedule from cache (immutable)
      Parameters:
      ctx -
      AD_Schedule_ID -
      Returns:
      MSchedule
    • chekIPFormat

      public boolean chekIPFormat(String ipOnly)
      Parameters:
      ipOnly -
      Returns:
      true if ipOnly is IPV4 IPV6 address
    • getNextRunMS

      @Deprecated public static long getNextRunMS(long last, String scheduleType, String frequencyType, int frequency, String cronPattern)
      Deprecated.
      Get Next Run
      Parameters:
      last - in MS
      scheduleType -
      frequencyType -
      frequency -
      cronPattern -
      Returns:
      next run in MS
    • getNextRunMS

      public static long getNextRunMS(long last, String scheduleType, String frequencyType, int frequency, String cronPattern, String timeZone)
      Get Next Run
      Parameters:
      last - in MS
      scheduleType -
      frequencyType -
      frequency -
      cronPattern -
      timeZone -
      Returns:
      next run time stamp in millisecond
    • markImmutable

      public MSchedule markImmutable()
      Description copied from interface: ImmutablePOSupport
      mark PO as immutable
      Specified by:
      markImmutable in interface ImmutablePOSupport
      Returns:
      PO