Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package org.apache.parquet.avro;
import org.apache.avro.specific.SpecificData;
import org.apache.avro.message.BinaryMessageEncoder;
import org.apache.avro.message.BinaryMessageDecoder;
import org.apache.avro.message.SchemaStore;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public class StringBehaviorTest extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = 415070539232112318L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"StringBehaviorTest\",\"namespace\":\"org.apache.parquet.avro\",\"fields\":[{\"name\":\"default_class\",\"type\":\"string\"},{\"name\":\"string_class\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"stringable_class\",\"type\":{\"type\":\"string\",\"java-class\":\"java.math.BigDecimal\"}},{\"name\":\"default_map\",\"type\":{\"type\":\"map\",\"values\":\"int\"}},{\"name\":\"string_map\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"avro.java.string\":\"String\"}},{\"name\":\"stringable_map\",\"type\":{\"type\":\"map\",\"values\":\"int\",\"java-key-class\":\"java.math.BigDecimal\"}}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private static SpecificData MODEL$ = new SpecificData();
private static final BinaryMessageEncoder ENCODER =
new BinaryMessageEncoder(MODEL$, SCHEMA$);
private static final BinaryMessageDecoder DECODER =
new BinaryMessageDecoder(MODEL$, SCHEMA$);
/**
* Return the BinaryMessageDecoder instance used by this class.
*/
public static BinaryMessageDecoder getDecoder() {
return DECODER;
}
/**
* Create a new BinaryMessageDecoder instance for this class that uses the specified {@link SchemaStore}.
* @param resolver a {@link SchemaStore} used to find schemas by fingerprint
*/
public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
return new BinaryMessageDecoder(MODEL$, SCHEMA$, resolver);
}
/** Serializes this StringBehaviorTest to a ByteBuffer. */
public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
return ENCODER.encode(this);
}
/** Deserializes a StringBehaviorTest from a ByteBuffer. */
public static StringBehaviorTest fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
}
@Deprecated public java.lang.CharSequence default_class;
@Deprecated public java.lang.CharSequence string_class;
@Deprecated public java.math.BigDecimal stringable_class;
@Deprecated public java.util.Map default_map;
@Deprecated public java.util.Map string_map;
@Deprecated public java.util.Map stringable_map;
/**
* Default constructor. Note that this does not initialize fields
* to their default values from the schema. If that is desired then
* one should use newBuilder().
*/
public StringBehaviorTest() {}
/**
* All-args constructor.
* @param default_class The new value for default_class
* @param string_class The new value for string_class
* @param stringable_class The new value for stringable_class
* @param default_map The new value for default_map
* @param string_map The new value for string_map
* @param stringable_map The new value for stringable_map
*/
public StringBehaviorTest(java.lang.CharSequence default_class, java.lang.CharSequence string_class, java.math.BigDecimal stringable_class, java.util.Map default_map, java.util.Map string_map, java.util.Map stringable_map) {
this.default_class = default_class;
this.string_class = string_class;
this.stringable_class = stringable_class;
this.default_map = default_map;
this.string_map = string_map;
this.stringable_map = stringable_map;
}
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
// Used by DatumWriter. Applications should not call.
public java.lang.Object get(int field$) {
switch (field$) {
case 0: return default_class;
case 1: return string_class;
case 2: return stringable_class;
case 3: return default_map;
case 4: return string_map;
case 5: return stringable_map;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
// Used by DatumReader. Applications should not call.
@SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: default_class = (java.lang.CharSequence)value$; break;
case 1: string_class = (java.lang.CharSequence)value$; break;
case 2: stringable_class = (java.math.BigDecimal)value$; break;
case 3: default_map = (java.util.Map)value$; break;
case 4: string_map = (java.util.Map)value$; break;
case 5: stringable_map = (java.util.Map)value$; break;
default: throw new org.apache.avro.AvroRuntimeException("Bad index");
}
}
/**
* Gets the value of the 'default_class' field.
* @return The value of the 'default_class' field.
*/
public java.lang.CharSequence getDefaultClass() {
return default_class;
}
/**
* Sets the value of the 'default_class' field.
* @param value the value to set.
*/
public void setDefaultClass(java.lang.CharSequence value) {
this.default_class = value;
}
/**
* Gets the value of the 'string_class' field.
* @return The value of the 'string_class' field.
*/
public java.lang.CharSequence getStringClass() {
return string_class;
}
/**
* Sets the value of the 'string_class' field.
* @param value the value to set.
*/
public void setStringClass(java.lang.CharSequence value) {
this.string_class = value;
}
/**
* Gets the value of the 'stringable_class' field.
* @return The value of the 'stringable_class' field.
*/
public java.math.BigDecimal getStringableClass() {
return stringable_class;
}
/**
* Sets the value of the 'stringable_class' field.
* @param value the value to set.
*/
public void setStringableClass(java.math.BigDecimal value) {
this.stringable_class = value;
}
/**
* Gets the value of the 'default_map' field.
* @return The value of the 'default_map' field.
*/
public java.util.Map getDefaultMap() {
return default_map;
}
/**
* Sets the value of the 'default_map' field.
* @param value the value to set.
*/
public void setDefaultMap(java.util.Map value) {
this.default_map = value;
}
/**
* Gets the value of the 'string_map' field.
* @return The value of the 'string_map' field.
*/
public java.util.Map getStringMap() {
return string_map;
}
/**
* Sets the value of the 'string_map' field.
* @param value the value to set.
*/
public void setStringMap(java.util.Map value) {
this.string_map = value;
}
/**
* Gets the value of the 'stringable_map' field.
* @return The value of the 'stringable_map' field.
*/
public java.util.Map getStringableMap() {
return stringable_map;
}
/**
* Sets the value of the 'stringable_map' field.
* @param value the value to set.
*/
public void setStringableMap(java.util.Map value) {
this.stringable_map = value;
}
/**
* Creates a new StringBehaviorTest RecordBuilder.
* @return A new StringBehaviorTest RecordBuilder
*/
public static org.apache.parquet.avro.StringBehaviorTest.Builder newBuilder() {
return new org.apache.parquet.avro.StringBehaviorTest.Builder();
}
/**
* Creates a new StringBehaviorTest RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new StringBehaviorTest RecordBuilder
*/
public static org.apache.parquet.avro.StringBehaviorTest.Builder newBuilder(org.apache.parquet.avro.StringBehaviorTest.Builder other) {
return new org.apache.parquet.avro.StringBehaviorTest.Builder(other);
}
/**
* Creates a new StringBehaviorTest RecordBuilder by copying an existing StringBehaviorTest instance.
* @param other The existing instance to copy.
* @return A new StringBehaviorTest RecordBuilder
*/
public static org.apache.parquet.avro.StringBehaviorTest.Builder newBuilder(org.apache.parquet.avro.StringBehaviorTest other) {
return new org.apache.parquet.avro.StringBehaviorTest.Builder(other);
}
/**
* RecordBuilder for StringBehaviorTest instances.
*/
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private java.lang.CharSequence default_class;
private java.lang.CharSequence string_class;
private java.math.BigDecimal stringable_class;
private java.util.Map default_map;
private java.util.Map string_map;
private java.util.Map stringable_map;
/** Creates a new Builder */
private Builder() {
super(SCHEMA$);
}
/**
* Creates a Builder by copying an existing Builder.
* @param other The existing Builder to copy.
*/
private Builder(org.apache.parquet.avro.StringBehaviorTest.Builder other) {
super(other);
if (isValidValue(fields()[0], other.default_class)) {
this.default_class = data().deepCopy(fields()[0].schema(), other.default_class);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.string_class)) {
this.string_class = data().deepCopy(fields()[1].schema(), other.string_class);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.stringable_class)) {
this.stringable_class = data().deepCopy(fields()[2].schema(), other.stringable_class);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.default_map)) {
this.default_map = data().deepCopy(fields()[3].schema(), other.default_map);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.string_map)) {
this.string_map = data().deepCopy(fields()[4].schema(), other.string_map);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.stringable_map)) {
this.stringable_map = data().deepCopy(fields()[5].schema(), other.stringable_map);
fieldSetFlags()[5] = true;
}
}
/**
* Creates a Builder by copying an existing StringBehaviorTest instance
* @param other The existing instance to copy.
*/
private Builder(org.apache.parquet.avro.StringBehaviorTest other) {
super(SCHEMA$);
if (isValidValue(fields()[0], other.default_class)) {
this.default_class = data().deepCopy(fields()[0].schema(), other.default_class);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.string_class)) {
this.string_class = data().deepCopy(fields()[1].schema(), other.string_class);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.stringable_class)) {
this.stringable_class = data().deepCopy(fields()[2].schema(), other.stringable_class);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.default_map)) {
this.default_map = data().deepCopy(fields()[3].schema(), other.default_map);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.string_map)) {
this.string_map = data().deepCopy(fields()[4].schema(), other.string_map);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.stringable_map)) {
this.stringable_map = data().deepCopy(fields()[5].schema(), other.stringable_map);
fieldSetFlags()[5] = true;
}
}
/**
* Gets the value of the 'default_class' field.
* @return The value.
*/
public java.lang.CharSequence getDefaultClass() {
return default_class;
}
/**
* Sets the value of the 'default_class' field.
* @param value The value of 'default_class'.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder setDefaultClass(java.lang.CharSequence value) {
validate(fields()[0], value);
this.default_class = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'default_class' field has been set.
* @return True if the 'default_class' field has been set, false otherwise.
*/
public boolean hasDefaultClass() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'default_class' field.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder clearDefaultClass() {
default_class = null;
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'string_class' field.
* @return The value.
*/
public java.lang.CharSequence getStringClass() {
return string_class;
}
/**
* Sets the value of the 'string_class' field.
* @param value The value of 'string_class'.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder setStringClass(java.lang.CharSequence value) {
validate(fields()[1], value);
this.string_class = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'string_class' field has been set.
* @return True if the 'string_class' field has been set, false otherwise.
*/
public boolean hasStringClass() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'string_class' field.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder clearStringClass() {
string_class = null;
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'stringable_class' field.
* @return The value.
*/
public java.math.BigDecimal getStringableClass() {
return stringable_class;
}
/**
* Sets the value of the 'stringable_class' field.
* @param value The value of 'stringable_class'.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder setStringableClass(java.math.BigDecimal value) {
validate(fields()[2], value);
this.stringable_class = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'stringable_class' field has been set.
* @return True if the 'stringable_class' field has been set, false otherwise.
*/
public boolean hasStringableClass() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'stringable_class' field.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder clearStringableClass() {
stringable_class = null;
fieldSetFlags()[2] = false;
return this;
}
/**
* Gets the value of the 'default_map' field.
* @return The value.
*/
public java.util.Map getDefaultMap() {
return default_map;
}
/**
* Sets the value of the 'default_map' field.
* @param value The value of 'default_map'.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder setDefaultMap(java.util.Map value) {
validate(fields()[3], value);
this.default_map = value;
fieldSetFlags()[3] = true;
return this;
}
/**
* Checks whether the 'default_map' field has been set.
* @return True if the 'default_map' field has been set, false otherwise.
*/
public boolean hasDefaultMap() {
return fieldSetFlags()[3];
}
/**
* Clears the value of the 'default_map' field.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder clearDefaultMap() {
default_map = null;
fieldSetFlags()[3] = false;
return this;
}
/**
* Gets the value of the 'string_map' field.
* @return The value.
*/
public java.util.Map getStringMap() {
return string_map;
}
/**
* Sets the value of the 'string_map' field.
* @param value The value of 'string_map'.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder setStringMap(java.util.Map value) {
validate(fields()[4], value);
this.string_map = value;
fieldSetFlags()[4] = true;
return this;
}
/**
* Checks whether the 'string_map' field has been set.
* @return True if the 'string_map' field has been set, false otherwise.
*/
public boolean hasStringMap() {
return fieldSetFlags()[4];
}
/**
* Clears the value of the 'string_map' field.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder clearStringMap() {
string_map = null;
fieldSetFlags()[4] = false;
return this;
}
/**
* Gets the value of the 'stringable_map' field.
* @return The value.
*/
public java.util.Map getStringableMap() {
return stringable_map;
}
/**
* Sets the value of the 'stringable_map' field.
* @param value The value of 'stringable_map'.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder setStringableMap(java.util.Map value) {
validate(fields()[5], value);
this.stringable_map = value;
fieldSetFlags()[5] = true;
return this;
}
/**
* Checks whether the 'stringable_map' field has been set.
* @return True if the 'stringable_map' field has been set, false otherwise.
*/
public boolean hasStringableMap() {
return fieldSetFlags()[5];
}
/**
* Clears the value of the 'stringable_map' field.
* @return This builder.
*/
public org.apache.parquet.avro.StringBehaviorTest.Builder clearStringableMap() {
stringable_map = null;
fieldSetFlags()[5] = false;
return this;
}
@Override
@SuppressWarnings("unchecked")
public StringBehaviorTest build() {
try {
StringBehaviorTest record = new StringBehaviorTest();
record.default_class = fieldSetFlags()[0] ? this.default_class : (java.lang.CharSequence) defaultValue(fields()[0]);
record.string_class = fieldSetFlags()[1] ? this.string_class : (java.lang.CharSequence) defaultValue(fields()[1]);
record.stringable_class = fieldSetFlags()[2] ? this.stringable_class : (java.math.BigDecimal) defaultValue(fields()[2]);
record.default_map = fieldSetFlags()[3] ? this.default_map : (java.util.Map) defaultValue(fields()[3]);
record.string_map = fieldSetFlags()[4] ? this.string_map : (java.util.Map) defaultValue(fields()[4]);
record.stringable_map = fieldSetFlags()[5] ? this.stringable_map : (java.util.Map) defaultValue(fields()[5]);
return record;
} catch (java.lang.Exception e) {
throw new org.apache.avro.AvroRuntimeException(e);
}
}
}
@SuppressWarnings("unchecked")
private static final org.apache.avro.io.DatumWriter
WRITER$ = (org.apache.avro.io.DatumWriter)MODEL$.createDatumWriter(SCHEMA$);
@Override public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException {
WRITER$.write(this, SpecificData.getEncoder(out));
}
@SuppressWarnings("unchecked")
private static final org.apache.avro.io.DatumReader
READER$ = (org.apache.avro.io.DatumReader)MODEL$.createDatumReader(SCHEMA$);
@Override public void readExternal(java.io.ObjectInput in)
throws java.io.IOException {
READER$.read(this, SpecificData.getDecoder(in));
}
}