com.ibm.tws.objects.types
Class AvailabilityInterval

java.lang.Object
  extended bycom.ibm.tws.objects.types.AvailabilityInterval
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ResourceAvailabilityInterval, ResourceInPlanAvailabilityInterval, WorkstationAvailabilityInterval

public class AvailabilityInterval
extends java.lang.Object
implements java.io.Serializable

This class is the base class to describe the availability intervals for Workstation and Resource objects in a z/OS database. Currently it is only used for z/OS Workstation and Resource objects, but in the future its usage can be extended also to the TWS distributed Workstation and Resource objects.

The following syntax validation constraints must be met on AvailabilityInterval objects in z/OS environment:

description Not longer than 24 characters
intervalEndTime Default value is 0
intervalStartTime Default value is 0
intervalValidityDate Default value is 0
intervalValidityDayOfWeek Valid values are 1-7
Default value is 0 (not set)
isDateIntervalType Default value is false
isDayOfWeekIntervalType Default value is false
isStandardIntervalType Default value is false

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Constructor Summary
AvailabilityInterval()
          Creates an empty AvailablityInterval object.
AvailabilityInterval(boolean isStandard, long startTime, long endTime)
          Creates an AvailabilityInterval object using the "STANDARD" value as a validity interval, and specifying a start and end time.
AvailabilityInterval(java.util.Date date, long startTime, long endTime)
          Creates an AvailabilityInterval object using a specific date as a validity interval, and specifying a start and end time.
AvailabilityInterval(int dayOfWeek, long startTime, long endTime)
          Creates an AvailaiblityInterval object using a day of week as a validity interval, and specifying a start and end time.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if all fields of this AvailabilityInterval object are equal to those of the given one.
 java.lang.String getDescription()
          Returns the description associated to this availability interval.
 long getIntervalEndTime()
          Returns the end time of this interval.
 long getIntervalStartTime()
          Returns the start time of this interval.
 java.util.Date getIntervalValidityDate()
          Returns the validity date of this interval.
 int getIntervalValidityDayOfWeek()
          Returns the validity day of week of this interval.
 int hashCode()
          Returns a hash code for this AvailabilityInterval object.
 boolean isDateIntervalType()
          Returns true if the value of this interval is set to a specific date.
 boolean isDayOfWeekIntervalType()
          Returns true if the value of this interval is set to a day of week.
 boolean isStandardIntervalType()
          Returns true if the value of this interval is the fixed "STANDARD" value.
 void setDescription(java.lang.String value)
          Sets the description associated to this availability interval.
 void setIntervalEndTime(long value)
          Sets the end time of this interval.
 void setIntervalStartTime(long value)
          Sets the start time of this interval.
 void setIntervalValidityDate(java.util.Date value)
          Sets the validity date of this interval, and resets the validity day of week.
 void setIntervalValidityDayOfWeek(int value)
          Sets the validity day of week of this interval, and resets the validity date.
 void setIntervalValidityToStandard()
          Sets the validity of this interval to the "STANDARD" value, and resets the validity day of week and date values.
 java.lang.String toString()
          Returns a string representation of this AvailabilityInterval object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright.

Constructor Detail

AvailabilityInterval

public AvailabilityInterval()
Creates an empty AvailablityInterval object.


AvailabilityInterval

public AvailabilityInterval(boolean isStandard,
                            long startTime,
                            long endTime)
Creates an AvailabilityInterval object using the "STANDARD" value as a validity interval, and specifying a start and end time.

Parameters:
isStandard - True to build a standard interval.
startTime - The start time for this interval.
endTime - The end time for this interval.

AvailabilityInterval

public AvailabilityInterval(int dayOfWeek,
                            long startTime,
                            long endTime)
Creates an AvailaiblityInterval object using a day of week as a validity interval, and specifying a start and end time.

Parameters:
dayOfWeek - The day of week (Sunday to Saturday) when this interval is valid. Use constants from java.util.Calendar (Calendar.MONDAY, ... Calendar.SUNDAY).
startTime - The start time for this interval.
endTime - The end time for this interval.

AvailabilityInterval

public AvailabilityInterval(java.util.Date date,
                            long startTime,
                            long endTime)
Creates an AvailabilityInterval object using a specific date as a validity interval, and specifying a start and end time.

Parameters:
date - The date when this interval is valid.
startTime - The start time for this interval.
endTime - The end time for this interval.
Method Detail

isStandardIntervalType

public boolean isStandardIntervalType()
Returns true if the value of this interval is the fixed "STANDARD" value.

Returns:
True if the value of this interval is the fixed "STANDARD" value.

isDayOfWeekIntervalType

public boolean isDayOfWeekIntervalType()
Returns true if the value of this interval is set to a day of week.

Returns:
True if the value of this interval is set to a day of week.

isDateIntervalType

public boolean isDateIntervalType()
Returns true if the value of this interval is set to a specific date.

Returns:
True if the value of this interval is set to a specific date.

getIntervalStartTime

public long getIntervalStartTime()
Returns the start time of this interval.

Returns:
The start time of this interval.

getIntervalEndTime

public long getIntervalEndTime()
Returns the end time of this interval.

Returns:
The end time of this interval.

getIntervalValidityDayOfWeek

public int getIntervalValidityDayOfWeek()
Returns the validity day of week of this interval.

Returns:
The day of week (Sunday to Saturday) when this interval is valid. Returns constants from java.util.Calendar (Calendar.MONDAY, ... Calendar.SUNDAY).

getIntervalValidityDate

public java.util.Date getIntervalValidityDate()
Returns the validity date of this interval.

Returns:
The validity date of this interval.

getDescription

public java.lang.String getDescription()
Returns the description associated to this availability interval.

Returns:
The description associated to this availability interval.

setIntervalStartTime

public void setIntervalStartTime(long value)
Sets the start time of this interval.

Parameters:
value - The start time of this interval.

setIntervalEndTime

public void setIntervalEndTime(long value)
Sets the end time of this interval.

Parameters:
value - The end time of this interval.

setIntervalValidityToStandard

public void setIntervalValidityToStandard()
Sets the validity of this interval to the "STANDARD" value, and resets the validity day of week and date values.


setIntervalValidityDayOfWeek

public void setIntervalValidityDayOfWeek(int value)
Sets the validity day of week of this interval, and resets the validity date.

Parameters:
value - The day of week (Sunday to Saturday) when this interval is valid. Use constants from java.util.Calendar (Calendar.MONDAY, ... Calendar.SUNDAY).

setIntervalValidityDate

public void setIntervalValidityDate(java.util.Date value)
Sets the validity date of this interval, and resets the validity day of week.

Parameters:
value - The validity date of this interval.

setDescription

public void setDescription(java.lang.String value)
Sets the description associated to this availability interval.

Parameters:
value - The description associated to this availability interval.

hashCode

public int hashCode()
Returns a hash code for this AvailabilityInterval object.

Returns:
The object's hash code.

equals

public boolean equals(java.lang.Object object)
Returns true if all fields of this AvailabilityInterval object are equal to those of the given one.

Parameters:
object - The object to be compared with this one.
Returns:
True if this object equals to the given one.

toString

public java.lang.String toString()
Returns a string representation of this AvailabilityInterval object.

Returns:
A text string including all AvailabilityInterval fields.


Copyright © 2005 IBM All Rights Reserved.