Class PendingChanges

java.lang.Object
org.apache.juneau.petstore.service.PendingChanges

public class PendingChanges extends Object
The staging area for pet-detail inline edits: edits are staged here instead of mutating the pet, then applied (perRow, with retry on failure) or discarded (aggregate) from the Pending changes page.

Obtained from PetStore.pendingChanges(). All methods are synchronized; the store is a demo, not a transactional system.

Example:

PendingChanges pc = store.pendingChanges(); PendingChange c = pc.stage(1, "price", "42.50", "alice"); pc.stage(1, "status", "SOLD", "alice"); pc.apply(c.getId(), "console:alice"); // pet 1 now costs 42.50 PendingChanges.DiscardOutcome out = pc.discard(List.of("7", "8"), "console:alice");