public class Customer
extends org.apache.avro.specific.SpecificRecordBase
implements org.apache.avro.specific.SpecificRecord
| Modifier and Type | Class and Description |
|---|---|
static class |
Customer.Builder
RecordBuilder for Customer instances.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.avro.Schema |
SCHEMA$ |
| Constructor and Description |
|---|
Customer()
Default constructor.
|
Customer(String first_name,
String last_name,
Integer age,
Float height,
Float weight,
Boolean automated_email)
All-args constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static org.apache.avro.message.BinaryMessageDecoder<Customer> |
createDecoder(org.apache.avro.message.SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified
SchemaStore. |
static Customer |
fromByteBuffer(ByteBuffer b)
Deserializes a Customer from a ByteBuffer.
|
Object |
get(int field$) |
Integer |
getAge()
Gets the value of the 'age' field.
|
Boolean |
getAutomatedEmail()
Gets the value of the 'automated_email' field.
|
static org.apache.avro.Schema |
getClassSchema() |
static org.apache.avro.message.BinaryMessageDecoder<Customer> |
getDecoder()
Return the BinaryMessageDecoder instance used by this class.
|
String |
getFirstName()
Gets the value of the 'first_name' field.
|
Float |
getHeight()
Gets the value of the 'height' field.
|
String |
getLastName()
Gets the value of the 'last_name' field.
|
org.apache.avro.Schema |
getSchema() |
Float |
getWeight()
Gets the value of the 'weight' field.
|
static Customer.Builder |
newBuilder()
Creates a new Customer RecordBuilder.
|
static Customer.Builder |
newBuilder(Customer.Builder other)
Creates a new Customer RecordBuilder by copying an existing Builder.
|
static Customer.Builder |
newBuilder(Customer other)
Creates a new Customer RecordBuilder by copying an existing Customer instance.
|
void |
put(int field$,
Object value$) |
void |
readExternal(ObjectInput in) |
ByteBuffer |
toByteBuffer()
Serializes this Customer to a ByteBuffer.
|
void |
writeExternal(ObjectOutput out) |
public Customer()
newBuilder().public Customer(String first_name, String last_name, Integer age, Float height, Float weight, Boolean automated_email)
first_name - First Name of Customerlast_name - Last Name of Customerage - Age at the time of registrationheight - Height at the time of registration in cmweight - Weight at the time of registration in kgautomated_email - Field indicating if the user is enrolled in marketing emailspublic static org.apache.avro.Schema getClassSchema()
public static org.apache.avro.message.BinaryMessageDecoder<Customer> getDecoder()
public static org.apache.avro.message.BinaryMessageDecoder<Customer> createDecoder(org.apache.avro.message.SchemaStore resolver)
SchemaStore.resolver - a SchemaStore used to find schemas by fingerprintpublic ByteBuffer toByteBuffer() throws IOException
IOExceptionpublic static Customer fromByteBuffer(ByteBuffer b) throws IOException
IOExceptionpublic org.apache.avro.Schema getSchema()
getSchema in interface org.apache.avro.generic.GenericContainergetSchema in class org.apache.avro.specific.SpecificRecordBasepublic Object get(int field$)
get in interface org.apache.avro.generic.IndexedRecordget in class org.apache.avro.specific.SpecificRecordBasepublic void put(int field$,
Object value$)
put in interface org.apache.avro.generic.IndexedRecordput in class org.apache.avro.specific.SpecificRecordBasepublic String getFirstName()
public String getLastName()
public Integer getAge()
public Float getHeight()
public Float getWeight()
public Boolean getAutomatedEmail()
public static Customer.Builder newBuilder()
public static Customer.Builder newBuilder(Customer.Builder other)
other - The existing builder to copy.public static Customer.Builder newBuilder(Customer other)
other - The existing instance to copy.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class org.apache.avro.specific.SpecificRecordBaseIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizablereadExternal in class org.apache.avro.specific.SpecificRecordBaseIOExceptionCopyright © 2020. All rights reserved.