Exemplo n.º 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, TRole struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetRoleName()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetRoleName()) {
     oprot.writeString(struct.roleName);
   }
 }
Exemplo n.º 2
0
  public boolean equals(TRole that) {
    if (that == null) return false;

    boolean this_present_roleName = true && this.isSetRoleName();
    boolean that_present_roleName = true && that.isSetRoleName();
    if (this_present_roleName || that_present_roleName) {
      if (!(this_present_roleName && that_present_roleName)) return false;
      if (!this.roleName.equals(that.roleName)) return false;
    }

    return true;
  }
Exemplo n.º 3
0
  @Override
  public int compareTo(TRole other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(other.isSetRoleName());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRoleName()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, other.roleName);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Exemplo n.º 4
0
 /** Performs a deep copy on <i>other</i>. */
 public TRole(TRole other) {
   if (other.isSetRoleName()) {
     this.roleName = other.roleName;
   }
 }