|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--brf.j2me.dynaworks.db.Record
|
+--brf.j2me.dynaworks.db.palm.PalmRec
|
+--brf.j2me.dynaworks.db.palm.DatebookRec
A DatebookRec represents a record in the Palm build-in datebook database.
PalmRec,
DatebookDB| Field Summary | |
private int |
descLength
|
private int |
descStart
parameters to address the description in the record.
|
private short[] |
exceptions
exception list in case FLG_EXCEPTIONS is set. |
private int |
flags
flags coded as a bit-masked integer. |
static int |
FLG_ALARM
|
static int |
FLG_CHANGED
|
static int |
FLG_DESCRIPTION
|
static int |
FLG_EXCEPTIONS
|
static int |
FLG_NOTE
|
static int |
FLG_REPEAT
|
static int |
FLG_UNK1
|
static int |
FLG_UNK2
|
private int |
noteLength
|
private int |
noteStart
parameters to address the note in the record. |
static int |
REPEAT_DAILY
|
static int |
REPEAT_MONTHLY_BY_DATE
|
static int |
REPEAT_MONTHLY_BY_DAY
|
static int |
REPEAT_NONE
repeat types. |
static int |
REPEAT_WEEKLY
|
static int |
REPEAT_YEARLY
|
private int |
repeatPos
start of repeat information. |
static int |
UNIT_DAYS
|
static int |
UNIT_HOURS
|
static int |
UNIT_MINUTES
alarm units. |
| Fields inherited from class brf.j2me.dynaworks.db.Record |
content, fields, sequence |
| Constructor Summary | |
DatebookRec()
constructor. |
|
| Method Summary | |
int |
getAlarmAdvance()
If this is an alarm entry, get the alarm advance. |
int |
getAlarmUnit()
If this is an alarm entry, get the alarm advance unit. |
Date |
getDate()
Get the date for this appointment. |
java.lang.String |
getDescription()
Get the description for this appointment. |
Time |
getEndTime()
Get the end time for this appointment. |
Date[] |
getExceptions()
If this is an repeating appointment with exceptions, get the list of exception dates in chronological order. |
java.lang.String |
getNote()
Get the note attached to this appointment. |
int |
getRepeatAt()
If this is an repeating appointment, get the code for the repetition. |
int |
getRepeatDayBase()
In case this is a repeating appointment and you have a type based on the "day of week (dow)" number, the value returned by this method addresses the base day. |
Date |
getRepeatEnd()
If this is an repeating appointment, get the end date for the repetition. |
int |
getRepeatFrequency()
If this is an repeating appointment, get the repeat frequency. |
int |
getRepeatType()
If this is an repeating appointment, get the type of repetition. |
Time |
getStartTime()
Get the start time for this appointment. |
boolean |
hasExceptions()
In case this is a repeating event, do we have any exceptions to the repeat list? |
boolean |
isAlarm()
Is this an alarm entry? |
boolean |
isChanged()
Has the entry been changed? |
boolean |
isRepeat()
Is this a repeating event? |
protected void |
update(boolean tomem)
Transfer the record content to the field variables. |
| Methods inherited from class brf.j2me.dynaworks.db.palm.PalmRec |
bitCount, intValue, shortValue |
| Methods inherited from class brf.j2me.dynaworks.db.Record |
addField, getBytes, getContent, getField, getInt, getShort, getString, readField, setBytes, setContent, setField, setInt, setShort, setString, size, writeField |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private int noteStart
These values are only valid if FLG_NOTE is set.
private int noteLength
private int descStart
private int descLength
private short[] exceptions
private int repeatPos
private int flags
public static final int FLG_UNK1
public static final int FLG_UNK2
public static final int FLG_DESCRIPTION
public static final int FLG_EXCEPTIONS
public static final int FLG_NOTE
public static final int FLG_REPEAT
public static final int FLG_ALARM
public static final int FLG_CHANGED
public static final int UNIT_MINUTES
public static final int UNIT_HOURS
public static final int UNIT_DAYS
public static final int REPEAT_NONE
public static final int REPEAT_DAILY
public static final int REPEAT_WEEKLY
public static final int REPEAT_MONTHLY_BY_DAY
public static final int REPEAT_MONTHLY_BY_DATE
public static final int REPEAT_YEARLY
| Constructor Detail |
public DatebookRec()
| Method Detail |
protected void update(boolean tomem)
Although an DatebkRecord is derived from a "normal" record, it's not using the RecordField mechanism to access its data but it stores and retreives its fields in a different way (directly from the content byte array).
update in class Recordtomem - boolean - direction of transferpublic Time getStartTime()
Timepublic Time getEndTime()
Timepublic Date getDate()
Datepublic boolean isChanged()
public boolean isAlarm()
public boolean isRepeat()
public boolean hasExceptions()
getExceptions()public java.lang.String getNote()
public java.lang.String getDescription()
public int getAlarmAdvance()
isAlarm(),
getAlarmUnit()public int getAlarmUnit()
isAlarm(),
getAlarmAdvance(),
UNIT_MINUTESpublic Date getRepeatEnd()
Date,
isRepeat()public int getRepeatFrequency()
isRepeat()public int getRepeatAt()
If the type of repetion (see method 'getRepeatType()' for further details) is REPEAT_WEEKLY, the code denotes the day of week the event is scheduled for.
If the repetition type is REPEAT_MONTHLY_BY_DAY, the code is split: the week number is "code / 7 + 1" and the day of the week is (code % 7)
In order to find the correct name of the scheduled day of the week, you have to take dayBase into account. See the method 'getRepeatDayBase()' for further details.
Date,
isRepeat(),
getRepeatDayBase(),
getRepeatType()public int getRepeatDayBase()
How does this work:
Days are numbered from '0' (Sunday) to '6' (Saturday). Assume you have a dow value of '5' and this method return '1'. So the needed number is '5' - '1' = '4' which means "Wednesday" in the table of day names.
getRepeatType(),
getRepeatAt(),
isRepeat()public Date[] getExceptions()
Date,
isRepeat(),
hasExceptions()public int getRepeatType()
REPEAT_NONE,
isRepeat()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||