public void write(org.apache.thrift.protocol.TProtocol oprot, ShowLocksResponseElement struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(LOCKID_FIELD_DESC);
      oprot.writeI64(struct.lockid);
      oprot.writeFieldEnd();
      if (struct.dbname != null) {
        oprot.writeFieldBegin(DBNAME_FIELD_DESC);
        oprot.writeString(struct.dbname);
        oprot.writeFieldEnd();
      }
      if (struct.tablename != null) {
        if (struct.isSetTablename()) {
          oprot.writeFieldBegin(TABLENAME_FIELD_DESC);
          oprot.writeString(struct.tablename);
          oprot.writeFieldEnd();
        }
      }
      if (struct.partname != null) {
        if (struct.isSetPartname()) {
          oprot.writeFieldBegin(PARTNAME_FIELD_DESC);
          oprot.writeString(struct.partname);
          oprot.writeFieldEnd();
        }
      }
      if (struct.state != null) {
        oprot.writeFieldBegin(STATE_FIELD_DESC);
        oprot.writeI32(struct.state.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.type != null) {
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
        oprot.writeI32(struct.type.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.isSetTxnid()) {
        oprot.writeFieldBegin(TXNID_FIELD_DESC);
        oprot.writeI64(struct.txnid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(LASTHEARTBEAT_FIELD_DESC);
      oprot.writeI64(struct.lastheartbeat);
      oprot.writeFieldEnd();
      if (struct.isSetAcquiredat()) {
        oprot.writeFieldBegin(ACQUIREDAT_FIELD_DESC);
        oprot.writeI64(struct.acquiredat);
        oprot.writeFieldEnd();
      }
      if (struct.user != null) {
        oprot.writeFieldBegin(USER_FIELD_DESC);
        oprot.writeString(struct.user);
        oprot.writeFieldEnd();
      }
      if (struct.hostname != null) {
        oprot.writeFieldBegin(HOSTNAME_FIELD_DESC);
        oprot.writeString(struct.hostname);
        oprot.writeFieldEnd();
      }
      if (struct.isSetHeartbeatCount()) {
        oprot.writeFieldBegin(HEARTBEAT_COUNT_FIELD_DESC);
        oprot.writeI32(struct.heartbeatCount);
        oprot.writeFieldEnd();
      }
      if (struct.agentInfo != null) {
        if (struct.isSetAgentInfo()) {
          oprot.writeFieldBegin(AGENT_INFO_FIELD_DESC);
          oprot.writeString(struct.agentInfo);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetBlockedByExtId()) {
        oprot.writeFieldBegin(BLOCKED_BY_EXT_ID_FIELD_DESC);
        oprot.writeI64(struct.blockedByExtId);
        oprot.writeFieldEnd();
      }
      if (struct.isSetBlockedByIntId()) {
        oprot.writeFieldBegin(BLOCKED_BY_INT_ID_FIELD_DESC);
        oprot.writeI64(struct.blockedByIntId);
        oprot.writeFieldEnd();
      }
      if (struct.isSetLockIdInternal()) {
        oprot.writeFieldBegin(LOCK_ID_INTERNAL_FIELD_DESC);
        oprot.writeI64(struct.lockIdInternal);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ShowLocksResponseElement.java