Package org.apache.camel.dataformat.bindy.model.simple.onetomany

Examples of org.apache.camel.dataformat.bindy.model.simple.onetomany.Author


    }

    public List<Map<String, Object>> generateModel() {
        Map<String, Object> modelObjects = new HashMap<String, Object>();

        Author author;
        Book book;

        Map<String, Object> model = new HashMap<String, Object>();
        List<Book> books = new ArrayList<Book>();
        // List<Reference> references = new ArrayList<Reference>();
        // List<Editor> editors = new ArrayList<Editor>();

        author = new Author();
        author.setFirstName("Charles");
        author.setLastName("Moulliard");
        author.setAge("43");

        // 1st Book
        book = new Book();
        book.setTitle("Camel in Action 1");
        book.setYear("2010");

        books.add(book);

        // 2nd book
        book = new Book();
        book.setTitle("Camel in Action 2");
        book.setYear("2012");

        books.add(book);

        // 3rd book
        book = new Book();
        book.setTitle("Camel in Action 3");
        book.setYear("2013");
        books.add(book);

        // 4th book
        book = new Book();
        book.setTitle("Camel in Action 4");
        book.setYear(null);
        books.add(book);

        // Add books to author
        author.setBooks(books);

        model.put(author.getClass().getName(), author);

        models.add(model);

        return models;
    }
View Full Code Here


        resultEndpoint.assertIsSatisfied();
    }

    public List<Map<String, Object>> generateModel() {
        Author author;
        Book book;

        Map<String, Object> model = new HashMap<String, Object>();
        List<Book> books = new ArrayList<Book>();
        // List<Reference> references = new ArrayList<Reference>();
        // List<Editor> editors = new ArrayList<Editor>();

        author = new Author();
        author.setFirstName("Charles");
        author.setLastName("Moulliard");
        author.setAge("43");

        // 1st Book
        book = new Book();
        book.setTitle("Camel in Action 1");
        book.setYear("2010");

        books.add(book);

        // 2nd book
        book = new Book();
        book.setTitle("Camel in Action 2");
        book.setYear("2012");

        books.add(book);

        // 3rd book
        book = new Book();
        book.setTitle("Camel in Action 3");
        book.setYear("2013");
        books.add(book);

        // 4th book
        book = new Book();
        book.setTitle("Camel in Action 4");
        book.setYear(null);
        books.add(book);

        // Add books to author
        author.setBooks(books);

        model.put(author.getClass().getName(), author);

        models.add(model);

        return models;
    }
View Full Code Here

    }

    public List<Map<String, Object>> generateModel() {
        Map<String, Object> modelObjects = new HashMap<String, Object>();

        Author author;
        Book book;

        Map<String, Object> model = new HashMap<String, Object>();
        List<Book> books = new ArrayList<Book>();
        // List<Reference> references = new ArrayList<Reference>();
        // List<Editor> editors = new ArrayList<Editor>();

        author = new Author();
        author.setFirstName("Charles");
        author.setLastName("Moulliard");
        author.setAge("43");

        // 1st Book
        book = new Book();
        book.setTitle("Camel in Action 1");
        book.setYear("2010");

        books.add(book);

        // 2nd book
        book = new Book();
        book.setTitle("Camel in Action 2");
        book.setYear("2012");

        books.add(book);

        // 3rd book
        book = new Book();
        book.setTitle("Camel in Action 3");
        book.setYear("2013");
        books.add(book);

        // 4th book
        book = new Book();
        book.setTitle("Camel in Action 4");
        book.setYear(null);
        books.add(book);

        // Add books to author
        author.setBooks(books);

        model.put(author.getClass().getName(), author);

        models.add(model);

        return models;
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.dataformat.bindy.model.simple.onetomany.Author

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.