Inheritance diagram for org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB:
Definition at line 68 of file SynchroFastObjectDB.java.
Public Member Functions | |
boolean | createCollection (FODBCollectionDescriptor descriptor) throws IOException, ClassNotFoundException, BadDataFormatException, FODBException |
Add a new collection to the database. | |
boolean | createCollection (String collectionName, Class objectType) throws IOException, ClassNotFoundException, BadDataFormatException, FODBException |
Add a new collection to the database. | |
void | registerSynchroFODBReturnListener (String collectionName, SynchroFODBReturnListener listener) |
Register a synchroListener call during synchronisation processus. | |
void | registerJournalLogRenderer (String collectionName, String journalinfo) |
Register a a simpe journal log renderer to the synchro journal manager for the specified collection. | |
boolean | isObjectInCollection (String colName, Object obj) throws DatabaseException |
return true if the specified object from the specified collection is in the collection. | |
Object | getObjectFromCollectionWithId (String colName, String id) throws DatabaseException |
return the object from the specified collection with specified id. | |
boolean | addFODB (String colName, Object obj) throws FODBException |
Add an element to a Collection of the database without saving modification data needed to synchronize synchronizable collection. | |
boolean | add (String colName, Object obj) throws FODBException |
Add an element to a Collection of the database. | |
boolean | replaceFODB (String colName, Object obj) throws FODBException |
Replace an existing element in a Collection of the database without saving modification data needed to synchronize synchronizable collection. | |
boolean | replace (String colName, Object obj) throws FODBException |
Replace an existing element in a Collection of the database. | |
boolean | delete (String colName, Object obj) throws FODBException |
Delete an element of a Collection. | |
boolean | deleteWithIdFODB (String colName, Object id) throws FODBException |
Delete an object of a Collection with its id Doas not generate syncho action. | |
boolean | deleteWithId (String colName, Object id) throws FODBException |
Delete an object of a Collection with its id. | |
Static Public Member Functions | |
static FastObjectDB | open (String dbRootDir, String dbName) throws IOException, ClassNotFoundException, BadDataFormatException, FODBException |
The function is called to open a database. | |
static void | registerSynchroFODBConnector (SynchroFODBConnector connector) |
Protected Member Functions | |
boolean | openCollection (String collectionName) throws IOException, ClassNotFoundException, BadDataFormatException, FODBException |
Open an existing collection. |
static FastObjectDB org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.open | ( | String | dbRootDir, | |
String | dbName | |||
) | throws IOException, ClassNotFoundException, BadDataFormatException, FODBException [static] |
The function is called to open a database.
If the database does not exist, It's created.
dbRootDir | - database directory | |
dbName | - database name |
IOException | ||
ClassNotFoundException | ||
BadDataFormatException | ||
FODBDataFileException | ||
FODBCollectionException |
Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.
Definition at line 96 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.FastObjectDB.ACTION_CREATE, org.openmobileis.database.fastobjectdb.FastObjectDB.ACTION_OPEN, org.openmobileis.database.fastobjectdb.db.store.FODBMainFile.createDbFile(), and org.openmobileis.database.fastobjectdb.db.store.FODBMainFile.openDbFile().
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.createCollection | ( | FODBCollectionDescriptor | descriptor | ) | throws IOException, ClassNotFoundException, BadDataFormatException, FODBException |
Add a new collection to the database.
collectionName | - name of the new colletion | |
objectType | - type of objects stored in this collection. | |
synchro | - if set to false the collection wont be synchronized when FODB is in synchro mode. |
IOException | ||
ClassNotFoundException | ||
BadDataFormatException | ||
FODBDataFileException | ||
FODBCollectionException |
Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.
Definition at line 134 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.synchro.client.SynchroFODBConnector.registerCollection().
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.createCollection | ( | String | collectionName, | |
Class | objectType | |||
) | throws IOException, ClassNotFoundException, BadDataFormatException, FODBException |
Add a new collection to the database.
the synchro parameter is set to true.
collectionName | - name of the new colletion | |
objectType | - type of objects stored in this collection. |
IOException | ||
ClassNotFoundException | ||
BadDataFormatException | ||
FODBDataFileException | ||
FODBCollectionException |
Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.
Definition at line 158 of file SynchroFastObjectDB.java.
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.openCollection | ( | String | collectionName | ) | throws IOException, ClassNotFoundException, BadDataFormatException, FODBException [protected] |
Open an existing collection.
This is not used and should be suppressed.
collectionName | - name of the collection |
IOException | ||
ClassNotFoundException | ||
BadDataFormatException | ||
FODBDataFileException | ||
FODBCollectionException |
Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.
Definition at line 174 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.db.FODBCollection.isSynchronized(), and org.openmobileis.database.fastobjectdb.synchro.client.SynchroFODBConnector.registerCollection().
void org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.registerSynchroFODBReturnListener | ( | String | collectionName, | |
SynchroFODBReturnListener | listener | |||
) |
Register a synchroListener call during synchronisation processus.
The listener is not persistent, so it must be registered at each application start.
collectionName | ||
listener |
Definition at line 197 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.synchro.client.SynchroFODBConnector.registerSynchroFODBReturnListener().
void org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.registerJournalLogRenderer | ( | String | collectionName, | |
String | journalinfo | |||
) |
Register a a simpe journal log renderer to the synchro journal manager for the specified collection.
journalinfo message will be displayed in the journal to identify the collection. The listener is not persistent, so it must be registered at each application start.
collectionName | ||
nodeObject |
Definition at line 208 of file SynchroFastObjectDB.java.
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.isObjectInCollection | ( | String | colName, | |
Object | obj | |||
) | throws DatabaseException |
return true if the specified object from the specified collection is in the collection.
return false otherwise
colName | - name of the Collection | |
object | - object to look for. |
Definition at line 220 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.FastObjectDB.colManager, org.openmobileis.database.fastobjectdb.db.CollectionManager.getCollectionByName(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), org.openmobileis.database.fastobjectdb.db.index.FODBUniqueIndex.getKeyPosition(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.getName().
Referenced by org.openmobileis.database.fastobjectdb.synchro.client.FODBImportQueryManager.addObject(), and org.openmobileis.synchro.sync4j.client.Sync4jFODBSyncSource.setSyncItem().
Object org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.getObjectFromCollectionWithId | ( | String | colName, | |
String | id | |||
) | throws DatabaseException |
return the object from the specified collection with specified id.
id is the string format of the id object. If id is an int for exemple. The specified parameter is converted to an int.
colName | - name of the Collection | |
id | - object id. |
Definition at line 250 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.FastObjectDB.colManager, org.odbms.Query.constrain(), org.odbms.Query.descend(), org.odbms.Query.execute(), org.openmobileis.database.fastobjectdb.db.CollectionManager.getCollectionByName(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionObjectClass(), org.odbms.ObjectSet.hasNext(), and org.odbms.ObjectSet.next().
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.addFODB | ( | String | colName, | |
Object | obj | |||
) | throws FODBException |
Add an element to a Collection of the database without saving modification data needed to synchronize synchronizable collection.
Use by synchro to add data that come from the server.
colName | - Name of the collection | |
obj | - object to add. |
FODBDataFileException | ||
FODBCollectionException | ||
FODBIndexException | ||
BTreeException |
Definition at line 291 of file SynchroFastObjectDB.java.
Referenced by org.openmobileis.database.fastobjectdb.synchro.client.FODBImportQueryManager.addObject(), and org.openmobileis.synchro.sync4j.client.Sync4jFODBSyncSource.setSyncItem().
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.add | ( | String | colName, | |
Object | obj | |||
) | throws FODBException |
Add an element to a Collection of the database.
colName | - Name of the collection | |
obj | - object to add. |
FODBException |
Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.
Definition at line 303 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.db.FODBCollection.deleteSingleElement(), org.openmobileis.database.fastobjectdb.db.transaction.TransactionManager.enterTransaction(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), org.openmobileis.database.fastobjectdb.db.index.FODBIndex.getIndexDescriptor(), org.openmobileis.database.fastobjectdb.db.index.FODBStringIndex.getKeySensitive(), org.openmobileis.database.fastobjectdb.FastObjectDB.getTransactionManager(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.isSynchronized().
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.replaceFODB | ( | String | colName, | |
Object | obj | |||
) | throws FODBException |
Replace an existing element in a Collection of the database without saving modification data needed to synchronize synchronizable collection.
Use by synchro to replace data that come from the server.
colName | - Name of the Collection | |
obj | - Object to replace. |
FODBException |
Definition at line 345 of file SynchroFastObjectDB.java.
Referenced by org.openmobileis.database.fastobjectdb.synchro.client.FODBImportQueryManager.addObject(), and org.openmobileis.synchro.sync4j.client.Sync4jFODBSyncSource.setSyncItem().
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.replace | ( | String | colName, | |
Object | obj | |||
) | throws FODBException |
Replace an existing element in a Collection of the database.
colName | - Name of the Collection | |
obj | - Object to replace. |
FODBException |
Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.
Definition at line 357 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.db.FODBCollection.deleteSingleElement(), org.openmobileis.database.fastobjectdb.db.transaction.TransactionManager.enterTransaction(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), org.openmobileis.database.fastobjectdb.db.index.FODBIndex.getIndexDescriptor(), org.openmobileis.database.fastobjectdb.db.index.FODBIndex.getKey(), org.openmobileis.database.fastobjectdb.FastObjectDB.getTransactionManager(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.isSynchronized().
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.delete | ( | String | colName, | |
Object | obj | |||
) | throws FODBException |
Delete an element of a Collection.
colName | - name of the Collection. | |
obj | - object to delete. |
FODBCollectionException | ||
FODBIndexException |
Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.
Definition at line 398 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.db.transaction.TransactionManager.enterTransaction(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), org.openmobileis.database.fastobjectdb.FastObjectDB.getTransactionManager(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.isSynchronized().
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.deleteWithIdFODB | ( | String | colName, | |
Object | id | |||
) | throws FODBException |
Delete an object of a Collection with its id Doas not generate syncho action.
colName | - name of the Collection. | |
id | - id of the object to delete. |
FODBCollectionException | ||
FODBIndexException |
Definition at line 438 of file SynchroFastObjectDB.java.
Referenced by org.openmobileis.database.fastobjectdb.synchro.client.FODBImportQueryManager.deleteObject(), and org.openmobileis.synchro.sync4j.client.Sync4jFODBSyncSource.removeSyncItem().
boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.deleteWithId | ( | String | colName, | |
Object | id | |||
) | throws FODBException |
Delete an object of a Collection with its id.
colName | - name of the Collection. | |
id | - id of the object to delete. |
FODBCollectionException | ||
FODBIndexException |
Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.
Definition at line 450 of file SynchroFastObjectDB.java.
References org.openmobileis.database.fastobjectdb.db.transaction.TransactionManager.enterTransaction(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), org.openmobileis.database.fastobjectdb.FastObjectDB.getTransactionManager(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.isSynchronized().