public class POJOBulletRecordConverter extends BulletRecordConverter
BulletRecord.
config, schema, shouldTypeCheck| Constructor and Description |
|---|
POJOBulletRecordConverter(com.yahoo.bullet.common.BulletConfig bulletConfig)
Constructs a POJOBulletRecordConverter from a given configuration.
|
POJOBulletRecordConverter(Class<?> type)
Constructs a POJOBulletRecordConverter without a schema that finds all valid fields regardless of access
(protected, private, etc.) though not including inherited fields.
|
POJOBulletRecordConverter(Class<?> type,
String schema)
Constructs a POJOBulletRecordConverter from a given schema.
|
| Modifier and Type | Method and Description |
|---|---|
protected BulletRecordConverter |
build()
Helper function used to initialize BulletRecordConverter from BulletDSLConfig.
|
com.yahoo.bullet.record.BulletRecord |
convert(Object object,
com.yahoo.bullet.record.BulletRecord record)
Converts an object to a BulletRecord using the given record.
|
protected Object |
get(Object object,
String base)
Gets the specified top-level field from the object.
|
convert, flattenMap, from, getField, getTypedObject, setFieldpublic POJOBulletRecordConverter(Class<?> type) throws BulletDSLException
type - The POJO class type.BulletDSLException - if there is an error creating the converter.public POJOBulletRecordConverter(Class<?> type, String schema) throws BulletDSLException
type - The POJO class type.schema - A schema file that specifies the fields to extract and their types.BulletDSLException - if there is an error creating the converter.public POJOBulletRecordConverter(com.yahoo.bullet.common.BulletConfig bulletConfig)
throws BulletDSLException
bulletConfig - The configuration that specifies the settings for a POJOBulletRecordConverter.BulletDSLException - if there is an error creating the converter.protected BulletRecordConverter build() throws BulletDSLException
BulletRecordConverterBulletRecordProvider, and optionally the BulletRecordSchema, used by the converter.build in class BulletRecordConverterBulletDSLException - if there is an error creating the converter.public com.yahoo.bullet.record.BulletRecord convert(Object object, com.yahoo.bullet.record.BulletRecord record) throws BulletDSLException
BulletRecordConverterconvert in class BulletRecordConverterobject - The object to be converted.record - The record to insert fields into.BulletDSLException - if there is an error converting the object to a BulletRecord.protected Object get(Object object, String base)
BulletRecordConverterget in class BulletRecordConverterobject - The object to get from.base - The top-level field to get.Copyright © 2021. All rights reserved.