Table of Contents
To create a new Record, first obtain a Table from the Store via the Store.getTable(String tableName) method. Then call the Table's create() method. The Record is neither persisted nor available to queries until its save() method is called.
Changes to a Record will not be visible to other parts of the program until the Record's save() method is called.
To create a new Record by copying all of the fields from another Record, use Table's createCopy(Record) method.
Trivial Persist provides a RecordInitializer interface with the single method void init(Record record). If a Table has had a RecordInitializer set via Table.setRecordInitializer(RecordInitializer initializer), the RecordInitializer's init() method will be called on every new Record before Table.create() returns. This provides a mechanism to include arbitrarily complex initialization logic, although most of the time your RecordInitializers will simply consist of a series of calls to the methods described below.