Class PetstoreSeed

java.lang.Object
org.apache.juneau.petstore.console.data.PetstoreSeed

public final class PetstoreSeed extends Object
Deterministic demo data for the petstore console: about 500 pets, 2,000 orders, 50 users and 300 audit rows, generated from a fixed Random seed and a fixed Clock so tests and screenshots are repeatable.

The classic rows a new PetStore() loads (pets 1-9, orders 101-103, three users) stay first with their ids; generated rows follow. Both runners seed this way on startup.

Example:

// Default seed and clock (what the runners use). PetStore store = PetstoreSeed.create().populate(new PetStore()); // A different but still repeatable data set. PetStore other = PetstoreSeed.create() .randomSeed(42L) .clock(Clock.fixed(Instant.parse("2027-01-01T00:00:00Z"), ZoneOffset.UTC)) .populate(new PetStore());