Class ScheduleUtil

java.lang.Object
org.compiere.model.ScheduleUtil

public class ScheduleUtil extends Object
Resource Scheduling Utilities.
Version:
$Id: ScheduleUtil.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke
  • Field Details

    • EARLIEST

      public static final Timestamp EARLIEST
      Begin Timestamp 1/1/1970
    • LATEST

      public static final Timestamp LATEST
      End Timestamp 12/31/2070
  • Constructor Details

    • ScheduleUtil

      public ScheduleUtil(Properties ctx)
      Constructor
      Parameters:
      ctx - context
  • Method Details

    • getAssignmentSlots

      public MAssignmentSlot[] getAssignmentSlots(int S_Resource_ID, Timestamp start_Date, Timestamp end_Date, BigDecimal qty, boolean getAll, String trxName)
      Get Assignments for time frame.
                      - Resource is Active and Available
                      - Resource UnAvailability
                      - NonBusinessDay
                      - ResourceType Available
        
      Parameters:
      S_Resource_ID - resource
      start_Date - start date
      end_Date - optional end date, need to provide qty to calculate it
      qty - optional qty in ResourceType UOM. Ignored if end date is not null
      getAll - if true return all errors
      trxName - transaction
      Returns:
      Array of existing Assignments or null - if free
    • getDayTimeSlots

      public MAssignmentSlot[] getDayTimeSlots()
      Get Day Time Slots
      Returns:
      array of day time slot
    • getS_Resource_ID

      public int getS_Resource_ID()
      Get Resource ID. Set in getAssignmentSlots method.
      Returns:
      current resource id
    • getStartDate

      public Timestamp getStartDate()
      Get Start Date. Set in getAssignmentSlots method.
      Returns:
      start date
    • getEndDate

      public Timestamp getEndDate()
      Get End Date. Set in getAssignmentSlots method.
      Returns:
      end date