|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openmobileis.database.fastobjectdb.db.FODBCollection
FODBCollection is the class that represents each collection. It offers simple functions that are mainly called by FastObjectDB. The unique index that index collection object ids, must be added first.
Method Summary | |
boolean |
addElement(java.lang.Object obj)
Add an Element to the collection. |
boolean |
addIndex(FODBIndexDescriptor descriptor)
Add an index. |
static FODBCollection |
createCollection(FastObjectDB db,
java.lang.String colName,
java.lang.Class objType)
Function that is called to create a new collection. |
boolean |
deleteObjectWithId(java.lang.Object id)
Delete an object of the Collection with its ID. |
boolean |
deleteSingleElement(java.lang.Object obj)
Delete an element of the Collection. |
BackwardUniqueIndexIterator |
getBackwardIndexIterator(java.lang.String memberName)
|
FODBCypher |
getCollectionCypher()
return the collection cypher if any, null otherwise. |
FODBUniqueIndex |
getCollectionIdIndex()
|
FODBIndex[] |
getCollectionIndexList()
|
java.lang.Class |
getCollectionObjectClass()
|
FastObjectDB |
getDatabase()
|
java.lang.Object |
getElementAtPos(long pos)
Returns the element at position 'pos' |
ForwardUniqueIndexIterator |
getForwardIndexIterator(java.lang.String memberName)
|
FODBIndex |
getIndexByMember(java.lang.String member)
|
java.lang.String |
getName()
|
protected java.lang.Object |
getNodeAtPos(long pos)
Returns the node at position 'pos' |
boolean |
isSynchronized()
|
static FODBCollection |
openCollection(FastObjectDB db,
java.lang.String colName)
Function that is called to open an existing collection. |
boolean |
replaceElement(java.lang.Object obj)
Replace an existing element of the Collection. |
void |
setCollectionCypher(FODBCypher cypher)
Init collection encryption with the specified cypher. |
void |
setSynchronized(boolean sync)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.Class getCollectionObjectClass()
public FODBIndex getIndexByMember(java.lang.String member)
public boolean isSynchronized()
public void setSynchronized(boolean sync) throws FODBException
public static FODBCollection createCollection(FastObjectDB db, java.lang.String colName, java.lang.Class objType) throws FODBException
db
- - FastObjectDB instance that refers to it.colName
- - Collection name.objType
- - Type of Objects stored in the collection.FODBException
- public static FODBCollection openCollection(FastObjectDB db, java.lang.String colName) throws FODBException
db
- - FastObjectDB instance that refers to it.colName
- - Collection name.FODBException
- public java.lang.String getName()
public void setCollectionCypher(FODBCypher cypher) throws FODBException
cypher
- : cypher to be use to encrypt data.FODBException
- public FODBCypher getCollectionCypher() throws FODBException
public boolean addIndex(FODBIndexDescriptor descriptor) throws FODBException
descriptor
- - index descriptor.FODBException
- public FODBIndex[] getCollectionIndexList()
public FODBUniqueIndex getCollectionIdIndex() throws FODBException
public boolean addElement(java.lang.Object obj) throws FODBException
obj
- - object to add.FODBException
- public boolean replaceElement(java.lang.Object obj) throws FODBException
obj
- - object that will replace an existing one.FODBException
- public boolean deleteSingleElement(java.lang.Object obj) throws FODBException
obj
- - object to Delete.FODBException
- public boolean deleteObjectWithId(java.lang.Object id) throws FODBException
id
- - id of object to Delete.FODBException
- public ForwardUniqueIndexIterator getForwardIndexIterator(java.lang.String memberName) throws FODBException
public BackwardUniqueIndexIterator getBackwardIndexIterator(java.lang.String memberName) throws FODBException
public java.lang.Object getElementAtPos(long pos) throws FODBException
pos
- - postion of the element to retrieve.FODBException
- protected java.lang.Object getNodeAtPos(long pos) throws FODBException
pos
- - postion of the element to retrieve.FODBException
- public FastObjectDB getDatabase()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |