jSyncManager

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

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

public class ExpenseRecord
extends DLPRecord

Expense Record for the Palm Expense database.

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

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, attributes, BUSY, category, data, DATA_INCLUDED, DELETE_ALL_IN_CATEGORY, DELETE_ALL_RECORDS, DELETED, DIRTY, index, inputData, recordID, recordSize, SECRET, SORT_DATABASE
 
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.
 java.lang.String getCurrencyTypeAsString()
          Return the currency type as a String representation.
 java.lang.String getExpenseAmount()
          Get the expense amount value.
 float getExpenseAmountAsFloat()
          Get the expense amount as a float value.
 java.lang.String getExpenseAttendees()
          Get the String representation of the attendees.
 java.lang.String getExpenseCity()
          Get the city for this expense record.
 java.util.Calendar getExpenseDate()
          Get the date of this expense record as a Calendar type.
 java.lang.String getExpenseNote()
          Get the note associated with this expense record.
 byte getExpenseType()
          Get the expense type of this expense record.
 java.lang.String getExpenseTypeAsString()
          Get the expense type as a String representation.
 java.lang.String getExpenseVendor()
          Get the vendor associated with this expense record as a String value.
 byte getPaymentType()
          Get the payment type for this expense reocrd.
 java.lang.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(float f)
          Set the expense amount from a float value.
 void setExpenseAmount(java.lang.String s)
          Set the expense amount from a String value.
 void setExpenseAttendees(java.lang.String s)
          Set the attendees value from a String.
 void setExpenseCity(java.lang.String s)
          Set the city for this expense record.
 void setExpenseDate(java.util.Calendar calendar)
          Set the date for this expense record from a Calendar value.
 void setExpenseNote(java.lang.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(java.lang.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.
 java.lang.String toString()
          Return a human-readable String representation of this expense record.
 
Methods inherited from class org.jSyncManager.API.Protocol.Util.DLPRecord
checkAttribute, getAttributes, getCategory, getData, getIndex, getRecordID, getRecordSize, setAttributes, setCategory, setData, setIndex, setRecordID, setRecordSize
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AMEX

public static final byte AMEX
The American Express payment type.

CASH

public static final byte CASH
The Cash payment type.

CHEQUE

public static final byte CHEQUE
The Cheque payment type.

CREDIT_CARD

public static final byte CREDIT_CARD
The generic Credit Card payment type.

MASTERCARD

public static final byte MASTERCARD
The Mastercard payment type.

PREPAID

public static final byte PREPAID
The prepaid payment type.

VISA

public static final byte VISA
The Visa payment type.

UNFILED

public static final byte UNFILED
The unspecified/unfiled payment type.

AIRFARE

public static final byte AIRFARE
The Airfare expense type.

BREAKFAST

public static final byte BREAKFAST
The Breakfast expense type.

BUS

public static final byte BUS
The Bus expense type.

BUSINESS_MEALS

public static final byte BUSINESS_MEALS
The Business Meal expense type.

CAR_RENTAL

public static final byte CAR_RENTAL
The Car Rental expense type.

DINNER

public static final byte DINNER
The Dinner expense type.

ENTERTAINMENT

public static final byte ENTERTAINMENT
The Entertainment expense type.

FAX

public static final byte FAX
The fascimilie (fax) expense type.

GAS

public static final byte GAS
The Gasoline expense type.

GIFTS

public static final byte GIFTS
The Gifts expense type.

HOTEL

public static final byte HOTEL
The Hotel expense type.

INCIDENTALS

public static final byte INCIDENTALS
The Incedentals expense type.

LAUNDRY

public static final byte LAUNDRY
The Laundry expense type.

LIMO

public static final byte LIMO
The Limosine expense type.

LODGING

public static final byte LODGING
The Lodging expense type.

LUNCH

public static final byte LUNCH
The Lunch expense type.

MILEAGE

public static final byte MILEAGE
The Milage expense type.

OTHER

public static final byte OTHER
The Other expense type.

PARKING

public static final byte PARKING
The Parking expense type.

POSTAGE

public static final byte POSTAGE
The Postage expense type.

SNACK

public static final byte SNACK
The Snack expense type.

SUBWAY

public static final byte SUBWAY
The Subway expense type.

SUPPLIES

public static final byte SUPPLIES
The Supplies expense type.

TAXI

public static final byte TAXI
The Taxi expense type.

TELEPHONE

public static final byte TELEPHONE
The Telephone expense type.

TIPS

public static final byte TIPS
The Tips expense type.

TOLLS

public static final byte TOLLS
The Tolls expense type.

TRAIN

public static final byte TRAIN
The Train expense type.
Constructor Detail

ExpenseRecord

public ExpenseRecord()
ExpenseRecord default constructor.

ExpenseRecord

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

generateData

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

getCurrencyType

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

getCurrencyTypeAsString

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

getExpenseAmount

public java.lang.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 java.lang.String getExpenseAttendees()
Get the String representation of the attendees.
Returns:
the String representation of the attendees.

getExpenseCity

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

getExpenseDate

public java.util.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 java.lang.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 java.lang.String getExpenseTypeAsString()
Get the expense type as a String representation.
Returns:
the expense type as a String representation.

getExpenseVendor

public java.lang.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 java.lang.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()
Parse the data fields.
Overrides:
parseFields in class DLPRecord

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(float f)
Set the expense amount from a float value.
Parameters:
f - float value of expense amount.

setExpenseAmount

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

setExpenseAttendees

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

setExpenseCity

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

setExpenseDate

public void setExpenseDate(java.util.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(java.lang.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:
byte0 - byte value of the expense type.

setExpenseVendor

public void setExpenseVendor(java.lang.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 java.lang.String toString()
Return a human-readable String representation of this expense record.
Overrides:
toString in class DLPRecord
Returns:
a String representation of this expense record.

jSyncManager

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