jSyncManager

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

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

public class AddressAppBlock
extends DLPBlock

AddAppBlock record abstraction/parser class. This class reprenests a Palm Address Application database record.

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

Field Summary
static byte AUSTRALIA
          Country code for Australia.
static byte AUSTRIA
          Country code for Austria.
static byte BELGIUM
          Country code for Belgium.
static byte BRAZIL
          Country code for Brazil.
static byte CANADA
          Country code for Canada.
static char CATEGORY1
          The flag for Category #1.
static char CATEGORY10
          The flag for Category #10.
static char CATEGORY11
          The flag for Category #11.
static char CATEGORY12
          The flag for Category #12.
static char CATEGORY13
          The flag for Category #13.
static char CATEGORY14
          The flag for Category #14.
static char CATEGORY15
          The flag for Category #15.
static char CATEGORY16
          The flag for Category #16.
static char CATEGORY2
          The flag for Category #2.
static char CATEGORY3
          The flag for Category #3.
static char CATEGORY4
          The flag for Category #4.
static char CATEGORY5
          The flag for Category #5.
static char CATEGORY6
          The flag for Category #6.
static char CATEGORY7
          The flag for Category #7.
static char CATEGORY8
          The flag for Category #8.
static char CATEGORY9
          The flag for Category #9.
static byte DENMARK
          Country code for Denmark.
static byte FINLAND
          Country code for Finland.
static byte FRANCE
          Country code for France.
static byte GERMANY
          Country code for Germany.
static byte HONGKONG
          Country code for Hong Kong.
static byte ICELAND
          Country code for Iceland.
static byte IRELAND
          Country code for Ireland.
static byte ITALY
          Country code for Italy.
static byte JAPAN
          Country code for Japan.
static byte LUXEMBOURG
          Country code for Luxembourg.
static byte MEXICO
          Country code for Mexico.
static byte NETHERLANDS
          Country code for the Netherlands.
static byte NEWZEALAND
          Country code for New Zealand.
static byte NORWAY
          Country code for Norway.
static int NUM_FIELD_LABELS
          The total number of possible field labels.
static byte SPAIN
          Country code for Spain.
static byte SWEDEN
          Country code for Sweden.
static byte SWITZERLAND
          Country code for Switzerland.
static byte UNITEDKINGDOM
          Country code for the United Kingdom.
static byte UNITEDSTATES
          Country code for the United States of America.
 
Fields inherited from class org.jSyncManager.API.Protocol.Util.DLPBlock
blockSize, data
 
Constructor Summary
AddressAppBlock()
          AddressAppBlock default constructor.
AddressAppBlock(DLPBlock block)
          AddressAppBlock constructor from DLPBlock.
 
Method Summary
protected  void generateData()
          Generate the data block from the existing data.
 CategoryInfo getCategoryInfo(int i)
          Return the CategoryInfo block for the selected category index.
 byte getCountryCode()
          Return the country code for this object.
 java.lang.String getFieldLabel(int i)
          Return the specified Field Labels as a String variable.
 java.lang.String getFieldLabelByBitmap(int i)
          Return the Fields Label by the offset value, derived from the bitmap.
 byte getLastUniqueID()
          Return the last unique record ID.
 int getNumCategories()
          Return the number of categories.
 boolean getViewByCompany()
          Return a boolean value denoting whether to view by company.
 boolean isFieldModified(int category)
          Return a boolean value denoting whether a field is modified by given category.
protected  void parseFields()
          Parse the byte array data block to the AddressAppBlock data fields.
 void setCategoryInfo(CategoryInfo info, int i)
          Set the category info block, given the bitmap to the category.
 void setCountryCode(byte newValue)
          Set the country code.
 void setFieldLabel(java.lang.String label, int i)
          Set the Field Label by index.
 void setLastUniqueID(byte newValue)
          Set the last unique ID value.
 void setViewByCompany(boolean newValue)
          Set whether to view by company.
 
Methods inherited from class org.jSyncManager.API.Protocol.Util.DLPBlock
getBlockSize, getData, setData, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUSTRALIA

public static final byte AUSTRALIA
Country code for Australia.

AUSTRIA

public static final byte AUSTRIA
Country code for Austria.

BELGIUM

public static final byte BELGIUM
Country code for Belgium.

BRAZIL

public static final byte BRAZIL
Country code for Brazil.

CANADA

public static final byte CANADA
Country code for Canada.

DENMARK

public static final byte DENMARK
Country code for Denmark.

FINLAND

public static final byte FINLAND
Country code for Finland.

FRANCE

public static final byte FRANCE
Country code for France.

GERMANY

public static final byte GERMANY
Country code for Germany.

HONGKONG

public static final byte HONGKONG
Country code for Hong Kong.

ICELAND

public static final byte ICELAND
Country code for Iceland.

IRELAND

public static final byte IRELAND
Country code for Ireland.

ITALY

public static final byte ITALY
Country code for Italy.

JAPAN

public static final byte JAPAN
Country code for Japan.

LUXEMBOURG

public static final byte LUXEMBOURG
Country code for Luxembourg.

MEXICO

public static final byte MEXICO
Country code for Mexico.

NETHERLANDS

public static final byte NETHERLANDS
Country code for the Netherlands.

NEWZEALAND

public static final byte NEWZEALAND
Country code for New Zealand.

NORWAY

public static final byte NORWAY
Country code for Norway.

SPAIN

public static final byte SPAIN
Country code for Spain.

SWEDEN

public static final byte SWEDEN
Country code for Sweden.

SWITZERLAND

public static final byte SWITZERLAND
Country code for Switzerland.

UNITEDKINGDOM

public static final byte UNITEDKINGDOM
Country code for the United Kingdom.

UNITEDSTATES

public static final byte UNITEDSTATES
Country code for the United States of America.

CATEGORY1

public static final char CATEGORY1
The flag for Category #1.

CATEGORY2

public static final char CATEGORY2
The flag for Category #2.

CATEGORY3

public static final char CATEGORY3
The flag for Category #3.

CATEGORY4

public static final char CATEGORY4
The flag for Category #4.

CATEGORY5

public static final char CATEGORY5
The flag for Category #5.

CATEGORY6

public static final char CATEGORY6
The flag for Category #6.

CATEGORY7

public static final char CATEGORY7
The flag for Category #7.

CATEGORY8

public static final char CATEGORY8
The flag for Category #8.

CATEGORY9

public static final char CATEGORY9
The flag for Category #9.

CATEGORY10

public static final char CATEGORY10
The flag for Category #10.

CATEGORY11

public static final char CATEGORY11
The flag for Category #11.

CATEGORY12

public static final char CATEGORY12
The flag for Category #12.

CATEGORY13

public static final char CATEGORY13
The flag for Category #13.

CATEGORY14

public static final char CATEGORY14
The flag for Category #14.

CATEGORY15

public static final char CATEGORY15
The flag for Category #15.

CATEGORY16

public static final char CATEGORY16
The flag for Category #16.

NUM_FIELD_LABELS

public static final int NUM_FIELD_LABELS
The total number of possible field labels.
Constructor Detail

AddressAppBlock

public AddressAppBlock()
AddressAppBlock default constructor.

AddressAppBlock

public AddressAppBlock(DLPBlock block)
AddressAppBlock constructor from DLPBlock. This constructor will parse the DLPBlock data.
Parameters:
block - the DLPBlock object containing the Address databases app block.
Method Detail

generateData

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

getCategoryInfo

public CategoryInfo getCategoryInfo(int i)
Return the CategoryInfo block for the selected category index.
Parameters:
i - the index of the category info to retreive.
Returns:
the CategoryInfo block for the selected category index.

getCountryCode

public byte getCountryCode()
Return the country code for this object.
Returns:
the country code for this object.

getFieldLabel

public java.lang.String getFieldLabel(int i)
Return the specified Field Labels as a String variable.
Parameters:
i - the index of the field label to retreive.
Returns:
the specified Field Labels as a String variable.

getFieldLabelByBitmap

public java.lang.String getFieldLabelByBitmap(int i)
Return the Fields Label by the offset value, derived from the bitmap.
Parameters:
i - the bitmap of the field label to retreive.
Returns:
the Fields Label requested.

getLastUniqueID

public byte getLastUniqueID()
Return the last unique record ID.
Returns:
the last unique record ID.

getNumCategories

public int getNumCategories()
Return the number of categories.
Returns:
the number of categories.

getViewByCompany

public boolean getViewByCompany()
Return a boolean value denoting whether to view by company.
Returns:
true if view-by-company is selected, false otherwise.

isFieldModified

public boolean isFieldModified(int category)
Return a boolean value denoting whether a field is modified by given category.
Parameters:
category - the category to test.
Returns:
true if the field label has been modified, false otherwise.

parseFields

protected void parseFields()
Parse the byte array data block to the AddressAppBlock data fields.
Overrides:
parseFields in class DLPBlock

setCategoryInfo

public void setCategoryInfo(CategoryInfo info,
                            int i)
Set the category info block, given the bitmap to the category.
Parameters:
info - the CategoryInfo object to set.
i - the index to write the category info to.

setCountryCode

public void setCountryCode(byte newValue)
Set the country code.
Parameters:
newValue - the new country code to use.

setFieldLabel

public void setFieldLabel(java.lang.String label,
                          int i)
Set the Field Label by index.
Parameters:
label - the label to use.
i - the index to write the label to.

setLastUniqueID

public void setLastUniqueID(byte newValue)
Set the last unique ID value.
Parameters:
newValue - the last unique ID value.

setViewByCompany

public void setViewByCompany(boolean newValue)
Set whether to view by company.
Parameters:
newValue - true if you want to view the records by company, false if by name.

jSyncManager

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