Esempio n. 1
0
 public TblPriv(
     String db,
     String tbl,
     String user,
     boolean selectPriv,
     boolean insertPriv,
     boolean indexPriv,
     boolean createPriv,
     boolean dropPriv,
     boolean deletePriv,
     boolean alterPriv,
     boolean updatePriv) {
   this();
   this.db = db;
   this.tbl = tbl;
   this.user = user;
   this.selectPriv = selectPriv;
   setSelectPrivIsSet(true);
   this.insertPriv = insertPriv;
   setInsertPrivIsSet(true);
   this.indexPriv = indexPriv;
   setIndexPrivIsSet(true);
   this.createPriv = createPriv;
   setCreatePrivIsSet(true);
   this.dropPriv = dropPriv;
   setDropPrivIsSet(true);
   this.deletePriv = deletePriv;
   setDeletePrivIsSet(true);
   this.alterPriv = alterPriv;
   setAlterPrivIsSet(true);
   this.updatePriv = updatePriv;
   setUpdatePrivIsSet(true);
 }
Esempio n. 2
0
 @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);
   }
 }
Esempio n. 3
0
 @Override
 public void clear() {
   this.db = null;
   this.tbl = null;
   this.user = null;
   setSelectPrivIsSet(false);
   this.selectPriv = false;
   setInsertPrivIsSet(false);
   this.insertPriv = false;
   setIndexPrivIsSet(false);
   this.indexPriv = false;
   setCreatePrivIsSet(false);
   this.createPriv = false;
   setDropPrivIsSet(false);
   this.dropPriv = false;
   setDeletePrivIsSet(false);
   this.deletePriv = false;
   setAlterPrivIsSet(false);
   this.alterPriv = false;
   setUpdatePrivIsSet(false);
   this.updatePriv = false;
 }
Esempio n. 4
0
 public void setDropPriv(boolean dropPriv) {
   this.dropPriv = dropPriv;
   setDropPrivIsSet(true);
 }
Esempio n. 5
0
 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();
 }