jSyncManager

org.jSyncManager.API.Protocol.Util.StdApps
Class ToDoListAppBlock

java.lang.Object
  |
  +--org.jSyncManager.API.Protocol.Util.DLPBlock
        |
        +--org.jSyncManager.API.Protocol.Util.StdApps.ToDoListAppBlock
All Implemented Interfaces:
java.io.Serializable

public class ToDoListAppBlock
extends DLPBlock

Application information block for the Palm ToDoList database.

Version:
$Revision: 1.10 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: yaztromo $ on $Date: 2003/05/14 03:24:24 $.
See Also:
Serialized Form

Field Summary
static byte SORT_BY_CATEGORY_THEN_DUEDATE
          A value denoting that we should sort the databases records by category and then due date.
static byte SORT_BY_CATEGORY_THEN_PRIORITY
          A value denoting that we should sort the databases records by category and then priority.
static byte SORT_BY_DUEDATE_THEN_PRIORITY
          A value denoting that we should sort the databases records by due date and then priority.
static byte SORT_BY_PRIORITY_THEN_DUEDATE
          A value denoting that we should sort the databases records by priority then due date.
 
Fields inherited from class org.jSyncManager.API.Protocol.Util.DLPBlock
blockSize, data
 
Constructor Summary
ToDoListAppBlock()
          ExpenseAppBlock default constructor.
ToDoListAppBlock(DLPBlock block)
          Construct a new ToDoList app block object using the data from the specified DLPBlork object.
 
Method Summary
 int findCategoryInfo(int i)
          Find the category info block given the category ID.
protected  void generateData()
          Generate the raw data block from the existing fields.
 CategoryInfo getCategoryInfo(int i)
          Get the category info block given the category index.
 int getDirtyAppInfo()
          Get the designator for Whether the app info has changed and needs to be refreshed.
 byte getLastUniqueID()
          Get the last unique record ID.
 int getNumCategories()
          Return the number of categories.
 byte getSortOrder()
          Get the sort order for the data records.
protected  void parseFields()
          Parse the data fields.
 void setCategoryInfo(CategoryInfo categoryinfo, int i)
          Set the category info block, given the index.
 void setDirtyAppInfo(int i)
          Set the designator for whether the app info has changed and needs to be refreshed.
 void setSortOrder(byte so)
          Set the sort order of this application block.
 
Methods inherited from class org.jSyncManager.API.Protocol.Util.DLPBlock
getBlockSize, getData, setData, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SORT_BY_DUEDATE_THEN_PRIORITY

public static final byte SORT_BY_DUEDATE_THEN_PRIORITY
A value denoting that we should sort the databases records by due date and then priority.

SORT_BY_PRIORITY_THEN_DUEDATE

public static final byte SORT_BY_PRIORITY_THEN_DUEDATE
A value denoting that we should sort the databases records by priority then due date.

SORT_BY_CATEGORY_THEN_PRIORITY

public static final byte SORT_BY_CATEGORY_THEN_PRIORITY
A value denoting that we should sort the databases records by category and then priority.

SORT_BY_CATEGORY_THEN_DUEDATE

public static final byte SORT_BY_CATEGORY_THEN_DUEDATE
A value denoting that we should sort the databases records by category and then due date.
Constructor Detail

ToDoListAppBlock

public ToDoListAppBlock()
ExpenseAppBlock default constructor.

ToDoListAppBlock

public ToDoListAppBlock(DLPBlock block)
Construct a new ToDoList app block object using the data from the specified DLPBlork object.
Parameters:
block - a DLPBlock object containing an app block from the ToDo List database.
Method Detail

findCategoryInfo

public int findCategoryInfo(int i)
Find the category info block given the category ID.
Parameters:
i - the requested category ID.
Returns:
the index of requested category.

generateData

protected void generateData()
Generate the raw data block from the existing fields.
Overrides:
generateData in class DLPBlock

getCategoryInfo

public CategoryInfo getCategoryInfo(int i)
Get the category info block given the category index.
Parameters:
i - the index to the desired category info.
Returns:
the requested category info object.

getDirtyAppInfo

public int getDirtyAppInfo()
Get the designator for Whether the app info has changed and needs to be refreshed.
Returns:
the Dirty App info indicator.

getLastUniqueID

public byte getLastUniqueID()
Get the last unique record ID.
Returns:
byte Last unique record ID.

getNumCategories

public int getNumCategories()
Return the number of categories.
Returns:
the number of categories.

getSortOrder

public byte getSortOrder()
Get the sort order for the data records.
Returns:
the sort order for the data records.

parseFields

protected void parseFields()
Parse the data fields.
Overrides:
parseFields in class DLPBlock

setCategoryInfo

public void setCategoryInfo(CategoryInfo categoryinfo,
                            int i)
Set the category info block, given the index.
Parameters:
categoryinfo - the CategoryInfo object to store.
i - the index to store the CategoryInfo object to.

setDirtyAppInfo

public void setDirtyAppInfo(int i)
Set the designator for whether the app info has changed and needs to be refreshed.
Parameters:
the - new value for the dirtyAppInfo field.

setSortOrder

public void setSortOrder(byte so)
Set the sort order of this application block.
Parameters:
so - the sort order of this application block.

jSyncManager

Copyright (c) 1999 - 2003 Brad BARCLAY and others. All Rights Reserved.