|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ejdb.driver.EJDBCollection
public class EJDBCollection
Nested Class Summary | |
---|---|
static class |
EJDBCollection.Index
Index meta information |
static class |
EJDBCollection.IndexType
Index types |
static class |
EJDBCollection.Options
Collection meta information (and creation options) |
Field Summary | |
---|---|
static int |
JBIDXARR
Array token index. |
static int |
JBIDXDROP
Drop index. |
static int |
JBIDXDROPALL
Drop index for all types. |
static int |
JBIDXISTR
Case insensitive string index |
static int |
JBIDXNUM
Number index. |
static int |
JBIDXOP
Optimize index. |
static int |
JBIDXREBLD
Rebuild index. |
static int |
JBIDXSTR
String index. |
protected static int |
JBTXBEGIN
|
protected static int |
JBTXCOMMIT
|
protected static int |
JBTXROLLBACK
|
protected static int |
JBTXSTATUS
|
Method Summary | |
---|---|
void |
beginTransaction()
Begin collection transaction. |
void |
commitTransaction()
Commit collection transaction. |
EJDBQuery |
createQuery(BSONObject query)
Deprecated. |
EJDBQuery |
createQuery(BSONObject query,
BSONObject hints)
Deprecated. |
EJDBQuery |
createQuery(BSONObject query,
BSONObject[] qors)
Deprecated. |
EJDBQuery |
createQuery(BSONObject query,
BSONObject[] qors,
BSONObject hints)
Deprecated. |
EJDBQuery |
createQuery(EJDBQueryBuilder query)
Creates new EJDB Query for current collection. |
void |
drop()
Drop collection. |
void |
drop(boolean prune)
Drop collection. |
void |
dropArrayIndex(java.lang.String path)
Drop index of Array type for BSON field path. |
void |
dropIndexes(java.lang.String path)
Drops indexes of all types for BSON field path. |
void |
dropIStringIndex(java.lang.String path)
Drop case insensitive String index for BSON field path. |
void |
dropNumderIndex(java.lang.String path)
Drop index of Number type for BSON field path. |
void |
dropStringIndex(java.lang.String path)
Drop index of String type for BSON field path. |
void |
ensureArrayIndex(java.lang.String path)
Ensure index presence of Array type for BSON field path |
void |
ensureExists()
Automatically creates new collection if it does't exists with using default collection options. |
void |
ensureExists(EJDBCollection.Options opts)
Automatically creates new collection if it does't exists. |
void |
ensureIStringIndex(java.lang.String path)
Ensure case insensitive String index for BSON field path |
void |
ensureNumderIndex(java.lang.String path)
Ensure index presence of Number type for BSON field path |
void |
ensureStringIndex(java.lang.String path)
Ensure index presence of String type for BSON field path |
EJDB |
getDB()
Returns EJDB object |
java.util.Collection<EJDBCollection.Index> |
getIndexes()
Returns indexes info |
java.lang.String |
getName()
Returns collection name |
EJDBCollection.Options |
getOptions()
Returns collection options EJDBCollection.Options |
boolean |
isExists()
Returns collection exists status |
boolean |
isTransactionActive()
Get collection transaction status. |
BSONObject |
load(ObjectId oid)
Loads BSON object identified by OID from the collection. |
void |
optimizeIndexes(java.lang.String path)
Optimize indexes of all types for BSON field path |
void |
rebuildArrayIndex(java.lang.String path)
Rebuild index of Array type for BSON field path. |
void |
rebuildIStringIndex(java.lang.String path)
Rebuild case insensitive String index for BSON field path. |
void |
rebuildNumderIndex(java.lang.String path)
Rebuild index of Number type for BSON field path. |
void |
rebuildStringIndex(java.lang.String path)
Rebuild index of String type for BSON field path. |
void |
remove(ObjectId oid)
Remove BSON object from collection by OID |
void |
rollbackTransaction()
Abort collection transaction. |
ObjectId |
save(BSONObject object)
Save/update specified BSON object in the collection. |
java.util.List<ObjectId> |
save(java.util.List<BSONObject> objects)
Save/update specified BSON objects in the collection. |
protected void |
setIndex(java.lang.String path,
int flags)
|
void |
sync()
Synchronize entire collection with storage. |
java.lang.String |
toString()
|
protected boolean |
txControl(int mode)
|
void |
updateMeta()
Update collection metainformation from storage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int JBIDXDROP
public static final int JBIDXDROPALL
public static final int JBIDXOP
public static final int JBIDXREBLD
public static final int JBIDXNUM
public static final int JBIDXSTR
public static final int JBIDXARR
public static final int JBIDXISTR
protected static final int JBTXBEGIN
protected static final int JBTXCOMMIT
protected static final int JBTXROLLBACK
protected static final int JBTXSTATUS
Method Detail |
---|
public EJDB getDB()
public java.lang.String getName()
public boolean isExists()
public EJDBCollection.Options getOptions()
EJDBCollection.Options
EJDBCollection.Options
public java.util.Collection<EJDBCollection.Index> getIndexes()
public void ensureExists() throws EJDBException
EJDBException
ensureExists(org.ejdb.driver.EJDBCollection.Options)
public void ensureExists(EJDBCollection.Options opts) throws EJDBException
opts
- Collection options.
EJDBException
public void drop() throws EJDBException
EJDBException
public void drop(boolean prune) throws EJDBException
prune
- If true the collection data will erased from disk.
EJDBException
public void sync() throws EJDBException
EJDBException
public void updateMeta() throws EJDBException
EJDBException
public BSONObject load(ObjectId oid) throws EJDBException
oid
- Object identifier (OID)
EJDBException
public ObjectId save(BSONObject object) throws EJDBException
object
- BSON object to save
EJDBException
public java.util.List<ObjectId> save(java.util.List<BSONObject> objects) throws EJDBException
objects
- array of JSON objects to save
EJDBException
public void remove(ObjectId oid) throws EJDBException
oid
- OID of removed object
EJDBException
protected void setIndex(java.lang.String path, int flags) throws EJDBException
path
- BSON field pathflags
-
EJDBException
public void dropIndexes(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void optimizeIndexes(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void ensureStringIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void rebuildStringIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void dropStringIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void ensureIStringIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void rebuildIStringIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void dropIStringIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void ensureNumderIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void rebuildNumderIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void dropNumderIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void ensureArrayIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void rebuildArrayIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public void dropArrayIndex(java.lang.String path) throws EJDBException
path
- BSON field path
EJDBException
public EJDBQuery createQuery(EJDBQueryBuilder query)
@Deprecated public EJDBQuery createQuery(BSONObject query)
createQuery(org.ejdb.bson.BSONObject, org.ejdb.bson.BSONObject[], org.ejdb.bson.BSONObject)
@Deprecated public EJDBQuery createQuery(BSONObject query, BSONObject[] qors)
createQuery(org.ejdb.bson.BSONObject, org.ejdb.bson.BSONObject[], org.ejdb.bson.BSONObject)
@Deprecated public EJDBQuery createQuery(BSONObject query, BSONObject hints)
createQuery(org.ejdb.bson.BSONObject, org.ejdb.bson.BSONObject[], org.ejdb.bson.BSONObject)
@Deprecated public EJDBQuery createQuery(BSONObject query, BSONObject[] qors, BSONObject hints)
query
- Main BSON query objectqors
- Array of additional OR query objects (joined with OR predicate).hints
- BSON object with query hints.public void beginTransaction() throws EJDBException
EJDBException
public void commitTransaction() throws EJDBException
EJDBException
public void rollbackTransaction() throws EJDBException
EJDBException
public boolean isTransactionActive() throws EJDBException
EJDBException
protected boolean txControl(int mode) throws EJDBException
EJDBException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |