コード例 #1
0
ファイル: TRole.java プロジェクト: making/moneygr
    public void read(org.apache.thrift.protocol.TProtocol iprot, TRole 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: // ROLE_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.roleName = iprot.readString();
              struct.setRoleNameIsSet(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();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }
コード例 #2
0
ファイル: TRole.java プロジェクト: making/moneygr
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, TRole struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     struct.roleName = iprot.readString();
     struct.setRoleNameIsSet(true);
   }
 }
コード例 #3
0
ファイル: TRole.java プロジェクト: making/moneygr
 @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);
   }
 }
コード例 #4
0
ファイル: TRole.java プロジェクト: making/moneygr
  @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;
  }
コード例 #5
0
ファイル: TRole.java プロジェクト: making/moneygr
  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;
  }
コード例 #6
0
ファイル: TRole.java プロジェクト: making/moneygr
    public void write(org.apache.thrift.protocol.TProtocol oprot, TRole struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.roleName != null) {
        oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
        oprot.writeString(struct.roleName);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
コード例 #7
0
ファイル: TRole.java プロジェクト: making/moneygr
 /** Performs a deep copy on <i>other</i>. */
 public TRole(TRole other) {
   if (other.isSetRoleName()) {
     this.roleName = other.roleName;
   }
 }