public void setFieldValue(_Fields field, Object value) { switch (field) { case ID: if (value == null) { unsetId(); } else { setId((Integer) value); } break; case ISSUER: if (value == null) { unsetIssuer(); } else { setIssuer((com.booktion.thrift.User) value); } break; case BOOK: if (value == null) { unsetBook(); } else { setBook((com.booktion.thrift.Book) value); } break; case ADVERT_TYPE: if (value == null) { unsetAdvertType(); } else { setAdvertType((com.booktion.thrift.AdvertType) value); } break; case EXPIRES: if (value == null) { unsetExpires(); } else { setExpires((Long) value); } break; case PRICE: if (value == null) { unsetPrice(); } else { setPrice((Double) value); } break; case WINNER: if (value == null) { unsetWinner(); } else { setWinner((Integer) value); } break; } }