protected void prepareStatement(PreparedStatement statement, User object, Boolean update) throws SQLException {
        try {
            if (object.getFirstName() != null)  statement.setString(1,object.getFirstName());
            else  statement.setNull(1, java.sql.Types.VARCHAR);

            if (object.getLastName() != null)  statement.setString(2,object.getLastName());
            else  statement.setNull(2, java.sql.Types.VARCHAR);

            if (object.getAge() != null)  statement.setInt(3,object.getAge());
            else  statement.setNull(3, java.sql.Types.INTEGER);

            if (object.getSex() != null)  statement.setString(4,object.getSex().toString());
            else  statement.setNull(4, java.sql.Types.VARCHAR);

            if (object.getPhone() != null)  statement.setString(5,object.getPhone());
            else  statement.setNull(5, java.sql.Types.VARCHAR);

            if (update) {

                if (object.getId() != null) statement.setInt(6, object.getId());
                else statement.setNull(6, java.sql.Types.INTEGER);
            }

        } catch (Exception e) {
            throw new SQLException(e);
        }
    }