| Enum Constant and Description |
|---|
Insert
Changes apply to SQL Insert.
|
InsertUpdate
Changes apply to SQL Update.
|
Unknown
Nothing is known about changes.
|
Update
Changes apply to SQL Update.
|
| Modifier and Type | Method and Description |
|---|---|
static TxKind |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TxKind[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TxKind Insert
public static final TxKind InsertUpdate
TxScope.ScopeConsumer when an entity is
Inserted via CRUD and then further modified via CRUD after the Insert. Such modifications are persisted via Update.
Example:
Sakila.commit(ctx -> {
Film film = Film...build(); // txbindings state is now Insert
film.setRating(...);
List<Film> films = Film.fetch(...); // query triggers prior CRUD to persist, INSERT film
film.setDescription(...); // txbindings state is now InsertUpdate
film.setSomethingElse(...);
List<Inventory> inv = Inventory.fetc(...); // query triggers prior CRUD to persist, UPDATE film
...
});
public static final TxKind Update
public static final TxKind Unknown
public static TxKind[] values()
for (TxKind c : TxKind.values()) System.out.println(c);
public static TxKind valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullCopyright © 2024. All rights reserved.