예제 #1
0
파일: TblPriv.java 프로젝트: cnhans/tdw
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, TblPriv struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(11);
   if (incoming.get(0)) {
     struct.db = iprot.readString();
     struct.setDbIsSet(true);
   }
   if (incoming.get(1)) {
     struct.tbl = iprot.readString();
     struct.setTblIsSet(true);
   }
   if (incoming.get(2)) {
     struct.user = iprot.readString();
     struct.setUserIsSet(true);
   }
   if (incoming.get(3)) {
     struct.selectPriv = iprot.readBool();
     struct.setSelectPrivIsSet(true);
   }
   if (incoming.get(4)) {
     struct.insertPriv = iprot.readBool();
     struct.setInsertPrivIsSet(true);
   }
   if (incoming.get(5)) {
     struct.indexPriv = iprot.readBool();
     struct.setIndexPrivIsSet(true);
   }
   if (incoming.get(6)) {
     struct.createPriv = iprot.readBool();
     struct.setCreatePrivIsSet(true);
   }
   if (incoming.get(7)) {
     struct.dropPriv = iprot.readBool();
     struct.setDropPrivIsSet(true);
   }
   if (incoming.get(8)) {
     struct.deletePriv = iprot.readBool();
     struct.setDeletePrivIsSet(true);
   }
   if (incoming.get(9)) {
     struct.alterPriv = iprot.readBool();
     struct.setAlterPrivIsSet(true);
   }
   if (incoming.get(10)) {
     struct.updatePriv = iprot.readBool();
     struct.setUpdatePrivIsSet(true);
   }
 }
예제 #2
0
파일: TblPriv.java 프로젝트: cnhans/tdw
 public void read(org.apache.thrift.protocol.TProtocol iprot, TblPriv 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:
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.db = iprot.readString();
           struct.setDbIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2:
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.tbl = iprot.readString();
           struct.setTblIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3:
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.user = iprot.readString();
           struct.setUserIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 4:
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.selectPriv = iprot.readBool();
           struct.setSelectPrivIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 5:
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.insertPriv = iprot.readBool();
           struct.setInsertPrivIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 6:
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.indexPriv = iprot.readBool();
           struct.setIndexPrivIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 7:
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.createPriv = iprot.readBool();
           struct.setCreatePrivIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 8:
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.dropPriv = iprot.readBool();
           struct.setDropPrivIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 9:
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.deletePriv = iprot.readBool();
           struct.setDeletePrivIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 10:
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.alterPriv = iprot.readBool();
           struct.setAlterPrivIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 11:
         if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
           struct.updatePriv = iprot.readBool();
           struct.setUpdatePrivIsSet(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();
   struct.validate();
 }