@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_description = true && (isSetDescription()); list.add(present_description); if (present_description) list.add(description); boolean present_locationUri = true && (isSetLocationUri()); list.add(present_locationUri); if (present_locationUri) list.add(locationUri); boolean present_createTime = true && (isSetCreateTime()); list.add(present_createTime); if (present_createTime) list.add(createTime); return list.hashCode(); }
if (isSetCreateTime()) { if (!first) sb.append(", "); sb.append("createTime:");
public void write(org.apache.thrift.protocol.TProtocol oprot, Catalog struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeString(struct.name); oprot.writeFieldEnd(); } if (struct.description != null) { if (struct.isSetDescription()) { oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC); oprot.writeString(struct.description); oprot.writeFieldEnd(); } } if (struct.locationUri != null) { oprot.writeFieldBegin(LOCATION_URI_FIELD_DESC); oprot.writeString(struct.locationUri); oprot.writeFieldEnd(); } if (struct.isSetCreateTime()) { oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); oprot.writeI32(struct.createTime); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NAME: return isSetName(); case DESCRIPTION: return isSetDescription(); case LOCATION_URI: return isSetLocationUri(); case CREATE_TIME: return isSetCreateTime(); } throw new IllegalStateException(); }
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) {
boolean this_present_createTime = true && this.isSetCreateTime(); boolean that_present_createTime = true && that.isSetCreateTime(); if (this_present_createTime || that_present_createTime) { if (!(this_present_createTime && that_present_createTime))
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Catalog struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetName()) { optionals.set(0); } if (struct.isSetDescription()) { optionals.set(1); } if (struct.isSetLocationUri()) { optionals.set(2); } if (struct.isSetCreateTime()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetName()) { oprot.writeString(struct.name); } if (struct.isSetDescription()) { oprot.writeString(struct.description); } if (struct.isSetLocationUri()) { oprot.writeString(struct.locationUri); } if (struct.isSetCreateTime()) { oprot.writeI32(struct.createTime); } }
Assert.assertEquals(description[i], cat.getDescription()); Assert.assertEquals(location[i], cat.getLocationUri()); Assert.assertTrue("Create time of catalog should be set", cat.isSetCreateTime()); Assert.assertTrue("Create time of catalog should be non-zero", cat.getCreateTime() > 0); File dir = new File(cat.getLocationUri());