Repository: incubator-blur Updated Branches: refs/heads/blur-platform 067b8d4fb -> 4d954b15e
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4d954b15/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AdhocByteCodeCommandRequest.java ---------------------------------------------------------------------- diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AdhocByteCodeCommandRequest.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AdhocByteCodeCommandRequest.java deleted file mode 100644 index 015ccf3..0000000 --- a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AdhocByteCodeCommandRequest.java +++ /dev/null @@ -1,1041 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.blur.thrift.generated; - -/** - * 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. - */ - - - -import org.apache.blur.thirdparty.thrift_0_9_0.scheme.IScheme; -import org.apache.blur.thirdparty.thrift_0_9_0.scheme.SchemeFactory; -import org.apache.blur.thirdparty.thrift_0_9_0.scheme.StandardScheme; - -import org.apache.blur.thirdparty.thrift_0_9_0.scheme.TupleScheme; -import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol; -import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolException; -import org.apache.blur.thirdparty.thrift_0_9_0.EncodingUtils; -import org.apache.blur.thirdparty.thrift_0_9_0.TException; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -//import org.slf4j.Logger; -//import org.slf4j.LoggerFactory; - -/** - * Carries ad hoc byte code based execution commands. - */ -public class AdHocByteCodeCommandRequest implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<AdHocByteCodeCommandRequest, AdHocByteCodeCommandRequest._Fields>, java.io.Serializable, Cloneable { - private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("AdHocByteCodeCommandRequest"); - - private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField TABLES_TO_INVOKE_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("tablesToInvoke", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.SET, (short)1); - private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField ARGUMENTS_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("arguments", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.LIST, (short)2); - private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField INSTANCE_DATA_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("instanceData", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, (short)3); - private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField CLASS_DATA_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("classData", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, (short)4); - private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField LIBRARIES_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("libraries", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.LIST, (short)5); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AdHocByteCodeCommandRequestStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AdHocByteCodeCommandRequestTupleSchemeFactory()); - } - - public Set<String> tablesToInvoke; // required - public List<Value> arguments; // required - public ByteBuffer instanceData; // required - public Map<String,ByteBuffer> classData; // required - public List<String> libraries; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum { - TABLES_TO_INVOKE((short)1, "tablesToInvoke"), - ARGUMENTS((short)2, "arguments"), - INSTANCE_DATA((short)3, "instanceData"), - CLASS_DATA((short)4, "classData"), - LIBRARIES((short)5, "libraries"); - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : 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: // TABLES_TO_INVOKE - return TABLES_TO_INVOKE; - case 2: // ARGUMENTS - return ARGUMENTS; - case 3: // INSTANCE_DATA - return INSTANCE_DATA; - case 4: // CLASS_DATA - return CLASS_DATA; - case 5: // LIBRARIES - return LIBRARIES; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TABLES_TO_INVOKE, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("tablesToInvoke", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.SetMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.SET, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)))); - tmpMap.put(_Fields.ARGUMENTS, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("arguments", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.ListMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.LIST, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Value.class)))); - tmpMap.put(_Fields.INSTANCE_DATA, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("instanceData", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING , true))); - tmpMap.put(_Fields.CLASS_DATA, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("classData", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.MapMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING), - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING , true)))); - tmpMap.put(_Fields.LIBRARIES, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("libraries", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.ListMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.LIST, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(AdHocByteCodeCommandRequest.class, metaDataMap); - } - - public AdHocByteCodeCommandRequest() { - } - - public AdHocByteCodeCommandRequest( - Set<String> tablesToInvoke, - List<Value> arguments, - ByteBuffer instanceData, - Map<String,ByteBuffer> classData, - List<String> libraries) - { - this(); - this.tablesToInvoke = tablesToInvoke; - this.arguments = arguments; - this.instanceData = instanceData; - this.classData = classData; - this.libraries = libraries; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public AdHocByteCodeCommandRequest(AdHocByteCodeCommandRequest other) { - if (other.isSetTablesToInvoke()) { - Set<String> __this__tablesToInvoke = new HashSet<String>(); - for (String other_element : other.tablesToInvoke) { - __this__tablesToInvoke.add(other_element); - } - this.tablesToInvoke = __this__tablesToInvoke; - } - if (other.isSetArguments()) { - List<Value> __this__arguments = new ArrayList<Value>(); - for (Value other_element : other.arguments) { - __this__arguments.add(new Value(other_element)); - } - this.arguments = __this__arguments; - } - if (other.isSetInstanceData()) { - this.instanceData = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.copyBinary(other.instanceData); -; - } - if (other.isSetClassData()) { - Map<String,ByteBuffer> __this__classData = new HashMap<String,ByteBuffer>(); - for (Map.Entry<String, ByteBuffer> other_element : other.classData.entrySet()) { - - String other_element_key = other_element.getKey(); - ByteBuffer other_element_value = other_element.getValue(); - - String __this__classData_copy_key = other_element_key; - - ByteBuffer __this__classData_copy_value = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.copyBinary(other_element_value); -; - - __this__classData.put(__this__classData_copy_key, __this__classData_copy_value); - } - this.classData = __this__classData; - } - if (other.isSetLibraries()) { - List<String> __this__libraries = new ArrayList<String>(); - for (String other_element : other.libraries) { - __this__libraries.add(other_element); - } - this.libraries = __this__libraries; - } - } - - public AdHocByteCodeCommandRequest deepCopy() { - return new AdHocByteCodeCommandRequest(this); - } - - @Override - public void clear() { - this.tablesToInvoke = null; - this.arguments = null; - this.instanceData = null; - this.classData = null; - this.libraries = null; - } - - public int getTablesToInvokeSize() { - return (this.tablesToInvoke == null) ? 0 : this.tablesToInvoke.size(); - } - - public java.util.Iterator<String> getTablesToInvokeIterator() { - return (this.tablesToInvoke == null) ? null : this.tablesToInvoke.iterator(); - } - - public void addToTablesToInvoke(String elem) { - if (this.tablesToInvoke == null) { - this.tablesToInvoke = new HashSet<String>(); - } - this.tablesToInvoke.add(elem); - } - - public Set<String> getTablesToInvoke() { - return this.tablesToInvoke; - } - - public AdHocByteCodeCommandRequest setTablesToInvoke(Set<String> tablesToInvoke) { - this.tablesToInvoke = tablesToInvoke; - return this; - } - - public void unsetTablesToInvoke() { - this.tablesToInvoke = null; - } - - /** Returns true if field tablesToInvoke is set (has been assigned a value) and false otherwise */ - public boolean isSetTablesToInvoke() { - return this.tablesToInvoke != null; - } - - public void setTablesToInvokeIsSet(boolean value) { - if (!value) { - this.tablesToInvoke = null; - } - } - - public int getArgumentsSize() { - return (this.arguments == null) ? 0 : this.arguments.size(); - } - - public java.util.Iterator<Value> getArgumentsIterator() { - return (this.arguments == null) ? null : this.arguments.iterator(); - } - - public void addToArguments(Value elem) { - if (this.arguments == null) { - this.arguments = new ArrayList<Value>(); - } - this.arguments.add(elem); - } - - public List<Value> getArguments() { - return this.arguments; - } - - public AdHocByteCodeCommandRequest setArguments(List<Value> arguments) { - this.arguments = arguments; - return this; - } - - public void unsetArguments() { - this.arguments = null; - } - - /** Returns true if field arguments is set (has been assigned a value) and false otherwise */ - public boolean isSetArguments() { - return this.arguments != null; - } - - public void setArgumentsIsSet(boolean value) { - if (!value) { - this.arguments = null; - } - } - - public byte[] getInstanceData() { - setInstanceData(org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.rightSize(instanceData)); - return instanceData == null ? null : instanceData.array(); - } - - public ByteBuffer bufferForInstanceData() { - return instanceData; - } - - public AdHocByteCodeCommandRequest setInstanceData(byte[] instanceData) { - setInstanceData(instanceData == null ? (ByteBuffer)null : ByteBuffer.wrap(instanceData)); - return this; - } - - public AdHocByteCodeCommandRequest setInstanceData(ByteBuffer instanceData) { - this.instanceData = instanceData; - return this; - } - - public void unsetInstanceData() { - this.instanceData = null; - } - - /** Returns true if field instanceData is set (has been assigned a value) and false otherwise */ - public boolean isSetInstanceData() { - return this.instanceData != null; - } - - public void setInstanceDataIsSet(boolean value) { - if (!value) { - this.instanceData = null; - } - } - - public int getClassDataSize() { - return (this.classData == null) ? 0 : this.classData.size(); - } - - public void putToClassData(String key, ByteBuffer val) { - if (this.classData == null) { - this.classData = new HashMap<String,ByteBuffer>(); - } - this.classData.put(key, val); - } - - public Map<String,ByteBuffer> getClassData() { - return this.classData; - } - - public AdHocByteCodeCommandRequest setClassData(Map<String,ByteBuffer> classData) { - this.classData = classData; - return this; - } - - public void unsetClassData() { - this.classData = null; - } - - /** Returns true if field classData is set (has been assigned a value) and false otherwise */ - public boolean isSetClassData() { - return this.classData != null; - } - - public void setClassDataIsSet(boolean value) { - if (!value) { - this.classData = null; - } - } - - public int getLibrariesSize() { - return (this.libraries == null) ? 0 : this.libraries.size(); - } - - public java.util.Iterator<String> getLibrariesIterator() { - return (this.libraries == null) ? null : this.libraries.iterator(); - } - - public void addToLibraries(String elem) { - if (this.libraries == null) { - this.libraries = new ArrayList<String>(); - } - this.libraries.add(elem); - } - - public List<String> getLibraries() { - return this.libraries; - } - - public AdHocByteCodeCommandRequest setLibraries(List<String> libraries) { - this.libraries = libraries; - return this; - } - - public void unsetLibraries() { - this.libraries = null; - } - - /** Returns true if field libraries is set (has been assigned a value) and false otherwise */ - public boolean isSetLibraries() { - return this.libraries != null; - } - - public void setLibrariesIsSet(boolean value) { - if (!value) { - this.libraries = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TABLES_TO_INVOKE: - if (value == null) { - unsetTablesToInvoke(); - } else { - setTablesToInvoke((Set<String>)value); - } - break; - - case ARGUMENTS: - if (value == null) { - unsetArguments(); - } else { - setArguments((List<Value>)value); - } - break; - - case INSTANCE_DATA: - if (value == null) { - unsetInstanceData(); - } else { - setInstanceData((ByteBuffer)value); - } - break; - - case CLASS_DATA: - if (value == null) { - unsetClassData(); - } else { - setClassData((Map<String,ByteBuffer>)value); - } - break; - - case LIBRARIES: - if (value == null) { - unsetLibraries(); - } else { - setLibraries((List<String>)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TABLES_TO_INVOKE: - return getTablesToInvoke(); - - case ARGUMENTS: - return getArguments(); - - case INSTANCE_DATA: - return getInstanceData(); - - case CLASS_DATA: - return getClassData(); - - case LIBRARIES: - return getLibraries(); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case TABLES_TO_INVOKE: - return isSetTablesToInvoke(); - case ARGUMENTS: - return isSetArguments(); - case INSTANCE_DATA: - return isSetInstanceData(); - case CLASS_DATA: - return isSetClassData(); - case LIBRARIES: - return isSetLibraries(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AdHocByteCodeCommandRequest) - return this.equals((AdHocByteCodeCommandRequest)that); - return false; - } - - public boolean equals(AdHocByteCodeCommandRequest that) { - if (that == null) - return false; - - boolean this_present_tablesToInvoke = true && this.isSetTablesToInvoke(); - boolean that_present_tablesToInvoke = true && that.isSetTablesToInvoke(); - if (this_present_tablesToInvoke || that_present_tablesToInvoke) { - if (!(this_present_tablesToInvoke && that_present_tablesToInvoke)) - return false; - if (!this.tablesToInvoke.equals(that.tablesToInvoke)) - return false; - } - - boolean this_present_arguments = true && this.isSetArguments(); - boolean that_present_arguments = true && that.isSetArguments(); - if (this_present_arguments || that_present_arguments) { - if (!(this_present_arguments && that_present_arguments)) - return false; - if (!this.arguments.equals(that.arguments)) - return false; - } - - boolean this_present_instanceData = true && this.isSetInstanceData(); - boolean that_present_instanceData = true && that.isSetInstanceData(); - if (this_present_instanceData || that_present_instanceData) { - if (!(this_present_instanceData && that_present_instanceData)) - return false; - if (!this.instanceData.equals(that.instanceData)) - return false; - } - - boolean this_present_classData = true && this.isSetClassData(); - boolean that_present_classData = true && that.isSetClassData(); - if (this_present_classData || that_present_classData) { - if (!(this_present_classData && that_present_classData)) - return false; - if (!this.classData.equals(that.classData)) - return false; - } - - boolean this_present_libraries = true && this.isSetLibraries(); - boolean that_present_libraries = true && that.isSetLibraries(); - if (this_present_libraries || that_present_libraries) { - if (!(this_present_libraries && that_present_libraries)) - return false; - if (!this.libraries.equals(that.libraries)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(AdHocByteCodeCommandRequest other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - AdHocByteCodeCommandRequest typedOther = (AdHocByteCodeCommandRequest)other; - - lastComparison = Boolean.valueOf(isSetTablesToInvoke()).compareTo(typedOther.isSetTablesToInvoke()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetTablesToInvoke()) { - lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.tablesToInvoke, typedOther.tablesToInvoke); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetArguments()).compareTo(typedOther.isSetArguments()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetArguments()) { - lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.arguments, typedOther.arguments); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetInstanceData()).compareTo(typedOther.isSetInstanceData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInstanceData()) { - lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.instanceData, typedOther.instanceData); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetClassData()).compareTo(typedOther.isSetClassData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetClassData()) { - lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.classData, typedOther.classData); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLibraries()).compareTo(typedOther.isSetLibraries()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLibraries()) { - lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.libraries, typedOther.libraries); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("AdHocByteCodeCommandRequest("); - boolean first = true; - - sb.append("tablesToInvoke:"); - if (this.tablesToInvoke == null) { - sb.append("null"); - } else { - sb.append(this.tablesToInvoke); - } - first = false; - if (!first) sb.append(", "); - sb.append("arguments:"); - if (this.arguments == null) { - sb.append("null"); - } else { - sb.append(this.arguments); - } - first = false; - if (!first) sb.append(", "); - sb.append("instanceData:"); - if (this.instanceData == null) { - sb.append("null"); - } else { - org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.toString(this.instanceData, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("classData:"); - if (this.classData == null) { - sb.append("null"); - } else { - sb.append(this.classData); - } - first = false; - if (!first) sb.append(", "); - sb.append("libraries:"); - if (this.libraries == null) { - sb.append("null"); - } else { - sb.append(this.libraries); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out))); - } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in))); - } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) { - throw new java.io.IOException(te); - } - } - - private static class AdHocByteCodeCommandRequestStandardSchemeFactory implements SchemeFactory { - public AdHocByteCodeCommandRequestStandardScheme getScheme() { - return new AdHocByteCodeCommandRequestStandardScheme(); - } - } - - private static class AdHocByteCodeCommandRequestStandardScheme extends StandardScheme<AdHocByteCodeCommandRequest> { - - public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, AdHocByteCodeCommandRequest struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TABLES_TO_INVOKE - if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.SET) { - { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TSet _set232 = iprot.readSetBegin(); - struct.tablesToInvoke = new HashSet<String>(2*_set232.size); - for (int _i233 = 0; _i233 < _set232.size; ++_i233) - { - String _elem234; // required - _elem234 = iprot.readString(); - struct.tablesToInvoke.add(_elem234); - } - iprot.readSetEnd(); - } - struct.setTablesToInvokeIsSet(true); - } else { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ARGUMENTS - if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.LIST) { - { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list235 = iprot.readListBegin(); - struct.arguments = new ArrayList<Value>(_list235.size); - for (int _i236 = 0; _i236 < _list235.size; ++_i236) - { - Value _elem237; // required - _elem237 = new Value(); - _elem237.read(iprot); - struct.arguments.add(_elem237); - } - iprot.readListEnd(); - } - struct.setArgumentsIsSet(true); - } else { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // INSTANCE_DATA - if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING) { - struct.instanceData = iprot.readBinary(); - struct.setInstanceDataIsSet(true); - } else { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // CLASS_DATA - if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.MAP) { - { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map238 = iprot.readMapBegin(); - struct.classData = new HashMap<String,ByteBuffer>(2*_map238.size); - for (int _i239 = 0; _i239 < _map238.size; ++_i239) - { - String _key240; // optional - ByteBuffer _val241; // required - _key240 = iprot.readString(); - _val241 = iprot.readBinary(); - struct.classData.put(_key240, _val241); - } - iprot.readMapEnd(); - } - struct.setClassDataIsSet(true); - } else { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // LIBRARIES - if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.LIST) { - { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list242 = iprot.readListBegin(); - struct.libraries = new ArrayList<String>(_list242.size); - for (int _i243 = 0; _i243 < _list242.size; ++_i243) - { - String _elem244; // required - _elem244 = iprot.readString(); - struct.libraries.add(_elem244); - } - iprot.readListEnd(); - } - struct.setLibrariesIsSet(true); - } else { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, AdHocByteCodeCommandRequest struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.tablesToInvoke != null) { - oprot.writeFieldBegin(TABLES_TO_INVOKE_FIELD_DESC); - { - oprot.writeSetBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TSet(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, struct.tablesToInvoke.size())); - for (String _iter245 : struct.tablesToInvoke) - { - oprot.writeString(_iter245); - } - oprot.writeSetEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.arguments != null) { - oprot.writeFieldBegin(ARGUMENTS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, struct.arguments.size())); - for (Value _iter246 : struct.arguments) - { - _iter246.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.instanceData != null) { - oprot.writeFieldBegin(INSTANCE_DATA_FIELD_DESC); - oprot.writeBinary(struct.instanceData); - oprot.writeFieldEnd(); - } - if (struct.classData != null) { - oprot.writeFieldBegin(CLASS_DATA_FIELD_DESC); - { - oprot.writeMapBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, struct.classData.size())); - for (Map.Entry<String, ByteBuffer> _iter247 : struct.classData.entrySet()) - { - oprot.writeString(_iter247.getKey()); - oprot.writeBinary(_iter247.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.libraries != null) { - oprot.writeFieldBegin(LIBRARIES_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, struct.libraries.size())); - for (String _iter248 : struct.libraries) - { - oprot.writeString(_iter248); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AdHocByteCodeCommandRequestTupleSchemeFactory implements SchemeFactory { - public AdHocByteCodeCommandRequestTupleScheme getScheme() { - return new AdHocByteCodeCommandRequestTupleScheme(); - } - } - - private static class AdHocByteCodeCommandRequestTupleScheme extends TupleScheme<AdHocByteCodeCommandRequest> { - - @Override - public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, AdHocByteCodeCommandRequest struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetTablesToInvoke()) { - optionals.set(0); - } - if (struct.isSetArguments()) { - optionals.set(1); - } - if (struct.isSetInstanceData()) { - optionals.set(2); - } - if (struct.isSetClassData()) { - optionals.set(3); - } - if (struct.isSetLibraries()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetTablesToInvoke()) { - { - oprot.writeI32(struct.tablesToInvoke.size()); - for (String _iter249 : struct.tablesToInvoke) - { - oprot.writeString(_iter249); - } - } - } - if (struct.isSetArguments()) { - { - oprot.writeI32(struct.arguments.size()); - for (Value _iter250 : struct.arguments) - { - _iter250.write(oprot); - } - } - } - if (struct.isSetInstanceData()) { - oprot.writeBinary(struct.instanceData); - } - if (struct.isSetClassData()) { - { - oprot.writeI32(struct.classData.size()); - for (Map.Entry<String, ByteBuffer> _iter251 : struct.classData.entrySet()) - { - oprot.writeString(_iter251.getKey()); - oprot.writeBinary(_iter251.getValue()); - } - } - } - if (struct.isSetLibraries()) { - { - oprot.writeI32(struct.libraries.size()); - for (String _iter252 : struct.libraries) - { - oprot.writeString(_iter252); - } - } - } - } - - @Override - public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, AdHocByteCodeCommandRequest struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TSet _set253 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TSet(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, iprot.readI32()); - struct.tablesToInvoke = new HashSet<String>(2*_set253.size); - for (int _i254 = 0; _i254 < _set253.size; ++_i254) - { - String _elem255; // required - _elem255 = iprot.readString(); - struct.tablesToInvoke.add(_elem255); - } - } - struct.setTablesToInvokeIsSet(true); - } - if (incoming.get(1)) { - { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list256 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, iprot.readI32()); - struct.arguments = new ArrayList<Value>(_list256.size); - for (int _i257 = 0; _i257 < _list256.size; ++_i257) - { - Value _elem258; // required - _elem258 = new Value(); - _elem258.read(iprot); - struct.arguments.add(_elem258); - } - } - struct.setArgumentsIsSet(true); - } - if (incoming.get(2)) { - struct.instanceData = iprot.readBinary(); - struct.setInstanceDataIsSet(true); - } - if (incoming.get(3)) { - { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap _map259 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TMap(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, iprot.readI32()); - struct.classData = new HashMap<String,ByteBuffer>(2*_map259.size); - for (int _i260 = 0; _i260 < _map259.size; ++_i260) - { - String _key261; // optional - ByteBuffer _val262; // required - _key261 = iprot.readString(); - _val262 = iprot.readBinary(); - struct.classData.put(_key261, _val262); - } - } - struct.setClassDataIsSet(true); - } - if (incoming.get(4)) { - { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList _list263 = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TList(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRING, iprot.readI32()); - struct.libraries = new ArrayList<String>(_list263.size); - for (int _i264 = 0; _i264 < _list263.size; ++_i264) - { - String _elem265; // required - _elem265 = iprot.readString(); - struct.libraries.add(_elem265); - } - } - struct.setLibrariesIsSet(true); - } - } - } - -} - http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/4d954b15/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AdhocByteCodeCommandResponse.java ---------------------------------------------------------------------- diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AdhocByteCodeCommandResponse.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AdhocByteCodeCommandResponse.java deleted file mode 100644 index f9dcb2f..0000000 --- a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/AdhocByteCodeCommandResponse.java +++ /dev/null @@ -1,410 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.0) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.blur.thrift.generated; - -/** - * 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. - */ - - - -import org.apache.blur.thirdparty.thrift_0_9_0.scheme.IScheme; -import org.apache.blur.thirdparty.thrift_0_9_0.scheme.SchemeFactory; -import org.apache.blur.thirdparty.thrift_0_9_0.scheme.StandardScheme; - -import org.apache.blur.thirdparty.thrift_0_9_0.scheme.TupleScheme; -import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TTupleProtocol; -import org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolException; -import org.apache.blur.thirdparty.thrift_0_9_0.EncodingUtils; -import org.apache.blur.thirdparty.thrift_0_9_0.TException; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -//import org.slf4j.Logger; -//import org.slf4j.LoggerFactory; - -public class AdHocByteCodeCommandResponse implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<AdHocByteCodeCommandResponse, AdHocByteCodeCommandResponse._Fields>, java.io.Serializable, Cloneable { - private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("AdHocByteCodeCommandResponse"); - - private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField RESULT_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("result", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)1); - - private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AdHocByteCodeCommandResponseStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AdHocByteCodeCommandResponseTupleSchemeFactory()); - } - - public Value result; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum { - RESULT((short)1, "result"); - - private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); - - static { - for (_Fields field : 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: // RESULT - return RESULT; - 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 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(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.RESULT, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("result", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, - new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.StructMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, Value.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(AdHocByteCodeCommandResponse.class, metaDataMap); - } - - public AdHocByteCodeCommandResponse() { - } - - public AdHocByteCodeCommandResponse( - Value result) - { - this(); - this.result = result; - } - - /** - * Performs a deep copy on <i>other</i>. - */ - public AdHocByteCodeCommandResponse(AdHocByteCodeCommandResponse other) { - if (other.isSetResult()) { - this.result = new Value(other.result); - } - } - - public AdHocByteCodeCommandResponse deepCopy() { - return new AdHocByteCodeCommandResponse(this); - } - - @Override - public void clear() { - this.result = null; - } - - public Value getResult() { - return this.result; - } - - public AdHocByteCodeCommandResponse setResult(Value result) { - this.result = result; - return this; - } - - public void unsetResult() { - this.result = null; - } - - /** Returns true if field result is set (has been assigned a value) and false otherwise */ - public boolean isSetResult() { - return this.result != null; - } - - public void setResultIsSet(boolean value) { - if (!value) { - this.result = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case RESULT: - if (value == null) { - unsetResult(); - } else { - setResult((Value)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case RESULT: - return getResult(); - - } - throw new 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 IllegalArgumentException(); - } - - switch (field) { - case RESULT: - return isSetResult(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof AdHocByteCodeCommandResponse) - return this.equals((AdHocByteCodeCommandResponse)that); - return false; - } - - public boolean equals(AdHocByteCodeCommandResponse that) { - if (that == null) - return false; - - boolean this_present_result = true && this.isSetResult(); - boolean that_present_result = true && that.isSetResult(); - if (this_present_result || that_present_result) { - if (!(this_present_result && that_present_result)) - return false; - if (!this.result.equals(that.result)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public int compareTo(AdHocByteCodeCommandResponse other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - AdHocByteCodeCommandResponse typedOther = (AdHocByteCodeCommandResponse)other; - - lastComparison = Boolean.valueOf(isSetResult()).compareTo(typedOther.isSetResult()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetResult()) { - lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.result, typedOther.result); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("AdHocByteCodeCommandResponse("); - boolean first = true; - - sb.append("result:"); - if (this.result == null) { - sb.append("null"); - } else { - sb.append(this.result); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - // check for required fields - // check for sub-struct validity - if (result != null) { - result.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out))); - } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in))); - } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) { - throw new java.io.IOException(te); - } - } - - private static class AdHocByteCodeCommandResponseStandardSchemeFactory implements SchemeFactory { - public AdHocByteCodeCommandResponseStandardScheme getScheme() { - return new AdHocByteCodeCommandResponseStandardScheme(); - } - } - - private static class AdHocByteCodeCommandResponseStandardScheme extends StandardScheme<AdHocByteCodeCommandResponse> { - - public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, AdHocByteCodeCommandResponse struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // RESULT - if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT) { - struct.result = new Value(); - struct.result.read(iprot); - struct.setResultIsSet(true); - } else { - org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.blur.thirdparty.thrift_0_9_0.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.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, AdHocByteCodeCommandResponse struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.result != null) { - oprot.writeFieldBegin(RESULT_FIELD_DESC); - struct.result.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AdHocByteCodeCommandResponseTupleSchemeFactory implements SchemeFactory { - public AdHocByteCodeCommandResponseTupleScheme getScheme() { - return new AdHocByteCodeCommandResponseTupleScheme(); - } - } - - private static class AdHocByteCodeCommandResponseTupleScheme extends TupleScheme<AdHocByteCodeCommandResponse> { - - @Override - public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, AdHocByteCodeCommandResponse struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetResult()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetResult()) { - struct.result.write(oprot); - } - } - - @Override - public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, AdHocByteCodeCommandResponse struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.result = new Value(); - struct.result.read(iprot); - struct.setResultIsSet(true); - } - } - } - -} -
