public interface OracleCollectionAdmin
OracleCollection
administration: index creation and destruction, collection deletion
(ie "drop"), metadata information about the collection,
etc.
An OracleCollectionAdmin
object is associated
with a particular OracleCollection
object.
Modifier and Type | Method and Description |
---|---|
void |
createIndex(OracleDocument indexSpecification)
Create an index using an index specification (expressed in JSON).
|
void |
createJsonSearchIndex(java.lang.String indexName)
Turns on Json Search Index.
|
void |
drop()
Drops the collection.
|
void |
dropIndex(java.lang.String indexName)
Drops the named index.
|
void |
dropIndex(java.lang.String indexName,
boolean force)
Drops the named index.
|
OracleDocument |
getDataGuide()
Returns a JSON data guide for the collection.
|
OracleDocument |
getMetadata()
Returns collection metadata expressed in JSON.
|
java.lang.String |
getName()
Gets the collection's name.
|
boolean |
isHeterogeneous()
Indicates whether the collection can store non-JSON data.
|
boolean |
isReadOnly()
Indicates whether the collection is read-only.
|
void |
truncate()
Deletes all documents in the collection.
|
java.lang.String getName()
String
void drop() throws OracleException
OracleException
- if an error occurs while dropping
the collectionvoid truncate() throws OracleException
OracleException
- if an error occurs while truncating
the collectionvoid dropIndex(java.lang.String indexName) throws OracleException
indexName
- name of the index to dropOracleException
- if an error occurs while dropping
the indexvoid dropIndex(java.lang.String indexName, boolean force) throws OracleException
indexName
- name of the index to dropforce
- force index drop. Can only be used with
json search or spatial indexes.OracleException
- if an error occurs while dropping
the indexvoid createIndex(OracleDocument indexSpecification) throws OracleException
indexSpecification
- an index specification. Cannot be
null
OracleException
- if (1) the index specification is
null
, or (2) an error
occurs while dropping the indexvoid createJsonSearchIndex(java.lang.String indexName) throws OracleException
indexName
- name of the index. Cannot be
null
OracleException
- if an error occurs while creating
the indexboolean isHeterogeneous()
true
if the collection can
store non-JSON data; false
otherwiseboolean isReadOnly()
true
if the collection is read-only;
false
otherwiseOracleDocument getDataGuide() throws OracleException
OracleDocument
representing
JSON data guide for the collection. null
if the data guide is not available.OracleException
- if an error occurs while fetching the JSON
data guide.OracleDocument getMetadata()