idOf(creditCard).set(id.get(rs));
return creditCard;
}
public void dehydrate(PreparedStatement st, PaymentMethod payment) throws SQLException {
CreditCardDetails creditCard = (CreditCardDetails) payment;
id.set(st, idOf(creditCard).get());
cardType.set(st, creditCard.getCardType().name());
cardNumber.set(st, creditCard.getCardNumber());
cardExpiryDate.set(st, creditCard.getCardExpiryDate());
paymentType.set(st, CREDIT_CARD);
}