CRUD Operations
Stormify supports three styles for performing basic Create / Read / Update / Delete operations on entities. Pick whichever matches your language and taste — they all dispatch to the same underlying implementation.
The Three Styles
Pass entities to the Stormify (Kotlin) or StormifyJ (Java) instance directly.
This is the standard form and works everywhere without any extra setup.
Implement the CRUDTable marker interface on an entity to gain create(),
update(), and delete() methods on the entity itself. This is especially useful
from Java, where extension functions are not available.
In Kotlin, any entity can call create(), update(), delete(), and
refresh() directly — no interface needed. The query helpers (findById,
findAll, details) are also available at top level.
Batch CRUD Operations
Pass a collection to create, update, or delete to operate on many entities at once:
Generated keys in batch insert
When batch-inserting entities with auto-generated keys, the generated key is populated
back to the entity only if a single item is inserted. For batch inserts, use
database sequences (primarySequence) instead of auto-increment to ensure keys are
assigned before insertion.