Compiere 3.1

org.compiere.model
Class ScheduleUtil

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

public class ScheduleUtil
extends Object

Scheduling Utilities.

Version:
$Id: ScheduleUtil.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
Author:
Jorg Janke

Field Summary
static Timestamp EARLIEST
          Begin Timestamp 1/1/1970
static Timestamp LATEST
          End Timestamp 12/31/2070
 
Constructor Summary
ScheduleUtil(Ctx ctx)
          Constructor
 
Method Summary
 MAssignmentSlot[] getAssignmentSlots(int S_Resource_ID, Timestamp start_Date, Timestamp end_Date, BigDecimal qty, boolean getAll, String trxName)
          Get Assignments for timeframe.
 MAssignmentSlot[] getDayTimeSlots()
          Get Day Time Slots for Date
 Timestamp getEndDate()
          Return End Date.
 int getS_Resource_ID()
          Get Resource ID.
 Timestamp getStartDate()
          Return Start Date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EARLIEST

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


LATEST

public static final Timestamp LATEST
End Timestamp 12/31/2070

Constructor Detail

ScheduleUtil

public ScheduleUtil(Ctx ctx)
Constructor

Parameters:
ctx - context
Method Detail

getAssignmentSlots

public MAssignmentSlot[] getAssignmentSlots(int S_Resource_ID,
                                            Timestamp start_Date,
                                            Timestamp end_Date,
                                            BigDecimal qty,
                                            boolean getAll,
                                            String trxName)
Get Assignments for timeframe.
                - 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 Assigments or null - if free

getDayTimeSlots

public MAssignmentSlot[] getDayTimeSlots()
Get Day Time Slots for Date

Returns:
"heading" or null

getS_Resource_ID

public int getS_Resource_ID()
Get Resource ID. Set by getAssignmentSlots

Returns:
current resource

getStartDate

public Timestamp getStartDate()
Return Start Date. Set by getAssignmentSlots

Returns:
start date

getEndDate

public Timestamp getEndDate()
Return End Date. Set by getAssignmentSlots

Returns:
end date

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.