brf.j2me.dynaworks.db.palm
Class TodoRec

java.lang.Object
  |
  +--brf.j2me.dynaworks.db.Record
        |
        +--brf.j2me.dynaworks.db.palm.PalmRec
              |
              +--brf.j2me.dynaworks.db.palm.TodoRec
All Implemented Interfaces:
Dataset

public class TodoRec
extends PalmRec

A TodoRec refers to an entry in the Palm build-in ToDo list database.

Version:
1.0
Author:
Bernd R. Fix
See Also:
TodoDB, PalmRec

Field Summary
private  int descLength
           
private  int descStart
          parameters to address the description in the record.
private  byte flags
          flags coded as a bit-masked byte.
private  int noteLength
           
private  int noteStart
          parameters to address the note in the record.
 
Fields inherited from class brf.j2me.dynaworks.db.Record
content, fields, sequence
 
Constructor Summary
TodoRec()
          constructor.
 
Method Summary
 java.lang.String getDescription()
          Return the descriptive text for the task.
 Date getDueDate()
          Get the date the task is scheduled for.
 java.lang.String getNote()
          Get any attached note for this task.
 int getPriority()
          Get the priority (1..5) for this task.
 boolean isDone()
          Is the task already done?
 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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

noteStart

private int noteStart
parameters to address the note in the record.

These values are only valid if FLG_NOTE is set.


noteLength

private int noteLength

descStart

private int descStart
parameters to address the description in the record.

These values are only valid if FLG_DESCRIPTION is set.


descLength

private int descLength

flags

private byte flags
flags coded as a bit-masked byte.
Constructor Detail

TodoRec

public TodoRec()
constructor.

Method Detail

update

public void update(boolean tomem)
Transfer the record content to the field variables.

Although an MemoRecord 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).

Overrides:
update in class Record
Parameters:
tomem - boolean - direction of transfer

getDueDate

public Date getDueDate()
Get the date the task is scheduled for.

Returns:
brf.pilot.util.Date - due date for task.
See Also:
Date

getDescription

public java.lang.String getDescription()
Return the descriptive text for the task.

Returns:
String - task description.

getNote

public java.lang.String getNote()
Get any attached note for this task.

Returns:
String - note attached to task (or empty string).

getPriority

public int getPriority()
Get the priority (1..5) for this task.

Returns:
int - priority for this task.

isDone

public boolean isDone()
Is the task already done?

Returns:
boolean - task done?