Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Autogenerated by Thrift Compiler (0.9.3)
0003  *
0004  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0005  *  @generated
0006  */
0007 package org.apache.hive.service.rpc.thrift;
0008 
0009 import org.apache.thrift.scheme.IScheme;
0010 import org.apache.thrift.scheme.SchemeFactory;
0011 import org.apache.thrift.scheme.StandardScheme;
0012 
0013 import org.apache.thrift.scheme.TupleScheme;
0014 import org.apache.thrift.protocol.TTupleProtocol;
0015 import org.apache.thrift.protocol.TProtocolException;
0016 import org.apache.thrift.EncodingUtils;
0017 import org.apache.thrift.TException;
0018 import org.apache.thrift.async.AsyncMethodCallback;
0019 import org.apache.thrift.server.AbstractNonblockingServer.*;
0020 import java.util.List;
0021 import java.util.ArrayList;
0022 import java.util.Map;
0023 import java.util.HashMap;
0024 import java.util.EnumMap;
0025 import java.util.Set;
0026 import java.util.HashSet;
0027 import java.util.EnumSet;
0028 import java.util.Collections;
0029 import java.util.BitSet;
0030 import java.nio.ByteBuffer;
0031 import java.util.Arrays;
0032 import javax.annotation.Generated;
0033 import org.slf4j.Logger;
0034 import org.slf4j.LoggerFactory;
0035 
0036 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
0037 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
0038 public class TGetCrossReferenceReq implements org.apache.thrift.TBase<TGetCrossReferenceReq, TGetCrossReferenceReq._Fields>, java.io.Serializable, Cloneable, Comparable<TGetCrossReferenceReq> {
0039   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetCrossReferenceReq");
0040 
0041   private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1);
0042   private static final org.apache.thrift.protocol.TField PARENT_CATALOG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parentCatalogName", org.apache.thrift.protocol.TType.STRING, (short)2);
0043   private static final org.apache.thrift.protocol.TField PARENT_SCHEMA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parentSchemaName", org.apache.thrift.protocol.TType.STRING, (short)3);
0044   private static final org.apache.thrift.protocol.TField PARENT_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parentTableName", org.apache.thrift.protocol.TType.STRING, (short)4);
0045   private static final org.apache.thrift.protocol.TField FOREIGN_CATALOG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignCatalogName", org.apache.thrift.protocol.TType.STRING, (short)5);
0046   private static final org.apache.thrift.protocol.TField FOREIGN_SCHEMA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignSchemaName", org.apache.thrift.protocol.TType.STRING, (short)6);
0047   private static final org.apache.thrift.protocol.TField FOREIGN_TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("foreignTableName", org.apache.thrift.protocol.TType.STRING, (short)7);
0048 
0049   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
0050   static {
0051     schemes.put(StandardScheme.class, new TGetCrossReferenceReqStandardSchemeFactory());
0052     schemes.put(TupleScheme.class, new TGetCrossReferenceReqTupleSchemeFactory());
0053   }
0054 
0055   private TSessionHandle sessionHandle; // required
0056   private String parentCatalogName; // optional
0057   private String parentSchemaName; // optional
0058   private String parentTableName; // optional
0059   private String foreignCatalogName; // optional
0060   private String foreignSchemaName; // optional
0061   private String foreignTableName; // optional
0062 
0063   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
0064   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0065     SESSION_HANDLE((short)1, "sessionHandle"),
0066     PARENT_CATALOG_NAME((short)2, "parentCatalogName"),
0067     PARENT_SCHEMA_NAME((short)3, "parentSchemaName"),
0068     PARENT_TABLE_NAME((short)4, "parentTableName"),
0069     FOREIGN_CATALOG_NAME((short)5, "foreignCatalogName"),
0070     FOREIGN_SCHEMA_NAME((short)6, "foreignSchemaName"),
0071     FOREIGN_TABLE_NAME((short)7, "foreignTableName");
0072 
0073     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
0074 
0075     static {
0076       for (_Fields field : EnumSet.allOf(_Fields.class)) {
0077         byName.put(field.getFieldName(), field);
0078       }
0079     }
0080 
0081     /**
0082      * Find the _Fields constant that matches fieldId, or null if its not found.
0083      */
0084     public static _Fields findByThriftId(int fieldId) {
0085       switch(fieldId) {
0086         case 1: // SESSION_HANDLE
0087           return SESSION_HANDLE;
0088         case 2: // PARENT_CATALOG_NAME
0089           return PARENT_CATALOG_NAME;
0090         case 3: // PARENT_SCHEMA_NAME
0091           return PARENT_SCHEMA_NAME;
0092         case 4: // PARENT_TABLE_NAME
0093           return PARENT_TABLE_NAME;
0094         case 5: // FOREIGN_CATALOG_NAME
0095           return FOREIGN_CATALOG_NAME;
0096         case 6: // FOREIGN_SCHEMA_NAME
0097           return FOREIGN_SCHEMA_NAME;
0098         case 7: // FOREIGN_TABLE_NAME
0099           return FOREIGN_TABLE_NAME;
0100         default:
0101           return null;
0102       }
0103     }
0104 
0105     /**
0106      * Find the _Fields constant that matches fieldId, throwing an exception
0107      * if it is not found.
0108      */
0109     public static _Fields findByThriftIdOrThrow(int fieldId) {
0110       _Fields fields = findByThriftId(fieldId);
0111       if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
0112       return fields;
0113     }
0114 
0115     /**
0116      * Find the _Fields constant that matches name, or null if its not found.
0117      */
0118     public static _Fields findByName(String name) {
0119       return byName.get(name);
0120     }
0121 
0122     private final short _thriftId;
0123     private final String _fieldName;
0124 
0125     _Fields(short thriftId, String fieldName) {
0126       _thriftId = thriftId;
0127       _fieldName = fieldName;
0128     }
0129 
0130     public short getThriftFieldId() {
0131       return _thriftId;
0132     }
0133 
0134     public String getFieldName() {
0135       return _fieldName;
0136     }
0137   }
0138 
0139   // isset id assignments
0140   private static final _Fields optionals[] = {_Fields.PARENT_CATALOG_NAME,_Fields.PARENT_SCHEMA_NAME,_Fields.PARENT_TABLE_NAME,_Fields.FOREIGN_CATALOG_NAME,_Fields.FOREIGN_SCHEMA_NAME,_Fields.FOREIGN_TABLE_NAME};
0141   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
0142   static {
0143     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
0144     tmpMap.put(_Fields.SESSION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("sessionHandle", org.apache.thrift.TFieldRequirementType.REQUIRED, 
0145         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSessionHandle.class)));
0146     tmpMap.put(_Fields.PARENT_CATALOG_NAME, new org.apache.thrift.meta_data.FieldMetaData("parentCatalogName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
0147         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , "TIdentifier")));
0148     tmpMap.put(_Fields.PARENT_SCHEMA_NAME, new org.apache.thrift.meta_data.FieldMetaData("parentSchemaName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
0149         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , "TIdentifier")));
0150     tmpMap.put(_Fields.PARENT_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("parentTableName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
0151         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , "TIdentifier")));
0152     tmpMap.put(_Fields.FOREIGN_CATALOG_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreignCatalogName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
0153         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , "TIdentifier")));
0154     tmpMap.put(_Fields.FOREIGN_SCHEMA_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreignSchemaName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
0155         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , "TIdentifier")));
0156     tmpMap.put(_Fields.FOREIGN_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("foreignTableName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
0157         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING        , "TIdentifier")));
0158     metaDataMap = Collections.unmodifiableMap(tmpMap);
0159     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetCrossReferenceReq.class, metaDataMap);
0160   }
0161 
0162   public TGetCrossReferenceReq() {
0163   }
0164 
0165   public TGetCrossReferenceReq(
0166     TSessionHandle sessionHandle)
0167   {
0168     this();
0169     this.sessionHandle = sessionHandle;
0170   }
0171 
0172   /**
0173    * Performs a deep copy on <i>other</i>.
0174    */
0175   public TGetCrossReferenceReq(TGetCrossReferenceReq other) {
0176     if (other.isSetSessionHandle()) {
0177       this.sessionHandle = new TSessionHandle(other.sessionHandle);
0178     }
0179     if (other.isSetParentCatalogName()) {
0180       this.parentCatalogName = other.parentCatalogName;
0181     }
0182     if (other.isSetParentSchemaName()) {
0183       this.parentSchemaName = other.parentSchemaName;
0184     }
0185     if (other.isSetParentTableName()) {
0186       this.parentTableName = other.parentTableName;
0187     }
0188     if (other.isSetForeignCatalogName()) {
0189       this.foreignCatalogName = other.foreignCatalogName;
0190     }
0191     if (other.isSetForeignSchemaName()) {
0192       this.foreignSchemaName = other.foreignSchemaName;
0193     }
0194     if (other.isSetForeignTableName()) {
0195       this.foreignTableName = other.foreignTableName;
0196     }
0197   }
0198 
0199   public TGetCrossReferenceReq deepCopy() {
0200     return new TGetCrossReferenceReq(this);
0201   }
0202 
0203   @Override
0204   public void clear() {
0205     this.sessionHandle = null;
0206     this.parentCatalogName = null;
0207     this.parentSchemaName = null;
0208     this.parentTableName = null;
0209     this.foreignCatalogName = null;
0210     this.foreignSchemaName = null;
0211     this.foreignTableName = null;
0212   }
0213 
0214   public TSessionHandle getSessionHandle() {
0215     return this.sessionHandle;
0216   }
0217 
0218   public void setSessionHandle(TSessionHandle sessionHandle) {
0219     this.sessionHandle = sessionHandle;
0220   }
0221 
0222   public void unsetSessionHandle() {
0223     this.sessionHandle = null;
0224   }
0225 
0226   /** Returns true if field sessionHandle is set (has been assigned a value) and false otherwise */
0227   public boolean isSetSessionHandle() {
0228     return this.sessionHandle != null;
0229   }
0230 
0231   public void setSessionHandleIsSet(boolean value) {
0232     if (!value) {
0233       this.sessionHandle = null;
0234     }
0235   }
0236 
0237   public String getParentCatalogName() {
0238     return this.parentCatalogName;
0239   }
0240 
0241   public void setParentCatalogName(String parentCatalogName) {
0242     this.parentCatalogName = parentCatalogName;
0243   }
0244 
0245   public void unsetParentCatalogName() {
0246     this.parentCatalogName = null;
0247   }
0248 
0249   /** Returns true if field parentCatalogName is set (has been assigned a value) and false otherwise */
0250   public boolean isSetParentCatalogName() {
0251     return this.parentCatalogName != null;
0252   }
0253 
0254   public void setParentCatalogNameIsSet(boolean value) {
0255     if (!value) {
0256       this.parentCatalogName = null;
0257     }
0258   }
0259 
0260   public String getParentSchemaName() {
0261     return this.parentSchemaName;
0262   }
0263 
0264   public void setParentSchemaName(String parentSchemaName) {
0265     this.parentSchemaName = parentSchemaName;
0266   }
0267 
0268   public void unsetParentSchemaName() {
0269     this.parentSchemaName = null;
0270   }
0271 
0272   /** Returns true if field parentSchemaName is set (has been assigned a value) and false otherwise */
0273   public boolean isSetParentSchemaName() {
0274     return this.parentSchemaName != null;
0275   }
0276 
0277   public void setParentSchemaNameIsSet(boolean value) {
0278     if (!value) {
0279       this.parentSchemaName = null;
0280     }
0281   }
0282 
0283   public String getParentTableName() {
0284     return this.parentTableName;
0285   }
0286 
0287   public void setParentTableName(String parentTableName) {
0288     this.parentTableName = parentTableName;
0289   }
0290 
0291   public void unsetParentTableName() {
0292     this.parentTableName = null;
0293   }
0294 
0295   /** Returns true if field parentTableName is set (has been assigned a value) and false otherwise */
0296   public boolean isSetParentTableName() {
0297     return this.parentTableName != null;
0298   }
0299 
0300   public void setParentTableNameIsSet(boolean value) {
0301     if (!value) {
0302       this.parentTableName = null;
0303     }
0304   }
0305 
0306   public String getForeignCatalogName() {
0307     return this.foreignCatalogName;
0308   }
0309 
0310   public void setForeignCatalogName(String foreignCatalogName) {
0311     this.foreignCatalogName = foreignCatalogName;
0312   }
0313 
0314   public void unsetForeignCatalogName() {
0315     this.foreignCatalogName = null;
0316   }
0317 
0318   /** Returns true if field foreignCatalogName is set (has been assigned a value) and false otherwise */
0319   public boolean isSetForeignCatalogName() {
0320     return this.foreignCatalogName != null;
0321   }
0322 
0323   public void setForeignCatalogNameIsSet(boolean value) {
0324     if (!value) {
0325       this.foreignCatalogName = null;
0326     }
0327   }
0328 
0329   public String getForeignSchemaName() {
0330     return this.foreignSchemaName;
0331   }
0332 
0333   public void setForeignSchemaName(String foreignSchemaName) {
0334     this.foreignSchemaName = foreignSchemaName;
0335   }
0336 
0337   public void unsetForeignSchemaName() {
0338     this.foreignSchemaName = null;
0339   }
0340 
0341   /** Returns true if field foreignSchemaName is set (has been assigned a value) and false otherwise */
0342   public boolean isSetForeignSchemaName() {
0343     return this.foreignSchemaName != null;
0344   }
0345 
0346   public void setForeignSchemaNameIsSet(boolean value) {
0347     if (!value) {
0348       this.foreignSchemaName = null;
0349     }
0350   }
0351 
0352   public String getForeignTableName() {
0353     return this.foreignTableName;
0354   }
0355 
0356   public void setForeignTableName(String foreignTableName) {
0357     this.foreignTableName = foreignTableName;
0358   }
0359 
0360   public void unsetForeignTableName() {
0361     this.foreignTableName = null;
0362   }
0363 
0364   /** Returns true if field foreignTableName is set (has been assigned a value) and false otherwise */
0365   public boolean isSetForeignTableName() {
0366     return this.foreignTableName != null;
0367   }
0368 
0369   public void setForeignTableNameIsSet(boolean value) {
0370     if (!value) {
0371       this.foreignTableName = null;
0372     }
0373   }
0374 
0375   public void setFieldValue(_Fields field, Object value) {
0376     switch (field) {
0377     case SESSION_HANDLE:
0378       if (value == null) {
0379         unsetSessionHandle();
0380       } else {
0381         setSessionHandle((TSessionHandle)value);
0382       }
0383       break;
0384 
0385     case PARENT_CATALOG_NAME:
0386       if (value == null) {
0387         unsetParentCatalogName();
0388       } else {
0389         setParentCatalogName((String)value);
0390       }
0391       break;
0392 
0393     case PARENT_SCHEMA_NAME:
0394       if (value == null) {
0395         unsetParentSchemaName();
0396       } else {
0397         setParentSchemaName((String)value);
0398       }
0399       break;
0400 
0401     case PARENT_TABLE_NAME:
0402       if (value == null) {
0403         unsetParentTableName();
0404       } else {
0405         setParentTableName((String)value);
0406       }
0407       break;
0408 
0409     case FOREIGN_CATALOG_NAME:
0410       if (value == null) {
0411         unsetForeignCatalogName();
0412       } else {
0413         setForeignCatalogName((String)value);
0414       }
0415       break;
0416 
0417     case FOREIGN_SCHEMA_NAME:
0418       if (value == null) {
0419         unsetForeignSchemaName();
0420       } else {
0421         setForeignSchemaName((String)value);
0422       }
0423       break;
0424 
0425     case FOREIGN_TABLE_NAME:
0426       if (value == null) {
0427         unsetForeignTableName();
0428       } else {
0429         setForeignTableName((String)value);
0430       }
0431       break;
0432 
0433     }
0434   }
0435 
0436   public Object getFieldValue(_Fields field) {
0437     switch (field) {
0438     case SESSION_HANDLE:
0439       return getSessionHandle();
0440 
0441     case PARENT_CATALOG_NAME:
0442       return getParentCatalogName();
0443 
0444     case PARENT_SCHEMA_NAME:
0445       return getParentSchemaName();
0446 
0447     case PARENT_TABLE_NAME:
0448       return getParentTableName();
0449 
0450     case FOREIGN_CATALOG_NAME:
0451       return getForeignCatalogName();
0452 
0453     case FOREIGN_SCHEMA_NAME:
0454       return getForeignSchemaName();
0455 
0456     case FOREIGN_TABLE_NAME:
0457       return getForeignTableName();
0458 
0459     }
0460     throw new IllegalStateException();
0461   }
0462 
0463   /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
0464   public boolean isSet(_Fields field) {
0465     if (field == null) {
0466       throw new IllegalArgumentException();
0467     }
0468 
0469     switch (field) {
0470     case SESSION_HANDLE:
0471       return isSetSessionHandle();
0472     case PARENT_CATALOG_NAME:
0473       return isSetParentCatalogName();
0474     case PARENT_SCHEMA_NAME:
0475       return isSetParentSchemaName();
0476     case PARENT_TABLE_NAME:
0477       return isSetParentTableName();
0478     case FOREIGN_CATALOG_NAME:
0479       return isSetForeignCatalogName();
0480     case FOREIGN_SCHEMA_NAME:
0481       return isSetForeignSchemaName();
0482     case FOREIGN_TABLE_NAME:
0483       return isSetForeignTableName();
0484     }
0485     throw new IllegalStateException();
0486   }
0487 
0488   @Override
0489   public boolean equals(Object that) {
0490     if (that == null)
0491       return false;
0492     if (that instanceof TGetCrossReferenceReq)
0493       return this.equals((TGetCrossReferenceReq)that);
0494     return false;
0495   }
0496 
0497   public boolean equals(TGetCrossReferenceReq that) {
0498     if (that == null)
0499       return false;
0500 
0501     boolean this_present_sessionHandle = true && this.isSetSessionHandle();
0502     boolean that_present_sessionHandle = true && that.isSetSessionHandle();
0503     if (this_present_sessionHandle || that_present_sessionHandle) {
0504       if (!(this_present_sessionHandle && that_present_sessionHandle))
0505         return false;
0506       if (!this.sessionHandle.equals(that.sessionHandle))
0507         return false;
0508     }
0509 
0510     boolean this_present_parentCatalogName = true && this.isSetParentCatalogName();
0511     boolean that_present_parentCatalogName = true && that.isSetParentCatalogName();
0512     if (this_present_parentCatalogName || that_present_parentCatalogName) {
0513       if (!(this_present_parentCatalogName && that_present_parentCatalogName))
0514         return false;
0515       if (!this.parentCatalogName.equals(that.parentCatalogName))
0516         return false;
0517     }
0518 
0519     boolean this_present_parentSchemaName = true && this.isSetParentSchemaName();
0520     boolean that_present_parentSchemaName = true && that.isSetParentSchemaName();
0521     if (this_present_parentSchemaName || that_present_parentSchemaName) {
0522       if (!(this_present_parentSchemaName && that_present_parentSchemaName))
0523         return false;
0524       if (!this.parentSchemaName.equals(that.parentSchemaName))
0525         return false;
0526     }
0527 
0528     boolean this_present_parentTableName = true && this.isSetParentTableName();
0529     boolean that_present_parentTableName = true && that.isSetParentTableName();
0530     if (this_present_parentTableName || that_present_parentTableName) {
0531       if (!(this_present_parentTableName && that_present_parentTableName))
0532         return false;
0533       if (!this.parentTableName.equals(that.parentTableName))
0534         return false;
0535     }
0536 
0537     boolean this_present_foreignCatalogName = true && this.isSetForeignCatalogName();
0538     boolean that_present_foreignCatalogName = true && that.isSetForeignCatalogName();
0539     if (this_present_foreignCatalogName || that_present_foreignCatalogName) {
0540       if (!(this_present_foreignCatalogName && that_present_foreignCatalogName))
0541         return false;
0542       if (!this.foreignCatalogName.equals(that.foreignCatalogName))
0543         return false;
0544     }
0545 
0546     boolean this_present_foreignSchemaName = true && this.isSetForeignSchemaName();
0547     boolean that_present_foreignSchemaName = true && that.isSetForeignSchemaName();
0548     if (this_present_foreignSchemaName || that_present_foreignSchemaName) {
0549       if (!(this_present_foreignSchemaName && that_present_foreignSchemaName))
0550         return false;
0551       if (!this.foreignSchemaName.equals(that.foreignSchemaName))
0552         return false;
0553     }
0554 
0555     boolean this_present_foreignTableName = true && this.isSetForeignTableName();
0556     boolean that_present_foreignTableName = true && that.isSetForeignTableName();
0557     if (this_present_foreignTableName || that_present_foreignTableName) {
0558       if (!(this_present_foreignTableName && that_present_foreignTableName))
0559         return false;
0560       if (!this.foreignTableName.equals(that.foreignTableName))
0561         return false;
0562     }
0563 
0564     return true;
0565   }
0566 
0567   @Override
0568   public int hashCode() {
0569     List<Object> list = new ArrayList<Object>();
0570 
0571     boolean present_sessionHandle = true && (isSetSessionHandle());
0572     list.add(present_sessionHandle);
0573     if (present_sessionHandle)
0574       list.add(sessionHandle);
0575 
0576     boolean present_parentCatalogName = true && (isSetParentCatalogName());
0577     list.add(present_parentCatalogName);
0578     if (present_parentCatalogName)
0579       list.add(parentCatalogName);
0580 
0581     boolean present_parentSchemaName = true && (isSetParentSchemaName());
0582     list.add(present_parentSchemaName);
0583     if (present_parentSchemaName)
0584       list.add(parentSchemaName);
0585 
0586     boolean present_parentTableName = true && (isSetParentTableName());
0587     list.add(present_parentTableName);
0588     if (present_parentTableName)
0589       list.add(parentTableName);
0590 
0591     boolean present_foreignCatalogName = true && (isSetForeignCatalogName());
0592     list.add(present_foreignCatalogName);
0593     if (present_foreignCatalogName)
0594       list.add(foreignCatalogName);
0595 
0596     boolean present_foreignSchemaName = true && (isSetForeignSchemaName());
0597     list.add(present_foreignSchemaName);
0598     if (present_foreignSchemaName)
0599       list.add(foreignSchemaName);
0600 
0601     boolean present_foreignTableName = true && (isSetForeignTableName());
0602     list.add(present_foreignTableName);
0603     if (present_foreignTableName)
0604       list.add(foreignTableName);
0605 
0606     return list.hashCode();
0607   }
0608 
0609   @Override
0610   public int compareTo(TGetCrossReferenceReq other) {
0611     if (!getClass().equals(other.getClass())) {
0612       return getClass().getName().compareTo(other.getClass().getName());
0613     }
0614 
0615     int lastComparison = 0;
0616 
0617     lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle());
0618     if (lastComparison != 0) {
0619       return lastComparison;
0620     }
0621     if (isSetSessionHandle()) {
0622       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle);
0623       if (lastComparison != 0) {
0624         return lastComparison;
0625       }
0626     }
0627     lastComparison = Boolean.valueOf(isSetParentCatalogName()).compareTo(other.isSetParentCatalogName());
0628     if (lastComparison != 0) {
0629       return lastComparison;
0630     }
0631     if (isSetParentCatalogName()) {
0632       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentCatalogName, other.parentCatalogName);
0633       if (lastComparison != 0) {
0634         return lastComparison;
0635       }
0636     }
0637     lastComparison = Boolean.valueOf(isSetParentSchemaName()).compareTo(other.isSetParentSchemaName());
0638     if (lastComparison != 0) {
0639       return lastComparison;
0640     }
0641     if (isSetParentSchemaName()) {
0642       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentSchemaName, other.parentSchemaName);
0643       if (lastComparison != 0) {
0644         return lastComparison;
0645       }
0646     }
0647     lastComparison = Boolean.valueOf(isSetParentTableName()).compareTo(other.isSetParentTableName());
0648     if (lastComparison != 0) {
0649       return lastComparison;
0650     }
0651     if (isSetParentTableName()) {
0652       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentTableName, other.parentTableName);
0653       if (lastComparison != 0) {
0654         return lastComparison;
0655       }
0656     }
0657     lastComparison = Boolean.valueOf(isSetForeignCatalogName()).compareTo(other.isSetForeignCatalogName());
0658     if (lastComparison != 0) {
0659       return lastComparison;
0660     }
0661     if (isSetForeignCatalogName()) {
0662       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignCatalogName, other.foreignCatalogName);
0663       if (lastComparison != 0) {
0664         return lastComparison;
0665       }
0666     }
0667     lastComparison = Boolean.valueOf(isSetForeignSchemaName()).compareTo(other.isSetForeignSchemaName());
0668     if (lastComparison != 0) {
0669       return lastComparison;
0670     }
0671     if (isSetForeignSchemaName()) {
0672       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignSchemaName, other.foreignSchemaName);
0673       if (lastComparison != 0) {
0674         return lastComparison;
0675       }
0676     }
0677     lastComparison = Boolean.valueOf(isSetForeignTableName()).compareTo(other.isSetForeignTableName());
0678     if (lastComparison != 0) {
0679       return lastComparison;
0680     }
0681     if (isSetForeignTableName()) {
0682       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignTableName, other.foreignTableName);
0683       if (lastComparison != 0) {
0684         return lastComparison;
0685       }
0686     }
0687     return 0;
0688   }
0689 
0690   public _Fields fieldForId(int fieldId) {
0691     return _Fields.findByThriftId(fieldId);
0692   }
0693 
0694   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
0695     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
0696   }
0697 
0698   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
0699     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
0700   }
0701 
0702   @Override
0703   public String toString() {
0704     StringBuilder sb = new StringBuilder("TGetCrossReferenceReq(");
0705     boolean first = true;
0706 
0707     sb.append("sessionHandle:");
0708     if (this.sessionHandle == null) {
0709       sb.append("null");
0710     } else {
0711       sb.append(this.sessionHandle);
0712     }
0713     first = false;
0714     if (isSetParentCatalogName()) {
0715       if (!first) sb.append(", ");
0716       sb.append("parentCatalogName:");
0717       if (this.parentCatalogName == null) {
0718         sb.append("null");
0719       } else {
0720         sb.append(this.parentCatalogName);
0721       }
0722       first = false;
0723     }
0724     if (isSetParentSchemaName()) {
0725       if (!first) sb.append(", ");
0726       sb.append("parentSchemaName:");
0727       if (this.parentSchemaName == null) {
0728         sb.append("null");
0729       } else {
0730         sb.append(this.parentSchemaName);
0731       }
0732       first = false;
0733     }
0734     if (isSetParentTableName()) {
0735       if (!first) sb.append(", ");
0736       sb.append("parentTableName:");
0737       if (this.parentTableName == null) {
0738         sb.append("null");
0739       } else {
0740         sb.append(this.parentTableName);
0741       }
0742       first = false;
0743     }
0744     if (isSetForeignCatalogName()) {
0745       if (!first) sb.append(", ");
0746       sb.append("foreignCatalogName:");
0747       if (this.foreignCatalogName == null) {
0748         sb.append("null");
0749       } else {
0750         sb.append(this.foreignCatalogName);
0751       }
0752       first = false;
0753     }
0754     if (isSetForeignSchemaName()) {
0755       if (!first) sb.append(", ");
0756       sb.append("foreignSchemaName:");
0757       if (this.foreignSchemaName == null) {
0758         sb.append("null");
0759       } else {
0760         sb.append(this.foreignSchemaName);
0761       }
0762       first = false;
0763     }
0764     if (isSetForeignTableName()) {
0765       if (!first) sb.append(", ");
0766       sb.append("foreignTableName:");
0767       if (this.foreignTableName == null) {
0768         sb.append("null");
0769       } else {
0770         sb.append(this.foreignTableName);
0771       }
0772       first = false;
0773     }
0774     sb.append(")");
0775     return sb.toString();
0776   }
0777 
0778   public void validate() throws org.apache.thrift.TException {
0779     // check for required fields
0780     if (!isSetSessionHandle()) {
0781       throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString());
0782     }
0783 
0784     // check for sub-struct validity
0785     if (sessionHandle != null) {
0786       sessionHandle.validate();
0787     }
0788   }
0789 
0790   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
0791     try {
0792       write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
0793     } catch (org.apache.thrift.TException te) {
0794       throw new java.io.IOException(te);
0795     }
0796   }
0797 
0798   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
0799     try {
0800       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
0801     } catch (org.apache.thrift.TException te) {
0802       throw new java.io.IOException(te);
0803     }
0804   }
0805 
0806   private static class TGetCrossReferenceReqStandardSchemeFactory implements SchemeFactory {
0807     public TGetCrossReferenceReqStandardScheme getScheme() {
0808       return new TGetCrossReferenceReqStandardScheme();
0809     }
0810   }
0811 
0812   private static class TGetCrossReferenceReqStandardScheme extends StandardScheme<TGetCrossReferenceReq> {
0813 
0814     public void read(org.apache.thrift.protocol.TProtocol iprot, TGetCrossReferenceReq struct) throws org.apache.thrift.TException {
0815       org.apache.thrift.protocol.TField schemeField;
0816       iprot.readStructBegin();
0817       while (true)
0818       {
0819         schemeField = iprot.readFieldBegin();
0820         if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
0821           break;
0822         }
0823         switch (schemeField.id) {
0824           case 1: // SESSION_HANDLE
0825             if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
0826               struct.sessionHandle = new TSessionHandle();
0827               struct.sessionHandle.read(iprot);
0828               struct.setSessionHandleIsSet(true);
0829             } else { 
0830               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0831             }
0832             break;
0833           case 2: // PARENT_CATALOG_NAME
0834             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0835               struct.parentCatalogName = iprot.readString();
0836               struct.setParentCatalogNameIsSet(true);
0837             } else { 
0838               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0839             }
0840             break;
0841           case 3: // PARENT_SCHEMA_NAME
0842             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0843               struct.parentSchemaName = iprot.readString();
0844               struct.setParentSchemaNameIsSet(true);
0845             } else { 
0846               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0847             }
0848             break;
0849           case 4: // PARENT_TABLE_NAME
0850             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0851               struct.parentTableName = iprot.readString();
0852               struct.setParentTableNameIsSet(true);
0853             } else { 
0854               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0855             }
0856             break;
0857           case 5: // FOREIGN_CATALOG_NAME
0858             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0859               struct.foreignCatalogName = iprot.readString();
0860               struct.setForeignCatalogNameIsSet(true);
0861             } else { 
0862               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0863             }
0864             break;
0865           case 6: // FOREIGN_SCHEMA_NAME
0866             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0867               struct.foreignSchemaName = iprot.readString();
0868               struct.setForeignSchemaNameIsSet(true);
0869             } else { 
0870               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0871             }
0872             break;
0873           case 7: // FOREIGN_TABLE_NAME
0874             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0875               struct.foreignTableName = iprot.readString();
0876               struct.setForeignTableNameIsSet(true);
0877             } else { 
0878               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0879             }
0880             break;
0881           default:
0882             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0883         }
0884         iprot.readFieldEnd();
0885       }
0886       iprot.readStructEnd();
0887       struct.validate();
0888     }
0889 
0890     public void write(org.apache.thrift.protocol.TProtocol oprot, TGetCrossReferenceReq struct) throws org.apache.thrift.TException {
0891       struct.validate();
0892 
0893       oprot.writeStructBegin(STRUCT_DESC);
0894       if (struct.sessionHandle != null) {
0895         oprot.writeFieldBegin(SESSION_HANDLE_FIELD_DESC);
0896         struct.sessionHandle.write(oprot);
0897         oprot.writeFieldEnd();
0898       }
0899       if (struct.parentCatalogName != null) {
0900         if (struct.isSetParentCatalogName()) {
0901           oprot.writeFieldBegin(PARENT_CATALOG_NAME_FIELD_DESC);
0902           oprot.writeString(struct.parentCatalogName);
0903           oprot.writeFieldEnd();
0904         }
0905       }
0906       if (struct.parentSchemaName != null) {
0907         if (struct.isSetParentSchemaName()) {
0908           oprot.writeFieldBegin(PARENT_SCHEMA_NAME_FIELD_DESC);
0909           oprot.writeString(struct.parentSchemaName);
0910           oprot.writeFieldEnd();
0911         }
0912       }
0913       if (struct.parentTableName != null) {
0914         if (struct.isSetParentTableName()) {
0915           oprot.writeFieldBegin(PARENT_TABLE_NAME_FIELD_DESC);
0916           oprot.writeString(struct.parentTableName);
0917           oprot.writeFieldEnd();
0918         }
0919       }
0920       if (struct.foreignCatalogName != null) {
0921         if (struct.isSetForeignCatalogName()) {
0922           oprot.writeFieldBegin(FOREIGN_CATALOG_NAME_FIELD_DESC);
0923           oprot.writeString(struct.foreignCatalogName);
0924           oprot.writeFieldEnd();
0925         }
0926       }
0927       if (struct.foreignSchemaName != null) {
0928         if (struct.isSetForeignSchemaName()) {
0929           oprot.writeFieldBegin(FOREIGN_SCHEMA_NAME_FIELD_DESC);
0930           oprot.writeString(struct.foreignSchemaName);
0931           oprot.writeFieldEnd();
0932         }
0933       }
0934       if (struct.foreignTableName != null) {
0935         if (struct.isSetForeignTableName()) {
0936           oprot.writeFieldBegin(FOREIGN_TABLE_NAME_FIELD_DESC);
0937           oprot.writeString(struct.foreignTableName);
0938           oprot.writeFieldEnd();
0939         }
0940       }
0941       oprot.writeFieldStop();
0942       oprot.writeStructEnd();
0943     }
0944 
0945   }
0946 
0947   private static class TGetCrossReferenceReqTupleSchemeFactory implements SchemeFactory {
0948     public TGetCrossReferenceReqTupleScheme getScheme() {
0949       return new TGetCrossReferenceReqTupleScheme();
0950     }
0951   }
0952 
0953   private static class TGetCrossReferenceReqTupleScheme extends TupleScheme<TGetCrossReferenceReq> {
0954 
0955     @Override
0956     public void write(org.apache.thrift.protocol.TProtocol prot, TGetCrossReferenceReq struct) throws org.apache.thrift.TException {
0957       TTupleProtocol oprot = (TTupleProtocol) prot;
0958       struct.sessionHandle.write(oprot);
0959       BitSet optionals = new BitSet();
0960       if (struct.isSetParentCatalogName()) {
0961         optionals.set(0);
0962       }
0963       if (struct.isSetParentSchemaName()) {
0964         optionals.set(1);
0965       }
0966       if (struct.isSetParentTableName()) {
0967         optionals.set(2);
0968       }
0969       if (struct.isSetForeignCatalogName()) {
0970         optionals.set(3);
0971       }
0972       if (struct.isSetForeignSchemaName()) {
0973         optionals.set(4);
0974       }
0975       if (struct.isSetForeignTableName()) {
0976         optionals.set(5);
0977       }
0978       oprot.writeBitSet(optionals, 6);
0979       if (struct.isSetParentCatalogName()) {
0980         oprot.writeString(struct.parentCatalogName);
0981       }
0982       if (struct.isSetParentSchemaName()) {
0983         oprot.writeString(struct.parentSchemaName);
0984       }
0985       if (struct.isSetParentTableName()) {
0986         oprot.writeString(struct.parentTableName);
0987       }
0988       if (struct.isSetForeignCatalogName()) {
0989         oprot.writeString(struct.foreignCatalogName);
0990       }
0991       if (struct.isSetForeignSchemaName()) {
0992         oprot.writeString(struct.foreignSchemaName);
0993       }
0994       if (struct.isSetForeignTableName()) {
0995         oprot.writeString(struct.foreignTableName);
0996       }
0997     }
0998 
0999     @Override
1000     public void read(org.apache.thrift.protocol.TProtocol prot, TGetCrossReferenceReq struct) throws org.apache.thrift.TException {
1001       TTupleProtocol iprot = (TTupleProtocol) prot;
1002       struct.sessionHandle = new TSessionHandle();
1003       struct.sessionHandle.read(iprot);
1004       struct.setSessionHandleIsSet(true);
1005       BitSet incoming = iprot.readBitSet(6);
1006       if (incoming.get(0)) {
1007         struct.parentCatalogName = iprot.readString();
1008         struct.setParentCatalogNameIsSet(true);
1009       }
1010       if (incoming.get(1)) {
1011         struct.parentSchemaName = iprot.readString();
1012         struct.setParentSchemaNameIsSet(true);
1013       }
1014       if (incoming.get(2)) {
1015         struct.parentTableName = iprot.readString();
1016         struct.setParentTableNameIsSet(true);
1017       }
1018       if (incoming.get(3)) {
1019         struct.foreignCatalogName = iprot.readString();
1020         struct.setForeignCatalogNameIsSet(true);
1021       }
1022       if (incoming.get(4)) {
1023         struct.foreignSchemaName = iprot.readString();
1024         struct.setForeignSchemaNameIsSet(true);
1025       }
1026       if (incoming.get(5)) {
1027         struct.foreignTableName = iprot.readString();
1028         struct.setForeignTableNameIsSet(true);
1029       }
1030     }
1031   }
1032 
1033 }
1034