javax.ejb
Class ScheduleExpression

java.lang.Object
  extended by javax.ejb.ScheduleExpression
All Implemented Interfaces:
java.io.Serializable

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

A calendar-based timeout expression for an enterprise bean timer.

Author:
Reza Rahman
See Also:
Serialized Form

Constructor Summary
ScheduleExpression()
          Constructs a new scheduled expression with defaults populated.
 
Method Summary
 ScheduleExpression dayOfMonth(int dayOfMonth)
          Sets the day of month expression.
 ScheduleExpression dayOfMonth(java.lang.String dayOfMonth)
          Sets the day of month expression.
 ScheduleExpression dayOfWeek(int dayOfWeek)
          Sets the day of week expression.
 ScheduleExpression dayOfWeek(java.lang.String dayOfWeek)
          Sets the day of week expression.
 ScheduleExpression end(java.util.Date end)
          Sets the end date for this schedule.
 java.lang.String getDayOfMonth()
          Gets the day of month expression.
 java.lang.String getDayOfWeek()
          Gets the day of week expression.
 java.util.Date getEnd()
          Gets the end date for the schedule.
 java.lang.String getHour()
          Gets the hour expression.
 java.lang.String getMinute()
          Gets the minutes expression.
 java.lang.String getMonth()
          Gets the month expression.
 java.lang.String getSecond()
          Gets the seconds expression.
 java.util.Date getStart()
          Gets the start date for the schedule.
 java.lang.String getTimezone()
          Gets the time zone for the schedule.
 java.lang.String getYear()
          Gets the year expression.
 ScheduleExpression hour(int hour)
          Sets the hour expression.
 ScheduleExpression hour(java.lang.String hour)
          Sets the hour expression.
 ScheduleExpression minute(int minute)
          Sets the minute expression.
 ScheduleExpression minute(java.lang.String minute)
          Sets the minute expression.
 ScheduleExpression month(int month)
          Sets the month expression.
 ScheduleExpression month(java.lang.String month)
          Sets the month expression.
 ScheduleExpression second(int second)
          Sets the second expression.
 ScheduleExpression second(java.lang.String second)
          Sets the second expression.
 ScheduleExpression start(java.util.Date start)
          Sets the start date for this schedule.
 ScheduleExpression timezone(java.lang.String timezoneId)
          Sets the time zone for this schedule.
 java.lang.String toString()
           
 ScheduleExpression year(int year)
          Sets the year expression.
 ScheduleExpression year(java.lang.String year)
          Sets the year expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScheduleExpression

public ScheduleExpression()
Constructs a new scheduled expression with defaults populated. The defaults are the same as they are for the @Schedule annotation.

Method Detail

getSecond

public java.lang.String getSecond()
Gets the seconds expression.

Returns:
Seconds expression.

getMinute

public java.lang.String getMinute()
Gets the minutes expression.

Returns:
Minutes expression.

getHour

public java.lang.String getHour()
Gets the hour expression.

Returns:
Hour expression.

getDayOfWeek

public java.lang.String getDayOfWeek()
Gets the day of week expression.

Returns:
Day of week expression.

getDayOfMonth

public java.lang.String getDayOfMonth()
Gets the day of month expression.

Returns:
Day of month expression.

getMonth

public java.lang.String getMonth()
Gets the month expression.

Returns:
Month expression.

getYear

public java.lang.String getYear()
Gets the year expression.

Returns:
Year expression.

getTimezone

public java.lang.String getTimezone()
Gets the time zone for the schedule.

Returns:
Time zone for the schedule.

getStart

public java.util.Date getStart()
Gets the start date for the schedule.

Returns:
Start date for the schedule.

getEnd

public java.util.Date getEnd()
Gets the end date for the schedule.

Returns:
End date for the schedule.

second

public ScheduleExpression second(java.lang.String second)
Sets the second expression.

Parameters:
second - Second expression.
Returns:
Reference to the current object (this) for method chaining.

second

public ScheduleExpression second(int second)
Sets the second expression.

Parameters:
second - Second expression.
Returns:
Reference to the current object (this) for method chaining.

minute

public ScheduleExpression minute(java.lang.String minute)
Sets the minute expression.

Parameters:
minute - Minute expression.
Returns:
Reference to the current object (this) for method chaining.

minute

public ScheduleExpression minute(int minute)
Sets the minute expression.

Parameters:
minute - Minute expression.
Returns:
Reference to the current object (this) for method chaining.

hour

public ScheduleExpression hour(java.lang.String hour)
Sets the hour expression.

Parameters:
hour - Hour expression.
Returns:
Reference to the current object (this) for method chaining.

hour

public ScheduleExpression hour(int hour)
Sets the hour expression.

Parameters:
hour - Hour expression.
Returns:
Reference to the current object (this) for method chaining.

dayOfWeek

public ScheduleExpression dayOfWeek(java.lang.String dayOfWeek)
Sets the day of week expression.

Parameters:
dayOfWeek - Day of week expression.
Returns:
Reference to the current object (this) for method chaining.

dayOfWeek

public ScheduleExpression dayOfWeek(int dayOfWeek)
Sets the day of week expression.

Parameters:
dayOfWeek - Day of week expression.
Returns:
Reference to the current object (this) for method chaining.

dayOfMonth

public ScheduleExpression dayOfMonth(java.lang.String dayOfMonth)
Sets the day of month expression.

Parameters:
dayOfMonth - Day of month expression.
Returns:
Reference to the current object (this) for method chaining.

dayOfMonth

public ScheduleExpression dayOfMonth(int dayOfMonth)
Sets the day of month expression.

Parameters:
dayOfMonth - Day of month expression.
Returns:
Reference to the current object (this) for method chaining.

month

public ScheduleExpression month(java.lang.String month)
Sets the month expression.

Parameters:
month - Month expression.
Returns:
Reference to the current object (this) for method chaining.

month

public ScheduleExpression month(int month)
Sets the month expression.

Parameters:
month - Month expression.
Returns:
Reference to the current object (this) for method chaining.

year

public ScheduleExpression year(java.lang.String year)
Sets the year expression.

Parameters:
year - Year expression.
Returns:
Reference to the current object (this) for method chaining.

year

public ScheduleExpression year(int year)
Sets the year expression.

Parameters:
year - Year expression.
Returns:
Reference to the current object (this) for method chaining.

timezone

public ScheduleExpression timezone(java.lang.String timezoneId)
Sets the time zone for this schedule.

Parameters:
timezoneId - Time zone ID of this schedule.
Returns:
Reference to the current object (this) for method chaining.

start

public ScheduleExpression start(java.util.Date start)
Sets the start date for this schedule.

Parameters:
start - Start date of this schedule.
Returns:
Reference to the current object (this) for method chaining.

end

public ScheduleExpression end(java.util.Date end)
Sets the end date for this schedule.

Parameters:
end - End date of this schedule.
Returns:
Reference to the current object (this) for method chaining.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object