public enum DocumentWriteOption extends Enum<DocumentWriteOption> implements com.holonplatform.core.datastore.DatastoreOperations.WriteOption
DatastoreOperations.WriteOption
.Enum Constant and Description |
---|
BYPASS_VALIDATION
A
DatastoreOperations.WriteOption to bypass document level validation. |
UNORDERED
A
DatastoreOperations.WriteOption which applies to multiple document insertion, to specify to not insert the documents in the
order provided (stopping on the first failed insertion). |
UPSERT
A
DatastoreOperations.WriteOption to create a new document if there are no matches to the update filter. |
Modifier and Type | Method and Description |
---|---|
static DocumentWriteOption |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DocumentWriteOption[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DocumentWriteOption BYPASS_VALIDATION
DatastoreOperations.WriteOption
to bypass document level validation.
Applies to the insert
and update
operations.
public static final DocumentWriteOption UPSERT
DatastoreOperations.WriteOption
to create a new document if there are no matches to the update filter.
Applies to the update
operation.
public static final DocumentWriteOption UNORDERED
DatastoreOperations.WriteOption
which applies to multiple document insertion, to specify to not insert the documents in the
order provided (stopping on the first failed insertion). When this option is provided, the server will attempt to
insert all the documents regardless of any failure.
Applies to the bulk insert
operation.
public static DocumentWriteOption[] values()
for (DocumentWriteOption c : DocumentWriteOption.values()) System.out.println(c);
public static DocumentWriteOption valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2019 The Holon Platform. All rights reserved.