AliasDatabaseCollection
AbstractDatabaseCollection
, MongoDBDatabaseCollection
, SQLDatabaseCollection
public interface DatabaseCollection
Modifier and Type | Method | Description |
---|---|---|
CollectionField |
addField(String name) |
Adds a new field to this
DatabaseCollection with the name name . |
AliasDatabaseCollection |
as(String alias) |
Gets this
DatabaseCollection with an alias name. |
void |
clear() |
Clear all data in this
DatabaseCollection . |
CompletableFuture<Void> |
clearAsync() |
Clear all data in this
DatabaseCollection async. |
DeleteQuery |
delete() |
Returns a
DeleteQuery to delete data in this DatabaseCollection . |
void |
drop() |
Drops this
DatabaseCollection . |
CompletableFuture<Void> |
dropAsync() |
Drops this
DatabaseCollection async. |
FindQuery |
find() |
Returns a
FindQuery to specify conditions to find data on this DatabaseCollection |
Database |
getDatabase() |
Returns the
Database on which this DatabaseCollection is hold. |
CollectionField |
getField(String name) |
Get a specific field by
name . |
CompletableFuture<CollectionField> |
getFieldAsync(String name) |
Returns
getField(String) async. |
Collection<CollectionField> |
getFields() |
Returns all database collection fields with his information.
|
CompletableFuture<Collection<CollectionField>> |
getFieldsAsync() |
Returns
getFields() async. |
String |
getName() |
Returns the name of this database collection.
|
long |
getSize() |
Returns the size of data in this
DatabaseCollection . |
CompletableFuture<Long> |
getSizeAsync() |
Returns the size of the
DatabaseCollection async. |
DatabaseCollectionType |
getType() |
Returns the
DatabaseCollectionType of this database collection type. |
QueryGroup |
group() |
Returns a new
QueryGroup . |
boolean |
hasField(String name) |
Check if a field with the name
name exists in this DatabaseCollection . |
CompletableFuture<Boolean> |
hasFieldAsync(String name) |
Returns
hasField(String) async. |
InsertQuery |
insert() |
Returns a
InsertQuery to insert new data in this DatabaseCollection . |
ReplaceQuery |
replace() |
Returns a
ReplaceQuery to replace a data in this DatabaseCollection . |
QueryTransaction |
transact() |
Creates a new
QueryTransaction on this database collection. |
UpdateQuery |
update() |
Returns a
UpdateQuery to update data in this DatabaseCollection with a specified conditions. |
String getName()
Database getDatabase()
Database
on which this DatabaseCollection
is hold.DatabaseCollectionType getType()
DatabaseCollectionType
of this database collection type.
The type may be incorrect when retrieving and not creating this DatabaseCollection
and then it's DatabaseCollectionType.NORMAL
.long getSize()
DatabaseCollection
.CompletableFuture<Long> getSizeAsync()
DatabaseCollection
async.InsertQuery insert()
InsertQuery
to insert new data in this DatabaseCollection
.FindQuery find()
FindQuery
to specify conditions to find data on this DatabaseCollection
UpdateQuery update()
UpdateQuery
to update data in this DatabaseCollection
with a specified conditions.ReplaceQuery replace()
ReplaceQuery
to replace a data in this DatabaseCollection
.DeleteQuery delete()
DeleteQuery
to delete data in this DatabaseCollection
.void drop()
DatabaseCollection
.CompletableFuture<Void> dropAsync()
DatabaseCollection
async.void clear()
DatabaseCollection
.CompletableFuture<Void> clearAsync()
DatabaseCollection
async.QueryTransaction transact()
QueryTransaction
on this database collection. For more information, see QueryTransaction
.QueryGroup group()
QueryGroup
.Collection<CollectionField> getFields()
CompletableFuture<Collection<CollectionField>> getFieldsAsync()
getFields()
async.CollectionField getField(String name)
name
.name
- of fieldCompletableFuture<CollectionField> getFieldAsync(String name)
getField(String)
async.name
- of fieldboolean hasField(String name)
name
exists in this DatabaseCollection
.name
- of fieldCompletableFuture<Boolean> hasFieldAsync(String name)
hasField(String)
async.name
- of fieldCollectionField addField(String name)
DatabaseCollection
with the name name
.name
- of fieldAliasDatabaseCollection as(String alias)
DatabaseCollection
with an alias name. For more information, see AliasDatabaseCollection
.alias
- of this collectionCopyright © 2020. All rights reserved.