jSyncManager

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

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

public class DateBookAppBlock
extends DLPBlock

The application block parser for the DateBook application. This class provides all of the parsing and access routines for the data contained within the application block belonging to the DateBook handheld application.

Version:
$Revision: 1.9 $
Author:
Brad BARCLAY <bbarclay@jsyncmanager.org>
Last modified by: $Author: yaztromo $ on $Date: 2003/05/13 00:00:07 $.
See Also:
Serialized Form

Fields inherited from class org.jSyncManager.API.Protocol.Util.DLPBlock
blockSize, data
 
Constructor Summary
DateBookAppBlock()
          DateBookAppBlock default constructor.
DateBookAppBlock(DLPBlock block)
          DateBookAppBlock constructor from DLPBlock.
 
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.
 byte getLastUniqueID()
          Return the last unique ID.
 int getNumCategories()
          Return the number of categories.
 byte getStartOfWeek()
          Return the byte value for the start of the week.
protected  void parseFields()
          Parse the data fields.
 void setCategoryInfo(CategoryInfo categoryinfo, int i)
          Set the category info block, given the index.
 void setStartOfWeek(byte newValue)
          Set the value for the start of the week field.
 
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
 

Constructor Detail

DateBookAppBlock

public DateBookAppBlock()
DateBookAppBlock default constructor.

DateBookAppBlock

public DateBookAppBlock(DLPBlock block)
DateBookAppBlock constructor from DLPBlock. This constructor will parse the DLPBlock data.
Parameters:
block - an application block from the Datebook database.
Method Detail

findCategoryInfo

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

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 - int index to the desired category info.
Returns:
the CategoryInfo object containing the requested category information.

getLastUniqueID

public byte getLastUniqueID()
Return the last unique ID.
Returns:
the last unique ID.

getNumCategories

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

getStartOfWeek

public byte getStartOfWeek()
Return the byte value for the start of the week.
Returns:
the byte value for the start of the week.

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 set.
i - Index in which to insert of the category info.

setStartOfWeek

public void setStartOfWeek(byte newValue)
Set the value for the start of the week field.
Parameters:
newValue - the value for the start of the week field.

jSyncManager

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