Inheritance diagram for org.openmobileis.database.fastobjectdb.FastObjectDB:
FastObjectDB is an Object collection based database. Object are stored in collection. Object are retrieved using Index that are attached to collections. A SODA like API is use to request collection.
FODB creation : db = FastObjectDB.open(dbdir, "testdb"); if (!FODBCollection.isCollectionExist(db, "TESTSEARCH")) { // if not created create it. db.createCollection("TESTSEARCH", TestSearchData.class); FODBUniqueIntIndexDescriptor KeyDescriptor = new FODBUniqueIntIndexDescriptor("KEY", "getKey()", 5); db.addIndex("TESTSEARCH", KeyDescriptor); FODBMultipleIntIndexDescriptor debKeyDescriptor = new FODBMultipleIntIndexDescriptor("DIZ", "getDizaine()", 5, 5); db.addIndex("TESTSEARCH", debKeyDescriptor); }
Definition at line 70 of file FastObjectDB.java.
Public Member Functions | |
String | getRootDir () |
String | getName () |
FODBCollection | getCollection (String name) |
boolean | isCollectionExist (String colName) |
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. | |
boolean | isCollectionEmpty (String colName) throws DatabaseException |
boolean | addIndex (String colName, FODBIndexDescriptor descriptor) throws BadDataFormatException, FODBException |
Add an index to a Collection of the Database. | |
boolean | add (String colName, Object obj) throws FODBException |
Add an element to a Collection of the database. | |
boolean | replace (String colName, Object obj) throws FODBException |
Replace an existing element in a Collection of the database. | |
Query | query () |
use to get base class to query FODB. | |
boolean | delete (String colName, Object obj) throws FODBException |
Delete an element of a Collection. | |
boolean | deleteWithId (String colName, Object id) throws FODBException |
Delete an object of a Collection with its id. | |
String | toString () |
FODBCollection[] | getDatabaseCollectionArray () |
TransactionManager | getTransactionManager () |
Static Public Member Functions | |
static FastObjectDB | open (String dbRootDir, String dbName) throws IOException, ClassNotFoundException, BadDataFormatException, FODBException |
The function is called to open a database. | |
Protected Member Functions | |
FastObjectDB (String dbRootDir, String dbName, FODBMainFile fmf, int action) throws BadDataFormatException, FODBException | |
The Constructor. | |
boolean | openCollection (String collectionName) throws IOException, ClassNotFoundException, BadDataFormatException, FODBException |
Open an existing collection. | |
Protected Attributes | |
CollectionManager | colManager |
Static Protected Attributes | |
static final int | ACTION_CREATE = 0 |
static final int | ACTION_OPEN = 1 |
|
The Constructor. It is private, it is called by local methods create and open
Definition at line 94 of file FastObjectDB.java. References org.openmobileis.database.fastobjectdb.FastObjectDB.ACTION_OPEN, org.openmobileis.database.fastobjectdb.FastObjectDB.colManager, org.openmobileis.database.fastobjectdb.db.store.FODBMainFile.getCollectionsList(), and org.openmobileis.database.fastobjectdb.FastObjectDB.openCollection(). Referenced by org.openmobileis.database.fastobjectdb.FastObjectDB.open(). |
|
|
Add an index to a Collection of the Database.
Definition at line 256 of file FastObjectDB.java. References org.openmobileis.database.fastobjectdb.db.FODBCollection.addIndex(), org.openmobileis.database.fastobjectdb.FastObjectDB.colManager, org.openmobileis.database.fastobjectdb.db.CollectionManager.getCollectionByName(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.getName(). Referenced by org.openmobileis.synchro.journal.JournalQueryManager.createJournalTable(), org.openmobileis.modules.crm.database.common.fodb.FODBLabelFactory.FODBLabelFactory(), org.openmobileis.modules.crm.database.common.fodb.FODBRepresentantFactory.FODBRepresentantFactory(), org.openmobileis.database.fastobjectdb.synchro.client.FODBSyncActionDBQueryManager.initDB(), org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.openDB(), and org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testDBSearch(). |
|
Add a new collection to the database. the synchro parameter is set to true.
Reimplemented in org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB. Definition at line 202 of file FastObjectDB.java. |
|
Add a new collection to the database.
Reimplemented in org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB. Definition at line 177 of file FastObjectDB.java. References org.openmobileis.database.fastobjectdb.db.store.FODBMainFile.addCollection(), org.openmobileis.database.fastobjectdb.db.CollectionManager.addCollection(), org.openmobileis.database.fastobjectdb.FastObjectDB.colManager, org.openmobileis.database.fastobjectdb.db.FODBCollection.createCollection(), and org.openmobileis.database.fastobjectdb.db.CollectionManager.getCollectionByName(). Referenced by org.openmobileis.synchro.journal.JournalQueryManager.createJournalTable(), org.openmobileis.modules.crm.database.common.fodb.FODBLabelFactory.FODBLabelFactory(), org.openmobileis.modules.crm.database.common.fodb.FODBRepresentantFactory.FODBRepresentantFactory(), org.openmobileis.database.fastobjectdb.synchro.client.FODBSyncActionDBQueryManager.initDB(), org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.openDB(), and org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testDBSearch(). |
|
Delete an element of a Collection.
Reimplemented in org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB. Definition at line 392 of file FastObjectDB.java. References org.openmobileis.database.fastobjectdb.FastObjectDB.colManager, org.openmobileis.database.fastobjectdb.db.FODBCollection.deleteSingleElement(), org.openmobileis.database.fastobjectdb.db.CollectionManager.getCollectionByName(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.getName(). Referenced by org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testDBSearch(). |
|
Delete an object of a Collection with its id.
Reimplemented in org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB. Definition at line 411 of file FastObjectDB.java. References org.openmobileis.database.fastobjectdb.FastObjectDB.colManager, org.openmobileis.database.fastobjectdb.db.FODBCollection.deleteObjectWithId(), org.openmobileis.database.fastobjectdb.db.CollectionManager.getCollectionByName(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.getName(). Referenced by org.openmobileis.modules.crm.database.common.fodb.FODBLabelFactory.deleteLabel(), and org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testDataWithArray(). |
|
The function is called to open a database. If the database does not exist, It's created.
Reimplemented in org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB. Definition at line 128 of file FastObjectDB.java. References org.openmobileis.database.fastobjectdb.FastObjectDB.ACTION_CREATE, org.openmobileis.database.fastobjectdb.FastObjectDB.ACTION_OPEN, and org.openmobileis.database.fastobjectdb.FastObjectDB.FastObjectDB(). Referenced by org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDBManager.getCurrentFODB(), org.openmobileis.database.fastobjectdb.FastObjectDBManager.getCurrentFODB(), and org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.openDB(). |
|
Open an existing collection. This is not used and should be suppressed.
Reimplemented in org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB. Definition at line 217 of file FastObjectDB.java. References org.openmobileis.database.fastobjectdb.db.CollectionManager.addCollection(), org.openmobileis.database.fastobjectdb.FastObjectDB.colManager, org.openmobileis.database.fastobjectdb.db.CollectionManager.getCollectionByName(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.openCollection(). Referenced by org.openmobileis.database.fastobjectdb.FastObjectDB.FastObjectDB(). |
|
use to get base class to query FODB. The FODB query API use the SODA API (http://http://odbms.org/soda) as a base API. From Soda specification the differences are : * only query on FODB collection : use query.constrain(MyCollectionObject.class) to declare it. * only query using index. use query.descend("IndexedFieldName") to specify an index. Exemple of use: Data class :TestSearchData class signature public final class TestSearchData implements Serializable { public int getKey(); public int getDizaine(); }
FODB creation : Exemple of query :
Definition at line 380 of file FastObjectDB.java. References org.openmobileis.database.fastobjectdb.FastObjectDB.colManager. Referenced by org.openmobileis.database.fastobjectdb.db.test.TestThreadRequest2.run(), org.openmobileis.database.fastobjectdb.db.test.TestThreadRequest.run(), org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testDataWithArray(), org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testDBSearch(), org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testFindLike(), org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testMultipleIndex(), org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testRomvedTree(), and org.openmobileis.database.fastobjectdb.db.test.TestFastObjectDB.testTree(). |
|
Replace an existing element in a Collection of the database.
Reimplemented in org.openmobileis.database.fastobjectdb.synchro.client.SynchroFastObjectDB. Definition at line 291 of file FastObjectDB.java. References org.openmobileis.database.fastobjectdb.FastObjectDB.colManager, org.openmobileis.database.fastobjectdb.db.CollectionManager.getCollectionByName(), org.openmobileis.database.fastobjectdb.db.FODBCollection.getName(), and org.openmobileis.database.fastobjectdb.db.FODBCollection.replaceElement(). Referenced by org.openmobileis.modules.crm.database.common.fodb.FODBLabelFactory.storeLabel(). |