Serializable, Comparable<RdbStore.ConflictResolution>public static enum RdbStore.ConflictResolution extends Enum<RdbStore.ConflictResolution>
| 枚举常量 | 说明 |
|---|---|
ON_CONFLICT_ABORT |
Aborts the current SQL statement with an SQLITE_CONSTRAINT error and discards any changes made by the
current SQL statement when a constraint violation occurs.
|
ON_CONFLICT_FAIL |
Aborts the current SQL statement with an SQLITE_CONSTRAINT error when a constraint violation occurs.
|
ON_CONFLICT_IGNORE |
Skips the one row that encounters a constraint violation and continues processing subsequent rows of the
SQL statement.
|
ON_CONFLICT_NONE |
Performs no operation when a conflict occurs.
|
ON_CONFLICT_REPLACE |
Deletes pre-existing rows that encounter a UNIQUE or PRIMARY KEY constraint violation prior to inserting
or updating of the current row and continues command execution.
|
ON_CONFLICT_ROLLBACK |
Aborts the current SQL statement with an SQLITE_CONSTRAINT error and rolls back the current transaction
when a constraint violation occurs.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getValue() |
Get conflict type number from ConflictResolution.
|
static RdbStore.ConflictResolution |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static RdbStore.ConflictResolution[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (RdbStore.ConflictResolution c : RdbStore.ConflictResolution.values()) System.out.println(c); |
public static final RdbStore.ConflictResolution ON_CONFLICT_NONE
public static final RdbStore.ConflictResolution ON_CONFLICT_ROLLBACK
public static final RdbStore.ConflictResolution ON_CONFLICT_ABORT
public static final RdbStore.ConflictResolution ON_CONFLICT_FAIL
public static final RdbStore.ConflictResolution ON_CONFLICT_IGNORE
public static final RdbStore.ConflictResolution ON_CONFLICT_REPLACE
public static RdbStore.ConflictResolution[] values()
for (RdbStore.ConflictResolution c : RdbStore.ConflictResolution.values()) System.out.println(c);
public static RdbStore.ConflictResolution valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getValue()