Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## superwaba.ext.palm.io.builtin
Class ToDo

    java.lang.Object
      |
      +--superwaba.ext.palm.io.builtin.ToDo

public class ToDo
extends Object
implements Storable

Provides a link to the standard Palm ToDo database. See BuiltinTest.

Field Summary
`boolean` | `completed` Has this todo been completed?
`String` | `description` A description for this todo
`Time` | `dueDate` The time this todo item is to be completed - note only date information is used
`String` | `note` A note giving extra information
`int` | `priority` The priority of this todo from 1-5

Constructor Summary
`ToDo()` Constructs a new empty todo

Method Summary
`static boolean` | `addToDo(ToDo todo)` Adds a new ToDo to the database
`byte` | `getID()` Gets a unique ID for this class.
`Storable` | `getInstance()` Returns an object of the same class as this object.
`static ToDo` | `getToDo(int i)` Gets a ToDo from the database
`static boolean` | `getToDo(int i, ToDo todo)` Gets a ToDo from the database and places it into the given ToDo.
`void` | `loadState(DataStream ds)` Load state information from the given DataStream into this object If any Storable objects need to be loaded as part of the state, their loadState() method can be called too.
`void` | `saveState(DataStream ds)` Send the state information of this object to the given object catalog using the given DataStream.
`static int` | `todoCount()` Gets the number of ToDo's in the database

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, toString, wait, wait`

Field Detail

### dueDate

    public Time dueDate

  The time this todo item is to be completed - note only date information is used

### priority

    public int priority

  The priority of this todo from 1-5

### completed

    public boolean completed

  Has this todo been completed?

### description

    public String description

  A description for this todo

### note

    public String note

  A note giving extra information

Constructor Detail

### ToDo

    public ToDo()

  Constructs a new empty todo

Method Detail

### todoCount

    public static int todoCount()

  Gets the number of ToDo's in the database
  Returns:
    the number of todos

### getToDo

    public static ToDo getToDo(int i)

  Gets a ToDo from the database
  Parameters:
    `i` - the index to get
  Returns:
    the retrieved todo

### getToDo

    public static boolean getToDo(int i,
                                  ToDo todo)

  Gets a ToDo from the database and places it into the given ToDo. Any previous data in the todo is erased.
  Parameters:
    `i` - the index to get
    `todo` - the todo object to place the todo into.

### addToDo

    public static boolean addToDo(ToDo todo)

  Adds a new ToDo to the database
  Parameters:
    `todo` - the todo to add
  Returns:
    true if successful, false otherwise

### saveState

    public void saveState(DataStream ds)

  Send the state information of this object to the given object catalog using the given DataStream. If any Storable objects need to be saved as part of the state, their saveState() method can be called too.
  Specified by:
    saveState in interface Storable

### loadState

    public void loadState(DataStream ds)

  Load state information from the given DataStream into this object If any Storable objects need to be loaded as part of the state, their loadState() method can be called too.
  Specified by:
    loadState in interface Storable

### getID

    public byte getID()

  Gets a unique ID for this class. It is up to the user to ensure that the ID of each class of Storable contained in a single ObjectCatalog is unique and the ID of each instance in a class is the same.
  Specified by:
    getID in interface Storable

### getInstance

    public Storable getInstance()

  Returns an object of the same class as this object.
  Specified by:
    getInstance in interface Storable
  Returns:
    a class. Any data is irrelevent.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD