| /* |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| /** |
| * Autogenerated by Thrift Compiler (0.11.0) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| package org.apache.accumulo.core.client.impl.thrift; |
| |
| @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) |
| @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)") |
| public class ThriftTableOperationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<ThriftTableOperationException, ThriftTableOperationException._Fields>, java.io.Serializable, Cloneable, Comparable<ThriftTableOperationException> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ThriftTableOperationException"); |
| |
| private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tableId", org.apache.thrift.protocol.TType.STRING, (short)1); |
| private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2); |
| private static final org.apache.thrift.protocol.TField OP_FIELD_DESC = new org.apache.thrift.protocol.TField("op", org.apache.thrift.protocol.TType.I32, (short)3); |
| private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)4); |
| private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)5); |
| |
| private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ThriftTableOperationExceptionStandardSchemeFactory(); |
| private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ThriftTableOperationExceptionTupleSchemeFactory(); |
| |
| public java.lang.String tableId; // required |
| public java.lang.String tableName; // required |
| /** |
| * |
| * @see TableOperation |
| */ |
| public TableOperation op; // required |
| /** |
| * |
| * @see TableOperationExceptionType |
| */ |
| public TableOperationExceptionType type; // required |
| public java.lang.String description; // required |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| TABLE_ID((short)1, "tableId"), |
| TABLE_NAME((short)2, "tableName"), |
| /** |
| * |
| * @see TableOperation |
| */ |
| OP((short)3, "op"), |
| /** |
| * |
| * @see TableOperationExceptionType |
| */ |
| TYPE((short)4, "type"), |
| DESCRIPTION((short)5, "description"); |
| |
| private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); |
| |
| static { |
| for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // TABLE_ID |
| return TABLE_ID; |
| case 2: // TABLE_NAME |
| return TABLE_NAME; |
| case 3: // OP |
| return OP; |
| case 4: // TYPE |
| return TYPE; |
| case 5: // DESCRIPTION |
| return DESCRIPTION; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(java.lang.String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final java.lang.String _fieldName; |
| |
| _Fields(short thriftId, java.lang.String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public java.lang.String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("tableId", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.OP, new org.apache.thrift.meta_data.FieldMetaData("op", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TableOperation.class))); |
| tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TableOperationExceptionType.class))); |
| tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ThriftTableOperationException.class, metaDataMap); |
| } |
| |
| public ThriftTableOperationException() { |
| } |
| |
| public ThriftTableOperationException( |
| java.lang.String tableId, |
| java.lang.String tableName, |
| TableOperation op, |
| TableOperationExceptionType type, |
| java.lang.String description) |
| { |
| this(); |
| this.tableId = tableId; |
| this.tableName = tableName; |
| this.op = op; |
| this.type = type; |
| this.description = description; |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public ThriftTableOperationException(ThriftTableOperationException other) { |
| if (other.isSetTableId()) { |
| this.tableId = other.tableId; |
| } |
| if (other.isSetTableName()) { |
| this.tableName = other.tableName; |
| } |
| if (other.isSetOp()) { |
| this.op = other.op; |
| } |
| if (other.isSetType()) { |
| this.type = other.type; |
| } |
| if (other.isSetDescription()) { |
| this.description = other.description; |
| } |
| } |
| |
| public ThriftTableOperationException deepCopy() { |
| return new ThriftTableOperationException(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.tableId = null; |
| this.tableName = null; |
| this.op = null; |
| this.type = null; |
| this.description = null; |
| } |
| |
| public java.lang.String getTableId() { |
| return this.tableId; |
| } |
| |
| public ThriftTableOperationException setTableId(java.lang.String tableId) { |
| this.tableId = tableId; |
| return this; |
| } |
| |
| public void unsetTableId() { |
| this.tableId = null; |
| } |
| |
| /** Returns true if field tableId is set (has been assigned a value) and false otherwise */ |
| public boolean isSetTableId() { |
| return this.tableId != null; |
| } |
| |
| public void setTableIdIsSet(boolean value) { |
| if (!value) { |
| this.tableId = null; |
| } |
| } |
| |
| public java.lang.String getTableName() { |
| return this.tableName; |
| } |
| |
| public ThriftTableOperationException setTableName(java.lang.String tableName) { |
| this.tableName = tableName; |
| return this; |
| } |
| |
| public void unsetTableName() { |
| this.tableName = null; |
| } |
| |
| /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ |
| public boolean isSetTableName() { |
| return this.tableName != null; |
| } |
| |
| public void setTableNameIsSet(boolean value) { |
| if (!value) { |
| this.tableName = null; |
| } |
| } |
| |
| /** |
| * |
| * @see TableOperation |
| */ |
| public TableOperation getOp() { |
| return this.op; |
| } |
| |
| /** |
| * |
| * @see TableOperation |
| */ |
| public ThriftTableOperationException setOp(TableOperation op) { |
| this.op = op; |
| return this; |
| } |
| |
| public void unsetOp() { |
| this.op = null; |
| } |
| |
| /** Returns true if field op is set (has been assigned a value) and false otherwise */ |
| public boolean isSetOp() { |
| return this.op != null; |
| } |
| |
| public void setOpIsSet(boolean value) { |
| if (!value) { |
| this.op = null; |
| } |
| } |
| |
| /** |
| * |
| * @see TableOperationExceptionType |
| */ |
| public TableOperationExceptionType getType() { |
| return this.type; |
| } |
| |
| /** |
| * |
| * @see TableOperationExceptionType |
| */ |
| public ThriftTableOperationException setType(TableOperationExceptionType type) { |
| this.type = type; |
| return this; |
| } |
| |
| public void unsetType() { |
| this.type = null; |
| } |
| |
| /** Returns true if field type is set (has been assigned a value) and false otherwise */ |
| public boolean isSetType() { |
| return this.type != null; |
| } |
| |
| public void setTypeIsSet(boolean value) { |
| if (!value) { |
| this.type = null; |
| } |
| } |
| |
| public java.lang.String getDescription() { |
| return this.description; |
| } |
| |
| public ThriftTableOperationException setDescription(java.lang.String description) { |
| this.description = description; |
| return this; |
| } |
| |
| public void unsetDescription() { |
| this.description = null; |
| } |
| |
| /** Returns true if field description is set (has been assigned a value) and false otherwise */ |
| public boolean isSetDescription() { |
| return this.description != null; |
| } |
| |
| public void setDescriptionIsSet(boolean value) { |
| if (!value) { |
| this.description = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, java.lang.Object value) { |
| switch (field) { |
| case TABLE_ID: |
| if (value == null) { |
| unsetTableId(); |
| } else { |
| setTableId((java.lang.String)value); |
| } |
| break; |
| |
| case TABLE_NAME: |
| if (value == null) { |
| unsetTableName(); |
| } else { |
| setTableName((java.lang.String)value); |
| } |
| break; |
| |
| case OP: |
| if (value == null) { |
| unsetOp(); |
| } else { |
| setOp((TableOperation)value); |
| } |
| break; |
| |
| case TYPE: |
| if (value == null) { |
| unsetType(); |
| } else { |
| setType((TableOperationExceptionType)value); |
| } |
| break; |
| |
| case DESCRIPTION: |
| if (value == null) { |
| unsetDescription(); |
| } else { |
| setDescription((java.lang.String)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public java.lang.Object getFieldValue(_Fields field) { |
| switch (field) { |
| case TABLE_ID: |
| return getTableId(); |
| |
| case TABLE_NAME: |
| return getTableName(); |
| |
| case OP: |
| return getOp(); |
| |
| case TYPE: |
| return getType(); |
| |
| case DESCRIPTION: |
| return getDescription(); |
| |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new java.lang.IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case TABLE_ID: |
| return isSetTableId(); |
| case TABLE_NAME: |
| return isSetTableName(); |
| case OP: |
| return isSetOp(); |
| case TYPE: |
| return isSetType(); |
| case DESCRIPTION: |
| return isSetDescription(); |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(java.lang.Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof ThriftTableOperationException) |
| return this.equals((ThriftTableOperationException)that); |
| return false; |
| } |
| |
| public boolean equals(ThriftTableOperationException that) { |
| if (that == null) |
| return false; |
| if (this == that) |
| return true; |
| |
| boolean this_present_tableId = true && this.isSetTableId(); |
| boolean that_present_tableId = true && that.isSetTableId(); |
| if (this_present_tableId || that_present_tableId) { |
| if (!(this_present_tableId && that_present_tableId)) |
| return false; |
| if (!this.tableId.equals(that.tableId)) |
| return false; |
| } |
| |
| boolean this_present_tableName = true && this.isSetTableName(); |
| boolean that_present_tableName = true && that.isSetTableName(); |
| if (this_present_tableName || that_present_tableName) { |
| if (!(this_present_tableName && that_present_tableName)) |
| return false; |
| if (!this.tableName.equals(that.tableName)) |
| return false; |
| } |
| |
| boolean this_present_op = true && this.isSetOp(); |
| boolean that_present_op = true && that.isSetOp(); |
| if (this_present_op || that_present_op) { |
| if (!(this_present_op && that_present_op)) |
| return false; |
| if (!this.op.equals(that.op)) |
| return false; |
| } |
| |
| boolean this_present_type = true && this.isSetType(); |
| boolean that_present_type = true && that.isSetType(); |
| if (this_present_type || that_present_type) { |
| if (!(this_present_type && that_present_type)) |
| return false; |
| if (!this.type.equals(that.type)) |
| return false; |
| } |
| |
| boolean this_present_description = true && this.isSetDescription(); |
| boolean that_present_description = true && that.isSetDescription(); |
| if (this_present_description || that_present_description) { |
| if (!(this_present_description && that_present_description)) |
| return false; |
| if (!this.description.equals(that.description)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| int hashCode = 1; |
| |
| hashCode = hashCode * 8191 + ((isSetTableId()) ? 131071 : 524287); |
| if (isSetTableId()) |
| hashCode = hashCode * 8191 + tableId.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetTableName()) ? 131071 : 524287); |
| if (isSetTableName()) |
| hashCode = hashCode * 8191 + tableName.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetOp()) ? 131071 : 524287); |
| if (isSetOp()) |
| hashCode = hashCode * 8191 + op.getValue(); |
| |
| hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287); |
| if (isSetType()) |
| hashCode = hashCode * 8191 + type.getValue(); |
| |
| hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287); |
| if (isSetDescription()) |
| hashCode = hashCode * 8191 + description.hashCode(); |
| |
| return hashCode; |
| } |
| |
| @Override |
| public int compareTo(ThriftTableOperationException other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = java.lang.Boolean.valueOf(isSetTableId()).compareTo(other.isSetTableId()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetTableId()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableId, other.tableId); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetTableName()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetOp()).compareTo(other.isSetOp()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetOp()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.op, other.op); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetType()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetDescription()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| scheme(iprot).read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| scheme(oprot).write(oprot, this); |
| } |
| |
| @Override |
| public java.lang.String toString() { |
| java.lang.StringBuilder sb = new java.lang.StringBuilder("ThriftTableOperationException("); |
| boolean first = true; |
| |
| sb.append("tableId:"); |
| if (this.tableId == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.tableId); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("tableName:"); |
| if (this.tableName == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.tableName); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("op:"); |
| if (this.op == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.op); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("type:"); |
| if (this.type == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.type); |
| } |
| first = false; |
| if (!first) sb.append(", "); |
| sb.append("description:"); |
| if (this.description == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.description); |
| } |
| first = false; |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class ThriftTableOperationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public ThriftTableOperationExceptionStandardScheme getScheme() { |
| return new ThriftTableOperationExceptionStandardScheme(); |
| } |
| } |
| |
| private static class ThriftTableOperationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<ThriftTableOperationException> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, ThriftTableOperationException struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // TABLE_ID |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.tableId = iprot.readString(); |
| struct.setTableIdIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 2: // TABLE_NAME |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.tableName = iprot.readString(); |
| struct.setTableNameIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 3: // OP |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.op = org.apache.accumulo.core.client.impl.thrift.TableOperation.findByValue(iprot.readI32()); |
| struct.setOpIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 4: // TYPE |
| if (schemeField.type == org.apache.thrift.protocol.TType.I32) { |
| struct.type = org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType.findByValue(iprot.readI32()); |
| struct.setTypeIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 5: // DESCRIPTION |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.description = iprot.readString(); |
| struct.setDescriptionIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| |
| // check for required fields of primitive type, which can't be checked in the validate method |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, ThriftTableOperationException struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.tableId != null) { |
| oprot.writeFieldBegin(TABLE_ID_FIELD_DESC); |
| oprot.writeString(struct.tableId); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.tableName != null) { |
| oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); |
| oprot.writeString(struct.tableName); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.op != null) { |
| oprot.writeFieldBegin(OP_FIELD_DESC); |
| oprot.writeI32(struct.op.getValue()); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.type != null) { |
| oprot.writeFieldBegin(TYPE_FIELD_DESC); |
| oprot.writeI32(struct.type.getValue()); |
| oprot.writeFieldEnd(); |
| } |
| if (struct.description != null) { |
| oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); |
| oprot.writeString(struct.description); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class ThriftTableOperationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public ThriftTableOperationExceptionTupleScheme getScheme() { |
| return new ThriftTableOperationExceptionTupleScheme(); |
| } |
| } |
| |
| private static class ThriftTableOperationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<ThriftTableOperationException> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, ThriftTableOperationException struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| java.util.BitSet optionals = new java.util.BitSet(); |
| if (struct.isSetTableId()) { |
| optionals.set(0); |
| } |
| if (struct.isSetTableName()) { |
| optionals.set(1); |
| } |
| if (struct.isSetOp()) { |
| optionals.set(2); |
| } |
| if (struct.isSetType()) { |
| optionals.set(3); |
| } |
| if (struct.isSetDescription()) { |
| optionals.set(4); |
| } |
| oprot.writeBitSet(optionals, 5); |
| if (struct.isSetTableId()) { |
| oprot.writeString(struct.tableId); |
| } |
| if (struct.isSetTableName()) { |
| oprot.writeString(struct.tableName); |
| } |
| if (struct.isSetOp()) { |
| oprot.writeI32(struct.op.getValue()); |
| } |
| if (struct.isSetType()) { |
| oprot.writeI32(struct.type.getValue()); |
| } |
| if (struct.isSetDescription()) { |
| oprot.writeString(struct.description); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, ThriftTableOperationException struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| java.util.BitSet incoming = iprot.readBitSet(5); |
| if (incoming.get(0)) { |
| struct.tableId = iprot.readString(); |
| struct.setTableIdIsSet(true); |
| } |
| if (incoming.get(1)) { |
| struct.tableName = iprot.readString(); |
| struct.setTableNameIsSet(true); |
| } |
| if (incoming.get(2)) { |
| struct.op = org.apache.accumulo.core.client.impl.thrift.TableOperation.findByValue(iprot.readI32()); |
| struct.setOpIsSet(true); |
| } |
| if (incoming.get(3)) { |
| struct.type = org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType.findByValue(iprot.readI32()); |
| struct.setTypeIsSet(true); |
| } |
| if (incoming.get(4)) { |
| struct.description = iprot.readString(); |
| struct.setDescriptionIsSet(true); |
| } |
| } |
| } |
| |
| private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { |
| return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); |
| } |
| private static void unusedMethod() {} |
| } |
| |