org.jSyncManager.API.Protocol.Util

Class DLPDatabaseListGroup

Implemented Interfaces:
Enumeration

public class DLPDatabaseListGroup
extends java.lang.Object
implements Enumeration

A class to store a group of database information objects. This class holds information on a group of databases.

Field Summary

static byte
MORE_DATABASES
A flag to denote that there are more database info to be retreived from the handheld.

Constructor Summary

DLPDatabaseListGroup(groupData[] )
Construct a new database list group object based on the byte array retreived from the handheld.

Method Summary

static DLPDatabaseListGroup
bytes2DBList(data[] )
Converts a list of database information to a Database List group object.
boolean
checkFlag(byte flag)
Tests to see if the specified flag is present in this object.
byte
getActualCount()
Returns the actual count of databases.
DLPDatabaseInfo
getElement(int i)
Retreives the specified element from the database info array.
byte
getFlags()
Retreives the flags associated with this object.
char
getLastIndex()
Returns the last index number for the database info array.
boolean
hasMoreElements()
Tests to see if this enumeration has more elements.
Object
nextElement()
Retreives the next element of this enumeration.
String
toString()
Converts this objects data to a human readable String.

Field Details

MORE_DATABASES

public static final byte MORE_DATABASES
A flag to denote that there are more database info to be retreived from the handheld.
Field Value:
-128

Constructor Details

DLPDatabaseListGroup

public DLPDatabaseListGroup(groupData[] )
            throws DLPFunctionCallException
Construct a new database list group object based on the byte array retreived from the handheld.
Parameters:
Throws:
DLPFunctionCallException - thrown if a parsing error occurs.

Method Details

bytes2DBList

public static DLPDatabaseListGroup bytes2DBList(data[] )
            throws DLPFunctionCallException
Converts a list of database information to a Database List group object.
Parameters:
Throws:
DLPFunctionCallException - thrown if there are any array parsing errors.

checkFlag

public boolean checkFlag(byte flag)
Tests to see if the specified flag is present in this object.
Parameters:
flag - the flag to test.
Returns:
true if the flog is enabled in this object, false otherwise.

getActualCount

public byte getActualCount()
Returns the actual count of databases.
Returns:
the actual count of databases.

getElement

public DLPDatabaseInfo getElement(int i)
Retreives the specified element from the database info array.
Parameters:
i - the index of the item to query.
Returns:
the Database Info object from the requested index.

getFlags

public byte getFlags()
Retreives the flags associated with this object.
Returns:
the flags associated with this object.

getLastIndex

public char getLastIndex()
Returns the last index number for the database info array.
Returns:
the last index number for the database info array.

hasMoreElements

public boolean hasMoreElements()
Tests to see if this enumeration has more elements.
Returns:
true if there are more elements in this enumeration, false otherwise.

nextElement

public Object nextElement()
Retreives the next element of this enumeration. Returned objects are instances of the DLPDatabaseInfo class.
Returns:
the next element of this enumeration.

toString

public String toString()
Converts this objects data to a human readable String.
Returns:
this objects data as a human readable String.