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. See EJB specification for the full timer expression syntax.

Each expression attribute has two overloaded setter methods, one that takes a String and one that takes an int. The int version is merely a convenience method for setting the attribute in the common case that the value is a simple integer.

E.g.

scheduleExpression.second(10)
is semantically equivalent to
scheduleExpression.second("10")

None of the ScheduleExpression methods are required to be called. The defaults are :

{ second , minute , hour } : "0"

{ dayOfMonth, month, dayOfWeek, year } : "*"

timezone : default JVM time zone

startDate : no start date

endDate : no end date

See Also:
Serialized Form

Constructor Summary
ScheduleExpression()
           
 
Method Summary
 ScheduleExpression dayOfMonth(int d)
           
 ScheduleExpression dayOfMonth(java.lang.String d)
           
 ScheduleExpression dayOfWeek(int d)
           
 ScheduleExpression dayOfWeek(java.lang.String d)
           
 ScheduleExpression end(java.util.Date e)
           
 java.lang.String getDayOfMonth()
           
 java.lang.String getDayOfWeek()
           
 java.util.Date getEnd()
           
 java.lang.String getHour()
           
 java.lang.String getMinute()
           
 java.lang.String getMonth()
           
 java.lang.String getSecond()
           
 java.util.Date getStart()
           
 java.lang.String getTimezone()
           
 java.lang.String getYear()
           
 ScheduleExpression hour(int h)
           
 ScheduleExpression hour(java.lang.String h)
           
 ScheduleExpression minute(int m)
           
 ScheduleExpression minute(java.lang.String m)
           
 ScheduleExpression month(int m)
           
 ScheduleExpression month(java.lang.String m)
           
 ScheduleExpression second(int s)
           
 ScheduleExpression second(java.lang.String s)
           
 ScheduleExpression start(java.util.Date s)
           
 ScheduleExpression timezone(java.lang.String timezoneID)
           
 java.lang.String toString()
           
 ScheduleExpression year(int y)
           
 ScheduleExpression year(java.lang.String y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScheduleExpression

public ScheduleExpression()
Method Detail

second

public ScheduleExpression second(java.lang.String s)

second

public ScheduleExpression second(int s)

getSecond

public java.lang.String getSecond()

minute

public ScheduleExpression minute(java.lang.String m)

minute

public ScheduleExpression minute(int m)

getMinute

public java.lang.String getMinute()

hour

public ScheduleExpression hour(java.lang.String h)

hour

public ScheduleExpression hour(int h)

getHour

public java.lang.String getHour()

dayOfMonth

public ScheduleExpression dayOfMonth(java.lang.String d)

dayOfMonth

public ScheduleExpression dayOfMonth(int d)

getDayOfMonth

public java.lang.String getDayOfMonth()

month

public ScheduleExpression month(java.lang.String m)

month

public ScheduleExpression month(int m)

getMonth

public java.lang.String getMonth()

dayOfWeek

public ScheduleExpression dayOfWeek(java.lang.String d)

dayOfWeek

public ScheduleExpression dayOfWeek(int d)

getDayOfWeek

public java.lang.String getDayOfWeek()

year

public ScheduleExpression year(java.lang.String y)

year

public ScheduleExpression year(int y)

getYear

public java.lang.String getYear()

timezone

public ScheduleExpression timezone(java.lang.String timezoneID)

getTimezone

public java.lang.String getTimezone()

start

public ScheduleExpression start(java.util.Date s)

getStart

public java.util.Date getStart()

end

public ScheduleExpression end(java.util.Date e)

getEnd

public java.util.Date getEnd()

toString

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


Submit a bug or feature

Copyright © 2009, 2010, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 4-June-2010 04:34