org.jSyncManager.API.Protocol.Util.StdApps

Class CategoryInfo


public class CategoryInfo
extends java.lang.Object

A class to hold Category information for the standard PalmOS databases. This class is also usuable for any other databases that follow the PalmOS categury information standards.

Field Summary

static byte
MAX_CATEGORIES
The maximum number of categories allowed in a single database.
static byte
MAX_NAME_LENGTH
The maximum length, in bytes, of a categories name.

Constructor Summary

CategoryInfo()
Construct a new Category Info object using null information.
CategoryInfo(String name, byte id)
Construct a new CategoryInfo object using the supplied name and ID.

Method Summary

byte
getCategoryID()
Retreives the ID number for this category.
String
getCategoryName()
Retreives the name of this category.
boolean
getModifiedFlag()
Retreives the modified flag for this category.
void
setCategoryID(byte id)
Sets the ID number for this category.
void
setCategoryName(String name)
Sets the name of this category.
void
setModifiedFlag(boolean flag)
Sets the modified flag for this category.
String
toString()
Converts the information in this CategoryInfo object to a human-readable String.

Field Details

MAX_CATEGORIES

public static final byte MAX_CATEGORIES
The maximum number of categories allowed in a single database.
Field Value:
16

MAX_NAME_LENGTH

public static final byte MAX_NAME_LENGTH
The maximum length, in bytes, of a categories name.
Field Value:
16

Constructor Details

CategoryInfo

public CategoryInfo()
Construct a new Category Info object using null information.

CategoryInfo

public CategoryInfo(String name,
                    byte id)
Construct a new CategoryInfo object using the supplied name and ID.
Parameters:
name - the name of the category.
id - the category ID value.

Method Details

getCategoryID

public byte getCategoryID()
Retreives the ID number for this category.
Returns:
the ID number for this category.

getCategoryName

public String getCategoryName()
Retreives the name of this category.
Returns:
the name of this category.

getModifiedFlag

public boolean getModifiedFlag()
Retreives the modified flag for this category.
Returns:
true if this category has been modified, false otherwise.

setCategoryID

public void setCategoryID(byte id)
Sets the ID number for this category.
Parameters:
id - the ID number for this category.

setCategoryName

public void setCategoryName(String name)
Sets the name of this category.
Parameters:
name - the name of this category.

setModifiedFlag

public void setModifiedFlag(boolean flag)
Sets the modified flag for this category.
Parameters:
flag - set to true if this category has been modified, false otherwise.

toString

public String toString()
Converts the information in this CategoryInfo object to a human-readable String.
Returns:
this CategoryInfo as a human-readable string.