|
3 | 3 | :toclevels: 4
|
4 | 4 |
|
5 | 5 | [[listOfReadersAndWriters]]
|
6 |
| - |
7 | 6 | [appendix]
|
8 | 7 | == List of ItemReaders and ItemWriters
|
9 | 8 |
|
10 | 9 | [[itemReadersAppendix]]
|
11 |
| - |
12 | 10 | === Item Readers
|
13 | 11 |
|
14 | 12 | .Available Item Readers
|
15 | 13 | [options="header"]
|
16 | 14 | |===============
|
17 | 15 | |Item Reader|Description
|
18 |
| -|AbstractItemCountingItemStreamItemReader|Abstract base class that provides basic |
| 16 | +|`AbstractItemCountingItemStreamItemReader`|Abstract base class that provides basic |
19 | 17 | restart capabilities by counting the number of items returned from
|
20 | 18 | an `ItemReader`.
|
21 |
| -|AggregateItemReader|An `ItemReader` that delivers a list as its |
| 19 | +|`AggregateItemReader`|An `ItemReader` that delivers a list as its |
22 | 20 | item, storing up objects from the injected `ItemReader` until they
|
23 |
| - are ready to be packed out as a collection. This class must be used |
24 |
| - as a wrapper for a custom `ItemReader` that can identify the record |
25 |
| - boundaries. The custom reader should mark the beginning and end of |
26 |
| - records by returning an `AggregateItem` which responds `true` to its |
27 |
| - query methods `isHeader()` and `isFooter()`. Note that this reader |
| 21 | + are ready to be packed out as a collection. This class must be used |
| 22 | + as a wrapper for a custom `ItemReader` that can identify the record |
| 23 | + boundaries. The custom reader should mark the beginning and end of |
| 24 | + records by returning an `AggregateItem` which responds `true` to its |
| 25 | + query methods (`isHeader()` and `isFooter()`). Note that this reader |
28 | 26 | is not part of the library of readers provided by Spring Batch
|
29 | 27 | but given as a sample in `spring-batch-samples`.
|
30 |
| -|AmqpItemReader|Given a Spring `AmqpTemplate`, it provides |
| 28 | +|`AmqpItemReader`|Given a Spring `AmqpTemplate`, it provides |
31 | 29 | synchronous receive methods. The `receiveAndConvert()` method
|
32 | 30 | lets you receive POJO objects.
|
33 |
| -|KafkaItemReader|An `ItemReader` that reads messages from an Apache Kafka topic. |
| 31 | +|`KafkaItemReader`|An `ItemReader` that reads messages from an Apache Kafka topic. |
34 | 32 | It can be configured to read messages from multiple partitions of the same topic.
|
35 | 33 | This reader stores message offsets in the execution context to support restart capabilities.
|
36 |
| -|FlatFileItemReader|Reads from a flat file. Includes `ItemStream` |
37 |
| - and `Skippable` functionality. See link:readersAndWriters.html#flatFileItemReader[`FlatFileItemReader`]. |
38 |
| -|HibernateCursorItemReader|Reads from a cursor based on an HQL query. See |
| 34 | +|`FlatFileItemReader`|Reads from a flat file. Includes `ItemStream` |
| 35 | + and `Skippable` functionality. See link:readersAndWriters.html#flatFileItemReader["`FlatFileItemReader`"]. |
| 36 | +|`HibernateCursorItemReader`|Reads from a cursor based on an HQL query. See |
39 | 37 | link:readersAndWriters.html#cursorBasedItemReaders[`Cursor-based ItemReaders`].
|
40 |
| -|HibernatePagingItemReader|Reads from a paginated HQL query |
41 |
| -|ItemReaderAdapter|Adapts any class to the |
| 38 | +|`HibernatePagingItemReader`|Reads from a paginated HQL query. |
| 39 | +|`ItemReaderAdapter`|Adapts any class to the |
42 | 40 | `ItemReader` interface.
|
43 |
| -|JdbcCursorItemReader|Reads from a database cursor via JDBC. See |
44 |
| - link:readersAndWriters.html#cursorBasedItemReaders[`Cursor-based ItemReaders`]. |
45 |
| -|JdbcPagingItemReader|Given an SQL statement, pages through the rows, |
| 41 | +|`JdbcCursorItemReader`|Reads from a database cursor over JDBC. See |
| 42 | + link:readersAndWriters.html#cursorBasedItemReaders["`Cursor-based ItemReaders`"]. |
| 43 | +|`JdbcPagingItemReader`|Given an SQL statement, pages through the rows, |
46 | 44 | such that large datasets can be read without running out of
|
47 | 45 | memory.
|
48 |
| -|JmsItemReader|Given a Spring `JmsOperations` object and a JMS |
49 |
| - Destination or destination name to which to send errors, provides items |
| 46 | +|`JmsItemReader`|Given a Spring `JmsOperations` object and a JMS |
| 47 | + destination or destination name to which to send errors, provides items |
50 | 48 | received through the injected `JmsOperations#receive()`
|
51 | 49 | method.
|
52 |
| -|JpaPagingItemReader|Given a JPQL statement, pages through the |
| 50 | +|`JpaPagingItemReader`|Given a JPQL statement, pages through the |
53 | 51 | rows, such that large datasets can be read without running out of
|
54 | 52 | memory.
|
55 |
| -|ListItemReader|Provides the items from a list, one at a |
| 53 | +|`ListItemReader`|Provides the items from a list, one at a |
56 | 54 | time.
|
57 |
| -|MongoItemReader|Given a `MongoOperations` object and a JSON-based MongoDB |
| 55 | +|`MongoItemReader`|Given a `MongoOperations` object and a JSON-based MongoDB |
58 | 56 | query, provides items received from the `MongoOperations#find()` method.
|
59 |
| -|Neo4jItemReader|Given a `Neo4jOperations` object and the components of a |
| 57 | +|`Neo4jItemReader`|Given a `Neo4jOperations` object and the components of a |
60 | 58 | Cyhper query, items are returned as the result of the Neo4jOperations.query
|
61 | 59 | method.
|
62 |
| -|RepositoryItemReader|Given a Spring Data `PagingAndSortingRepository` object, |
| 60 | +|`RepositoryItemReader`|Given a Spring Data `PagingAndSortingRepository` object, |
63 | 61 | a `Sort`, and the name of method to execute, returns items provided by the
|
64 | 62 | Spring Data repository implementation.
|
65 |
| -|StoredProcedureItemReader|Reads from a database cursor resulting from the |
| 63 | +|`StoredProcedureItemReader`|Reads from a database cursor resulting from the |
66 | 64 | execution of a database stored procedure. See link:readersAndWriters.html#StoredProcedureItemReader[`StoredProcedureItemReader`]
|
67 |
| -|StaxEventItemReader|Reads via StAX. see link:readersAndWriters.html#StaxEventItemReader[`StaxEventItemReader`]. |
68 |
| -|JsonItemReader|Reads items from a Json document. see link:readersAndWriters.html#JsonItemReader[`JsonItemReader`]. |
| 65 | +|`StaxEventItemReader`|Reads over StAX. see link:readersAndWriters.html#StaxEventItemReader[`StaxEventItemReader`]. |
| 66 | +|`JsonItemReader`|Reads items from a Json document. see link:readersAndWriters.html#JsonItemReader[`JsonItemReader`]. |
69 | 67 |
|
70 | 68 | |===============
|
71 | 69 |
|
72 | 70 |
|
73 | 71 | [[itemWritersAppendix]]
|
74 |
| - |
75 |
| - |
76 | 72 | === Item Writers
|
77 | 73 |
|
78 | 74 | .Available Item Writers
|
79 | 75 | [options="header"]
|
80 | 76 | |===============
|
81 | 77 | |Item Writer|Description
|
82 |
| -|AbstractItemStreamItemWriter|Abstract base class that combines the |
| 78 | +|`AbstractItemStreamItemWriter`|Abstract base class that combines the |
83 | 79 | `ItemStream` and
|
84 | 80 | `ItemWriter` interfaces.
|
85 |
| -|AmqpItemWriter|Given a Spring `AmqpTemplate`, it provides |
| 81 | +|`AmqpItemWriter`|Given a Spring `AmqpTemplate`, provides |
86 | 82 | for a synchronous `send` method. The `convertAndSend(Object)`
|
87 | 83 | method lets you send POJO objects.
|
88 |
| -|CompositeItemWriter|Passes an item to the `write` method of each |
| 84 | +|`CompositeItemWriter`|Passes an item to the `write` method of each item |
89 | 85 | in an injected `List` of `ItemWriter` objects.
|
90 |
| -|FlatFileItemWriter|Writes to a flat file. Includes `ItemStream` and |
91 |
| - Skippable functionality. See link:readersAndWriters.html#flatFileItemWriter[`FlatFileItemWriter`]. |
92 |
| -|GemfireItemWriter|Using a `GemfireOperations` object, items are either written |
| 86 | +|`FlatFileItemWriter`|Writes to a flat file. Includes `ItemStream` and |
| 87 | + Skippable functionality. See link:readersAndWriters.html#flatFileItemWriter["`FlatFileItemWriter`"]. |
| 88 | +|`GemfireItemWriter`|Using a `GemfireOperations` object, items are either written |
93 | 89 | or removed from the Gemfire instance based on the configuration of the delete
|
94 | 90 | flag.
|
95 |
| -|HibernateItemWriter|This item writer is Hibernate-session aware |
96 |
| - and handles some transaction-related work that a non-"hibernate-aware" |
| 91 | +|`HibernateItemWriter`|This item writer is Hibernate-session aware |
| 92 | + and handles some transaction-related work that a non-"`hibernate-aware`" |
97 | 93 | item writer would not need to know about and then delegates
|
98 | 94 | to another item writer to do the actual writing.
|
99 |
| -|ItemWriterAdapter|Adapts any class to the |
| 95 | +|`ItemWriterAdapter`|Adapts any class to the |
100 | 96 | `ItemWriter` interface.
|
101 |
| -|JdbcBatchItemWriter|Uses batching features from a |
| 97 | +|`JdbcBatchItemWriter`|Uses batching features from a |
102 | 98 | `PreparedStatement`, if available, and can
|
103 | 99 | take rudimentary steps to locate a failure during a
|
104 | 100 | `flush`.
|
105 |
| -|JmsItemWriter|Using a `JmsOperations` object, items are written |
| 101 | +|`JmsItemWriter`|Using a `JmsOperations` object, items are written |
106 | 102 | to the default queue through the `JmsOperations#convertAndSend()` method.
|
107 |
| -|JpaItemWriter|This item writer is JPA EntityManager-aware |
108 |
| - and handles some transaction-related work that a non-"JPA-aware" |
| 103 | +|`JpaItemWriter`|This item writer is JPA `EntityManager`-aware |
| 104 | + and handles some transaction-related work that a non-"`JPA-aware`" |
109 | 105 | `ItemWriter` would not need to know about and
|
110 | 106 | then delegates to another writer to do the actual writing.
|
111 |
| -|KafkaItemWriter|Using a `KafkaTemplate` object, items are written to the default topic through the |
112 |
| - `KafkaTemplate#sendDefault(Object, Object)` method using a `Converter` to map the key from the item. |
| 107 | +|`KafkaItemWriter`|Using a `KafkaTemplate` object, items are written to the default topic through the |
| 108 | + `KafkaTemplate#sendDefault(Object, Object)` method by using a `Converter` to map the key from the item. |
113 | 109 | A delete flag can also be configured to send delete events to the topic.
|
114 |
| -|MimeMessageItemWriter|Using Spring's `JavaMailSender`, items of type `MimeMessage` |
| 110 | +|`MimeMessageItemWriter`|Using Spring's `JavaMailSender`, items of type `MimeMessage` |
115 | 111 | are sent as mail messages.
|
116 |
| -|MongoItemWriter|Given a `MongoOperations` object, items are written |
| 112 | +|`MongoItemWriter`|Given a `MongoOperations` object, items are written |
117 | 113 | through the `MongoOperations.save(Object)` method. The actual write is delayed
|
118 | 114 | until the last possible moment before the transaction commits.
|
119 |
| -|Neo4jItemWriter|Given a `Neo4jOperations` object, items are persisted through the |
120 |
| - `save(Object)` method or deleted through the `delete(Object)` per the |
| 115 | +|`Neo4jItemWriter`|Given a `Neo4jOperations` object, items are persisted through the |
| 116 | + `save(Object)` method or deleted through the `delete(Object)`, as dictated by the |
121 | 117 | `ItemWriter's` configuration
|
122 |
| -|PropertyExtractingDelegatingItemWriter|Extends `AbstractMethodInvokingDelegator` |
| 118 | +|`PropertyExtractingDelegatingItemWriter`|Extends `AbstractMethodInvokingDelegator` |
123 | 119 | creating arguments on the fly. Arguments are created by retrieving
|
124 | 120 | the values from the fields in the item to be processed (through a
|
125 | 121 | `SpringBeanWrapper`), based on an injected array of field
|
126 | 122 | names.
|
127 |
| -|RepositoryItemWriter|Given a Spring Data `CrudRepository` implementation, |
| 123 | +|`RepositoryItemWriter`|Given a Spring Data `CrudRepository` implementation, |
128 | 124 | items are saved through the method specified in the configuration.
|
129 |
| -|StaxEventItemWriter|Uses a `Marshaller` implementation to |
130 |
| - convert each item to XML and then writes it to an XML file using |
| 125 | +|`StaxEventItemWriter`|Uses a `Marshaller` implementation to |
| 126 | + convert each item to XML and then writes it to an XML file by using |
131 | 127 | StAX.
|
132 |
| -|JsonFileItemWriter|Uses a `JsonObjectMarshaller` implementation to |
133 |
| - convert each item to Json and then writes it to an Json file. |
| 128 | +|`JsonFileItemWriter`|Uses a `JsonObjectMarshaller` implementation to |
| 129 | + convert each item to Json and then writes it to a Json file. |
134 | 130 |
|
135 | 131 | |===============
|
0 commit comments