public class Car
extends org.apache.avro.specific.SpecificRecordBase
implements org.apache.avro.specific.SpecificRecord
Modifier and Type | Class and Description |
---|---|
static class |
Car.Builder
RecordBuilder for Car instances.
|
Modifier and Type | Field and Description |
---|---|
int |
doors
Deprecated.
|
Engine |
engine
Deprecated.
|
String |
make
Deprecated.
|
String |
model
Deprecated.
|
Object |
optionalExtra
Deprecated.
|
String |
registration
Deprecated.
|
static org.apache.avro.Schema |
SCHEMA$ |
List<Service> |
serviceHistory
Deprecated.
|
Vin |
vin
Deprecated.
|
long |
year
Deprecated.
|
Constructor and Description |
---|
Car()
Default constructor.
|
Car(Long year,
String registration,
String make,
String model,
Vin vin,
Integer doors,
Engine engine,
Object optionalExtra,
List<Service> serviceHistory)
All-args constructor.
|
Modifier and Type | Method and Description |
---|---|
static org.apache.avro.message.BinaryMessageDecoder<Car> |
createDecoder(org.apache.avro.message.SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified
SchemaStore . |
static Car |
fromByteBuffer(ByteBuffer b)
Deserializes a Car from a ByteBuffer.
|
Object |
get(int field$) |
static org.apache.avro.Schema |
getClassSchema() |
static org.apache.avro.message.BinaryMessageDecoder<Car> |
getDecoder()
Return the BinaryMessageDecoder instance used by this class.
|
Integer |
getDoors()
Gets the value of the 'doors' field.
|
Engine |
getEngine()
Gets the value of the 'engine' field.
|
String |
getMake()
Gets the value of the 'make' field.
|
String |
getModel()
Gets the value of the 'model' field.
|
Object |
getOptionalExtra()
Gets the value of the 'optionalExtra' field.
|
String |
getRegistration()
Gets the value of the 'registration' field.
|
org.apache.avro.Schema |
getSchema() |
List<Service> |
getServiceHistory()
Gets the value of the 'serviceHistory' field.
|
Vin |
getVin()
Gets the value of the 'vin' field.
|
Long |
getYear()
Gets the value of the 'year' field.
|
static Car.Builder |
newBuilder()
Creates a new Car RecordBuilder.
|
static Car.Builder |
newBuilder(Car.Builder other)
Creates a new Car RecordBuilder by copying an existing Builder.
|
static Car.Builder |
newBuilder(Car other)
Creates a new Car RecordBuilder by copying an existing Car instance.
|
void |
put(int field$,
Object value$) |
void |
readExternal(ObjectInput in) |
void |
setDoors(Integer value)
Sets the value of the 'doors' field.
|
void |
setEngine(Engine value)
Sets the value of the 'engine' field.
|
void |
setMake(String value)
Sets the value of the 'make' field.
|
void |
setModel(String value)
Sets the value of the 'model' field.
|
void |
setOptionalExtra(Object value)
Sets the value of the 'optionalExtra' field.
|
void |
setRegistration(String value)
Sets the value of the 'registration' field.
|
void |
setServiceHistory(List<Service> value)
Sets the value of the 'serviceHistory' field.
|
void |
setVin(Vin value)
Sets the value of the 'vin' field.
|
void |
setYear(Long value)
Sets the value of the 'year' field.
|
ByteBuffer |
toByteBuffer()
Serializes this Car to a ByteBuffer.
|
void |
writeExternal(ObjectOutput out) |
public static final org.apache.avro.Schema SCHEMA$
@Deprecated public long year
@Deprecated public String registration
@Deprecated public String make
@Deprecated public String model
@Deprecated public Vin vin
@Deprecated public int doors
@Deprecated public Engine engine
@Deprecated public Object optionalExtra
@Deprecated public List<Service> serviceHistory
public Car()
newBuilder()
.public Car(Long year, String registration, String make, String model, Vin vin, Integer doors, Engine engine, Object optionalExtra, List<Service> serviceHistory)
year
- The new value for yearregistration
- The new value for registrationmake
- The new value for makemodel
- The new value for modelvin
- The new value for vindoors
- The new value for doorsengine
- The new value for engineoptionalExtra
- The new value for optionalExtraserviceHistory
- The new value for serviceHistorypublic static org.apache.avro.Schema getClassSchema()
public static org.apache.avro.message.BinaryMessageDecoder<Car> getDecoder()
public static org.apache.avro.message.BinaryMessageDecoder<Car> createDecoder(org.apache.avro.message.SchemaStore resolver)
SchemaStore
.resolver
- a SchemaStore
used to find schemas by fingerprintpublic ByteBuffer toByteBuffer() throws IOException
IOException
public static Car 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 Long getYear()
public void setYear(Long value)
value
- the value to set.public String getRegistration()
public void setRegistration(String value)
value
- the value to set.public String getMake()
public void setMake(String value)
value
- the value to set.public String getModel()
public void setModel(String value)
value
- the value to set.public Vin getVin()
public void setVin(Vin value)
value
- the value to set.public Integer getDoors()
public void setDoors(Integer value)
value
- the value to set.public Engine getEngine()
public void setEngine(Engine value)
value
- the value to set.public Object getOptionalExtra()
public void setOptionalExtra(Object value)
value
- the value to set.public List<Service> getServiceHistory()
public void setServiceHistory(List<Service> value)
value
- the value to set.public static Car.Builder newBuilder()
public static Car.Builder newBuilder(Car.Builder other)
other
- The existing builder to copy.public static Car.Builder newBuilder(Car 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 © 2019 The Apache Software Foundation. All rights reserved.