Package org.apache.avro.specific
Class SpecificErrorBuilderBase<T extends SpecificExceptionBase>
java.lang.Object
org.apache.avro.data.RecordBuilderBase<T>
org.apache.avro.specific.SpecificErrorBuilderBase<T>
- All Implemented Interfaces:
ErrorBuilder<T>
,RecordBuilder<T>
public abstract class SpecificErrorBuilderBase<T extends SpecificExceptionBase>
extends RecordBuilderBase<T>
implements ErrorBuilder<T>
Abstract base class for specific ErrorBuilder implementations. Not
thread-safe.
-
Constructor Summary
ModifierConstructorDescriptionprotected
SpecificErrorBuilderBase
(Schema schema) Creates a SpecificErrorBuilderBase for building errors of the given type.protected
SpecificErrorBuilderBase
(Schema schema, SpecificData model) Creates a SpecificErrorBuilderBase for building errors of the given type.protected
SpecificErrorBuilderBase copy constructor.protected
SpecificErrorBuilderBase
(T other) Creates a SpecificErrorBuilderBase by copying an existing error instance. -
Method Summary
Methods inherited from class org.apache.avro.data.RecordBuilderBase
data, defaultValue, equals, fields, fieldSetFlags, hashCode, isValidValue, schema, validate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.avro.data.RecordBuilder
build
-
Constructor Details
-
SpecificErrorBuilderBase
Creates a SpecificErrorBuilderBase for building errors of the given type.- Parameters:
schema
- the schema associated with the error class.
-
SpecificErrorBuilderBase
Creates a SpecificErrorBuilderBase for building errors of the given type.- Parameters:
schema
- the schema associated with the error class.model
- the SpecificData instance associated with the error class
-
SpecificErrorBuilderBase
SpecificErrorBuilderBase copy constructor.- Parameters:
other
- SpecificErrorBuilderBase instance to copy.
-
SpecificErrorBuilderBase
Creates a SpecificErrorBuilderBase by copying an existing error instance.- Parameters:
other
- the error instance to copy.
-
-
Method Details
-
getValue
Description copied from interface:ErrorBuilder
Gets the value- Specified by:
getValue
in interfaceErrorBuilder<T extends SpecificExceptionBase>
-
setValue
Description copied from interface:ErrorBuilder
Sets the value- Specified by:
setValue
in interfaceErrorBuilder<T extends SpecificExceptionBase>
-
hasValue
public boolean hasValue()Description copied from interface:ErrorBuilder
Checks whether the value has been set- Specified by:
hasValue
in interfaceErrorBuilder<T extends SpecificExceptionBase>
-
clearValue
Description copied from interface:ErrorBuilder
Clears the value- Specified by:
clearValue
in interfaceErrorBuilder<T extends SpecificExceptionBase>
-
getCause
Description copied from interface:ErrorBuilder
Gets the error cause- Specified by:
getCause
in interfaceErrorBuilder<T extends SpecificExceptionBase>
-
setCause
Description copied from interface:ErrorBuilder
Sets the error cause- Specified by:
setCause
in interfaceErrorBuilder<T extends SpecificExceptionBase>
-
hasCause
public boolean hasCause()Description copied from interface:ErrorBuilder
Checks whether the cause has been set- Specified by:
hasCause
in interfaceErrorBuilder<T extends SpecificExceptionBase>
-
clearCause
Description copied from interface:ErrorBuilder
Clears the cause- Specified by:
clearCause
in interfaceErrorBuilder<T extends SpecificExceptionBase>
-