@Override
    public void update(CreditCard card) throws DaoException {
        Connection connection = null;
        ResultSet rs = null;
        PreparedStatement ps = null;
        try {
            int countId = card.getCount().getCountID();
            int cardId = card.getCardID();
            int cardStatus = 0;
            if (card.getStatus()) {
                cardStatus = 1;
            }
            connection = dataSource.getConnection();
            ps = connection.prepareStatement(UPDATE_CARD_BY_ID);
            ps.setInt(1, countId);
            ps.setInt(2, cardStatus);
            ps.setInt(3, cardId);
            ps.execute();
        } catch (SQLException e) {
            throw new DaoException(ps.toString()); // TODO: Add discription of
                                                   // Exception
        } finally {
            closeConection(connection, rs, ps);
        }
    }