org.jSyncManager.API.Protocol.Util.StdApps

Class ExpenseRecord

Implemented Interfaces:
Serializable

public class ExpenseRecord
extends DLPRecord

Expense Record for the Palm Expense database.

Field Summary

static byte
AIRFARE
The Airfare expense type.
static byte
AMEX
The American Express payment type.
static byte
BREAKFAST
The Breakfast expense type.
static byte
BUS
The Bus expense type.
static byte
BUSINESS_MEALS
The Business Meal expense type.
static byte
CAR_RENTAL
The Car Rental expense type.
static byte
CASH
The Cash payment type.
static byte
CHEQUE
The Cheque payment type.
static byte
CREDIT_CARD
The generic Credit Card payment type.
static byte
DINNER
The Dinner expense type.
static byte
ENTERTAINMENT
The Entertainment expense type.
static byte
FAX
The fascimilie (fax) expense type.
static byte
GAS
The Gasoline expense type.
static byte
GIFTS
The Gifts expense type.
static byte
HOTEL
The Hotel expense type.
static byte
INCIDENTALS
The Incedentals expense type.
static byte
LAUNDRY
The Laundry expense type.
static byte
LIMO
The Limosine expense type.
static byte
LODGING
The Lodging expense type.
static byte
LUNCH
The Lunch expense type.
static byte
MASTERCARD
The Mastercard payment type.
static byte
MILEAGE
The Milage expense type.
static byte
OTHER
The Other expense type.
static byte
PARKING
The Parking expense type.
static byte
POSTAGE
The Postage expense type.
static byte
PREPAID
The prepaid payment type.
static byte
SNACK
The Snack expense type.
static byte
SUBWAY
The Subway expense type.
static byte
SUPPLIES
The Supplies expense type.
static byte
TAXI
The Taxi expense type.
static byte
TELEPHONE
The Telephone expense type.
static byte
TIPS
The Tips expense type.
static byte
TOLLS
The Tolls expense type.
static byte
TRAIN
The Train expense type.
static byte
UNFILED
The unspecified/unfiled payment type.
static byte
VISA
The Visa payment type.

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

ARCHIVED, BUSY, DATA_INCLUDED, DELETED, DELETE_ALL_IN_CATEGORY, DELETE_ALL_RECORDS, DIRTY, SECRET, SORT_DATABASE, attributes, category, data, index, inputData, recordID, recordSize

Constructor Summary

ExpenseRecord()
ExpenseRecord default constructor.
ExpenseRecord(DLPRecord record)
Construct a new Expense Record using the specified DLPRecord read form the expense database.

Method Summary

protected void
generateData()
Generate the raw data block from the existing fields.
byte
getCurrencyType()
Return the currency type byte data value.
String
getCurrencyTypeAsString()
Return the currency type as a String representation.
String
getExpenseAmount()
Get the expense amount value.
float
getExpenseAmountAsFloat()
Get the expense amount as a float value.
String
getExpenseAttendees()
Get the String representation of the attendees.
String
getExpenseCity()
Get the city for this expense record.
Calendar
getExpenseDate()
Get the date of this expense record as a Calendar type.
String
getExpenseNote()
Get the note associated with this expense record.
byte
getExpenseType()
Get the expense type of this expense record.
String
getExpenseTypeAsString()
Get the expense type as a String representation.
String
getExpenseVendor()
Get the vendor associated with this expense record as a String value.
byte
getPaymentType()
Get the payment type for this expense reocrd.
String
getPaymentTypeAsString()
Get the payment type of this expense record as a String representation.
protected void
parseFields()
Parse the data fields.
void
setCurrencyType(byte type)
Set the currency type for this record as a byte value.
void
setExpenseAmount(String s)
Set the expense amount from a String value.
void
setExpenseAmount(float f)
Set the expense amount from a float value.
void
setExpenseAttendees(String s)
Set the attendees value from a String.
void
setExpenseCity(String s)
Set the city for this expense record.
void
setExpenseDate(Calendar calendar)
Set the date for this expense record from a Calendar value.
void
setExpenseNote(String s)
Set the note value for this expense record.
void
setExpenseType(byte type)
Set the type of this expense record from a byte value.
void
setExpenseVendor(String s)
Set the vendor for this expense record.
void
setPaymentType(byte type)
Set the payment type of this expense record from a byte value.
String
toString()
Return a human-readable String representation of this expense record.

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

addAttribute, checkAttribute, clearAttribute, generateData, getAttributes, getCategory, getData, getIndex, getRecordID, getRecordSize, parseFields, setAttributes, setCategory, setData, setIndex, setRecordID, setRecordSize, toString

Field Details

AIRFARE

public static final byte AIRFARE
The Airfare expense type.
Field Value:
0

AMEX

public static final byte AMEX
The American Express payment type.
Field Value:
0

BREAKFAST

public static final byte BREAKFAST
The Breakfast expense type.
Field Value:
1

BUS

public static final byte BUS
The Bus expense type.
Field Value:
2

BUSINESS_MEALS

public static final byte BUSINESS_MEALS
The Business Meal expense type.
Field Value:
3

CAR_RENTAL

public static final byte CAR_RENTAL
The Car Rental expense type.
Field Value:
4

CASH

public static final byte CASH
The Cash payment type.
Field Value:
1

CHEQUE

public static final byte CHEQUE
The Cheque payment type.
Field Value:
2

CREDIT_CARD

public static final byte CREDIT_CARD
The generic Credit Card payment type.
Field Value:
3

DINNER

public static final byte DINNER
The Dinner expense type.
Field Value:
5

ENTERTAINMENT

public static final byte ENTERTAINMENT
The Entertainment expense type.
Field Value:
6

FAX

public static final byte FAX
The fascimilie (fax) expense type.
Field Value:
7

GAS

public static final byte GAS
The Gasoline expense type.
Field Value:
8

GIFTS

public static final byte GIFTS
The Gifts expense type.
Field Value:
9

HOTEL

public static final byte HOTEL
The Hotel expense type.
Field Value:
10

INCIDENTALS

public static final byte INCIDENTALS
The Incedentals expense type.
Field Value:
11

LAUNDRY

public static final byte LAUNDRY
The Laundry expense type.
Field Value:
12

LIMO

public static final byte LIMO
The Limosine expense type.
Field Value:
13

LODGING

public static final byte LODGING
The Lodging expense type.
Field Value:
14

LUNCH

public static final byte LUNCH
The Lunch expense type.
Field Value:
15

MASTERCARD

public static final byte MASTERCARD
The Mastercard payment type.
Field Value:
4

MILEAGE

public static final byte MILEAGE
The Milage expense type.
Field Value:
16

OTHER

public static final byte OTHER
The Other expense type.
Field Value:
17

PARKING

public static final byte PARKING
The Parking expense type.
Field Value:
18

POSTAGE

public static final byte POSTAGE
The Postage expense type.
Field Value:
19

PREPAID

public static final byte PREPAID
The prepaid payment type.
Field Value:
5

SNACK

public static final byte SNACK
The Snack expense type.
Field Value:
20

SUBWAY

public static final byte SUBWAY
The Subway expense type.
Field Value:
21

SUPPLIES

public static final byte SUPPLIES
The Supplies expense type.
Field Value:
22

TAXI

public static final byte TAXI
The Taxi expense type.
Field Value:
23

TELEPHONE

public static final byte TELEPHONE
The Telephone expense type.
Field Value:
24

TIPS

public static final byte TIPS
The Tips expense type.
Field Value:
25

TOLLS

public static final byte TOLLS
The Tolls expense type.
Field Value:
26

TRAIN

public static final byte TRAIN
The Train expense type.
Field Value:
27

UNFILED

public static final byte UNFILED
The unspecified/unfiled payment type.
Field Value:
7

VISA

public static final byte VISA
The Visa payment type.
Field Value:
6

Constructor Details

ExpenseRecord

public ExpenseRecord()
ExpenseRecord default constructor.

ExpenseRecord

public ExpenseRecord(DLPRecord record)
            throws ParseException
Construct a new Expense Record using the specified DLPRecord read form the expense database.
Parameters:
record - the DLPRecord containing an expense record.

Method Details

generateData

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

getCurrencyType

public byte getCurrencyType()
Return the currency type byte data value.
Returns:
the currency type used by this record.

getCurrencyTypeAsString

public String getCurrencyTypeAsString()
Return the currency type as a String representation.
Returns:
the currency type as a String representation.

getExpenseAmount

public String getExpenseAmount()
Get the expense amount value.
Returns:
expense amount value.

getExpenseAmountAsFloat

public float getExpenseAmountAsFloat()
Get the expense amount as a float value.
Returns:
the expense amount as a float value.

getExpenseAttendees

public String getExpenseAttendees()
Get the String representation of the attendees.
Returns:
the String representation of the attendees.

getExpenseCity

public String getExpenseCity()
Get the city for this expense record.
Returns:
the city for this expense record.

getExpenseDate

public Calendar getExpenseDate()
Get the date of this expense record as a Calendar type.
Returns:
the date of this expense record as a Calendar type.

getExpenseNote

public String getExpenseNote()
Get the note associated with this expense record.
Returns:
the note associated with this expense record.

getExpenseType

public byte getExpenseType()
Get the expense type of this expense record.
Returns:
the expense type of this expense record.

getExpenseTypeAsString

public String getExpenseTypeAsString()
Get the expense type as a String representation.
Returns:
the expense type as a String representation.

getExpenseVendor

public String getExpenseVendor()
Get the vendor associated with this expense record as a String value.
Returns:
the vendor associated with this expense record as a String value.

getPaymentType

public byte getPaymentType()
Get the payment type for this expense reocrd.
Returns:
the payment type for this expense reocrd.

getPaymentTypeAsString

public String getPaymentTypeAsString()
Get the payment type of this expense record as a String representation.
Returns:
the payment type of this expense record as a String representation.

parseFields

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

setCurrencyType

public void setCurrencyType(byte type)
Set the currency type for this record as a byte value.
Parameters:
type - byte value for the currency type.

setExpenseAmount

public void setExpenseAmount(String s)
Set the expense amount from a String value.
Parameters:
s - String value representation of expense amount.

setExpenseAmount

public void setExpenseAmount(float f)
Set the expense amount from a float value.
Parameters:
f - float value of expense amount.

setExpenseAttendees

public void setExpenseAttendees(String s)
Set the attendees value from a String.
Parameters:
s - String value of attendees.

setExpenseCity

public void setExpenseCity(String s)
Set the city for this expense record.
Parameters:
s - the city for this expense record.

setExpenseDate

public void setExpenseDate(Calendar calendar)
Set the date for this expense record from a Calendar value.
Parameters:
calendar - the date for this expense record from a Calendar value.

setExpenseNote

public void setExpenseNote(String s)
Set the note value for this expense record.
Parameters:
s - the note value for this expense record.

setExpenseType

public void setExpenseType(byte type)
Set the type of this expense record from a byte value.
Parameters:
type - byte value of the expense type.

setExpenseVendor

public void setExpenseVendor(String s)
Set the vendor for this expense record.
Parameters:
s - String value of vendor.

setPaymentType

public void setPaymentType(byte type)
Set the payment type of this expense record from a byte value.
Parameters:
type - byte value of payment type.

toString

public String toString()
Return a human-readable String representation of this expense record.
Overrides:
toString in interface DLPRecord
Returns:
a String representation of this expense record.