superwaba.ext.palm.io.builtin
Class Address

java.lang.Object
  |
  +--superwaba.ext.palm.io.builtin.Address

public class Address
extends java.lang.Object
implements Storable

Provides a link to the standard Palm Address database.


Field Summary
 java.lang.String address
          the street name, eg "12 Long St"
 java.lang.String city
          the city of the address, eg "Perth"
 java.lang.String company
          the company the person works for, eg "TechCo"
 java.lang.String country
          the country of the address, eg "Australia"
 java.lang.String[] custom
          the custom fields
 int displayPhone
          The index of phone (1-7) to display in the main list
 java.lang.String firstName
          the first name of the person, eg "Rob"
 java.lang.String name
          the surname of the person, eg "Nielsen"
 java.lang.String note
          a note giving extra information
 java.lang.String[] phone
          the phone numbers
 int[] phoneLabelID
          the type of each phone number to be displayed (0-Work,1-Home,etc)
 java.lang.String state
          the state of the the address, eg "WA"
 java.lang.String title
          the title of the person, eg "Mr"
 java.lang.String zipCode
          the zip code or postcode of the address, eg "6009"
 
Constructor Summary
Address()
          Constructs a new empty address
 
Method Summary
static boolean addAddress(Address address)
          Adds a new Address to the database
static int addressCount()
          Gets the number of Addresss in the database
static boolean changeAddress(int i, Address address)
          Changes the Address at the given index
static boolean delAddress(int i)
          Deletes an Address entry in the database
static Address getAddress(int i)
          Gets a Address from the database
static boolean getAddress(int i, Address address)
          Gets a Address from the database and places it into the given Address.
 byte getID()
          Gets a unique ID for this class.
 Storable getInstance()
          Returns an object of the same class as this object.
 void loadState(DataStream ds)
          Load state information from the given DataStream into this object If any Storable objects need to be loaded as part of the state, their loadState() method can be called too.
 void saveState(DataStream ds)
          Send the state information of this object to the given object catalog using the given DataStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

displayPhone

public int displayPhone
The index of phone (1-7) to display in the main list

phoneLabelID

public int[] phoneLabelID
the type of each phone number to be displayed (0-Work,1-Home,etc)

phone

public java.lang.String[] phone
the phone numbers

custom

public java.lang.String[] custom
the custom fields

note

public java.lang.String note
a note giving extra information

title

public java.lang.String title
the title of the person, eg "Mr"

country

public java.lang.String country
the country of the address, eg "Australia"

zipCode

public java.lang.String zipCode
the zip code or postcode of the address, eg "6009"

state

public java.lang.String state
the state of the the address, eg "WA"

city

public java.lang.String city
the city of the address, eg "Perth"

address

public java.lang.String address
the street name, eg "12 Long St"

company

public java.lang.String company
the company the person works for, eg "TechCo"

firstName

public java.lang.String firstName
the first name of the person, eg "Rob"

name

public java.lang.String name
the surname of the person, eg "Nielsen"
Constructor Detail

Address

public Address()
Constructs a new empty address
Method Detail

addressCount

public static int addressCount()
Gets the number of Addresss in the database
Returns:
the number of addresss

getAddress

public static Address getAddress(int i)
Gets a Address from the database
Parameters:
i - the index to get
Returns:
the retrieved address

getAddress

public static boolean getAddress(int i,
                                 Address address)
Gets a Address from the database and places it into the given Address. Any previous data in the address is erased.
Parameters:
i - the index to get
address - the address object to place the address into.

addAddress

public static boolean addAddress(Address address)
Adds a new Address to the database
Parameters:
address - the address to add
Returns:
true if successful, false otherwise

delAddress

public static boolean delAddress(int i)
Deletes an Address entry in the database
Parameters:
i - the index to delete
Returns:
true if successful, false otherwise

changeAddress

public static boolean changeAddress(int i,
                                    Address address)
Changes the Address at the given index
Parameters:
i - the index to change
address - an Addressobject with the values you want the Address at i to have
Returns:
true if successful, false otherwise

saveState

public void saveState(DataStream ds)
Send the state information of this object to the given object catalog using the given DataStream. If any Storable objects need to be saved as part of the state, their saveState() method can be called too.
Specified by:
saveState in interface Storable

loadState

public void loadState(DataStream ds)
Load state information from the given DataStream into this object If any Storable objects need to be loaded as part of the state, their loadState() method can be called too.
Specified by:
loadState in interface Storable

getID

public byte getID()
Gets a unique ID for this class. It is up to the user to ensure that the ID of each class of Storable contained in a single ObjectCatalog is unique and the ID of each instance in a class is the same.
Specified by:
getID in interface Storable

getInstance

public Storable getInstance()
Returns an object of the same class as this object.
Specified by:
getInstance in interface Storable
Returns:
a class. Any data is irrelevent.