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
ConstructorsModifierConstructorDescriptionprotectedSpecificErrorBuilderBase(Schema schema) Creates a SpecificErrorBuilderBase for building errors of the given type.protectedSpecificErrorBuilderBase(Schema schema, SpecificData model) Creates a SpecificErrorBuilderBase for building errors of the given type.protectedSpecificErrorBuilderBase copy constructor.protectedSpecificErrorBuilderBase(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, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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:ErrorBuilderGets the value- Specified by:
getValuein interfaceErrorBuilder<T extends SpecificExceptionBase>
-
setValue
Description copied from interface:ErrorBuilderSets the value- Specified by:
setValuein interfaceErrorBuilder<T extends SpecificExceptionBase>
-
hasValue
public boolean hasValue()Description copied from interface:ErrorBuilderChecks whether the value has been set- Specified by:
hasValuein interfaceErrorBuilder<T extends SpecificExceptionBase>
-
clearValue
Description copied from interface:ErrorBuilderClears the value- Specified by:
clearValuein interfaceErrorBuilder<T extends SpecificExceptionBase>
-
getCause
Description copied from interface:ErrorBuilderGets the error cause- Specified by:
getCausein interfaceErrorBuilder<T extends SpecificExceptionBase>
-
setCause
Description copied from interface:ErrorBuilderSets the error cause- Specified by:
setCausein interfaceErrorBuilder<T extends SpecificExceptionBase>
-
hasCause
public boolean hasCause()Description copied from interface:ErrorBuilderChecks whether the cause has been set- Specified by:
hasCausein interfaceErrorBuilder<T extends SpecificExceptionBase>
-
clearCause
Description copied from interface:ErrorBuilderClears the cause- Specified by:
clearCausein interfaceErrorBuilder<T extends SpecificExceptionBase>
-