Modifier and Type | Field and Description |
---|---|
static int |
FLG_INSERT_CONTONDUP
The flag represent whether insert continue(no errors were reported) when hitting index key
duplicate error
|
static int |
FLG_INSERT_CONTONDUP_ID
The flag represent the error of the dup key will be ignored when the dup key is '_id'.
|
static int |
FLG_INSERT_REPLACEONDUP
The flag represent whether insert becomes update when hitting index key duplicate error.
|
static int |
FLG_INSERT_REPLACEONDUP_ID
The flag represents the error of the dup key will be ignored when the dup key is '_id',
and the original record will be replaced by new record.
|
static int |
FLG_INSERT_RETURN_OID
The flag represent whether insert return the "_id" field of the record for user
|
Constructor and Description |
---|
InsertOption() |
Modifier and Type | Method and Description |
---|---|
void |
appendFlag(int flag)
Appends a new flag to the insert option.
|
Object |
clone() |
void |
eraseFlag(int flag)
Erases the specified flag from the insert option.
|
int |
getFlag()
Gets the flag option.
|
InsertOption |
setFlag(int flag)
Sets the flag option.
|
String |
toString() |
public static final int FLG_INSERT_CONTONDUP
public static final int FLG_INSERT_CONTONDUP_ID
public static final int FLG_INSERT_REPLACEONDUP
public static final int FLG_INSERT_REPLACEONDUP_ID
public static final int FLG_INSERT_RETURN_OID
public void appendFlag(int flag)
flag
- The insert flag, the following values:
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public void eraseFlag(int flag)
flag
- The insert flag, the following values:
public int getFlag()
public InsertOption setFlag(int flag)
flag
- The insert flag, default to be 0, the following values:
Copyright © 2023. All rights reserved.