[BATCH-430] Created an item.adapter package and moved adapter implementations there.
This commit is contained in:
@@ -10,9 +10,6 @@
|
||||
<config>src/test/resources/org/springframework/batch/retry/aop/retry-transaction-test.xml</config>
|
||||
<config>src/test/resources/org/springframework/batch/item/database/data-source-context.xml</config>
|
||||
<config>src/test/resources/org/springframework/batch/item/file/mapping/bean-wrapper.xml</config>
|
||||
<config>src/test/resources/org/springframework/batch/item/reader/delegating-item-provider.xml</config>
|
||||
<config>src/test/resources/org/springframework/batch/item/writer/delegating-item-writer.xml</config>
|
||||
<config>src/test/resources/org/springframework/batch/item/writer/pe-delegating-item-writer.xml</config>
|
||||
</configs>
|
||||
<configSets>
|
||||
</configSets>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.item.reader;
|
||||
package org.springframework.batch.item.adapter;
|
||||
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.item.writer;
|
||||
package org.springframework.batch.item.adapter;
|
||||
|
||||
import org.springframework.batch.item.ClearFailedException;
|
||||
import org.springframework.batch.item.FlushFailedException;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.item.writer;
|
||||
package org.springframework.batch.item.adapter;
|
||||
|
||||
import org.springframework.batch.item.ClearFailedException;
|
||||
import org.springframework.batch.item.FlushFailedException;
|
||||
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
Adapters for Plain Old Java Objects.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -113,7 +113,7 @@ public class ResourceLineReader extends ItemStreamSupport implements LineReader,
|
||||
*
|
||||
* @return a String.
|
||||
*
|
||||
* @see org.springframework.batch.item.reader.support.ItemReader#read()
|
||||
* @see org.springframework.batch.item.adapter.support.ItemReader#read()
|
||||
*/
|
||||
public synchronized Object read() {
|
||||
// Make a copy of the recordSeparatorPolicy reference, in case it is
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package org.springframework.batch.item.reader;
|
||||
package org.springframework.batch.item.adapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.batch.io.sample.domain.FooService;
|
||||
import org.springframework.batch.item.adapter.ItemReaderAdapter;
|
||||
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
|
||||
|
||||
/**
|
||||
@@ -11,7 +12,7 @@ import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
|
||||
*
|
||||
* @author Robert Kasanicky
|
||||
*/
|
||||
public class DelegatingItemReaderIntegrationTests extends AbstractDependencyInjectionSpringContextTests {
|
||||
public class ItemReaderAdapterTests extends AbstractDependencyInjectionSpringContextTests {
|
||||
|
||||
private ItemReaderAdapter provider;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package org.springframework.batch.item.writer;
|
||||
package org.springframework.batch.item.adapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.batch.io.sample.domain.Foo;
|
||||
import org.springframework.batch.io.sample.domain.FooService;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.item.adapter.ItemWriterAdapter;
|
||||
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
|
||||
|
||||
/**
|
||||
@@ -1,9 +1,10 @@
|
||||
package org.springframework.batch.item.writer;
|
||||
package org.springframework.batch.item.adapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.batch.io.sample.domain.Foo;
|
||||
import org.springframework.batch.io.sample.domain.FooService;
|
||||
import org.springframework.batch.item.adapter.PropertyExtractingDelegatingItemWriter;
|
||||
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
|
||||
|
||||
/**
|
||||
@@ -2,7 +2,7 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
|
||||
<bean id="provider" class="org.springframework.batch.item.reader.ItemReaderAdapter">
|
||||
<bean id="provider" class="org.springframework.batch.item.adapter.ItemReaderAdapter">
|
||||
<property name="targetObject" ref="fooService" />
|
||||
<property name="targetMethod" value="generateFoo" />
|
||||
</bean>
|
||||
@@ -2,7 +2,7 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
|
||||
<bean id="processor" class="org.springframework.batch.item.writer.ItemWriterAdapter">
|
||||
<bean id="processor" class="org.springframework.batch.item.adapter.ItemWriterAdapter">
|
||||
<property name="targetObject" ref="fooService" />
|
||||
<property name="targetMethod" value="processFoo" />
|
||||
</bean>
|
||||
@@ -2,7 +2,7 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
|
||||
<bean id="processor" class="org.springframework.batch.item.writer.PropertyExtractingDelegatingItemWriter">
|
||||
<bean id="processor" class="org.springframework.batch.item.adapter.PropertyExtractingDelegatingItemWriter">
|
||||
<property name="targetObject" ref="fooService" />
|
||||
<property name="targetMethod" value="processNameValuePair" />
|
||||
<property name="fieldsUsedAsTargetMethodArguments" value="name,value" />
|
||||
Reference in New Issue
Block a user