public class Address
extends org.apache.avro.specific.SpecificRecordBase
implements org.apache.avro.specific.SpecificRecord
Modifier and Type | Class and Description |
---|---|
static class |
Address.Builder
RecordBuilder for Address instances.
|
Modifier and Type | Field and Description |
---|---|
static org.apache.avro.Schema |
SCHEMA$ |
Constructor and Description |
---|
Address()
Default constructor.
|
Address(Integer num,
String street,
String city,
String state,
String zip,
String appno)
All-args constructor.
|
Modifier and Type | Method and Description |
---|---|
static org.apache.avro.message.BinaryMessageDecoder<Address> |
createDecoder(org.apache.avro.message.SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified
SchemaStore . |
static Address |
fromByteBuffer(ByteBuffer b)
Deserializes a Address from a ByteBuffer.
|
Object |
get(int field$) |
String |
getAppno()
Gets the value of the 'appno' field.
|
String |
getCity()
Gets the value of the 'city' field.
|
static org.apache.avro.Schema |
getClassSchema() |
static org.apache.avro.message.BinaryMessageDecoder<Address> |
getDecoder()
Return the BinaryMessageDecoder instance used by this class.
|
Integer |
getNum()
Gets the value of the 'num' field.
|
org.apache.avro.Schema |
getSchema() |
String |
getState()
Gets the value of the 'state' field.
|
String |
getStreet()
Gets the value of the 'street' field.
|
String |
getZip()
Gets the value of the 'zip' field.
|
static Address.Builder |
newBuilder()
Creates a new Address RecordBuilder.
|
static Address.Builder |
newBuilder(Address.Builder other)
Creates a new Address RecordBuilder by copying an existing Builder.
|
static Address.Builder |
newBuilder(Address other)
Creates a new Address RecordBuilder by copying an existing Address instance.
|
void |
put(int field$,
Object value$) |
void |
readExternal(ObjectInput in) |
void |
setAppno(String value)
Sets the value of the 'appno' field.
|
void |
setCity(String value)
Sets the value of the 'city' field.
|
void |
setNum(Integer value)
Sets the value of the 'num' field.
|
void |
setState(String value)
Sets the value of the 'state' field.
|
void |
setStreet(String value)
Sets the value of the 'street' field.
|
void |
setZip(String value)
Sets the value of the 'zip' field.
|
ByteBuffer |
toByteBuffer()
Serializes this Address to a ByteBuffer.
|
void |
writeExternal(ObjectOutput out) |
public Address()
newBuilder()
.public Address(Integer num, String street, String city, String state, String zip, String appno)
num
- The new value for numstreet
- The new value for streetcity
- The new value for citystate
- The new value for statezip
- The new value for zipappno
- The new value for appnopublic static org.apache.avro.Schema getClassSchema()
public static org.apache.avro.message.BinaryMessageDecoder<Address> getDecoder()
public static org.apache.avro.message.BinaryMessageDecoder<Address> createDecoder(org.apache.avro.message.SchemaStore resolver)
SchemaStore
.resolver
- a SchemaStore
used to find schemas by fingerprintpublic ByteBuffer toByteBuffer() throws IOException
IOException
public static Address fromByteBuffer(ByteBuffer b) throws IOException
IOException
public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
getSchema
in class org.apache.avro.specific.SpecificRecordBase
public Object get(int field$)
get
in interface org.apache.avro.generic.IndexedRecord
get
in class org.apache.avro.specific.SpecificRecordBase
public void put(int field$, Object value$)
put
in interface org.apache.avro.generic.IndexedRecord
put
in class org.apache.avro.specific.SpecificRecordBase
public Integer getNum()
public void setNum(Integer value)
value
- the value to set.public String getStreet()
public void setStreet(String value)
value
- the value to set.public String getCity()
public void setCity(String value)
value
- the value to set.public String getState()
public void setState(String value)
value
- the value to set.public String getZip()
public void setZip(String value)
value
- the value to set.public String getAppno()
public void setAppno(String value)
value
- the value to set.public static Address.Builder newBuilder()
public static Address.Builder newBuilder(Address.Builder other)
other
- The existing builder to copy.public static Address.Builder newBuilder(Address other)
other
- The existing instance to copy.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class org.apache.avro.specific.SpecificRecordBase
IOException
public void readExternal(ObjectInput in) throws IOException
readExternal
in interface Externalizable
readExternal
in class org.apache.avro.specific.SpecificRecordBase
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.