@Override public void write(org.apache.thrift.protocol.TProtocol prot, Role struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetRoleName()) { optionals.set(0); } if (struct.isSetCreateTime()) { optionals.set(1); } if (struct.isSetOwnerName()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetRoleName()) { oprot.writeString(struct.roleName); } if (struct.isSetCreateTime()) { oprot.writeI32(struct.createTime); } if (struct.isSetOwnerName()) { oprot.writeString(struct.ownerName); } }
public boolean equals(Role 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; } boolean this_present_createTime = true; boolean that_present_createTime = true; if (this_present_createTime || that_present_createTime) { if (!(this_present_createTime && that_present_createTime)) return false; if (this.createTime != that.createTime) return false; } boolean this_present_ownerName = true && this.isSetOwnerName(); boolean that_present_ownerName = true && that.isSetOwnerName(); if (this_present_ownerName || that_present_ownerName) { if (!(this_present_ownerName && that_present_ownerName)) return false; if (!this.ownerName.equals(that.ownerName)) return false; } return true; }
/** Performs a deep copy on <i>other</i>. */ public Role(Role other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetRoleName()) { this.roleName = other.roleName; } this.createTime = other.createTime; if (other.isSetOwnerName()) { this.ownerName = other.ownerName; } }
@Override public int compareTo(Role 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; } } lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); if (lastComparison != 0) { return lastComparison; } if (isSetCreateTime()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOwnerName()).compareTo(other.isSetOwnerName()); if (lastComparison != 0) { return lastComparison; } if (isSetOwnerName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerName, other.ownerName); if (lastComparison != 0) { return lastComparison; } } return 0; }