|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface OracleCollection
A collection of documents.
| Method Summary | |
|---|---|
OracleCollectionAdmin |
admin()
Gets an OracleCollectionAdmin object |
OracleOperationBuilder |
find()
Returns an OracleOperationBuilder representing
an operation that finds all documents in the collection. |
OracleDocument |
findOne(java.lang.String key)
Finds an OracleDocument matching a key. |
void |
insert(java.util.Iterator<OracleDocument> documents)
Inserts multiple documents into the collection. |
void |
insert(OracleDocument document)
Inserts a document into the collection. |
java.util.List<OracleDocument> |
insertAndGet(java.util.Iterator<OracleDocument> documents)
Inserts multiple documents into the collection. |
OracleDocument |
insertAndGet(OracleDocument document)
Inserts a document into the collection. |
void |
save(OracleDocument document)
Saves a document into the collection. |
OracleDocument |
saveAndGet(OracleDocument document)
Saves a document into the collection. |
| Method Detail |
|---|
OracleOperationBuilder find()
OracleOperationBuilder representing
an operation that finds all documents in the collection.
OracleOperationBuilder
OracleDocument findOne(java.lang.String key)
throws OracleException
OracleDocument matching a key.
This is a convenience method. The same operation can be
expressed as: col.find().key("k1").getOne()
key - the key. Cannot be null
OracleDocument matching the key.
null if not found.
OracleException - if the key is null
void insert(OracleDocument document)
throws OracleException
The key will be automatically created, unless this collection is configured with client-assigned keys and the key is provided in the input document.
document - input document. Cannot have a
key if the collection is
configured to auto-generate keys. Cannot
be null
OracleException - if (1) the input document
is null, or (2) keys are
client-assigned for this
collection, but the key is not provided
in the input document, or (3) keys are
client-assigned for this collection, and
the key provided in the input document
already exists in the collection, or
(4) keys are auto-generated for this collection,
and the key is provided in the input document,
or (5) an error during insertion occurs
OracleDocument insertAndGet(OracleDocument document)
throws OracleException
The key will be automatically created, unless this collection is configured with client-assigned keys and the key is provided in the input document.
document - input document. Cannot have a
key if the collection is
configured to auto-generate keys. Cannot
be null
OracleException - if (1) the input document
is null, or (2) keys are
client-assigned for this
collection, but the key is not provided
in the input document, or (3) keys are
client-assigned for this collection, and
the key provided in the input document
already exists in the collection, or
(4) keys are auto-generated for this collection,
and the key is provided in the input document,
or (5) an error during insertion occurs
void save(OracleDocument document)
throws OracleException
insert(OracleDocument) except that
if client-assigned keys are used, and the document with
the specified key already exists in the collection, it
will be replaced with the input document.
The key will be automatically created, unless this collection is configured with client-assigned keys and the key is provided in the input document.
document - input document. Cannot have a
key if the collection is
configured to auto-generate keys. Cannot
be null
OracleException - if (1) the input document is
null, or (2) keys are client-assigned
for this collection, but the key is not provided
in the input document, or
(3) keys are auto-generated for this collection,
and the key is provided in the input document,
or (4) an error during insertion occurs
OracleDocument saveAndGet(OracleDocument document)
throws OracleException
insertAndGet(OracleDocument) except that
if client-assigned keys are used, and the document with
the specified key already exists in the collection, it
will be replaced with the input document.
The key will be automatically created, unless this collection is configured with client-assigned keys and the key is provided in the input document.
document - input document. Cannot have a
key if the collection is
configured to auto-generate keys.
Cannot be null
OracleException - if (1) the input document is
null, or (2) keys are client-assigned
for this collection, but the key is not provided
in the input document, or (3) keys are auto-generated
for this collection, and the key is provided in the input
document, or (4) an error during insertion occurs
void insert(java.util.Iterator<OracleDocument> documents)
throws OracleBatchException
The keys will be automatically created, unless this collection has client-assigned keys and the key is provided in the input document.
If there is an error inserting one of the documents,
OracleBatchException will be thrown. Invoking
OracleBatchException.getProcessed() method
returns the number of document processed successfully
before the error occurred.
documents - an Iterator over input documents.
Cannot be null.
Documents cannot have keys
if the collection is configured to
auto-generate keys.
OracleBatchException - if (1) the input documents
Iterator is null,
or (2) keys are client-assigned for this
collection, but the key is not provided
for one or more of the input documents,
or (3) keys are client-assigned for this
collection, and the key provided for one
or more of the input documents already
exists in the collection, or (4) keys are
auto-generated for this collection,
but the key is provided in one or more
input documents, or (5) if an error
during insertion occurs
java.util.List<OracleDocument> insertAndGet(java.util.Iterator<OracleDocument> documents)
throws OracleBatchException
The keys will be automatically created, unless this collection has client-assigned keys and the key is provided in the input document.
If there is an error inserting one of the documents,
OracleBatchException will be thrown. Invoking
OracleBatchException.getProcessed() method
returns the number of document processed successfully
before the error occurred.
documents - an iterator over input documents.
Cannot be null.
Documents cannot have keys
if the collection is configured to
auto-generate keys
OracleBatchException - if (1) the input documents
Iterator is null,
or (2) keys are client-assigned for this
collection, but the key is not provided
for one or more of the input documents,
or (3) keys are client-assigned for this
collection, and the key provided for one
or more of the input documents already
exists in the collection, or (4) keys are
auto-generated for this collection,
but the key is provided in one or more
input documents, or (5) if an error
during insertion occursOracleCollectionAdmin admin()
OracleCollectionAdmin object
OracleCollectionAdmin object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||