コード例 #1
0
ファイル: TblPriv.java プロジェクト: cnhans/tdw
 public TblPriv(TblPriv other) {
   __isset_bit_vector.clear();
   __isset_bit_vector.or(other.__isset_bit_vector);
   if (other.isSetDb()) {
     this.db = other.db;
   }
   if (other.isSetTbl()) {
     this.tbl = other.tbl;
   }
   if (other.isSetUser()) {
     this.user = other.user;
   }
   this.selectPriv = other.selectPriv;
   this.insertPriv = other.insertPriv;
   this.indexPriv = other.indexPriv;
   this.createPriv = other.createPriv;
   this.dropPriv = other.dropPriv;
   this.deletePriv = other.deletePriv;
   this.alterPriv = other.alterPriv;
   this.updatePriv = other.updatePriv;
 }
コード例 #2
0
ファイル: TblPriv.java プロジェクト: cnhans/tdw
    public void write(org.apache.thrift.protocol.TProtocol oprot, TblPriv struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.db != null) {
        oprot.writeFieldBegin(DB_FIELD_DESC);
        oprot.writeString(struct.db);
        oprot.writeFieldEnd();
      }
      if (struct.tbl != null) {
        oprot.writeFieldBegin(TBL_FIELD_DESC);
        oprot.writeString(struct.tbl);
        oprot.writeFieldEnd();
      }
      if (struct.user != null) {
        oprot.writeFieldBegin(USER_FIELD_DESC);
        oprot.writeString(struct.user);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(SELECT_PRIV_FIELD_DESC);
      oprot.writeBool(struct.selectPriv);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(INSERT_PRIV_FIELD_DESC);
      oprot.writeBool(struct.insertPriv);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(INDEX_PRIV_FIELD_DESC);
      oprot.writeBool(struct.indexPriv);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(CREATE_PRIV_FIELD_DESC);
      oprot.writeBool(struct.createPriv);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(DROP_PRIV_FIELD_DESC);
      oprot.writeBool(struct.dropPriv);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(DELETE_PRIV_FIELD_DESC);
      oprot.writeBool(struct.deletePriv);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ALTER_PRIV_FIELD_DESC);
      oprot.writeBool(struct.alterPriv);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(UPDATE_PRIV_FIELD_DESC);
      oprot.writeBool(struct.updatePriv);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
コード例 #3
0
ファイル: TblPriv.java プロジェクト: cnhans/tdw
  public int compareTo(TblPriv other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    TblPriv typedOther = (TblPriv) other;

    lastComparison = Boolean.valueOf(isSetDb()).compareTo(typedOther.isSetDb());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDb()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, typedOther.db);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTbl()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tbl, typedOther.tbl);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUser()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSelectPriv()).compareTo(typedOther.isSetSelectPriv());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSelectPriv()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.selectPriv, typedOther.selectPriv);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetInsertPriv()).compareTo(typedOther.isSetInsertPriv());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInsertPriv()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.insertPriv, typedOther.insertPriv);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIndexPriv()).compareTo(typedOther.isSetIndexPriv());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIndexPriv()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.indexPriv, typedOther.indexPriv);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetCreatePriv()).compareTo(typedOther.isSetCreatePriv());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetCreatePriv()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.createPriv, typedOther.createPriv);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDropPriv()).compareTo(typedOther.isSetDropPriv());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDropPriv()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dropPriv, typedOther.dropPriv);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetDeletePriv()).compareTo(typedOther.isSetDeletePriv());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDeletePriv()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.deletePriv, typedOther.deletePriv);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAlterPriv()).compareTo(typedOther.isSetAlterPriv());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAlterPriv()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.alterPriv, typedOther.alterPriv);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUpdatePriv()).compareTo(typedOther.isSetUpdatePriv());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUpdatePriv()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.updatePriv, typedOther.updatePriv);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
コード例 #4
0
ファイル: TblPriv.java プロジェクト: cnhans/tdw
  public boolean equals(TblPriv that) {
    if (that == null) return false;

    boolean this_present_db = true && this.isSetDb();
    boolean that_present_db = true && that.isSetDb();
    if (this_present_db || that_present_db) {
      if (!(this_present_db && that_present_db)) return false;
      if (!this.db.equals(that.db)) return false;
    }

    boolean this_present_tbl = true && this.isSetTbl();
    boolean that_present_tbl = true && that.isSetTbl();
    if (this_present_tbl || that_present_tbl) {
      if (!(this_present_tbl && that_present_tbl)) return false;
      if (!this.tbl.equals(that.tbl)) return false;
    }

    boolean this_present_user = true && this.isSetUser();
    boolean that_present_user = true && that.isSetUser();
    if (this_present_user || that_present_user) {
      if (!(this_present_user && that_present_user)) return false;
      if (!this.user.equals(that.user)) return false;
    }

    boolean this_present_selectPriv = true;
    boolean that_present_selectPriv = true;
    if (this_present_selectPriv || that_present_selectPriv) {
      if (!(this_present_selectPriv && that_present_selectPriv)) return false;
      if (this.selectPriv != that.selectPriv) return false;
    }

    boolean this_present_insertPriv = true;
    boolean that_present_insertPriv = true;
    if (this_present_insertPriv || that_present_insertPriv) {
      if (!(this_present_insertPriv && that_present_insertPriv)) return false;
      if (this.insertPriv != that.insertPriv) return false;
    }

    boolean this_present_indexPriv = true;
    boolean that_present_indexPriv = true;
    if (this_present_indexPriv || that_present_indexPriv) {
      if (!(this_present_indexPriv && that_present_indexPriv)) return false;
      if (this.indexPriv != that.indexPriv) return false;
    }

    boolean this_present_createPriv = true;
    boolean that_present_createPriv = true;
    if (this_present_createPriv || that_present_createPriv) {
      if (!(this_present_createPriv && that_present_createPriv)) return false;
      if (this.createPriv != that.createPriv) return false;
    }

    boolean this_present_dropPriv = true;
    boolean that_present_dropPriv = true;
    if (this_present_dropPriv || that_present_dropPriv) {
      if (!(this_present_dropPriv && that_present_dropPriv)) return false;
      if (this.dropPriv != that.dropPriv) return false;
    }

    boolean this_present_deletePriv = true;
    boolean that_present_deletePriv = true;
    if (this_present_deletePriv || that_present_deletePriv) {
      if (!(this_present_deletePriv && that_present_deletePriv)) return false;
      if (this.deletePriv != that.deletePriv) return false;
    }

    boolean this_present_alterPriv = true;
    boolean that_present_alterPriv = true;
    if (this_present_alterPriv || that_present_alterPriv) {
      if (!(this_present_alterPriv && that_present_alterPriv)) return false;
      if (this.alterPriv != that.alterPriv) return false;
    }

    boolean this_present_updatePriv = true;
    boolean that_present_updatePriv = true;
    if (this_present_updatePriv || that_present_updatePriv) {
      if (!(this_present_updatePriv && that_present_updatePriv)) return false;
      if (this.updatePriv != that.updatePriv) return false;
    }

    return true;
  }
コード例 #5
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);
   }
 }
コード例 #6
0
ファイル: TblPriv.java プロジェクト: cnhans/tdw
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, TblPriv struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetDb()) {
     optionals.set(0);
   }
   if (struct.isSetTbl()) {
     optionals.set(1);
   }
   if (struct.isSetUser()) {
     optionals.set(2);
   }
   if (struct.isSetSelectPriv()) {
     optionals.set(3);
   }
   if (struct.isSetInsertPriv()) {
     optionals.set(4);
   }
   if (struct.isSetIndexPriv()) {
     optionals.set(5);
   }
   if (struct.isSetCreatePriv()) {
     optionals.set(6);
   }
   if (struct.isSetDropPriv()) {
     optionals.set(7);
   }
   if (struct.isSetDeletePriv()) {
     optionals.set(8);
   }
   if (struct.isSetAlterPriv()) {
     optionals.set(9);
   }
   if (struct.isSetUpdatePriv()) {
     optionals.set(10);
   }
   oprot.writeBitSet(optionals, 11);
   if (struct.isSetDb()) {
     oprot.writeString(struct.db);
   }
   if (struct.isSetTbl()) {
     oprot.writeString(struct.tbl);
   }
   if (struct.isSetUser()) {
     oprot.writeString(struct.user);
   }
   if (struct.isSetSelectPriv()) {
     oprot.writeBool(struct.selectPriv);
   }
   if (struct.isSetInsertPriv()) {
     oprot.writeBool(struct.insertPriv);
   }
   if (struct.isSetIndexPriv()) {
     oprot.writeBool(struct.indexPriv);
   }
   if (struct.isSetCreatePriv()) {
     oprot.writeBool(struct.createPriv);
   }
   if (struct.isSetDropPriv()) {
     oprot.writeBool(struct.dropPriv);
   }
   if (struct.isSetDeletePriv()) {
     oprot.writeBool(struct.deletePriv);
   }
   if (struct.isSetAlterPriv()) {
     oprot.writeBool(struct.alterPriv);
   }
   if (struct.isSetUpdatePriv()) {
     oprot.writeBool(struct.updatePriv);
   }
 }
コード例 #7
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();
 }