private static Pledgepayment setPledgepayment(ResultSet resultset) {
        Pledgepayment pledgepayment = new Pledgepayment();
        try {
            pledgepayment.setActual_amount(resultset.getFloat("actual_amount"));
            pledgepayment.setContribution_id(resultset.getInt("contribution_id"));
            pledgepayment.setCurrency(resultset.getString("currency"));
            pledgepayment.setId(resultset.getInt("id"));
            pledgepayment.setPledge_id(resultset.getInt("pledge_id"));
            pledgepayment.setReminder_count(resultset.getInt("reminder_count"));
            pledgepayment.setReminder_date(resultset.getDate("reminder_date"));
            pledgepayment.setScheduled_amount(resultset.getFloat("scheduled_amount"));
            pledgepayment.setScheduled_date(resultset.getDate("scheduled_date"));
            int status_id = resultset.getInt("status_id");
            switch (status_id) {
                case Pledge.STATUS_ID_COMPLETED:
                    pledgepayment.setStatus(Enum_status.COMPLETED);
                    break;
                case Pledge.STATUS_ID_PENDING:
                    pledgepayment.setStatus(Enum_status.PENDING);
                    break;
                case Pledge.STATUS_ID_CANCELLED:
                    pledgepayment.setStatus(Enum_status.CANCELLED);
                    break;
                case Pledge.STATUS_ID_FAILED:
                    pledgepayment.setStatus(Enum_status.FAILED);
                    break;
                case Pledge.STATUS_ID_INPROGRESS:
                    pledgepayment.setStatus(Enum_status.INPROGRESS);
                    break;
                case Pledge.STATUS_ID_OVERDUE:
                    pledgepayment.setStatus(Enum_status.OVERDUE);
                    break;
                default:
                    break;
            }

            return pledgepayment;
        } catch (SQLException ex) {
            Logger.getLogger(PledgepaymentController.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        } catch (Exception e) {
            Logger.getLogger(PledgepaymentController.class.getName()).log(Level.SEVERE, null, e);
            return null;
        }
    }