CamelCookbook / camel-cookbook-examples

Example source code for Apache Camel Developer's Cookbook
http://www.packtpub.com/apache-camel-developers-cookbook/book
Apache License 2.0
262 stars 188 forks source link

transformation/normalizer/MyNormalizer #47

Open jkorab opened 9 years ago

jkorab commented 9 years ago

Method signature simplified. Affected code block, was:

public Bookstore bookModelToJaxb(List<Map<String, Object>> books) {
    final Bookstore bookstore = new Bookstore();

    final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy");

    for (Map<String, Object> bookEntry : books) {
        final Book book = new Book();
        final Book.Title title = new Book.Title();

        final BookModel bookModel = (BookModel) bookEntry.get(BookModel.class.getCanonicalName());

now

public Bookstore bookModelToJaxb(List<BookModel> books) {
    final Bookstore bookstore = new Bookstore();

    final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy");

    for (BookModel bookModel : books) {
        final Book book = new Book();
        final Book.Title title = new Book.Title();

Update whole class in example.