I'm trying to save a Customer record here, using preparedstatementcreator.
public Customer saveRecord(Customer customer) {
        int result = 0;
        try {
            KeyHolder keyHolder = new GeneratedKeyHolder();
            result = jdbcTemplate.update(new PreparedStatementCreator() {
                @Override
                public PreparedStatement createPreparedStatement(Connection connection)
                        throws SQLException {
                    PreparedStatement preparedStatement = connection.prepareStatement(SQL_INSERT_CUSTOMER_MASTER_WITH_AUTO_INCREMENT, Statement.RETURN_GENERATED_KEYS);
                    preparedStatement.setString(1, customer.getFirstname());
                    return preparedStatement;
                }
            }, keyHolder);
        } catch (DataAccessException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result > 0 ? customer : null;
    }
And here is my Customer object.
public class Customer implements Serializable{
    private long id;
    private String firstname;
    private String secondname;
    private int age;
    private String address;
    private Country country;
    private String[] language;
    public Customer() {
    }
    public Customer(String firstname, String secondname, int age, String address, Country country, String[] language) {
        this.firstname = firstname;
        this.secondname = secondname;
        this.age = age;
        this.address = address;
        this.country = country;
        this.language = language;
    }
    //getters setters
}
I understand the reason here is we cannot access customer object from inside of createPreparedStatement().
So kind of modification I can do to original Customer object class to make it visible inside of this inner class? 
