org.jSyncManager.API.Protocol.Util.StdApps

Class ExpenseAppBlock

Implemented Interfaces:
Serializable

public class ExpenseAppBlock
extends AbstractAppBlock

Application information block for the Palm Expense database.

Field Summary

static byte
COUNTRY
A value for the COUNTRY field.
static byte
EXCHANGE_RATE
A value for the EXCHANGE RATE field.
static byte
MAX_CUSTOM_CURRENCIES
A value representing the maximum number of custom currencies.
static byte
SORT_BY_DATE
A value to denote this database is to be sorted by date.
static byte
SORT_BY_TYPE
A value to denote this database is to be sorted by type.
static byte
SYMBOL
A value for the SYMBOL field.

Fields inherited from class org.jSyncManager.API.Protocol.Util.StdApps.AbstractAppBlock

categories, lastUniqueID, numCategories, sortOrder

Fields inherited from class org.jSyncManager.API.Protocol.Util.DLPBlock

blockSize, data

Constructor Summary

ExpenseAppBlock()
ExpenseAppBlock default constructor.
ExpenseAppBlock(DLPBlock block)
Construct an ExpenseAppBlock with the given DLPBlock.

Method Summary

protected void
generateData()
Generate the raw data block from the existing fields.
String
getCurrencyInfo(byte type, int i)
Return a String representation of the currency info block.
static String
getDatabaseName()
Returns the name of the database on the Palm this app block processes.
protected void
parseFields()
Parse the data fields.
void
setCurrencyInfo(byte type, int i, String s)
Set the category info field value s for the type type and index i given.

Methods inherited from class org.jSyncManager.API.Protocol.Util.StdApps.AbstractAppBlock

addCategory, findCategoryInfo, findCategoryInfoByName, findCategoryInfoObject, getCategories, getCategoryInfo, getLastUniqueID, getNumCategories, getSortOrder, setCategoryInfo, setLastUniqueID, setSortOrder

Methods inherited from class org.jSyncManager.API.Protocol.Util.DLPBlock

generateData, getBlockSize, getData, parseFields, setData, toString

Field Details

COUNTRY

public static final byte COUNTRY
A value for the COUNTRY field.
Field Value:
10

EXCHANGE_RATE

public static final byte EXCHANGE_RATE
A value for the EXCHANGE RATE field.
Field Value:
12

MAX_CUSTOM_CURRENCIES

public static final byte MAX_CUSTOM_CURRENCIES
A value representing the maximum number of custom currencies.
Field Value:
4

SORT_BY_DATE

public static final byte SORT_BY_DATE
A value to denote this database is to be sorted by date.
Field Value:
0

SORT_BY_TYPE

public static final byte SORT_BY_TYPE
A value to denote this database is to be sorted by type.
Field Value:
1

SYMBOL

public static final byte SYMBOL
A value for the SYMBOL field.
Field Value:
11

Constructor Details

ExpenseAppBlock

public ExpenseAppBlock()
ExpenseAppBlock default constructor.

ExpenseAppBlock

public ExpenseAppBlock(DLPBlock block)
            throws ParseException
Construct an ExpenseAppBlock with the given DLPBlock.
Parameters:
block - a DLPAppBlock object containing app block information from the Expense database.

Method Details

generateData

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

getCurrencyInfo

public String getCurrencyInfo(byte type,
                              int i)
Return a String representation of the currency info block.
Parameters:
type - byte data of information type requested.
i - int index to currency info block.
Returns:
the requested currency information.

getDatabaseName

public static String getDatabaseName()
Returns the name of the database on the Palm this app block processes.
Returns:
the name of the database on the Palm this app block processes.

parseFields

protected void parseFields()
            throws ParseException
Parse the data fields.
Overrides:
parseFields in interface DLPBlock
Throws:
ParseException - if the data cannot be parsed correctly.

setCurrencyInfo

public void setCurrencyInfo(byte type,
                            int i,
                            String s)
Set the category info field value s for the type type and index i given.
Parameters:
type - byte value of the currency field type.
i - int value of the index for the requested category info block.
s - String value of the data to set.