Commit Graph

1034 Commits

Author SHA1 Message Date
Mahmoud Ben Hassine
70d0e3c510 Add JSR-305 annotations to public APIs
(Partially) Resolves BATCH-2688
2018-08-31 15:11:50 -05:00
Mahmoud Ben Hassine
8af965cac5 Update javadoc 2018-08-31 19:47:49 +02:00
Mahmoud Ben Hassine
adc90b220d Fix typo in method name HibernatePagingItemReaderBuilder#useSatelessSession
Resolves BATCH-2745
2018-08-31 10:50:50 -05:00
Mahmoud Ben Hassine
80d1a24f52 Allow whitespace characters as delimiters in FlatFileItemReader
Resolves BATCH-2738
2018-08-31 10:32:59 -05:00
Mahmoud Ben Hassine
523c8083ab Polish 2018-08-13 00:50:12 +02:00
Jerry Zhao
a8032196bf reuse existing methods whenever applicable
remove unnecessary unboxing
2018-08-13 00:00:34 +02:00
Mahmoud Ben Hassine
96a0fc825e Add JSR-305 annotations to public APIs
(Partially) Resolves BATCH-2688
2018-07-19 22:58:24 +02:00
Mahmoud Ben Hassine
9f2b752f3f Add a validator based on the Bean Validation API
Resolves BATCH-2690
2018-07-10 00:08:18 +02:00
Mahmoud Ben Hassine
84d349ea9d Add streaming json item writer
Resolves BATCH-2692
2018-07-09 16:41:56 -05:00
Michael Minella
7e402242db Applied spelling fix noted by koraytugay 2018-06-08 10:56:30 -05:00
Mahmoud Ben Hassine
5cb3355fcb Add package-info.java file in org.springframework.batch.item.json package 2018-06-05 16:38:56 +02:00
Mahmoud Ben Hassine
5281d6d2aa Add a streaming Json item reader
This commit adds a new Json item reader with two implementations based
on Jackson and Gson.

Resolves BATCH-2691
2018-05-31 08:07:34 -05:00
Mahmoud Ben Hassine
69b32e56e6 Add a builder for the JpaItemWriter
Resolves BATCH-2714.
2018-05-17 15:19:33 -05:00
woniper
c2b0a208c3 fix up code formatting and typo 2018-05-17 14:45:16 +02:00
Drummond Dawson
d89102d7ff Fix typos in JdbcPagingItemReaderBuilder 2018-04-18 14:39:21 +02:00
Drummond Dawson
32692f9583 Add beanRowMapper to JdbcCursorItemReaderBuilder
Sets the rowMapper of the JdbcCursorItemReader as a BeanPropertyRowMapper.

Resolves BATCH-2710
2018-04-13 11:41:32 +02:00
Mahmoud Ben Hassine
79f3a67883 BATCH-2397: fix parameters handling in MethodInvokingTaskletAdapter
When a tasklet is declared with xml using the shortcut version, the
MethodInvokingTaskletAdapter that is created automatically does not
address passing parameters expected by Tasklet#execute (which is
incorrect since the documentation of the schema attribute "method"
says the bean should define a method with the same signature).

This commit fixes parameters passing when using the shortcut version.

Resolves BATCH-2397
2018-01-26 13:15:20 -06:00
Mahmoud Ben Hassine
54f3a5c837 BATCH-2465: add note about the importance to have a unique key constraint on the sortKey 2018-01-25 17:29:56 -06:00
Mahmoud Ben Hassine
8af6841fa6 BATCH-2672: add method to set the encoding in the FlatFileItemReaderBuilder 2018-01-25 15:05:04 +01:00
Michael Minella
7211947553 Polish 2017-12-01 06:49:16 -06:00
Philippe Marschall
73ca73688d BATCH-2417 Drop JAXP 1.3 support
Spring 4 requires JDK 6 which includes JAXP 1.4. In Spring 4
`org.springframework.util.xml.StaxUtils` is public and directly
delegates to `javax.xml.transform.stax.StAXSource`. This means that
`org.springframework.batch.item.xml.StaxUtils#hasSpring30StaxSupport`
will always be true. Therefore a lot of code an be simplified by
calling the constructors directly instead of through reflection.

 - remove reflection no longer needed in Spring 4
 - move methods only used in tests to custom test class

Issue: BATCH-2417
2017-12-01 06:31:37 -06:00
Michael Minella
40db8a770f Polish 2017-11-30 15:01:02 -06:00
Michael Minella
1c9c30c10d Polish 2017-11-30 12:13:38 -06:00
Guillaume DARMONT
dca726af16 Added AbstractCursorItemReader.connectionAutoCommit to allow override of cursor connection autoCommit value
autoCommit value is restored after connection use.
2017-11-30 10:55:58 -06:00
Takaaki Iida
cae2cabdce BATCH-2567: Allow to access MongoItemWriter.template from a subclass
JIRA: https://jira.spring.io/browse/BATCH-2567
2017-11-30 10:14:23 -06:00
Michael Minella
b2f91ae395 Added builder method for new Query option on the MongoItemReader 2017-11-29 11:16:10 -06:00
Michael Minella
6e0df991b6 Polish 2017-11-27 18:01:26 -06:00
Takaaki Iida
6d88d1f3d2 BATCH-2568: MongoItemReader should support Query object by default
JIRA: https://jira.spring.io/browse/BATCH-2568
2017-11-27 17:12:15 -06:00
Olivier Bourgain
62a580f52d Revert the behavior of DelimitedLineTokenizer to pre-4
DelimitedLineTokenizer was refactored to improve its performance but its behavior was also slightly changed.
When the input is an empty csv string with double quotes, e.g. the java
String line = "\"\""; the tokenizer returns the same String, whereas
before it was returning an empty string.

This is due to the condition checking for quotes to remove not stripping
the double quotes from the empty csv string (because its length is 2 and
the code check for strictly greater than 2).
The previous code is there 973fe44d6c/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DelimitedLineTokenizer.java (L202)  and checking for
double quotes at the start and end of the string without special
handling for the empty string.

At test is also added to ensure this won't break again.

Resolves BATCH-2657
2017-11-27 16:43:01 -06:00
Michael Minella
8fa5929a44 Updated documentation to outline skip behaviour of RepositoryItemReader
This commit addresses via documentation the issues with using a paging
algorithm for the RepositoryItemReader.

Resolves BATCH-2589
2017-11-27 10:55:57 -06:00
René Keller
8402f10242 Add support for DB2AS400 database
Add support for DB2AS400 to DefaultDataFieldMaxValueIncrementerFactory.
Apparently, DB2AS400 is using the same syntax for sequence value
retrieval as standard DB2.

resolves BATCH-2525
2017-11-02 13:21:42 -05:00
Michael Minella
70a5ec24c5 Added a builder for the StoredProcedureItemReader
This commit adds a builder for the StoredProcedureItemReader

Resolves BATCH-2646
2017-11-01 12:35:20 -05:00
Michael Minella
00a16b41b8 Remove checked exception from FlatFileItemReaderBuilder#build
A checked exception from this method is rather invasive so this commit
refactors it to throw a RuntimeException instead.

Resolves BATCH-2649
2017-10-31 16:12:37 -05:00
Michael Minella
7d2a26a136 Add an ItemProcessor that delegates to a java.util.function.Function
This commit adds a new `ItemProcessor` that delegates to a
`java.util.function.Function`.  It also enables users to configure a
`Function` as an `ItemProcessor` via the builders (so they don't need to
worry about the `ItemProcessor` wrapper in the first place).

Resolves BATCH-2641
2017-09-15 16:44:54 -05:00
Michael Minella
b180c75ce0 Housecleaning of build warnings 2017-09-15 15:58:22 -05:00
Glenn Renfro
cf97912ec9 Adds ConversionService support to BeanWrapperFieldSetMapper.
This PR supercedes PR#430

Resolves BATCH-2529
2017-09-11 22:59:59 -05:00
Michael Minella
63df1fe529 Polish 2017-09-11 22:33:10 -05:00
Glenn Renfro
9fc6ba149b Remove first set of JavaDoc warnings 2017-09-11 11:41:46 -05:00
Anne-Lore Montagne
e2147e2495 BATCH-2500: MultiResourceItemWriter with StaxEventItemWriter restarts at position 0
MultiResourceItemWriter delegating to a StaxEventItemWriter doesn't restart properly.
* Changed the open() method in MultiResourceItemWriter by setting the flag 'opened' to true.

Updated PR with code review comments.
2017-08-03 09:52:41 -04:00
Glenn Renfro
77d9ff9d95 Add builder for LdifReader.
Resolves #BATCH-2600
2017-07-25 14:16:11 -05:00
Glenn Renfro
0e510112a9 Add Builder for MappingLdifReader.
Resolves #BATCH-2601
2017-07-25 14:02:13 -05:00
geowarin
96883023b9 Fix off-by-one error in DelimitedLineTokenizer on blank strings
There is currently a bug causing an ArrayIndexOutOfBoundsException
when trying to tokenize a blank string with more than two characters
2017-07-25 13:42:00 -05:00
Philippe Marschall
9f990f47c4 BATCH-2408 Use ArrayList instead of Stack
Stack is a pre Java 1.2 class that is slower than ArrayList as it
incurs additional synchronization overhead.

 - replace Stack with ArrayList where it's not public API

Issue: BATCH-2408
2017-07-19 09:23:12 -05:00
Michael Minella
d1f7dd0215 Removed abstract parent classes for builders
The abstract classes used for the parents of the builders.  Their use
caused odd generic issues with the API.  This reverts that change.
2017-07-17 22:39:26 -05:00
Glenn Renfro
f2fcbfe2a8 Added builder for Neo4jItemReader
resolves BATCH-2610
2017-07-17 16:19:11 -05:00
Glenn Renfro
fcdc916c72 Added AmqpItemWriterBuilder
resolves BATCH-2626
2017-07-17 14:20:27 -05:00
Michael Minella
d0a3278d12 Refactored FixLengthTokenizer to use vargs
This commit updates the FixLengthTokenizer to use vargs instead of an
array for ease of configuration.
2017-07-16 16:51:52 -05:00
Michael Minella
7dccbd75a6 Refactored DelimitedLineTokenizer to use vargs
This commit updates the DelimitedLineTokenizer to use vargs instead of
arrays for ease of configuration.
2017-07-16 16:40:29 -05:00
Glenn Renfro
67853f22de Documentation Migration
This commit migrates the old Spring Batch documentation to a new
asciidoc toolchain.  It will be the first piece in modernizing the
existing Spring Batch documentation.  Future steps will include making
java based configuraion more prominant in the reference documentation.

Resolves BATCH-2620
2017-07-13 14:49:33 -05:00
Michael Minella
5e65a283a1 Polish for BATCH-2609 2017-06-02 17:17:53 -05:00