Top Description Fields Constructors Methods
org.apache.avro.specific

public abstract Class SpecificErrorBuilderBase<T extends org.apache.avro.specific.SpecificExceptionBase>

extends RecordBuilderBase<T extends SpecificExceptionBase>
implements ErrorBuilder<T extends SpecificExceptionBase>
Class Inheritance
All Implemented Interfaces
org.apache.avro.data.ErrorBuilder, org.apache.avro.data.RecordBuilder
Imports
java.lang.reflect.Constructor, org.apache.avro.Schema, org.apache.avro.data.ErrorBuilder, .RecordBuilderBase

Abstract base class for specific ErrorBuilder implementations. Not thread-safe.

Field Summary

Modifier and TypeField and Description
private Throwable
private Constructor<T>
private boolean
private boolean
private Object

Constructor Summary

AccessConstructor and Description
protected
SpecificErrorBuilderBase(Schema
the schema associated with the error class.
schema
)

Creates a SpecificErrorBuilderBase for building errors of the given type.

protected
SpecificErrorBuilderBase(Schema
the schema associated with the error class.
schema
,
SpecificData
the SpecificData instance associated with the error class
model
)

Creates a SpecificErrorBuilderBase for building errors of the given type.

protected
SpecificErrorBuilderBase(SpecificErrorBuilderBase<T>
SpecificErrorBuilderBase instance to copy.
other
)

SpecificErrorBuilderBase copy constructor.

protected
SpecificErrorBuilderBase(T
the error instance to copy.
other
)

Creates a SpecificErrorBuilderBase by copying an existing error instance.

Method Summary

Modifier and TypeMethod and Description
public SpecificErrorBuilderBase<T>
public SpecificErrorBuilderBase<T>
public Throwable
getCause()

Implements org.apache.avro.data.ErrorBuilder.getCause.

Gets the error cause
public Object
public boolean
hasCause()

Implements org.apache.avro.data.ErrorBuilder.hasCause.

Checks whether the cause has been set
public boolean
hasValue()

Implements org.apache.avro.data.ErrorBuilder.hasValue.

Checks whether the value has been set
public SpecificErrorBuilderBase<T>
setCause(Throwable cause)

Implements org.apache.avro.data.ErrorBuilder.setCause.

Sets the error cause
public SpecificErrorBuilderBase<T>
Inherited from org.apache.avro.data.RecordBuilderBase:
datadefaultValueequalsfieldsfieldSetFlagshashCodeisValidValueschemavalidate

Field Detail

causeback to summary
private Throwable cause
errorConstructorback to summary
private Constructor<T> errorConstructor
hasCauseback to summary
private boolean hasCause
hasValueback to summary
private boolean hasValue
valueback to summary
private Object value

Constructor Detail

SpecificErrorBuilderBaseback to summary
protected SpecificErrorBuilderBase(Schema schema)

Creates a SpecificErrorBuilderBase for building errors of the given type.

Parameters
schema:Schema

the schema associated with the error class.

SpecificErrorBuilderBaseback to summary
protected SpecificErrorBuilderBase(Schema schema, SpecificData model)

Creates a SpecificErrorBuilderBase for building errors of the given type.

Parameters
schema:Schema

the schema associated with the error class.

model:SpecificData

the SpecificData instance associated with the error class

SpecificErrorBuilderBaseback to summary
protected SpecificErrorBuilderBase(SpecificErrorBuilderBase<T> other)

SpecificErrorBuilderBase copy constructor.

Parameters
other:SpecificErrorBuilderBase<T>

SpecificErrorBuilderBase instance to copy.

SpecificErrorBuilderBaseback to summary
protected SpecificErrorBuilderBase(T other)

Creates a SpecificErrorBuilderBase by copying an existing error instance.

Parameters
other:T

the error instance to copy.

Method Detail

clearCauseback to summary
public SpecificErrorBuilderBase<T> clearCause()

Implements org.apache.avro.data.ErrorBuilder.clearCause.

Doc from org.apache.avro.data.ErrorBuilder.clearCause.

Clears the cause

Annotations
@Override
clearValueback to summary
public SpecificErrorBuilderBase<T> clearValue()

Implements org.apache.avro.data.ErrorBuilder.clearValue.

Doc from org.apache.avro.data.ErrorBuilder.clearValue.

Clears the value

Annotations
@Override
getCauseback to summary
public Throwable getCause()

Implements org.apache.avro.data.ErrorBuilder.getCause.

Doc from org.apache.avro.data.ErrorBuilder.getCause.

Gets the error cause

Annotations
@Override
getValueback to summary
public Object getValue()

Implements org.apache.avro.data.ErrorBuilder.getValue.

Doc from org.apache.avro.data.ErrorBuilder.getValue.

Gets the value

Annotations
@Override
hasCauseback to summary
public boolean hasCause()

Implements org.apache.avro.data.ErrorBuilder.hasCause.

Doc from org.apache.avro.data.ErrorBuilder.hasCause.

Checks whether the cause has been set

Annotations
@Override
hasValueback to summary
public boolean hasValue()

Implements org.apache.avro.data.ErrorBuilder.hasValue.

Doc from org.apache.avro.data.ErrorBuilder.hasValue.

Checks whether the value has been set

Annotations
@Override
setCauseback to summary
public SpecificErrorBuilderBase<T> setCause(Throwable cause)

Implements org.apache.avro.data.ErrorBuilder.setCause.

Doc from org.apache.avro.data.ErrorBuilder.setCause.

Sets the error cause

Annotations
@Override
setValueback to summary
public SpecificErrorBuilderBase<T> setValue(Object value)

Implements org.apache.avro.data.ErrorBuilder.setValue.

Doc from org.apache.avro.data.ErrorBuilder.setValue.

Sets the value

Annotations
@Override