|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jSyncManager.API.Protocol.Util.DLPDatabase
A class representing an entire handheld database. This class holds a single database. Note that this construct is not directly readable or writable to or from a handheld device -- instead it's a container class that can hold all of the other elements that can be read or written to the handheld device.
Field Summary | |
---|---|
static char |
APP_INFO_DIRTY
A flag to denote that the app info block is dirty (modified). |
static char |
BACKUP_FLAG
A flag to denote that this database should be backed up at sync time. |
static char |
COPY_PREVENTION
A flag to denote that this database should employ copy protection. |
static char |
DB_OPEN
A flag to denote that the database is open. |
static byte |
EXCLUSIVE_MODE
A flag to denote that the database should be opened in exclusive mode. |
static char |
INSTALL_NEWER
A flag to denote that it's okay to write a newer version of this database with a different name if this database is currently open. |
static byte |
RAM_BASED_DB_FLAG
A flag to denate that this is a RAM-based database. |
static byte |
READ_MODE
A flag to denote that the database should be opened in read mode. |
static byte |
READ_MULTI_FLAG
A flag to denote that during a call to read the database list, multiple entries are allowed in the response. |
static char |
READ_ONLY
A flag to denote that this database is flagged as read-only. |
static char |
RESET_AFTER_INSTALL
A flag to denote that the handheld should be reset after the installation of this database. |
static char |
RESOURCE_DATABASE
A flag to denote that this is a resource (application) database. |
static byte |
ROM_BASED_DB_FLAG
A flag to denate that this is a ROM-based database. |
static byte |
SHOW_SECRET
A flag to denote that secret records should be shown. |
static byte |
WRITE_MODE
A flag to denote that the database should be opened in write mode. |
Constructor Summary | |
---|---|
DLPDatabase(boolean flag,
DLPDatabaseInfo dlpdatabaseinfo)
DLPDatabase constructor, with a flag denoting whether this is a resource DB or not, and the DLPDatabaseInfo block. |
Method Summary | |
---|---|
void |
addElement(DLPRecord dlprecord)
Add an element in the form of a DLPRecord to the database. |
void |
addElement(DLPResource dlpresource)
Add an element in the form of a DLPResource to the database. |
void |
exportDatabase(java.lang.String s)
Export this database to a File. |
DLPBlock |
getApplicationBlock()
Get this databases application block. |
DLPDatabaseInfo |
getDatabaseInfo()
Get this database information object. |
java.lang.Object |
getElement(int i)
Get an element from the database by index. |
int |
getElements()
Get the number of elements in the database. |
DLPBlock |
getSortBlock()
Get the sort block for this database. |
(package private) java.lang.String |
getUniqueDBID()
Get the unique DB ID for this database. |
static DLPDatabase |
importFromFile(java.io.File filename)
Import a database from the specified File object. |
static DLPDatabase |
importFromFile(java.lang.String filename)
Import a database from the specified file. |
static DLPDatabase |
importFromURL(java.net.URL url)
Import a database from the specified URL. |
boolean |
isResourceDB()
Return boolean denoting whether this is a Resource DB or not. |
void |
setApplicationBlock(DLPBlock dlpblock)
Set the ApplicationBlock for this database. |
void |
setSortBlock(DLPBlock dlpblock)
Set the Sort Block for this database. |
Methods inherited from class java.lang.Object |
---|
|
Field Detail |
public static final byte RAM_BASED_DB_FLAG
public static final byte ROM_BASED_DB_FLAG
public static final byte READ_MULTI_FLAG
public static final char RESOURCE_DATABASE
public static final char READ_ONLY
public static final char APP_INFO_DIRTY
public static final char BACKUP_FLAG
public static final char INSTALL_NEWER
public static final char RESET_AFTER_INSTALL
public static final char COPY_PREVENTION
public static final char DB_OPEN
public static final byte READ_MODE
public static final byte WRITE_MODE
public static final byte EXCLUSIVE_MODE
public static final byte SHOW_SECRET
Constructor Detail |
public DLPDatabase(boolean flag, DLPDatabaseInfo dlpdatabaseinfo)
flag
- true if this is a resource (application) database, false otherwise.dlpdatabaseinfo
- DLPDatabaseInfo block.Method Detail |
public void addElement(DLPRecord dlprecord)
dlprecord
- DLPRecord to be inserted.public void addElement(DLPResource dlpresource)
dlpresource
- DLPResource to be inserted.public void exportDatabase(java.lang.String s)
s
- path and name of file to export to.public DLPBlock getApplicationBlock()
public DLPDatabaseInfo getDatabaseInfo()
public java.lang.Object getElement(int i)
i
- index of the element requested.public int getElements()
public DLPBlock getSortBlock()
java.lang.String getUniqueDBID()
public static DLPDatabase importFromFile(java.lang.String filename) throws DatabaseFormatException
filename
- filename to import from.DatabaseFormatException
- if the file isn't a serialized database.public static DLPDatabase importFromFile(java.io.File filename) throws DatabaseFormatException
filename
- the File object to import from.DatabaseFormatException
- thrown if the file doesn't contain a parseable database.public static DLPDatabase importFromURL(java.net.URL url) throws DatabaseFormatException
url
- the URL object to read from.DatabaseFormatException
- thrown if the received data is not a parseable database.public boolean isResourceDB()
public void setApplicationBlock(DLPBlock dlpblock)
dlpblock
- the ApplicationBlock for this database.public void setSortBlock(DLPBlock dlpblock)
dlpblock
- the Sort Block for this database.
|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |