Class RecurrenceInfo
- java.lang.Object
-
- org.apache.ofbiz.service.calendar.RecurrenceInfo
-
public class RecurrenceInfo extends java.lang.Object
Recurrence Info Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
RecurrenceInfo.RecurrenceWrapper
Wraps a RecurrenceInfo object with a TemporalExpression object.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.util.Date>
eDateList
protected java.util.List<RecurrenceRule>
eRulesList
protected GenericValue
info
static java.lang.String
module
protected java.util.List<java.util.Date>
rDateList
protected java.util.List<RecurrenceRule>
rRulesList
protected java.util.Date
startDate
-
Constructor Summary
Constructors Constructor Description RecurrenceInfo(GenericValue info)
Creates new RecurrenceInfo
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
first()
Returns the first recurrence.long
getCurrentCount()
Returns the current count of this recurrence.java.util.Iterator<java.util.Date>
getExceptionDateIterator()
Returns a sorted exception date iteratorjava.util.Iterator<RecurrenceRule>
getExceptionRuleIterator()
Returns a exception recurrence iteratorjava.lang.String
getID()
Returns the primary key for this value objectjava.util.Iterator<java.util.Date>
getRecurrenceDateIterator()
Returns a sorted recurrence date iteratorjava.util.Iterator<RecurrenceRule>
getRecurrenceRuleIterator()
Returns a recurrence rule iteratorjava.util.Date
getStartDate()
Returns the startDate Date object.long
getStartTime()
Returns the long value of the startDate.void
incrementCurrentCount()
Increments the current count of this recurrence and updates the record.void
incrementCurrentCount(boolean store)
Increments the current count of this recurrence.void
init()
Initializes the rules for this RecurrenceInfo object.boolean
isValidCurrent()
Checks the current recurrence validity at the moment.boolean
isValidCurrent(long checkTime)
Checks the current recurrence validity for checkTime.long
last()
Returns the estimated last recurrence.static RecurrenceInfo
makeInfo(Delegator delegator, long startTime, int frequency, int interval, int count)
static RecurrenceInfo
makeInfo(Delegator delegator, long startTime, int frequency, int interval, int count, long endTime)
static RecurrenceInfo
makeInfo(Delegator delegator, long startTime, int frequency, int interval, long endTime)
long
next()
Returns the next recurrence from now.long
next(long fromTime)
Returns the next recurrence from the specified time.java.lang.String
primaryKey()
void
remove()
Removes the recurrence from persistant store.static TemporalExpression
toTemporalExpression(RecurrenceInfo info)
Convert a RecurrenceInfo object to a TemporalExpression object.
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
info
protected GenericValue info
-
startDate
protected java.util.Date startDate
-
rRulesList
protected java.util.List<RecurrenceRule> rRulesList
-
eRulesList
protected java.util.List<RecurrenceRule> eRulesList
-
rDateList
protected java.util.List<java.util.Date> rDateList
-
eDateList
protected java.util.List<java.util.Date> eDateList
-
-
Constructor Detail
-
RecurrenceInfo
public RecurrenceInfo(GenericValue info) throws RecurrenceInfoException
Creates new RecurrenceInfo- Throws:
RecurrenceInfoException
-
-
Method Detail
-
init
public void init() throws RecurrenceInfoException
Initializes the rules for this RecurrenceInfo object.- Throws:
RecurrenceInfoException
-
getID
public java.lang.String getID()
Returns the primary key for this value object
-
getStartDate
public java.util.Date getStartDate()
Returns the startDate Date object.
-
getStartTime
public long getStartTime()
Returns the long value of the startDate.
-
getRecurrenceRuleIterator
public java.util.Iterator<RecurrenceRule> getRecurrenceRuleIterator()
Returns a recurrence rule iterator
-
getRecurrenceDateIterator
public java.util.Iterator<java.util.Date> getRecurrenceDateIterator()
Returns a sorted recurrence date iterator
-
getExceptionRuleIterator
public java.util.Iterator<RecurrenceRule> getExceptionRuleIterator()
Returns a exception recurrence iterator
-
getExceptionDateIterator
public java.util.Iterator<java.util.Date> getExceptionDateIterator()
Returns a sorted exception date iterator
-
getCurrentCount
public long getCurrentCount()
Returns the current count of this recurrence.
-
incrementCurrentCount
public void incrementCurrentCount() throws GenericEntityException
Increments the current count of this recurrence and updates the record.- Throws:
GenericEntityException
-
incrementCurrentCount
public void incrementCurrentCount(boolean store) throws GenericEntityException
Increments the current count of this recurrence.- Throws:
GenericEntityException
-
remove
public void remove() throws RecurrenceInfoException
Removes the recurrence from persistant store.- Throws:
RecurrenceInfoException
-
first
public long first()
Returns the first recurrence.
-
last
public long last()
Returns the estimated last recurrence.
-
next
public long next()
Returns the next recurrence from now.
-
next
public long next(long fromTime)
Returns the next recurrence from the specified time.
-
isValidCurrent
public boolean isValidCurrent()
Checks the current recurrence validity at the moment.
-
isValidCurrent
public boolean isValidCurrent(long checkTime)
Checks the current recurrence validity for checkTime.
-
primaryKey
public java.lang.String primaryKey()
-
makeInfo
public static RecurrenceInfo makeInfo(Delegator delegator, long startTime, int frequency, int interval, int count) throws RecurrenceInfoException
- Throws:
RecurrenceInfoException
-
makeInfo
public static RecurrenceInfo makeInfo(Delegator delegator, long startTime, int frequency, int interval, long endTime) throws RecurrenceInfoException
- Throws:
RecurrenceInfoException
-
makeInfo
public static RecurrenceInfo makeInfo(Delegator delegator, long startTime, int frequency, int interval, int count, long endTime) throws RecurrenceInfoException
- Throws:
RecurrenceInfoException
-
toTemporalExpression
public static TemporalExpression toTemporalExpression(RecurrenceInfo info)
Convert a RecurrenceInfo object to a TemporalExpression object.- Parameters:
info
- A RecurrenceInfo instance- Returns:
- A TemporalExpression instance
-
-