@Internal public class RowFactory extends java.lang.Object
Generates the code to create RowType
s and Row
s based on pojos.
Generated record types are cached in the instance of this factory.
At the moment single pojo class corresponds to single RowType
.
Supported pojo getter types depend on types supported by the RowTypeFactory
.
See DefaultRowTypeFactory
for default implementation.
Modifier and Type | Method and Description |
---|---|
Row |
create(java.lang.Object pojo)
Create a
Row of the pojo. |
static RowFactory |
createDefault()
|
public static RowFactory createDefault()
public Row create(java.lang.Object pojo)
Row
of the pojo.
This implementation copies the return values of the pojo getters into the record fields on creation.
Currently all public getters are used to populate the record type and instance.
Field names for getters are stripped of the 'get' prefix. For example record field 'name' will be generated for 'getName()' pojo method.