Examples of GreetingProcessor


Examples of org.easybatch.tutorials.common.GreetingProcessor

        // Build an easy batch engine
        EasyBatchEngine easyBatchEngine = new EasyBatchEngineBuilder()
                .registerRecordReader(new FlatFileRecordReader(new File(args[0])))
                .registerRecordMapper(new DelimitedRecordMapper<Greeting>(Greeting.class, new String[]{"id", "name"}))
                .registerRecordProcessor(new GreetingProcessor())
                .build();

        // Run easy batch engine
        EasyBatchReport easyBatchReport = easyBatchEngine.call();
View Full Code Here

Examples of org.easybatch.tutorials.common.GreetingProcessor

                .registerRecordFilter(new StartsWithStringRecordFilter("#"))
                .registerRecordMapper(new FixedLengthRecordMapper<Greeting>(
                        Greeting.class,
                        new int[]{3,3},
                        new String[]{"id", "name"}))
                .registerRecordProcessor(new GreetingProcessor())
                .build();

        // Run easy batch engine
        EasyBatchReport easyBatchReport = easyBatchEngine.call();
View Full Code Here

Examples of org.easybatch.tutorials.common.GreetingProcessor

        // Build an easy batch engine
        EasyBatchEngine easyBatchEngine = new EasyBatchEngineBuilder()
                .registerRecordReader(new StringRecordReader(dataSource))
                .registerRecordFilter(new StartsWithStringRecordFilter("#"))
                .registerRecordMapper(new DelimitedRecordMapper<Greeting>(Greeting.class, new String[]{"id", "name"}))
                .registerRecordProcessor(new GreetingProcessor())
                .build();

        // Run easy batch engine
        EasyBatchReport easyBatchReport = easyBatchEngine.call();
View Full Code Here

Examples of org.easybatch.tutorials.common.GreetingProcessor

        // Build an easy batch engine
        EasyBatchEngine easyBatchEngine = new EasyBatchEngineBuilder()
                .registerRecordReader(new JsonRecordReader(new File(args[0])))
                .registerRecordMapper(new JsonRecordMapper())
                .registerRecordProcessor(new GreetingProcessor())
                .build();

        // Run easy batch engine
        EasyBatchReport easyBatchReport = easyBatchEngine.call();
View Full Code Here

Examples of org.easybatch.tutorials.common.GreetingProcessor

        // Build an easy batch engine
        EasyBatchEngine easyBatchEngine = new EasyBatchEngineBuilder()
                .registerRecordReader(new JdbcRecordReader(connection, "select * from greeting"))
                .registerRecordMapper(new JdbcRecordMapper<Greeting>(Greeting.class))
                .registerRecordProcessor(new GreetingProcessor())
                .build();

        // Run easy batch engine
        EasyBatchReport easyBatchReport = easyBatchEngine.call();

View Full Code Here

Examples of org.easybatch.tutorials.common.GreetingProcessor

        // Build an easy batch engine
        EasyBatchEngine easyBatchEngine = new EasyBatchEngineBuilder()
                .registerRecordReader(new CliRecordReader())
                .registerRecordFilter(new StartsWithStringRecordFilter("#"))
                .registerRecordMapper(new DelimitedRecordMapper<Greeting>(Greeting.class, new String[]{"id", "name"}))
                .registerRecordProcessor(new GreetingProcessor())
                .build();

        // Run easy batch engine
        EasyBatchReport easyBatchReport = easyBatchEngine.call();
        System.out.println(easyBatchReport);
View Full Code Here

Examples of org.easybatch.tutorials.common.GreetingProcessor

        // Build an easy batch engine
        EasyBatchEngine easyBatchEngine = new EasyBatchEngineBuilder()
                .registerRecordReader(new FlatFileRecordReader(new File(args[0])))
                .registerRecordMapper(new DelimitedRecordMapper<Greeting>(Greeting.class, new String[]{"id", "name"}))
                .registerRecordValidator(new BeanValidationRecordValidator<Greeting>())
                .registerRecordProcessor(new GreetingProcessor())
                .build();

        // schedule the engine to start now and run every minute
        EasyBatchScheduler easyBatchScheduler = new EasyBatchScheduler(easyBatchEngine);
        easyBatchScheduler.scheduleAtWithInterval(new Date(), 1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.