public class SchemaImpl extends java.lang.Object implements Schema
Schema implementation.Schema.CreateCollectionOptions, Schema.ModifyCollectionOptions, Schema.ValidationDatabaseObject.DbObjectStatus, DatabaseObject.DbObjectType| Modifier and Type | Method and Description |
|---|---|
Collection |
createCollection(java.lang.String collectionName)
Create a new collection.
|
Collection |
createCollection(java.lang.String collectionName,
boolean reuseExisting)
Create a new collection if it does not already exist on the server.
|
Collection |
createCollection(java.lang.String collectionName,
Schema.CreateCollectionOptions options)
Create a new collection.
|
void |
dropCollection(java.lang.String collectionName)
Drop the collection from this schema.
|
boolean |
equals(java.lang.Object other) |
DatabaseObject.DbObjectStatus |
existsInDatabase()
Query the existence of this database object.
|
Collection |
getCollection(java.lang.String collectionName)
Retrieve a reference to the named collection.
|
Collection |
getCollection(java.lang.String collectionName,
boolean requireExists)
Retrieve a reference to the named collection hinting that an exception should be thrown if the collection is not known to the server.
|
Table |
getCollectionAsTable(java.lang.String collectionName)
Retrieve a reference to the named collection using the table API.
|
java.util.List<Collection> |
getCollections()
Retrieve the set of collections existing in this schema.
|
java.util.List<Collection> |
getCollections(java.lang.String pattern)
Retrieve the set of collections existing in this schema and matching the given pattern.
|
java.lang.String |
getName()
Retrieve the name of the database object represented by the Java object.
|
Schema |
getSchema()
Retrieve the schema owning this database object.
|
Session |
getSession()
Retrieve the session owning the given schema object.
|
Table |
getTable(java.lang.String tableName)
Retrieve a reference to the named table.
|
Table |
getTable(java.lang.String tableName,
boolean requireExists)
Retrieve a reference to the named table hinting that an exception should be thrown if the collection is not known to the server.
|
java.util.List<Table> |
getTables()
Retrieve the set of tables existing in this schema.
|
java.util.List<Table> |
getTables(java.lang.String pattern)
Retrieve the set of tables existing in this schema and matching the given pattern.
|
int |
hashCode() |
void |
modifyCollection(java.lang.String collectionName,
Schema.ModifyCollectionOptions options)
Modify the schema validation of a collection.
|
java.lang.String |
toString() |
public Session getSession()
DatabaseObjectgetSession in interface DatabaseObjectSessionpublic Schema getSchema()
DatabaseObjectgetSchema in interface DatabaseObjectSchemapublic java.lang.String getName()
DatabaseObjectgetName in interface DatabaseObjectpublic DatabaseObject.DbObjectStatus existsInDatabase()
DatabaseObjectexistsInDatabase in interface DatabaseObjectDatabaseObject.DbObjectStatuspublic java.util.List<Collection> getCollections()
SchemagetCollections in interface SchemaCollection objectspublic java.util.List<Collection> getCollections(java.lang.String pattern)
SchemagetCollections in interface Schemapattern - match patternCollection objectspublic java.util.List<Table> getTables()
Schemapublic java.util.List<Table> getTables(java.lang.String pattern)
Schemapublic Collection getCollection(java.lang.String collectionName)
SchemagetCollection in interface SchemacollectionName - collection nameCollectionpublic Collection getCollection(java.lang.String collectionName, boolean requireExists)
SchemagetCollection in interface SchemacollectionName - collection namerequireExists - true if required to existCollectionpublic Table getCollectionAsTable(java.lang.String collectionName)
SchemagetCollectionAsTable in interface SchemacollectionName - collection nameTablepublic Table getTable(java.lang.String tableName)
Schemapublic Table getTable(java.lang.String tableName, boolean requireExists)
Schemapublic Collection createCollection(java.lang.String collectionName)
SchemacreateCollection in interface SchemacollectionName - collection nameCollectionpublic Collection createCollection(java.lang.String collectionName, boolean reuseExisting)
SchemacreateCollection in interface SchemacollectionName - collection namereuseExisting - true if allowed to reuseCollectionpublic Collection createCollection(java.lang.String collectionName, Schema.CreateCollectionOptions options)
SchemacreateCollection in interface SchemacollectionName - collection nameoptions - reuseExisting, validation level and JSON schema optionsCollectionpublic void modifyCollection(java.lang.String collectionName,
Schema.ModifyCollectionOptions options)
SchemamodifyCollection in interface SchemacollectionName - collection nameoptions - validation level and JSON schema optionspublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void dropCollection(java.lang.String collectionName)
SchemadropCollection in interface SchemacollectionName - name of collection to drop