org.jSyncManager.API.Protocol.Util

Class DLPFindDBResponse


public class DLPFindDBResponse
extends java.lang.Object

The DLPFindDBResponse object class. This class is used to contain the response from any of the DLP FIND_DB method calls in the JHotSync class.
See Also:
JHotSync.findDatabaseByName(byte,byte,String), JHotSync.findDatabaseByOpenHandle(byte,byte), JHotSync.findDatabaseByCreator(byte,byte,int,int)

Field Summary

static byte
GET_ATTRIBUTES_FLAG
A flag denoting that the searcher requests the retreival of attribute information.
static byte
GET_MAXIMUM_RECORD_SIZE_FLAG
A flag denating that the searcher wants the maximum record/resource size.
static byte
GET_SIZE_FLAG
A flag denoting that the searcher requests data size and record count information.
static byte
LATEST_ONLY_SEARCH_FLAG
A flag denoting that the searcher wants to search for the latest version.
static byte
NEW_SEARCH_FLAG
A flag denoting that the searcher wants to begin a new search.

Constructor Summary

DLPFindDBResponse(byte[] basicArgument, byte[] sizeArgument)
Constructs a new FindDB Response object from the two input arguments.

Method Summary

int
getApplicationBlockSize()
Retrieves the application block size for the database requested.
byte
getCardNumber()
Retrieves the card number the database was found on.
DLPDatabaseInfo
getDatabaseInfo()
Retrieves the database information object for the database requested.
int
getDatabaseLocalID()
Retrieves the database local ID for the database requested.
int
getDatabaseOpenReference()
Retrieves the open reference for the database requested.
int
getMaximumRecordSize()
Retrieves the maximum record size for the database requested.
int
getNumberRecords()
Retrieves the number of records for the database requested.
int
getSortBlockSize()
Retrieves the sort block size for the database requested.
int
getTotalBytesAvailable()
Retrieves the total bytes available for the database requested.
int
getTotalBytesUsed()
Retrieves the total bytes used for the database requested.
String
toString()

Field Details

GET_ATTRIBUTES_FLAG

public static final byte GET_ATTRIBUTES_FLAG
A flag denoting that the searcher requests the retreival of attribute information.
Field Value:
-128

GET_MAXIMUM_RECORD_SIZE_FLAG

public static final byte GET_MAXIMUM_RECORD_SIZE_FLAG
A flag denating that the searcher wants the maximum record/resource size. This flag is only usuable when calling JHotSync.findDatabaseByOpenHandle().
Field Value:
32

GET_SIZE_FLAG

public static final byte GET_SIZE_FLAG
A flag denoting that the searcher requests data size and record count information.
Field Value:
64

LATEST_ONLY_SEARCH_FLAG

public static final byte LATEST_ONLY_SEARCH_FLAG
A flag denoting that the searcher wants to search for the latest version. This flag is only for use with JHotSync.findDatabaseByCreator()s 'searchFlags' field.
Field Value:
64

NEW_SEARCH_FLAG

public static final byte NEW_SEARCH_FLAG
A flag denoting that the searcher wants to begin a new search. This flag is only for use with JHotSync.findDatabaseByCreator()s 'searchFlags' field.
Field Value:
-128

Constructor Details

DLPFindDBResponse

public DLPFindDBResponse(byte[] basicArgument,
                         byte[] sizeArgument)
            throws DLPFunctionCallException
Constructs a new FindDB Response object from the two input arguments.
Parameters:
basicArgument - the basic response argument. Must not be null!
sizeArgument - the size argument. This may be null, as it's only returned if it was requested.
Throws:
DLPFunctionCallException - if a parsing error occurs.

Method Details

getApplicationBlockSize

public int getApplicationBlockSize()
Retrieves the application block size for the database requested.
Returns:
the application block size for the database requested, or -1 if this information wasn't requested.

getCardNumber

public byte getCardNumber()
Retrieves the card number the database was found on.
Returns:
the card number the database was found on.

getDatabaseInfo

public DLPDatabaseInfo getDatabaseInfo()
Retrieves the database information object for the database requested.
Returns:
the database information object for the database requested.

getDatabaseLocalID

public int getDatabaseLocalID()
Retrieves the database local ID for the database requested.
Returns:
the database local ID for the database requested.

getDatabaseOpenReference

public int getDatabaseOpenReference()
Retrieves the open reference for the database requested.
Returns:
the open reference for the database requested.

getMaximumRecordSize

public int getMaximumRecordSize()
Retrieves the maximum record size for the database requested.
Returns:
the maximum record size for the database requested, or -1 if this information wasn't requested.

getNumberRecords

public int getNumberRecords()
Retrieves the number of records for the database requested.
Returns:
the number of records for the database requested, or -1 if this information wasn't requested.

getSortBlockSize

public int getSortBlockSize()
Retrieves the sort block size for the database requested.
Returns:
the sort block size for the database requested, or -1 if this information wasn't requested.

getTotalBytesAvailable

public int getTotalBytesAvailable()
Retrieves the total bytes available for the database requested.
Returns:
the total bytes available for the database requested, or -1 if this information wasn't requested.

getTotalBytesUsed

public int getTotalBytesUsed()
Retrieves the total bytes used for the database requested.
Returns:
the total bytes used for the database requested, or -1 if this information wasn't requested.

toString

public String toString()