Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB Class Reference

Inheritance diagram for org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB:

org.openmobileis.database.fastobjectdb.FastObjectDB List of all members.

Detailed Description

Title: OpenMobileIS project source
Description: Synchronisable version of FastDBObject.

Author:
Philippe Delrieu
Since:
JDK 1.1
Version:
1.0.

Definition at line 63 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.


Member Function Documentation

boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.add String  colName,
Object  obj
throws FODBException
 

Add an element to a Collection of the database.

Parameters:
colName - Name of the collection
obj - object to add.
Returns:
- true if it succeded, false otherwise.
Exceptions:
FODBException 

Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.

Definition at line 284 of file SynchroFastObjectDB.java.

References org.openmobileis.database.fastobjectdb.db.FODBCollection.deleteSingleElement(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.isSynchronized().

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.

Parameters:
colName - Name of the collection
obj - object to add.
Returns:
- true if it succeded, false otherwise.
Exceptions:
FODBDataFileException 
FODBCollectionException 
FODBIndexException 
BTreeException 

Definition at line 272 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.createCollection String  collectionName,
Class  objectType
throws IOException, ClassNotFoundException, BadDataFormatException, FODBException
 

Add a new collection to the database.

the synchro parameter is set to true.

Parameters:
collectionName - name of the new colletion
objectType - type of objects stored in this collection.
Returns:
true if it succeded, false otherwise.
Exceptions:
IOException 
ClassNotFoundException 
BadDataFormatException 
FODBDataFileException 
FODBCollectionException 

Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.

Definition at line 151 of file SynchroFastObjectDB.java.

boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.createCollection FODBCollectionDescriptor  descriptor  )  throws IOException, ClassNotFoundException, BadDataFormatException, FODBException
 

Add a new collection to the database.

Parameters:
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.
Returns:
true if it succeded, false otherwise.
Exceptions:
IOException 
ClassNotFoundException 
BadDataFormatException 
FODBDataFileException 
FODBCollectionException 

Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.

Definition at line 129 of file SynchroFastObjectDB.java.

References org.openmobileis.database.fastobjectdb.synchro.client.SynchroFODBConnector.registerCollection().

boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.delete String  colName,
Object  obj
throws FODBException
 

Delete an element of a Collection.

Parameters:
colName - name of the Collection.
obj - object to delete.
Returns:
true if it succeded, false otherwise.
Exceptions:
FODBCollectionException 
FODBIndexException 

Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.

Definition at line 365 of file SynchroFastObjectDB.java.

References org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.isSynchronized().

boolean org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB.deleteWithId String  colName,
Object  id
throws FODBException
 

Delete an object of a Collection with its id.

Parameters:
colName - name of the Collection.
id - id of the object to delete.
Returns:
true if it succeded, false otherwise.
Exceptions:
FODBCollectionException 
FODBIndexException 

Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.

Definition at line 411 of file SynchroFastObjectDB.java.

References org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), 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.

Parameters:
colName - name of the Collection.
id - id of the object to delete.
Returns:
true if it succeded, false otherwise.
Exceptions:
FODBCollectionException 
FODBIndexException 

Definition at line 399 of file SynchroFastObjectDB.java.

Referenced by org.openmobileis.database.fastobjectdb.synchro.client.FODBImportQueryManager.deleteObject(), and org.openmobileis.synchro.sync4j.client.Sync4jFODBSyncSource.removeSyncItem().

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.

Parameters:
colName - name of the Collection
id - object id.
Returns:
the object with specified id or null if not found.

Definition at line 237 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.isObjectInCollection String  colName,
Object  obj
throws DatabaseException
 

return true if the specified object from the specified collection is in the collection.

return false otherwise

Parameters:
colName - name of the Collection
object - object to look for.
Returns:
true if the object is found.

Definition at line 207 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().

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.

Parameters:
dbRootDir - database directory
dbName - database name
Returns:
the database object that has been created.
Exceptions:
IOException 
ClassNotFoundException 
BadDataFormatException 
FODBDataFileException 
FODBCollectionException 

Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.

Definition at line 91 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.openCollection String  collectionName  )  throws IOException, ClassNotFoundException, BadDataFormatException, FODBException [protected]
 

Open an existing collection.

This is not used and should be suppressed.

Parameters:
collectionName - name of the collection
Returns:
true if it succeded, false otherwise.
Exceptions:
IOException 
ClassNotFoundException 
BadDataFormatException 
FODBDataFileException 
FODBCollectionException 

Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.

Definition at line 167 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.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.

Parameters:
collectionName 
listener 

Definition at line 195 of file SynchroFastObjectDB.java.

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.

Parameters:
collectionName 
listener 

Definition at line 184 of file SynchroFastObjectDB.java.

References org.openmobileis.database.fastobjectdb.synchro.client.SynchroFODBConnector.registerSynchroFODBReturnListener().

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.

Parameters:
colName - Name of the Collection
obj - Object to replace.
Returns:
true if it succeded, false otherwise.
Exceptions:
FODBException 

Reimplemented from org.openmobileis.database.fastobjectdb.FastObjectDB.

Definition at line 331 of file SynchroFastObjectDB.java.

References org.openmobileis.database.fastobjectdb.db.FODBCollection.deleteSingleElement(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getCollectionIdIndex(), 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.

Parameters:
colName - Name of the Collection
obj - Object to replace.
Returns:
true if it succeded, false otherwise.
Exceptions:
FODBException 

Definition at line 319 of file SynchroFastObjectDB.java.

Referenced by org.openmobileis.database.fastobjectdb.synchro.client.FODBImportQueryManager.addObject(), and org.openmobileis.synchro.sync4j.client.Sync4jFODBSyncSource.setSyncItem().


The documentation for this class was generated from the following file:
Generated on Wed Dec 14 21:05:38 2005 for OpenMobileIS by  doxygen 1.4.4