|
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.DLPDatabaseSet
A class for the storage and halndling of multiple DLPDatabase objects. This class holds several databases, and allows for their manipulation, including serialization and deserialization as a set. This class does not represent any structure on the handheld. It is a utility class designed to make it easier to store and query databases.
Constructor Summary | |
---|---|
DLPDatabaseSet()
Create a new empty database set object. |
|
DLPDatabaseSet(java.lang.String filename)
Create a new database set object based on the provided serialization directory. |
Method Summary | |
---|---|
void |
addDatabase(DLPDatabase db)
Add the specified database to the set. |
int |
databaseCount()
Return the number of databases in this set. |
DLPDatabase |
getDatabase(int i)
Retreives the specified database. |
DLPDatabase |
getDatabase(java.lang.String s)
Gets the database specified by name. |
DLPDatabaseInfo |
getDatabaseInfo(int dbNum)
Gets the database info object from the specified index. |
DLPDatabaseInfo |
getDatabaseInfo(java.lang.String s)
Gets the database info object for the database with the specified name. |
boolean |
hasDatabase(java.lang.String s)
Checks to see if this set contains the specified database. |
boolean |
isModified()
Tests to see if this set has been modified. |
void |
removeDatabase(int i)
Removes the database at the specified index from this set. |
void |
removeDatabase(java.lang.String s)
Removes the database with the specified name from this set. |
void |
writeToFile(java.lang.String directory)
Write this database set to the specified directory. |
Methods inherited from class java.lang.Object |
---|
|
Constructor Detail |
public DLPDatabaseSet()
public DLPDatabaseSet(java.lang.String filename) throws java.lang.Exception
filename
- the directory contanining the serialized database information.java.lang.Exception
- thrown if any exceptions are encountered.Method Detail |
public void addDatabase(DLPDatabase db)
db
- the database to be added to the set.public int databaseCount()
public DLPDatabase getDatabase(int i)
i
- the database index to be retreived.public DLPDatabase getDatabase(java.lang.String s)
s
- the name of the database to retreive.public DLPDatabaseInfo getDatabaseInfo(int dbNum)
dbNum
- the index of the db info object to retrieve.public DLPDatabaseInfo getDatabaseInfo(java.lang.String s)
dbNum
- the name of the database to retrieve the info object for.public boolean hasDatabase(java.lang.String s)
s
- the name of the database to check for.public boolean isModified()
public void removeDatabase(int i)
i
- the index of the database to remove.public void removeDatabase(java.lang.String s)
s
- the name of the database to remove.public void writeToFile(java.lang.String directory) throws java.io.IOException
directory
- the fully qualified path of the directory to write tha databes set to.java.io.IOException
- if any exceptions occur during write.
|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |