net.sourceforge.jbizmo.commons.avro.search.SearchInput Maven / Gradle / Ivy
The newest version!
/**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package net.sourceforge.jbizmo.commons.avro.search;
import org.apache.avro.specific.SpecificData;
import org.apache.avro.util.Utf8;
import org.apache.avro.message.BinaryMessageEncoder;
import org.apache.avro.message.BinaryMessageDecoder;
import org.apache.avro.message.SchemaStore;
@org.apache.avro.specific.AvroGenerated
public class SearchInput extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
private static final long serialVersionUID = 3763850396540909333L;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"SearchInput\",\"namespace\":\"net.sourceforge.jbizmo.commons.avro.search\",\"fields\":[{\"name\":\"maxResult\",\"type\":\"int\"},{\"name\":\"caseSensitive\",\"type\":\"boolean\"},{\"name\":\"numberFormat\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"dateFormat\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"dateTimeFormat\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"startIndex\",\"type\":\"int\"},{\"name\":\"searchFields\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"SearchInputField\",\"fields\":[{\"name\":\"filterCriteria\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"]},{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"sortOrder\",\"type\":{\"type\":\"enum\",\"name\":\"SortDirectionEnum\",\"symbols\":[\"NONE\",\"ASC\",\"DESC\"]}},{\"name\":\"sortIndex\",\"type\":\"int\"},{\"name\":\"dateTimeFormat\",\"type\":\"boolean\",\"default\":true},{\"name\":\"operator\",\"type\":{\"type\":\"enum\",\"name\":\"FilterOperatorEnum\",\"symbols\":[\"IN\",\"NOT_IN\",\"BETWEEN\",\"IS_NULL\",\"IS_NOT_NULL\",\"LIKE\",\"NOT_LIKE\",\"EQUAL\",\"GREATER\",\"SMALLER\",\"GREATER_OR_EQUAL\",\"SMALLER_OR_EQUAL\"]}}]}}},{\"name\":\"exactFilterMatch\",\"type\":\"boolean\"},{\"name\":\"decimalSeparator\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},{\"name\":\"groupingSeparator\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"}}]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
private static final SpecificData MODEL$ = new SpecificData();
private static final BinaryMessageEncoder ENCODER =
new BinaryMessageEncoder<>(MODEL$, SCHEMA$);
private static final BinaryMessageDecoder DECODER =
new BinaryMessageDecoder<>(MODEL$, SCHEMA$);
/**
* Return the BinaryMessageEncoder instance used by this class.
* @return the message encoder used by this class
*/
public static BinaryMessageEncoder getEncoder() {
return ENCODER;
}
/**
* Return the BinaryMessageDecoder instance used by this class.
* @return the message decoder 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
* @return a BinaryMessageDecoder instance for this class backed by the given SchemaStore
*/
public static BinaryMessageDecoder createDecoder(SchemaStore resolver) {
return new BinaryMessageDecoder<>(MODEL$, SCHEMA$, resolver);
}
/**
* Serializes this SearchInput to a ByteBuffer.
* @return a buffer holding the serialized data for this instance
* @throws java.io.IOException if this instance could not be serialized
*/
public java.nio.ByteBuffer toByteBuffer() throws java.io.IOException {
return ENCODER.encode(this);
}
/**
* Deserializes a SearchInput from a ByteBuffer.
* @param b a byte buffer holding serialized data for an instance of this class
* @return a SearchInput instance decoded from the given buffer
* @throws java.io.IOException if the given bytes could not be deserialized into an instance of this class
*/
public static SearchInput fromByteBuffer(
java.nio.ByteBuffer b) throws java.io.IOException {
return DECODER.decode(b);
}
private int maxResult;
private boolean caseSensitive;
private java.lang.String numberFormat;
private java.lang.String dateFormat;
private java.lang.String dateTimeFormat;
private int startIndex;
private java.util.List searchFields;
private boolean exactFilterMatch;
private java.lang.String decimalSeparator;
private java.lang.String groupingSeparator;
/**
* 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 SearchInput() {}
/**
* All-args constructor.
* @param maxResult The new value for maxResult
* @param caseSensitive The new value for caseSensitive
* @param numberFormat The new value for numberFormat
* @param dateFormat The new value for dateFormat
* @param dateTimeFormat The new value for dateTimeFormat
* @param startIndex The new value for startIndex
* @param searchFields The new value for searchFields
* @param exactFilterMatch The new value for exactFilterMatch
* @param decimalSeparator The new value for decimalSeparator
* @param groupingSeparator The new value for groupingSeparator
*/
public SearchInput(java.lang.Integer maxResult, java.lang.Boolean caseSensitive, java.lang.String numberFormat, java.lang.String dateFormat, java.lang.String dateTimeFormat, java.lang.Integer startIndex, java.util.List searchFields, java.lang.Boolean exactFilterMatch, java.lang.String decimalSeparator, java.lang.String groupingSeparator) {
this.maxResult = maxResult;
this.caseSensitive = caseSensitive;
this.numberFormat = numberFormat;
this.dateFormat = dateFormat;
this.dateTimeFormat = dateTimeFormat;
this.startIndex = startIndex;
this.searchFields = searchFields;
this.exactFilterMatch = exactFilterMatch;
this.decimalSeparator = decimalSeparator;
this.groupingSeparator = groupingSeparator;
}
@Override
public org.apache.avro.specific.SpecificData getSpecificData() { return MODEL$; }
@Override
public org.apache.avro.Schema getSchema() { return SCHEMA$; }
// Used by DatumWriter. Applications should not call.
@Override
public java.lang.Object get(int field$) {
switch (field$) {
case 0: return maxResult;
case 1: return caseSensitive;
case 2: return numberFormat;
case 3: return dateFormat;
case 4: return dateTimeFormat;
case 5: return startIndex;
case 6: return searchFields;
case 7: return exactFilterMatch;
case 8: return decimalSeparator;
case 9: return groupingSeparator;
default: throw new IndexOutOfBoundsException("Invalid index: " + field$);
}
}
// Used by DatumReader. Applications should not call.
@Override
@SuppressWarnings(value="unchecked")
public void put(int field$, java.lang.Object value$) {
switch (field$) {
case 0: maxResult = (java.lang.Integer)value$; break;
case 1: caseSensitive = (java.lang.Boolean)value$; break;
case 2: numberFormat = value$ != null ? value$.toString() : null; break;
case 3: dateFormat = value$ != null ? value$.toString() : null; break;
case 4: dateTimeFormat = value$ != null ? value$.toString() : null; break;
case 5: startIndex = (java.lang.Integer)value$; break;
case 6: searchFields = (java.util.List)value$; break;
case 7: exactFilterMatch = (java.lang.Boolean)value$; break;
case 8: decimalSeparator = value$ != null ? value$.toString() : null; break;
case 9: groupingSeparator = value$ != null ? value$.toString() : null; break;
default: throw new IndexOutOfBoundsException("Invalid index: " + field$);
}
}
/**
* Gets the value of the 'maxResult' field.
* @return The value of the 'maxResult' field.
*/
public int getMaxResult() {
return maxResult;
}
/**
* Sets the value of the 'maxResult' field.
* @param value the value to set.
*/
public void setMaxResult(int value) {
this.maxResult = value;
}
/**
* Gets the value of the 'caseSensitive' field.
* @return The value of the 'caseSensitive' field.
*/
public boolean getCaseSensitive() {
return caseSensitive;
}
/**
* Sets the value of the 'caseSensitive' field.
* @param value the value to set.
*/
public void setCaseSensitive(boolean value) {
this.caseSensitive = value;
}
/**
* Gets the value of the 'numberFormat' field.
* @return The value of the 'numberFormat' field.
*/
public java.lang.String getNumberFormat() {
return numberFormat;
}
/**
* Sets the value of the 'numberFormat' field.
* @param value the value to set.
*/
public void setNumberFormat(java.lang.String value) {
this.numberFormat = value;
}
/**
* Gets the value of the 'dateFormat' field.
* @return The value of the 'dateFormat' field.
*/
public java.lang.String getDateFormat() {
return dateFormat;
}
/**
* Sets the value of the 'dateFormat' field.
* @param value the value to set.
*/
public void setDateFormat(java.lang.String value) {
this.dateFormat = value;
}
/**
* Gets the value of the 'dateTimeFormat' field.
* @return The value of the 'dateTimeFormat' field.
*/
public java.lang.String getDateTimeFormat() {
return dateTimeFormat;
}
/**
* Sets the value of the 'dateTimeFormat' field.
* @param value the value to set.
*/
public void setDateTimeFormat(java.lang.String value) {
this.dateTimeFormat = value;
}
/**
* Gets the value of the 'startIndex' field.
* @return The value of the 'startIndex' field.
*/
public int getStartIndex() {
return startIndex;
}
/**
* Sets the value of the 'startIndex' field.
* @param value the value to set.
*/
public void setStartIndex(int value) {
this.startIndex = value;
}
/**
* Gets the value of the 'searchFields' field.
* @return The value of the 'searchFields' field.
*/
public java.util.List getSearchFields() {
return searchFields;
}
/**
* Sets the value of the 'searchFields' field.
* @param value the value to set.
*/
public void setSearchFields(java.util.List value) {
this.searchFields = value;
}
/**
* Gets the value of the 'exactFilterMatch' field.
* @return The value of the 'exactFilterMatch' field.
*/
public boolean getExactFilterMatch() {
return exactFilterMatch;
}
/**
* Sets the value of the 'exactFilterMatch' field.
* @param value the value to set.
*/
public void setExactFilterMatch(boolean value) {
this.exactFilterMatch = value;
}
/**
* Gets the value of the 'decimalSeparator' field.
* @return The value of the 'decimalSeparator' field.
*/
public java.lang.String getDecimalSeparator() {
return decimalSeparator;
}
/**
* Sets the value of the 'decimalSeparator' field.
* @param value the value to set.
*/
public void setDecimalSeparator(java.lang.String value) {
this.decimalSeparator = value;
}
/**
* Gets the value of the 'groupingSeparator' field.
* @return The value of the 'groupingSeparator' field.
*/
public java.lang.String getGroupingSeparator() {
return groupingSeparator;
}
/**
* Sets the value of the 'groupingSeparator' field.
* @param value the value to set.
*/
public void setGroupingSeparator(java.lang.String value) {
this.groupingSeparator = value;
}
/**
* Creates a new SearchInput RecordBuilder.
* @return A new SearchInput RecordBuilder
*/
public static net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder newBuilder() {
return new net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder();
}
/**
* Creates a new SearchInput RecordBuilder by copying an existing Builder.
* @param other The existing builder to copy.
* @return A new SearchInput RecordBuilder
*/
public static net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder newBuilder(net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder other) {
if (other == null) {
return new net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder();
} else {
return new net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder(other);
}
}
/**
* Creates a new SearchInput RecordBuilder by copying an existing SearchInput instance.
* @param other The existing instance to copy.
* @return A new SearchInput RecordBuilder
*/
public static net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder newBuilder(net.sourceforge.jbizmo.commons.avro.search.SearchInput other) {
if (other == null) {
return new net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder();
} else {
return new net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder(other);
}
}
/**
* RecordBuilder for SearchInput instances.
*/
@org.apache.avro.specific.AvroGenerated
public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase
implements org.apache.avro.data.RecordBuilder {
private int maxResult;
private boolean caseSensitive;
private java.lang.String numberFormat;
private java.lang.String dateFormat;
private java.lang.String dateTimeFormat;
private int startIndex;
private java.util.List searchFields;
private boolean exactFilterMatch;
private java.lang.String decimalSeparator;
private java.lang.String groupingSeparator;
/** Creates a new Builder */
private Builder() {
super(SCHEMA$, MODEL$);
}
/**
* Creates a Builder by copying an existing Builder.
* @param other The existing Builder to copy.
*/
private Builder(net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder other) {
super(other);
if (isValidValue(fields()[0], other.maxResult)) {
this.maxResult = data().deepCopy(fields()[0].schema(), other.maxResult);
fieldSetFlags()[0] = other.fieldSetFlags()[0];
}
if (isValidValue(fields()[1], other.caseSensitive)) {
this.caseSensitive = data().deepCopy(fields()[1].schema(), other.caseSensitive);
fieldSetFlags()[1] = other.fieldSetFlags()[1];
}
if (isValidValue(fields()[2], other.numberFormat)) {
this.numberFormat = data().deepCopy(fields()[2].schema(), other.numberFormat);
fieldSetFlags()[2] = other.fieldSetFlags()[2];
}
if (isValidValue(fields()[3], other.dateFormat)) {
this.dateFormat = data().deepCopy(fields()[3].schema(), other.dateFormat);
fieldSetFlags()[3] = other.fieldSetFlags()[3];
}
if (isValidValue(fields()[4], other.dateTimeFormat)) {
this.dateTimeFormat = data().deepCopy(fields()[4].schema(), other.dateTimeFormat);
fieldSetFlags()[4] = other.fieldSetFlags()[4];
}
if (isValidValue(fields()[5], other.startIndex)) {
this.startIndex = data().deepCopy(fields()[5].schema(), other.startIndex);
fieldSetFlags()[5] = other.fieldSetFlags()[5];
}
if (isValidValue(fields()[6], other.searchFields)) {
this.searchFields = data().deepCopy(fields()[6].schema(), other.searchFields);
fieldSetFlags()[6] = other.fieldSetFlags()[6];
}
if (isValidValue(fields()[7], other.exactFilterMatch)) {
this.exactFilterMatch = data().deepCopy(fields()[7].schema(), other.exactFilterMatch);
fieldSetFlags()[7] = other.fieldSetFlags()[7];
}
if (isValidValue(fields()[8], other.decimalSeparator)) {
this.decimalSeparator = data().deepCopy(fields()[8].schema(), other.decimalSeparator);
fieldSetFlags()[8] = other.fieldSetFlags()[8];
}
if (isValidValue(fields()[9], other.groupingSeparator)) {
this.groupingSeparator = data().deepCopy(fields()[9].schema(), other.groupingSeparator);
fieldSetFlags()[9] = other.fieldSetFlags()[9];
}
}
/**
* Creates a Builder by copying an existing SearchInput instance
* @param other The existing instance to copy.
*/
private Builder(net.sourceforge.jbizmo.commons.avro.search.SearchInput other) {
super(SCHEMA$, MODEL$);
if (isValidValue(fields()[0], other.maxResult)) {
this.maxResult = data().deepCopy(fields()[0].schema(), other.maxResult);
fieldSetFlags()[0] = true;
}
if (isValidValue(fields()[1], other.caseSensitive)) {
this.caseSensitive = data().deepCopy(fields()[1].schema(), other.caseSensitive);
fieldSetFlags()[1] = true;
}
if (isValidValue(fields()[2], other.numberFormat)) {
this.numberFormat = data().deepCopy(fields()[2].schema(), other.numberFormat);
fieldSetFlags()[2] = true;
}
if (isValidValue(fields()[3], other.dateFormat)) {
this.dateFormat = data().deepCopy(fields()[3].schema(), other.dateFormat);
fieldSetFlags()[3] = true;
}
if (isValidValue(fields()[4], other.dateTimeFormat)) {
this.dateTimeFormat = data().deepCopy(fields()[4].schema(), other.dateTimeFormat);
fieldSetFlags()[4] = true;
}
if (isValidValue(fields()[5], other.startIndex)) {
this.startIndex = data().deepCopy(fields()[5].schema(), other.startIndex);
fieldSetFlags()[5] = true;
}
if (isValidValue(fields()[6], other.searchFields)) {
this.searchFields = data().deepCopy(fields()[6].schema(), other.searchFields);
fieldSetFlags()[6] = true;
}
if (isValidValue(fields()[7], other.exactFilterMatch)) {
this.exactFilterMatch = data().deepCopy(fields()[7].schema(), other.exactFilterMatch);
fieldSetFlags()[7] = true;
}
if (isValidValue(fields()[8], other.decimalSeparator)) {
this.decimalSeparator = data().deepCopy(fields()[8].schema(), other.decimalSeparator);
fieldSetFlags()[8] = true;
}
if (isValidValue(fields()[9], other.groupingSeparator)) {
this.groupingSeparator = data().deepCopy(fields()[9].schema(), other.groupingSeparator);
fieldSetFlags()[9] = true;
}
}
/**
* Gets the value of the 'maxResult' field.
* @return The value.
*/
public int getMaxResult() {
return maxResult;
}
/**
* Sets the value of the 'maxResult' field.
* @param value The value of 'maxResult'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setMaxResult(int value) {
validate(fields()[0], value);
this.maxResult = value;
fieldSetFlags()[0] = true;
return this;
}
/**
* Checks whether the 'maxResult' field has been set.
* @return True if the 'maxResult' field has been set, false otherwise.
*/
public boolean hasMaxResult() {
return fieldSetFlags()[0];
}
/**
* Clears the value of the 'maxResult' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearMaxResult() {
fieldSetFlags()[0] = false;
return this;
}
/**
* Gets the value of the 'caseSensitive' field.
* @return The value.
*/
public boolean getCaseSensitive() {
return caseSensitive;
}
/**
* Sets the value of the 'caseSensitive' field.
* @param value The value of 'caseSensitive'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setCaseSensitive(boolean value) {
validate(fields()[1], value);
this.caseSensitive = value;
fieldSetFlags()[1] = true;
return this;
}
/**
* Checks whether the 'caseSensitive' field has been set.
* @return True if the 'caseSensitive' field has been set, false otherwise.
*/
public boolean hasCaseSensitive() {
return fieldSetFlags()[1];
}
/**
* Clears the value of the 'caseSensitive' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearCaseSensitive() {
fieldSetFlags()[1] = false;
return this;
}
/**
* Gets the value of the 'numberFormat' field.
* @return The value.
*/
public java.lang.String getNumberFormat() {
return numberFormat;
}
/**
* Sets the value of the 'numberFormat' field.
* @param value The value of 'numberFormat'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setNumberFormat(java.lang.String value) {
validate(fields()[2], value);
this.numberFormat = value;
fieldSetFlags()[2] = true;
return this;
}
/**
* Checks whether the 'numberFormat' field has been set.
* @return True if the 'numberFormat' field has been set, false otherwise.
*/
public boolean hasNumberFormat() {
return fieldSetFlags()[2];
}
/**
* Clears the value of the 'numberFormat' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearNumberFormat() {
numberFormat = null;
fieldSetFlags()[2] = false;
return this;
}
/**
* Gets the value of the 'dateFormat' field.
* @return The value.
*/
public java.lang.String getDateFormat() {
return dateFormat;
}
/**
* Sets the value of the 'dateFormat' field.
* @param value The value of 'dateFormat'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setDateFormat(java.lang.String value) {
validate(fields()[3], value);
this.dateFormat = value;
fieldSetFlags()[3] = true;
return this;
}
/**
* Checks whether the 'dateFormat' field has been set.
* @return True if the 'dateFormat' field has been set, false otherwise.
*/
public boolean hasDateFormat() {
return fieldSetFlags()[3];
}
/**
* Clears the value of the 'dateFormat' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearDateFormat() {
dateFormat = null;
fieldSetFlags()[3] = false;
return this;
}
/**
* Gets the value of the 'dateTimeFormat' field.
* @return The value.
*/
public java.lang.String getDateTimeFormat() {
return dateTimeFormat;
}
/**
* Sets the value of the 'dateTimeFormat' field.
* @param value The value of 'dateTimeFormat'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setDateTimeFormat(java.lang.String value) {
validate(fields()[4], value);
this.dateTimeFormat = value;
fieldSetFlags()[4] = true;
return this;
}
/**
* Checks whether the 'dateTimeFormat' field has been set.
* @return True if the 'dateTimeFormat' field has been set, false otherwise.
*/
public boolean hasDateTimeFormat() {
return fieldSetFlags()[4];
}
/**
* Clears the value of the 'dateTimeFormat' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearDateTimeFormat() {
dateTimeFormat = null;
fieldSetFlags()[4] = false;
return this;
}
/**
* Gets the value of the 'startIndex' field.
* @return The value.
*/
public int getStartIndex() {
return startIndex;
}
/**
* Sets the value of the 'startIndex' field.
* @param value The value of 'startIndex'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setStartIndex(int value) {
validate(fields()[5], value);
this.startIndex = value;
fieldSetFlags()[5] = true;
return this;
}
/**
* Checks whether the 'startIndex' field has been set.
* @return True if the 'startIndex' field has been set, false otherwise.
*/
public boolean hasStartIndex() {
return fieldSetFlags()[5];
}
/**
* Clears the value of the 'startIndex' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearStartIndex() {
fieldSetFlags()[5] = false;
return this;
}
/**
* Gets the value of the 'searchFields' field.
* @return The value.
*/
public java.util.List getSearchFields() {
return searchFields;
}
/**
* Sets the value of the 'searchFields' field.
* @param value The value of 'searchFields'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setSearchFields(java.util.List value) {
validate(fields()[6], value);
this.searchFields = value;
fieldSetFlags()[6] = true;
return this;
}
/**
* Checks whether the 'searchFields' field has been set.
* @return True if the 'searchFields' field has been set, false otherwise.
*/
public boolean hasSearchFields() {
return fieldSetFlags()[6];
}
/**
* Clears the value of the 'searchFields' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearSearchFields() {
searchFields = null;
fieldSetFlags()[6] = false;
return this;
}
/**
* Gets the value of the 'exactFilterMatch' field.
* @return The value.
*/
public boolean getExactFilterMatch() {
return exactFilterMatch;
}
/**
* Sets the value of the 'exactFilterMatch' field.
* @param value The value of 'exactFilterMatch'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setExactFilterMatch(boolean value) {
validate(fields()[7], value);
this.exactFilterMatch = value;
fieldSetFlags()[7] = true;
return this;
}
/**
* Checks whether the 'exactFilterMatch' field has been set.
* @return True if the 'exactFilterMatch' field has been set, false otherwise.
*/
public boolean hasExactFilterMatch() {
return fieldSetFlags()[7];
}
/**
* Clears the value of the 'exactFilterMatch' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearExactFilterMatch() {
fieldSetFlags()[7] = false;
return this;
}
/**
* Gets the value of the 'decimalSeparator' field.
* @return The value.
*/
public java.lang.String getDecimalSeparator() {
return decimalSeparator;
}
/**
* Sets the value of the 'decimalSeparator' field.
* @param value The value of 'decimalSeparator'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setDecimalSeparator(java.lang.String value) {
validate(fields()[8], value);
this.decimalSeparator = value;
fieldSetFlags()[8] = true;
return this;
}
/**
* Checks whether the 'decimalSeparator' field has been set.
* @return True if the 'decimalSeparator' field has been set, false otherwise.
*/
public boolean hasDecimalSeparator() {
return fieldSetFlags()[8];
}
/**
* Clears the value of the 'decimalSeparator' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearDecimalSeparator() {
decimalSeparator = null;
fieldSetFlags()[8] = false;
return this;
}
/**
* Gets the value of the 'groupingSeparator' field.
* @return The value.
*/
public java.lang.String getGroupingSeparator() {
return groupingSeparator;
}
/**
* Sets the value of the 'groupingSeparator' field.
* @param value The value of 'groupingSeparator'.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder setGroupingSeparator(java.lang.String value) {
validate(fields()[9], value);
this.groupingSeparator = value;
fieldSetFlags()[9] = true;
return this;
}
/**
* Checks whether the 'groupingSeparator' field has been set.
* @return True if the 'groupingSeparator' field has been set, false otherwise.
*/
public boolean hasGroupingSeparator() {
return fieldSetFlags()[9];
}
/**
* Clears the value of the 'groupingSeparator' field.
* @return This builder.
*/
public net.sourceforge.jbizmo.commons.avro.search.SearchInput.Builder clearGroupingSeparator() {
groupingSeparator = null;
fieldSetFlags()[9] = false;
return this;
}
@Override
@SuppressWarnings("unchecked")
public SearchInput build() {
try {
SearchInput record = new SearchInput();
record.maxResult = fieldSetFlags()[0] ? this.maxResult : (java.lang.Integer) defaultValue(fields()[0]);
record.caseSensitive = fieldSetFlags()[1] ? this.caseSensitive : (java.lang.Boolean) defaultValue(fields()[1]);
record.numberFormat = fieldSetFlags()[2] ? this.numberFormat : (java.lang.String) defaultValue(fields()[2]);
record.dateFormat = fieldSetFlags()[3] ? this.dateFormat : (java.lang.String) defaultValue(fields()[3]);
record.dateTimeFormat = fieldSetFlags()[4] ? this.dateTimeFormat : (java.lang.String) defaultValue(fields()[4]);
record.startIndex = fieldSetFlags()[5] ? this.startIndex : (java.lang.Integer) defaultValue(fields()[5]);
record.searchFields = fieldSetFlags()[6] ? this.searchFields : (java.util.List) defaultValue(fields()[6]);
record.exactFilterMatch = fieldSetFlags()[7] ? this.exactFilterMatch : (java.lang.Boolean) defaultValue(fields()[7]);
record.decimalSeparator = fieldSetFlags()[8] ? this.decimalSeparator : (java.lang.String) defaultValue(fields()[8]);
record.groupingSeparator = fieldSetFlags()[9] ? this.groupingSeparator : (java.lang.String) defaultValue(fields()[9]);
return record;
} catch (org.apache.avro.AvroMissingFieldException e) {
throw e;
} 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));
}
@Override protected boolean hasCustomCoders() { return true; }
@Override public void customEncode(org.apache.avro.io.Encoder out)
throws java.io.IOException
{
out.writeInt(this.maxResult);
out.writeBoolean(this.caseSensitive);
if (this.numberFormat == null) {
out.writeIndex(1);
out.writeNull();
} else {
out.writeIndex(0);
out.writeString(this.numberFormat);
}
if (this.dateFormat == null) {
out.writeIndex(1);
out.writeNull();
} else {
out.writeIndex(0);
out.writeString(this.dateFormat);
}
if (this.dateTimeFormat == null) {
out.writeIndex(1);
out.writeNull();
} else {
out.writeIndex(0);
out.writeString(this.dateTimeFormat);
}
out.writeInt(this.startIndex);
long size0 = this.searchFields.size();
out.writeArrayStart();
out.setItemCount(size0);
long actualSize0 = 0;
for (net.sourceforge.jbizmo.commons.avro.search.SearchInputField e0: this.searchFields) {
actualSize0++;
out.startItem();
e0.customEncode(out);
}
out.writeArrayEnd();
if (actualSize0 != size0)
throw new java.util.ConcurrentModificationException("Array-size written was " + size0 + ", but element count was " + actualSize0 + ".");
out.writeBoolean(this.exactFilterMatch);
out.writeString(this.decimalSeparator);
out.writeString(this.groupingSeparator);
}
@Override public void customDecode(org.apache.avro.io.ResolvingDecoder in)
throws java.io.IOException
{
org.apache.avro.Schema.Field[] fieldOrder = in.readFieldOrderIfDiff();
if (fieldOrder == null) {
this.maxResult = in.readInt();
this.caseSensitive = in.readBoolean();
if (in.readIndex() != 0) {
in.readNull();
this.numberFormat = null;
} else {
this.numberFormat = in.readString();
}
if (in.readIndex() != 0) {
in.readNull();
this.dateFormat = null;
} else {
this.dateFormat = in.readString();
}
if (in.readIndex() != 0) {
in.readNull();
this.dateTimeFormat = null;
} else {
this.dateTimeFormat = in.readString();
}
this.startIndex = in.readInt();
long size0 = in.readArrayStart();
java.util.List a0 = this.searchFields;
if (a0 == null) {
a0 = new SpecificData.Array((int)size0, SCHEMA$.getField("searchFields").schema());
this.searchFields = a0;
} else a0.clear();
SpecificData.Array ga0 = (a0 instanceof SpecificData.Array ? (SpecificData.Array)a0 : null);
for ( ; 0 < size0; size0 = in.arrayNext()) {
for ( ; size0 != 0; size0--) {
net.sourceforge.jbizmo.commons.avro.search.SearchInputField e0 = (ga0 != null ? ga0.peek() : null);
if (e0 == null) {
e0 = new net.sourceforge.jbizmo.commons.avro.search.SearchInputField();
}
e0.customDecode(in);
a0.add(e0);
}
}
this.exactFilterMatch = in.readBoolean();
this.decimalSeparator = in.readString();
this.groupingSeparator = in.readString();
} else {
for (int i = 0; i < 10; i++) {
switch (fieldOrder[i].pos()) {
case 0:
this.maxResult = in.readInt();
break;
case 1:
this.caseSensitive = in.readBoolean();
break;
case 2:
if (in.readIndex() != 0) {
in.readNull();
this.numberFormat = null;
} else {
this.numberFormat = in.readString();
}
break;
case 3:
if (in.readIndex() != 0) {
in.readNull();
this.dateFormat = null;
} else {
this.dateFormat = in.readString();
}
break;
case 4:
if (in.readIndex() != 0) {
in.readNull();
this.dateTimeFormat = null;
} else {
this.dateTimeFormat = in.readString();
}
break;
case 5:
this.startIndex = in.readInt();
break;
case 6:
long size0 = in.readArrayStart();
java.util.List a0 = this.searchFields;
if (a0 == null) {
a0 = new SpecificData.Array((int)size0, SCHEMA$.getField("searchFields").schema());
this.searchFields = a0;
} else a0.clear();
SpecificData.Array ga0 = (a0 instanceof SpecificData.Array ? (SpecificData.Array)a0 : null);
for ( ; 0 < size0; size0 = in.arrayNext()) {
for ( ; size0 != 0; size0--) {
net.sourceforge.jbizmo.commons.avro.search.SearchInputField e0 = (ga0 != null ? ga0.peek() : null);
if (e0 == null) {
e0 = new net.sourceforge.jbizmo.commons.avro.search.SearchInputField();
}
e0.customDecode(in);
a0.add(e0);
}
}
break;
case 7:
this.exactFilterMatch = in.readBoolean();
break;
case 8:
this.decimalSeparator = in.readString();
break;
case 9:
this.groupingSeparator = in.readString();
break;
default:
throw new java.io.IOException("Corrupt ResolvingDecoder.");
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy