public class DefaultCommonFactory extends Object implements CommonFactory
CommonFactory
implementation.Constructor and Description |
---|
DefaultCommonFactory() |
Modifier and Type | Method and Description |
---|---|
CommonArray |
createCommonArray(org.apache.avro.Schema schema,
List<CommonValue> list)
Creates CommonArray with the given schema and list of values.
|
CommonEnum |
createCommonEnum(org.apache.avro.Schema schema,
String symbol)
Creates CommonEnum with the given schema and symbol.
|
CommonFixed |
createCommonFixed(org.apache.avro.Schema schema,
byte[] bytes)
Creates CommonFixed with the given schema and byte array.
|
CommonRecord |
createCommonRecord(CommonRecord record)
Creates CommonRecord from the existing record.
|
CommonRecord |
createCommonRecord(org.apache.avro.Schema schema)
Creates CommonRecord with the given schema.
|
CommonRecord |
createCommonRecord(UUID uuid,
org.apache.avro.Schema schema)
Creates CommonRecord with the given avro schema and uuid .
|
CommonValue |
createCommonValue(Object value)
Creates CommonValue from the given value.
|
public CommonValue createCommonValue(Object value)
CommonFactory
createCommonValue
in interface CommonFactory
value
- value which will be stored in CommonValue.public CommonRecord createCommonRecord(org.apache.avro.Schema schema)
CommonFactory
createCommonRecord
in interface CommonFactory
schema
- avro schema object for the new CommonRecord object.public CommonRecord createCommonRecord(CommonRecord record)
CommonFactory
createCommonRecord
in interface CommonFactory
record
- record object which is going to be copied.public CommonRecord createCommonRecord(UUID uuid, org.apache.avro.Schema schema)
CommonFactory
createCommonRecord
in interface CommonFactory
uuid
- uuid for the new record.schema
- avro schema object for the new record.public CommonArray createCommonArray(org.apache.avro.Schema schema, List<CommonValue> list)
CommonFactory
createCommonArray
in interface CommonFactory
schema
- avro schema for the new array.list
- list of values.public CommonFixed createCommonFixed(org.apache.avro.Schema schema, byte[] bytes)
CommonFactory
createCommonFixed
in interface CommonFactory
schema
- avro schema for the new fixed object.bytes
- byte array for the new CommonFixed.public CommonEnum createCommonEnum(org.apache.avro.Schema schema, String symbol)
CommonFactory
createCommonEnum
in interface CommonFactory
schema
- avro schema for the new enum object.symbol
- enum symbol.Copyright © 2015. All rights reserved.