General cleanup in spring-batch-samples

* Delete unused classes, files, misc ide files
* Cleanup checkstyle/pmd/findbugs reports
* Add @Override as needed
* Remove schema versions in xml configs
* Remove unused imports
* General tidying
* Cleanup deprecated jdbctemplate methods
* Fix @Ignored OrderItemReaderTests test
This commit is contained in:
Chris Schaefer
2014-03-21 17:14:24 -04:00
parent 3f5448f832
commit db8b5d9735
175 changed files with 737 additions and 2820 deletions

View File

@@ -1,116 +0,0 @@
#FindBugs User Preferences
#Wed Jul 23 12:11:15 BST 2008
detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
detectorBadAppletConstructor=BadAppletConstructor|false
detectorBadResultSetAccess=BadResultSetAccess|true
detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
detectorBadUseOfReturnValue=BadUseOfReturnValue|true
detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
detectorBooleanReturnNull=BooleanReturnNull|true
detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
detectorCheckTypeQualifiers=CheckTypeQualifiers|true
detectorCloneIdiom=CloneIdiom|true
detectorComparatorIdiom=ComparatorIdiom|true
detectorConfusedInheritance=ConfusedInheritance|true
detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
detectorCrossSiteScripting=CrossSiteScripting|true
detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
detectorDontUseEnum=DontUseEnum|true
detectorDroppedException=DroppedException|true
detectorDumbMethodInvocations=DumbMethodInvocations|true
detectorDumbMethods=DumbMethods|true
detectorDuplicateBranches=DuplicateBranches|true
detectorEmptyZipFileEntry=EmptyZipFileEntry|true
detectorFinalizerNullsFields=FinalizerNullsFields|true
detectorFindBadCast2=FindBadCast2|true
detectorFindBadForLoop=FindBadForLoop|true
detectorFindCircularDependencies=FindCircularDependencies|false
detectorFindDeadLocalStores=FindDeadLocalStores|true
detectorFindDoubleCheck=FindDoubleCheck|true
detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
detectorFindFinalizeInvocations=FindFinalizeInvocations|true
detectorFindFloatEquality=FindFloatEquality|true
detectorFindHEmismatch=FindHEmismatch|true
detectorFindInconsistentSync2=FindInconsistentSync2|true
detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
detectorFindMaskedFields=FindMaskedFields|true
detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
detectorFindNakedNotify=FindNakedNotify|true
detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
detectorFindNonShortCircuit=FindNonShortCircuit|true
detectorFindNullDeref=FindNullDeref|true
detectorFindOpenStream=FindOpenStream|true
detectorFindPuzzlers=FindPuzzlers|true
detectorFindRefComparison=FindRefComparison|true
detectorFindReturnRef=FindReturnRef|true
detectorFindRunInvocations=FindRunInvocations|true
detectorFindSelfComparison=FindSelfComparison|true
detectorFindSelfComparison2=FindSelfComparison2|true
detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
detectorFindSpinLoop=FindSpinLoop|true
detectorFindSqlInjection=FindSqlInjection|true
detectorFindTwoLockWait=FindTwoLockWait|true
detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
detectorFindUnconditionalWait=FindUnconditionalWait|true
detectorFindUninitializedGet=FindUninitializedGet|true
detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
detectorFindUnreleasedLock=FindUnreleasedLock|true
detectorFindUnsyncGet=FindUnsyncGet|true
detectorFindUselessControlFlow=FindUselessControlFlow|true
detectorHugeSharedStringConstants=HugeSharedStringConstants|true
detectorIDivResultCastToDouble=IDivResultCastToDouble|true
detectorIncompatMask=IncompatMask|true
detectorInefficientMemberAccess=InefficientMemberAccess|false
detectorInefficientToArray=InefficientToArray|true
detectorInfiniteLoop=InfiniteLoop|true
detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false
detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
detectorInitializationChain=InitializationChain|true
detectorInstantiateStaticClass=InstantiateStaticClass|true
detectorInvalidJUnitTest=InvalidJUnitTest|true
detectorIteratorIdioms=IteratorIdioms|true
detectorLazyInit=LazyInit|true
detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
detectorMethodReturnCheck=MethodReturnCheck|true
detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
detectorMutableLock=MutableLock|true
detectorMutableStaticFields=MutableStaticFields|true
detectorNaming=Naming|true
detectorNumberConstructor=NumberConstructor|true
detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
detectorPublicSemaphores=PublicSemaphores|false
detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
detectorRedundantInterfaces=RedundantInterfaces|true
detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
detectorSerializableIdiom=SerializableIdiom|true
detectorStartInConstructor=StartInConstructor|true
detectorStaticCalendarDetector=StaticCalendarDetector|true
detectorStringConcatenation=StringConcatenation|true
detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
detectorSwitchFallthrough=SwitchFallthrough|true
detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
detectorURLProblems=URLProblems|true
detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
detectorUnnecessaryMath=UnnecessaryMath|true
detectorUnreadFields=UnreadFields|true
detectorUseObjectEquals=UseObjectEquals|false
detectorUselessSubclassMethod=UselessSubclassMethod|false
detectorVarArgsProblems=VarArgsProblems|true
detectorVolatileUsage=VolatileUsage|true
detectorWaitInLoop=WaitInLoop|true
detectorWrongMapIterator=WrongMapIterator|true
detectorXMLFactoryBypass=XMLFactoryBypass|true
detector_threshold=2
effort=default
filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,I18N,MALICIOUS_CODE,MT_CORRECTNESS,PERFORMANCE,SECURITY,STYLE|false
filter_settings_neg=|

View File

@@ -1,413 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beansProjectDescription>
<version>1</version>
<pluginVersion><![CDATA[2.3.1.201002090815-CI-R3692-B638]]></pluginVersion>
<configSuffixes>
<configSuffix><![CDATA[xml]]></configSuffix>
</configSuffixes>
<enableImports><![CDATA[false]]></enableImports>
<configs>
<config>src/main/resources/jobs/multilineJob.xml</config>
<config>src/main/resources/jobs/multilineOrderJob.xml</config>
<config>src/main/resources/jobs/tradeJob.xml</config>
<config>src/main/resources/jobs/restartSample.xml</config>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/beanWrapperMapperSampleJob.xml</config>
<config>src/main/resources/jobs/adhocLoopJob.xml</config>
<config>src/main/resources/jobs/infiniteLoopJob.xml</config>
<config>src/main/resources/jobs/footballJob.xml</config>
<config>src/main/resources/jobs/delegatingJob.xml</config>
<config>src/main/resources/jobs/parallelJob.xml</config>
<config>src/main/resources/jobs/retrySample.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/adhoc-job-launcher-context.xml</config>
<config>src/main/resources/quartz-job-launcher-context.xml</config>
<config>src/main/resources/jobs/skipSampleJob.xml</config>
<config>src/main/resources/jobs/multilineOrderInputTokenizers.xml</config>
<config>src/main/resources/jobs/multilineOrderOutputAggregators.xml</config>
<config>src/main/resources/jobs/compositeItemWriterSampleJob.xml</config>
<config>src/main/resources/hibernate-context.xml</config>
<config>src/main/resources/staging-test-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/jobs/headerFooterSample.xml</config>
<config>src/main/resources/jobs/customerFilterJob.xml</config>
<config>src/main/resources/skipSample-job-launcher-context.xml</config>
<config>src/main/resources/jobs/ioSampleJob.xml</config>
<config>src/main/resources/jobs/iosample/delimited.xml</config>
<config>src/main/resources/jobs/iosample/fixedLength.xml</config>
<config>src/main/resources/jobs/iosample/jdbcCursor.xml</config>
<config>src/main/resources/jobs/iosample/multiLine.xml</config>
<config>src/main/resources/jobs/iosample/multiRecordType.xml</config>
<config>src/main/resources/jobs/iosample/multiResource.xml</config>
<config>src/main/resources/jobs/iosample/xml.xml</config>
<config>src/main/resources/jobs/iosample/hibernate.xml</config>
<config>src/main/resources/jobs/hibernateJob.xml</config>
<config>src/main/resources/jobs/iosample/jpa.xml</config>
<config>src/main/resources/jobs/iosample/ibatis.xml</config>
<config>src/test/resources/org/springframework/batch/sample/domain/trade/internal/JdbcCustomerDebitDaoTests-context.xml</config>
<config>src/main/resources/jobs/loopFlowSample.xml</config>
<config>src/test/resources/org/springframework/batch/sample/common/StagingItemReaderTests-context.xml</config>
<config>src/test/resources/org/springframework/batch/sample/common/StagingItemWriterTests-context.xml</config>
<config>src/main/resources/jobs/multilineOrderValidator.xml</config>
<config>src/main/resources/jobs/restartFileSampleJob.xml</config>
<config>src/main/resources/jobs/taskletJob.xml</config>
<config>src/main/resources/org/springframework/batch/sample/football-job-context.xml</config>
<config>src/main/resources/jobs/groovyJob.xml</config>
<config>src/main/resources/jobs/iosample/jdbcPaging.xml</config>
<config>src/main/resources/jobs/partitionJdbcJob.xml</config>
<config>src/main/resources/jobs/jobStepSample.xml</config>
<config>src/main/resources/jobs/partitionFileJob.xml</config>
<config>src/test/resources/org/springframework/batch/sample/common/ColumnRangePartitionerTests-context.xml</config>
<config>src/test/resources/job-runner-context.xml</config>
<config>src/test/resources/org/springframework/batch/sample/JobStepFunctionalTests-context.xml</config>
<config>src/main/resources/jobs/mailJob.xml</config>
</configs>
<configSets>
<configSet>
<name><![CDATA[repositoryTest]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[beanWrapper]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/jobs/beanWrapperMapperSampleJob.xml</config>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[delegating]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/delegatingJob.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[football]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/footballJob.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[infiniteLoop]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/jobs/infiniteLoopJob.xml</config>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[multiline]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/multilineJob.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[parallel]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/parallelJob.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[restart]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/restartSample.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[retry]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/jobs/retrySample.xml</config>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[trade]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/tradeJob.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[batchUpdate]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[quartzLauncher]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/quartz-job-launcher-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[compositeItemWriter]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/jobs/compositeItemWriterSampleJob.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[adhocLoop]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/jobs/adhocLoopJob.xml</config>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[staging]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/staging-test-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[common]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[jmxLauncher]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/adhoc-job-launcher-context.xml</config>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[headerFooter]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/headerFooterSample.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[customerFilterJob]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/jobs/customerFilterJob.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[hibernate]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/hibernate-context.xml</config>
<config>src/main/resources/jobs/hibernateJob.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[multiResourceJob]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[skipSample]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/skipSampleJob.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/skipSample-job-launcher-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[iosample-hibernate]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/ioSampleJob.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/hibernate-context.xml</config>
<config>src/main/resources/jobs/iosample/hibernate.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[iosample-jdbc]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/iosample/jdbcCursor.xml</config>
<config>src/main/resources/jobs/ioSampleJob.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[iosample-multiline]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/iosample/multiLine.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[iosample-multiRecordType]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/iosample/multiRecordType.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[iosample-jpa]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/iosample/jpa.xml</config>
<config>src/main/resources/jobs/ioSampleJob.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[data-source-contex]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
</configs>
</configSet>
<configSet>
<name><![CDATA[ibatis]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/jobs/iosample/ibatis.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[partition]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[multilineOrder]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/multilineOrderJob.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
<config>src/main/resources/jobs/multilineOrderInputTokenizers.xml</config>
<config>src/main/resources/jobs/multilineOrderOutputAggregators.xml</config>
<config>src/main/resources/jobs/multilineOrderValidator.xml</config>
</configs>
</configSet>
<configSet>
<name><![CDATA[restartFile]]></name>
<allowBeanDefinitionOverriding>true</allowBeanDefinitionOverriding>
<incomplete>false</incomplete>
<configs>
<config>src/main/resources/data-source-context.xml</config>
<config>src/main/resources/jobs/restartFileSampleJob.xml</config>
<config>src/main/resources/simple-job-launcher-context.xml</config>
<config>src/main/resources/org/springframework/batch/sample/config/common-context.xml</config>
</configs>
</configSet>
</configSets>
</beansProjectDescription>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/spring-batch-samples"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.hsqldb.util.DatabaseManagerSwing"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--url jdbc:hsqldb:hsql://localhost:9005/samples"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="spring-batch-samples"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
</launchConfiguration>

View File

@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/spring-batch-samples"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.hsqldb.Server"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="spring-batch-samples"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbatch.jdbc.url=jdbc:hsqldb:hsql://localhost:9005/samples"/>
</launchConfiguration>

View File

@@ -1,436 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<jalopy>
<general>
<compliance>
<version>14</version>
</compliance>
<style>
<description>Spring-Batch Java Coding Convention (based on Geotools CC and Sun CC)</description>
<name>Spring-Batch</name>
</style>
</general>
<inspector>
<enable>true</enable>
<naming>
<classes>
<abstract>[A-Z][a-zA-Z0-9]+</abstract>
<general>[A-Z][a-zA-Z0-9]+</general>
</classes>
<fields>
<default>[a-z][\w]+</default>
<defaultStatic>[a-z][\w]+</defaultStatic>
<defaultStaticFinal>[a-zA-Z][\w]+</defaultStaticFinal>
<private>[a-z][\w]+</private>
<privateStatic>[a-z][\w]+</privateStatic>
<privateStaticFinal>[a-zA-Z][\w]+</privateStaticFinal>
<protected>[a-z][\w]+</protected>
<protectedStatic>[a-z][\w]+</protectedStatic>
<protectedStaticFinal>[a-zA-Z][\w]+</protectedStaticFinal>
<public>[a-z][\w]+</public>
<publicStatic>[a-z][\w]+</publicStatic>
<publicStaticFinal>[a-zA-Z][\w]+</publicStaticFinal>
</fields>
<interfaces>[A-Z][a-zA-Z0-9]+</interfaces>
<labels>\w+</labels>
<methods>
<default>[a-z][\w]+</default>
<defaultStatic>[a-z][\w]+</defaultStatic>
<defaultStaticFinal>[a-z][\w]+</defaultStaticFinal>
<private>[a-z][\w]+</private>
<privateStatic>[a-z][\w]+</privateStatic>
<privateStaticFinal>[a-z][\w]+</privateStaticFinal>
<protected>[a-z][\w]+</protected>
<protectedStatic>[a-z][\w]+</protectedStatic>
<protectedStaticFinal>[a-z][\w]+</protectedStaticFinal>
<public>[a-z][\w]+</public>
<publicStatic>[a-z][\w]+</publicStatic>
<publicStaticFinal>[a-z][\w]+</publicStaticFinal>
</methods>
<packages>[a-z]+(?:\.[a-z]+)*</packages>
<parameters>
<default>[a-z][\w]+</default>
<final>[a-z][\w]+</final>
</parameters>
<variables>[a-z][\w]*</variables>
</naming>
<tips>
<adhereToNamingConvention>false</adhereToNamingConvention>
<alwaysOverrideEquals>false</alwaysOverrideEquals>
<alwaysOverrideHashCode>false</alwaysOverrideHashCode>
<avoidThreadGroups>false</avoidThreadGroups>
<declareCollectionComment>false</declareCollectionComment>
<dontIgnoreExceptions>false</dontIgnoreExceptions>
<dontSubstituteObjectEquals>false</dontSubstituteObjectEquals>
<neverDeclareException>false</neverDeclareException>
<neverDeclareThrowable>false</neverDeclareThrowable>
<neverInvokeWaitOutsideLoop>false</neverInvokeWaitOutsideLoop>
<neverReturnZeroArrays>false</neverReturnZeroArrays>
<neverUseEmptyFinally>false</neverUseEmptyFinally>
<obeyContractEquals>false</obeyContractEquals>
<overrideToString>false</overrideToString>
<referToObjectsByInterface>false</referToObjectsByInterface>
<replaceStructureWithClass>false</replaceStructureWithClass>
<stringLiterallI18n>false</stringLiterallI18n>
<useInterfaceOnlyForTypes>false</useInterfaceOnlyForTypes>
<wrongCollectionComment>false</wrongCollectionComment>
</tips>
</inspector>
<internal>
<version>6</version>
</internal>
<messages>
<priority>
<general>30000</general>
<parser>30000</parser>
<parserJavadoc>30000</parserJavadoc>
<printer>30000</printer>
<printerJavadoc>30000</printerJavadoc>
<transform>30000</transform>
</priority>
<showErrorStackTrace>true</showErrorStackTrace>
</messages>
<misc>
<threadCount>1</threadCount>
</misc>
<printer>
<alignment>
<methodCallChain>true</methodCallChain>
<parameterMethodDeclaration>false</parameterMethodDeclaration>
<ternaryOperator>true</ternaryOperator>
<variableAssignment>false</variableAssignment>
<variableDeclAssignment>false</variableDeclAssignment>
<variableIdentifier>false</variableIdentifier>
</alignment>
<backup>
<directory>bak</directory>
<level>0</level>
</backup>
<blanklines>
<after>
<block>1</block>
<braceLeft>0</braceLeft>
<class>1</class>
<declaration>0</declaration>
<footer>1</footer>
<header>0</header>
<interface>1</interface>
<lastImport>2</lastImport>
<method>1</method>
<package>1</package>
</after>
<before>
<block>1</block>
<braceRight>0</braceRight>
<caseBlock>1</caseBlock>
<comment>
<javadoc>1</javadoc>
<multiline>1</multiline>
<singleline>1</singleline>
</comment>
<controlStatement>1</controlStatement>
<declaration>1</declaration>
<footer>0</footer>
<header>0</header>
</before>
<keepUpTo>1</keepUpTo>
</blanklines>
<brace>
<comment>false</comment>
</brace>
<braces>
<empty>
<cuddle>false</cuddle>
<insertStatement>false</insertStatement>
</empty>
<insert>
<dowhile>false</dowhile>
<for>false</for>
<ifelse>true</ifelse>
<while>false</while>
</insert>
<remove>
<block>true</block>
<dowhile>false</dowhile>
<for>false</for>
<ifelse>false</ifelse>
<while>false</while>
</remove>
<treatDifferent>
<methodClass>false</methodClass>
<methodClassIfWrapped>false</methodClassIfWrapped>
</treatDifferent>
</braces>
<chunks>
<blanklines>true</blanklines>
<comments>true</comments>
</chunks>
<comments>
<format>
<multiline>true</multiline>
</format>
<javadoc>
<check>
<innerclass>false</innerclass>
<tags>true</tags>
<throwsTags>true</throwsTags>
</check>
<fieldsShort>true</fieldsShort>
<generate>
<class>0</class>
<constructor>0</constructor>
<field>0</field>
<method>0</method>
</generate>
<parseComments>false</parseComments>
<parseDescription>true</parseDescription>
<skip>
<ifml>false</ifml>
</skip>
<tags>
<in-line></in-line>
<standard>@task</standard>
</tags>
<templates>
<class>/**| * DOCUMENT ME!| *| * @author $author$| * @version $Revision: 1.9 $| */</class>
<constructor>
<bottom> */</bottom>
<exception> * @throws $exceptionType$ DOCUMENT ME!</exception>
<param> * @param $paramType$ DOCUMENT ME!</param>
<top>/**| * Creates a new $objectType$ object.</top>
</constructor>
<interface>/**| * DOCUMENT ME!| *| * @author $author$| * @version $Revision: 1.9 $| */</interface>
<method>
<bottom> */</bottom>
<exception> * @throws $exceptionType$ DOCUMENT ME!</exception>
<param> * @param $paramType$ DOCUMENT ME!</param>
<return> * @return DOCUMENT ME!</return>
<top>/**| * DOCUMENT ME!</top>
</method>
<variable>/** DOCUMENT ME! */</variable>
</templates>
</javadoc>
<remove>
<javadoc>false</javadoc>
<multiline>false</multiline>
<singleline>false</singleline>
</remove>
<separator>
<fillCharacter>-</fillCharacter>
<insert>false</insert>
<insertRecursive>false</insertRecursive>
<text>
<annotation>Annotations</annotation>
<class>Inner Classes</class>
<constructor>Constructors</constructor>
<enum>Enumerations</enum>
<field>Instance fields</field>
<initializer>Instance initializers</initializer>
<interface>Inner Interfaces</interface>
<method>Methods</method>
<static>Static fields/initializers</static>
</text>
</separator>
</comments>
<environment></environment>
<footer>
<ignoreIfExists>false</ignoreIfExists>
<keys></keys>
<smartMode>0</smartMode>
<use>false</use>
</footer>
<header>
<ignoreIfExists>true</ignoreIfExists>
<keys>Geotools2 - OpenSource mapping toolkit</keys>
<smartMode>0</smartMode>
<text>/*| * GeoTools - OpenSource mapping toolkit| * http://geotools.org| * (C) 2002-2006, GeoTools Project Managment Committee (PMC)| *| * This library is free software; you can redistribute it and/or| * modify it under the terms of the GNU Lesser General Public| * License as published by the Free Software Foundation;| * version 2.1 of the License.| *| * This library is distributed in the hope that it will be useful,| * but WITHOUT ANY WARRANTY; without even the implied warranty of| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU| * Lesser General Public License for more details.| */</text>
<use>false</use>
</header>
<history>
<policy>disabled</policy>
</history>
<imports>
<grouping>
<defaultDepth>0</defaultDepth>
<packages>*:0|java:1|javax:1|org.springframework:3|com.accenture:2</packages>
</grouping>
<policy>disabled</policy>
<sort>true</sort>
</imports>
<indentation>
<caseFromSwitch>false</caseFromSwitch>
<continuation>
<block>true</block>
<operator>false</operator>
</continuation>
<firstColumnComments>true</firstColumnComments>
<label>false</label>
<policy>
<deep>false</deep>
</policy>
<sizes>
<braceCuddled>1</braceCuddled>
<braceLeft>1</braceLeft>
<braceRight>0</braceRight>
<braceRightAfter>1</braceRightAfter>
<continuation>4</continuation>
<deep>55</deep>
<extends>-1</extends>
<general>4</general>
<implements>-1</implements>
<leading>0</leading>
<tabs>8</tabs>
<throws>-1</throws>
<trailingComment>1</trailingComment>
</sizes>
<tabs>
<enable>false</enable>
<onlyLeading>false</onlyLeading>
</tabs>
</indentation>
<misc>
<arrayBracketsAfterIdent>false</arrayBracketsAfterIdent>
<forceFinalModifier>false</forceFinalModifier>
<forceFormatting>false</forceFormatting>
<insertExpressionParentheses>true</insertExpressionParentheses>
<insertLoggingConditional>false</insertLoggingConditional>
<insertTrailingNewline>true</insertTrailingNewline>
<insertUID>false</insertUID>
<method>
<forceFinalModifier>false</forceFinalModifier>
</method>
</misc>
<sorting>
<declaration>
<annotation>false</annotation>
<class>false</class>
<constructor>false</constructor>
<enable>true</enable>
<enum>false</enum>
<interface>false</interface>
<method>
<bean>false</bean>
</method>
<order>static|field|initializer|constructor|method|interface|class|annotation|enum</order>
<variable>false</variable>
</declaration>
<modifier>
<enable>false</enable>
<order>public=true|protected=true|private=true|abstract=true|static=true|final=true|synchronized=true|transient=true|volatile=true|native=true|strictfp=true</order>
</modifier>
</sorting>
<whitespace>
<after>
<comma>true</comma>
<semicolon>true</semicolon>
<typeCast>true</typeCast>
</after>
<before>
<braces>true</braces>
<brackets>false</brackets>
<bracketsTypes>false</bracketsTypes>
<caseColon>false</caseColon>
<operator>
<not>false</not>
</operator>
<parentheses>
<methodCall>false</methodCall>
<methodDeclaration>false</methodDeclaration>
<statement>true</statement>
</parentheses>
</before>
<padding>
<braces>true</braces>
<brackets>false</brackets>
<operator>
<assignment>true</assignment>
<bitwise>true</bitwise>
<logical>true</logical>
<mathematical>true</mathematical>
<relational>true</relational>
<shift>true</shift>
</operator>
<parenthesis>false</parenthesis>
<typeCast>false</typeCast>
</padding>
</whitespace>
<wrapping>
<always>
<after>
<arrayElement>0</arrayElement>
<braceRight>false</braceRight>
<extendsTypes>false</extendsTypes>
<implementsTypes>false</implementsTypes>
<label>true</label>
<methodCallChained>false</methodCallChained>
<ternaryOperator>
<first>false</first>
<second>false</second>
</ternaryOperator>
<throwsTypes>false</throwsTypes>
</after>
<before>
<braceLeft>false</braceLeft>
<extends>false</extends>
<implements>false</implements>
<throws>false</throws>
</before>
<parameter>
<methodCall>false</methodCall>
<methodCallNested>false</methodCallNested>
<methodDeclaration>false</methodDeclaration>
</parameter>
</always>
<anon>
<align>
<after>2147483647</after>
</align>
<lcurly>
<newline>true</newline>
</lcurly>
</anon>
<anondef>
<align>
<after>2147483647</after>
</align>
<lcurly>
<nonewline>true</nonewline>
</lcurly>
</anondef>
<enum>
<align>
<after>2147483647</after>
</align>
<lcurly>
<nonewline>true</nonewline>
</lcurly>
</enum>
<general>
<beforeOperator>true</beforeOperator>
<enable>true</enable>
<lineLength>100</lineLength>
</general>
<ondemand>
<after>
<assignment>false</assignment>
<leftParenthesis>false</leftParenthesis>
<parameter>false</parameter>
<types>
<extends>false</extends>
<implements>false</implements>
<throws>false</throws>
</types>
</after>
<before>
<rightParenthesis>false</rightParenthesis>
</before>
<deep>
<parameter>false</parameter>
</deep>
<groupingParentheses>false</groupingParentheses>
<hard>
<parameter>false</parameter>
</hard>
</ondemand>
</wrapping>
</printer>
</jalopy>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.springframework.batch.core.launch.support.JobRegistryBackgroundJobRunner"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="adhoc-job-launcher-context.xml jobs/adhocLoopJob.xml jobs/footballJob.xml"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="spring-batch-samples"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcom.sun.management.jmxremote -Dplayer.file.name=player.csv -Dgames.file.name=games.csv -Djob.commit.interval=50 -Dbatch.jdbc.url=jdbc:hsqldb:hsql://localhost:9005/samples"/>
</launchConfiguration>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.springframework.batch.core.launch.support.CommandLineJobRunner"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="org/springframework/batch/sample/football-job-context.xml footballJob"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="spring-batch-samples"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dplayer.file.name=player.csv -Dgames.file.name=games.csv"/>
</launchConfiguration>

View File

@@ -1,166 +0,0 @@
<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
<!--
Checkstyle configuration that checks the maven coding conventions from:
-->
<module name="Checker">
<!-- Checks that a package.html file exists for each package. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
<!-- module name="PackageHtml"/ -->
<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
<!-- module name="NewlineAtEndOfFile"/ -->
<!-- Checks that property files contain the same keys. -->
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
<!-- module name="Translation"/ -->
<module name="TreeWalker">
<property name="cacheFile" value="${checkstyle.cache.file}"/>
<property name="tabWidth" value="4"/>
<module name="LeftCurly"/>
<module name="RightCurly"/>
<module name="LineLength">
<property name="max" value="120" />
<property name="ignorePattern" value="@version|@see|@todo|TODO"/>
</module>
<module name="MemberName" />
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod"/>
<module name="JavadocType"/>
<module name="JavadocVariable"/>
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<!-- Checks for Headers -->
<!-- See http://checkstyle.sf.net/config_header.html -->
<!--<module name="RegexpHeader">
<property name="header" value=""/>
</module>-->
<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<module name="AvoidStarImport"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="FileLength"/>
<module name="MethodLength"/>
<module name="ParameterNumber"/>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="EmptyForIteratorPad"/>
<!-- module name="NoWhitespaceAfter"/ -->
<!-- module name="NoWhitespaceBefore"/ -->
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TabCharacter"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
<!-- module name="MethodParamPad"/ -->
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="NeedBraces"/>
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<!-- <module name="AvoidInlineConditionals"/> -->
<module name="DoubleCheckedLocking"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="HiddenField"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MissingSwitchDefault"/>
<module name="RedundantThrows"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<!-- module name="DesignForExtension"/ -->
<!-- module name="FinalClass"/ -->
<!-- module name="HideUtilityClassConstructor"/ -->
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<!-- module name="ArrayTypeStyle"/ -->
<!-- module name="FinalParameters"/ -->
<!-- Line with Trailing Spaces (disabled as it's to noisy)
<module name="GenericIllegalRegexp">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
-->
<!-- Let todo plugin handle this.
<module name="TodoComment"/>
-->
<module name="UpperEll"/>
</module>
</module>

View File

@@ -383,15 +383,7 @@
</pluginManagement>
</build>
<repositories>
<!-- <repository>
<id>com.springsource.repository.bundles.external</id>
<name>SpringSource Enterprise Bundle Repository - SpringSource Bundle External</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
--> <repository>
<repository>
<id>gemstone</id>
<name>Release bundles for SQLFire and GemFire</name>
<url>http://dist.gemstone.com.s3.amazonaws.com/maven/release</url>

View File

@@ -1,5 +0,0 @@
server.port=9005
server.trace=true
server.database.0=file:target/hsqldb-data/samples
server.dbname.0=samples

View File

@@ -62,9 +62,9 @@ public class ColumnRangePartitioner implements Partitioner {
* @see Partitioner#partition(int)
*/
public Map<String, ExecutionContext> partition(int gridSize) {
int min = jdbcTemplate.queryForObject("SELECT MIN(" + column + ") from " + table, Integer.class);
int max = jdbcTemplate.queryForObject("SELECT MAX(" + column + ") from " + table, Integer.class);
int min = jdbcTemplate.queryForInt("SELECT MIN(" + column + ") from " + table);
int max = jdbcTemplate.queryForInt("SELECT MAX(" + column + ") from " + table);
int targetSize = (max - min) / gridSize + 1;
Map<String, ExecutionContext> result = new HashMap<String, ExecutionContext>();
@@ -73,7 +73,6 @@ public class ColumnRangePartitioner implements Partitioner {
int end = start + targetSize - 1;
while (start <= max) {
ExecutionContext value = new ExecutionContext();
result.put("partition" + number, value);
@@ -88,7 +87,5 @@ public class ColumnRangePartitioner implements Partitioner {
}
return result;
}
}

View File

@@ -1,65 +0,0 @@
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.common;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.springframework.batch.item.file.transform.DefaultFieldSet;
import org.springframework.batch.item.file.transform.FieldSet;
/**
* ResultSetExtractor implementation that returns list of FieldSets
* for given ResultSet.
*
* @author peter.zozom
*
*/
public final class FieldSetResultSetExtractor {
// utility class not meant for instantiation
private FieldSetResultSetExtractor(){}
/**
* Processes single row in ResultSet and returns its FieldSet representation.
* @param rs ResultSet ResultSet to extract data from.
* @return FieldSet representation of current row in ResultSet
* @throws SQLException thrown during processing
*/
public static FieldSet getFieldSet(ResultSet rs) throws SQLException {
ResultSetMetaData metaData = rs.getMetaData();
int columnCount = metaData.getColumnCount();
FieldSet fs;
List<String> tokens = new ArrayList<String>();
List<String> names = new ArrayList<String>();
for (int i = 1; i <= columnCount; i++) {
tokens.add(rs.getString(i));
names.add(metaData.getColumnName(i));
}
fs = new DefaultFieldSet(tokens.toArray(new String[0]), names.toArray(new String[0]));
return fs;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
package org.springframework.batch.sample.common;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ParseException;
import org.springframework.batch.item.UnexpectedInputException;
/**
* ItemReader implementation that will continually return a new object. It's
@@ -28,9 +26,7 @@ import org.springframework.batch.item.UnexpectedInputException;
*
*/
public class InfiniteLoopReader implements ItemReader<Object> {
public Object read() throws Exception, UnexpectedInputException, ParseException {
public Object read() throws Exception {
return new Object();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,6 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepExecutionListener;
import org.springframework.batch.core.listener.StepExecutionListenerSupport;
import org.springframework.batch.item.ItemWriter;
@@ -34,24 +33,19 @@ import org.springframework.batch.item.ItemWriter;
*
*/
public class InfiniteLoopWriter extends StepExecutionListenerSupport implements ItemWriter<Object> {
private static final Log LOG = LogFactory.getLog(InfiniteLoopWriter.class);
private StepExecution stepExecution;
private int count = 0;
private static final Log logger = LogFactory.getLog(InfiniteLoopWriter.class);
/**
* @see StepExecutionListener#beforeStep(StepExecution)
* @see org.springframework.batch.core.StepExecutionListener#beforeStep(StepExecution)
*/
@Override
public void beforeStep(StepExecution stepExecution) {
this.stepExecution = stepExecution;
}
/**
*
*/
public InfiniteLoopWriter() {
super();
}
@@ -62,9 +56,10 @@ public class InfiniteLoopWriter extends StepExecutionListenerSupport implements
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("Job interrupted.");
throw new IllegalStateException("Job interrupted.", e);
}
stepExecution.setWriteCount(++count);
logger.info("Executing infinite loop, at count=" + count);
LOG.info("Executing infinite loop, at count=" + count);
}
}

View File

@@ -18,8 +18,6 @@ package org.springframework.batch.sample.common;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.JoinPoint;
/**
* Wraps calls for 'Processing' methods which output a single Object to write
@@ -28,29 +26,9 @@ import org.aspectj.lang.JoinPoint;
* @author Lucas Ward
*/
public class LogAdvice {
private static Log log = LogFactory.getLog(LogAdvice.class);
/*
* Wraps original method and adds logging both before and after method
*/
public void doBasicLogging(JoinPoint pjp) throws Throwable {
Object[] args = pjp.getArgs();
StringBuffer output = new StringBuffer();
output.append(pjp.getTarget().getClass().getName()).append(": ");
output.append(pjp.toShortString()).append(": ");
for (Object arg : args) {
output.append(arg).append(" ");
}
log.info("Basic: " + output.toString());
}
public void doStronglyTypedLogging(Object item){
log.info("Processed: " + item);
}
}

View File

@@ -1,5 +0,0 @@
package org.springframework.batch.sample.common;
public class OutputFileNameListener {
}

View File

@@ -1,55 +0,0 @@
/*
* Copyright 2006-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.common;
import javax.sql.DataSource;
import org.springframework.batch.core.listener.StepListenerSupport;
import org.springframework.batch.item.ItemReader;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.dao.OptimisticLockingFailureException;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.util.Assert;
/**
* Thread-safe database {@link ItemReader} implementing the process indicator
* pattern.
*/
public class StagingItemListener extends StepListenerSupport<Long, Long> implements InitializingBean {
private JdbcOperations jdbcTemplate;
public void setDataSource(DataSource dataSource) {
jdbcTemplate = new JdbcTemplate(dataSource);
}
public final void afterPropertiesSet() throws Exception {
Assert.notNull(jdbcTemplate, "You must provide a DataSource.");
}
@Override
public void afterRead(Long id) {
int count = jdbcTemplate.update("UPDATE BATCH_STAGING SET PROCESSED=? WHERE ID=? AND PROCESSED=?",
StagingItemWriter.DONE, id, StagingItemWriter.NEW);
if (count != 1) {
throw new OptimisticLockingFailureException("The staging record with ID=" + id
+ " was updated concurrently when trying to mark as complete (updated " + count + " records.");
}
}
}

View File

@@ -32,7 +32,6 @@ import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ReaderNotOpenException;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
@@ -97,8 +96,7 @@ InitializingBean, DisposableBean {
}
@Override
public ProcessIndicatorItemWrapper<T> read() throws DataAccessException {
public ProcessIndicatorItemWrapper<T> read() {
if (!initialized) {
throw new ReaderNotOpenException("Reader must be open before it can be used.");
}
@@ -125,7 +123,6 @@ InitializingBean, DisposableBean {
}, id);
return new ProcessIndicatorItemWrapper<T>(id, result);
}
@Override

View File

@@ -37,11 +37,9 @@ import org.springframework.util.SerializationUtils;
*/
public class StagingItemWriter<T> extends JdbcDaoSupport implements StepExecutionListener, ItemWriter<T> {
public static final String NEW = "N";
protected static final String NEW = "N";
public static final String DONE = "Y";
public static final Object WORKING = "W";
protected static final String DONE = "Y";
private DataFieldMaxValueIncrementer incrementer;
@@ -75,11 +73,10 @@ public class StagingItemWriter<T> extends JdbcDaoSupport implements StepExecutio
*/
@Override
public void write(final List<? extends T> items) {
final ListIterator<? extends T> itemIterator = items.listIterator();
getJdbcTemplate().batchUpdate("INSERT into BATCH_STAGING (ID, JOB_ID, VALUE, PROCESSED) values (?,?,?,?)",
new BatchPreparedStatementSetter() {
@Override
public int getBatchSize() {
return items.size();
@@ -87,22 +84,14 @@ public class StagingItemWriter<T> extends JdbcDaoSupport implements StepExecutio
@Override
public void setValues(PreparedStatement ps, int i) throws SQLException {
Assert.state(itemIterator.nextIndex() == i, "Item ordering must be preserved in batch sql update");
long id = incrementer.nextLongValue();
long jobId = stepExecution.getJobExecution().getJobId();
Assert.state(itemIterator.nextIndex() == i,
"Item ordering must be preserved in batch sql update");
byte[] blob = SerializationUtils.serialize(itemIterator.next());
ps.setLong(1, id);
ps.setLong(2, jobId);
ps.setBytes(3, blob);
ps.setLong(1, incrementer.nextLongValue());
ps.setLong(2, stepExecution.getJobExecution().getJobId());
ps.setBytes(3, SerializationUtils.serialize(itemIterator.next()));
ps.setString(4, NEW);
}
});
}
/*
@@ -127,5 +116,4 @@ public class StagingItemWriter<T> extends JdbcDaoSupport implements StepExecutio
public void beforeStep(StepExecution stepExecution) {
this.stepExecution = stepExecution;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,12 +42,12 @@ public class RetrySampleConfiguration {
private StepBuilderFactory steps;
@Bean
public Job retrySample() throws Exception {
public Job retrySample() {
return jobs.get("retrySample").start(step()).build();
}
@Bean
protected Step step() throws Exception {
protected Step step() {
return steps.get("step").<Trade, Object> chunk(1).reader(reader()).writer(writer()).faultTolerant()
.retry(Exception.class).retryLimit(3).build();
}
@@ -63,5 +63,4 @@ public class RetrySampleConfiguration {
protected ItemWriter<Object> writer() {
return new RetrySampleItemWriter<Object>();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -232,19 +232,25 @@ public class Game implements Serializable {
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
Game other = (Game) obj;
if (id == null) {
if (other.id != null)
if (other.id != null) {
return false;
}
}
else if (!id.equals(other.id))
else if (!id.equals(other.id)) {
return false;
}
return true;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,19 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.domain.football;
/**
* Domain object representing the summary of a given Player's
* year.
*
* @author Lucas Ward
*
*/
public class PlayerSummary {
private String id;
private int year;
private int completes;
@@ -111,13 +107,14 @@ public class PlayerSummary {
public void setTotalTd(int totalTd) {
this.totalTd = totalTd;
}
@Override
public String toString() {
return "Player Summary: ID=" + id + " Year=" + year + "[" + completes + ";" + attempts + ";" + passingYards +
";" + passingTd + ";" + interceptions + ";" + rushes + ";" + rushYards + ";" + receptions +
";" + receptionYards + ";" + totalTd;
}
@Override
public int hashCode() {
final int prime = 31;
@@ -125,22 +122,28 @@ public class PlayerSummary {
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
PlayerSummary other = (PlayerSummary) obj;
if (id == null) {
if (other.id != null)
if (other.id != null) {
return false;
}
}
else if (!id.equals(other.id))
else if (!id.equals(other.id)) {
return false;
}
return true;
}
}

View File

@@ -1,40 +0,0 @@
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.domain.football.internal;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.ExceptionHandler;
public class FootballExceptionHandler implements ExceptionHandler {
private static final Log logger = LogFactory
.getLog(FootballExceptionHandler.class);
public void handleException(RepeatContext context, Throwable throwable)
throws Throwable {
if (!(throwable instanceof NumberFormatException)) {
throw throwable;
} else {
logger.error("Number Format Exception!", throwable);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2010 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,8 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.item.mail.MailErrorHandler;
import org.springframework.mail.MailMessage;
@@ -33,13 +35,13 @@ import org.springframework.mail.MailMessage;
* @since 2.1
*/
public class TestMailErrorHandler implements MailErrorHandler {
private static final Log LOGGER = LogFactory.getLog(TestMailErrorHandler.class);
private List<MailMessage> failedMessages = new ArrayList<MailMessage>();
public void handle(MailMessage failedMessage, Exception ex) {
this.failedMessages.add(failedMessage);
System.out.println("Mail message failed: " + failedMessage);
System.out.println(ex);
LOGGER.error("Mail message failed: " + failedMessage, ex);
}
public List<MailMessage> getFailedMessages() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,8 +15,6 @@
*/
package org.springframework.batch.sample.domain.multiline;
import org.springframework.batch.item.ItemReaderException;
/**
* A wrapper type for an item that is used by {@link AggregateItemReader} to
* identify the start and end of an aggregate record.
@@ -27,11 +25,10 @@ import org.springframework.batch.item.ItemReaderException;
*
*/
public class AggregateItem<T> {
@SuppressWarnings("rawtypes")
private static final AggregateItem FOOTER = new AggregateItem<Object>(false, true) {
@Override
public Object getItem() throws ItemReaderException {
public Object getItem() {
throw new IllegalStateException("Footer record has no item.");
}
};
@@ -41,14 +38,14 @@ public class AggregateItem<T> {
* @return a static {@link AggregateItem} that is a footer.
*/
@SuppressWarnings("unchecked")
public static final <T> AggregateItem<T> getFooter() {
public static <T> AggregateItem<T> getFooter() {
return FOOTER;
}
@SuppressWarnings("rawtypes")
private static final AggregateItem HEADER = new AggregateItem<Object>(true, false) {
@Override
public Object getItem() throws ItemReaderException {
public Object getItem() {
throw new IllegalStateException("Header record has no item.");
}
};
@@ -58,7 +55,7 @@ public class AggregateItem<T> {
* @return a static {@link AggregateItem} that is a header.
*/
@SuppressWarnings("unchecked")
public static final <T> AggregateItem<T> getHeader() {
public static <T> AggregateItem<T> getHeader() {
return HEADER;
}
@@ -89,7 +86,7 @@ public class AggregateItem<T> {
* @throws IllegalStateException if called on a record for which either
* {@link #isHeader()} or {@link #isFooter()} answers true.
*/
public T getItem() throws IllegalStateException {
public T getItem() {
return item;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,8 +42,7 @@ import org.springframework.batch.item.ItemReader;
*
*/
public class AggregateItemReader<T> implements ItemReader<List<T>> {
private static final Log log = LogFactory.getLog(AggregateItemReader.class);
private static final Log LOG = LogFactory.getLog(AggregateItemReader.class);
private ItemReader<AggregateItem<T>> itemReader;
@@ -60,8 +59,8 @@ public class AggregateItemReader<T> implements ItemReader<List<T>> {
continue;
}
if (!holder.exhausted) {
return holder.records;
if (!holder.isExhausted()) {
return holder.getRecords();
}
else {
return null;
@@ -71,26 +70,26 @@ public class AggregateItemReader<T> implements ItemReader<List<T>> {
private boolean process(AggregateItem<T> value, ResultHolder holder) {
// finish processing if we hit the end of file
if (value == null) {
log.debug("Exhausted ItemReader");
holder.exhausted = true;
LOG.debug("Exhausted ItemReader");
holder.setExhausted(true);
return false;
}
// start a new collection
if (value.isHeader()) {
log.debug("Start of new record detected");
LOG.debug("Start of new record detected");
return true;
}
// mark we are finished with current collection
if (value.isFooter()) {
log.debug("End of record detected");
LOG.debug("End of record detected");
return false;
}
// add a simple record to the current collection
log.debug("Mapping: " + value);
holder.records.add(value.getItem());
LOG.debug("Mapping: " + value);
holder.addRecord(value.getItem());
return true;
}
@@ -106,9 +105,23 @@ public class AggregateItemReader<T> implements ItemReader<List<T>> {
*
*/
private class ResultHolder {
List<T> records = new ArrayList<T>();
private List<T> records = new ArrayList<T>();
private boolean exhausted = false;
boolean exhausted = false;
public List<T> getRecords() {
return records;
}
public boolean isExhausted() {
return exhausted;
}
public void addRecord(T record) {
records.add(record);
}
public void setExhausted(boolean exhausted) {
this.exhausted = exhausted;
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -109,32 +109,41 @@ public class Address {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
Address other = (Address) obj;
if (addressee == null) {
if (other.addressee != null)
if (other.addressee != null) {
return false;
}
}
else if (!addressee.equals(other.addressee))
else if (!addressee.equals(other.addressee)) {
return false;
}
if (country == null) {
if (other.country != null)
if (other.country != null) {
return false;
}
}
else if (!country.equals(other.country))
else if (!country.equals(other.country)) {
return false;
}
if (zipCode == null) {
if (other.zipCode != null)
if (other.zipCode != null) {
return false;
}
}
else if (!zipCode.equals(other.zipCode))
else if (!zipCode.equals(other.zipCode)) {
return false;
}
return true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,26 +56,33 @@ public class BillingInfo {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
BillingInfo other = (BillingInfo) obj;
if (paymentDesc == null) {
if (other.paymentDesc != null)
if (other.paymentDesc != null) {
return false;
}
}
else if (!paymentDesc.equals(other.paymentDesc))
else if (!paymentDesc.equals(other.paymentDesc)) {
return false;
}
if (paymentId == null) {
if (other.paymentId != null)
if (other.paymentId != null) {
return false;
}
}
else if (!paymentId.equals(other.paymentId))
else if (!paymentId.equals(other.paymentId)) {
return false;
}
return true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -126,45 +126,60 @@ public class Customer {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
Customer other = (Customer) obj;
if (businessCustomer != other.businessCustomer)
if (businessCustomer != other.businessCustomer) {
return false;
}
if (companyName == null) {
if (other.companyName != null)
if (other.companyName != null) {
return false;
}
}
else if (!companyName.equals(other.companyName))
else if (!companyName.equals(other.companyName)) {
return false;
}
if (firstName == null) {
if (other.firstName != null)
if (other.firstName != null) {
return false;
}
}
else if (!firstName.equals(other.firstName))
else if (!firstName.equals(other.firstName)) {
return false;
}
if (lastName == null) {
if (other.lastName != null)
if (other.lastName != null) {
return false;
}
}
else if (!lastName.equals(other.lastName))
else if (!lastName.equals(other.lastName)) {
return false;
}
if (middleName == null) {
if (other.middleName != null)
if (other.middleName != null) {
return false;
}
}
else if (!middleName.equals(other.middleName))
else if (!middleName.equals(other.middleName)) {
return false;
if (registered != other.registered)
}
if (registered != other.registered) {
return false;
if (registrationId != other.registrationId)
}
if (registrationId != other.registrationId) {
return false;
if (vip != other.vip)
}
if (vip != other.vip) {
return false;
}
return true;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,9 +18,9 @@ package org.springframework.batch.sample.domain.order;
import java.math.BigDecimal;
public class LineItem {
public static final String LINE_ID_ITEM = "LIT";
private long itemId;
private BigDecimal price;
private BigDecimal discountPerc;
@@ -110,18 +110,28 @@ public class LineItem {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
LineItem other = (LineItem) obj;
if (itemId != other.itemId)
if (itemId != other.itemId) {
return false;
if (quantity != other.quantity)
}
if (quantity != other.quantity) {
return false;
}
return true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -164,68 +164,90 @@ public class Order {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
Order other = (Order) obj;
if (billing == null) {
if (other.billing != null)
if (other.billing != null) {
return false;
}
}
else if (!billing.equals(other.billing))
else if (!billing.equals(other.billing)) {
return false;
}
if (billingAddress == null) {
if (other.billingAddress != null)
if (other.billingAddress != null) {
return false;
}
}
else if (!billingAddress.equals(other.billingAddress))
else if (!billingAddress.equals(other.billingAddress)) {
return false;
}
if (customer == null) {
if (other.customer != null)
if (other.customer != null) {
return false;
}
}
else if (!customer.equals(other.customer))
else if (!customer.equals(other.customer)) {
return false;
}
if (lineItems == null) {
if (other.lineItems != null)
if (other.lineItems != null) {
return false;
}
}
else if (!lineItems.equals(other.lineItems))
else if (!lineItems.equals(other.lineItems)) {
return false;
}
if (orderDate == null) {
if (other.orderDate != null)
if (other.orderDate != null) {
return false;
}
}
else if (!orderDate.equals(other.orderDate))
else if (!orderDate.equals(other.orderDate)) {
return false;
if (orderId != other.orderId)
}
if (orderId != other.orderId) {
return false;
}
if (shipping == null) {
if (other.shipping != null)
if (other.shipping != null) {
return false;
}
}
else if (!shipping.equals(other.shipping))
else if (!shipping.equals(other.shipping)) {
return false;
}
if (shippingAddress == null) {
if (other.shippingAddress != null)
if (other.shippingAddress != null) {
return false;
}
}
else if (!shippingAddress.equals(other.shippingAddress))
else if (!shippingAddress.equals(other.shippingAddress)) {
return false;
if (totalItems != other.totalItems)
}
if (totalItems != other.totalItems) {
return false;
if (totalLines != other.totalLines)
}
if (totalLines != other.totalLines) {
return false;
}
if (totalPrice == null) {
if (other.totalPrice != null)
if (other.totalPrice != null) {
return false;
}
}
else if (!totalPrice.equals(other.totalPrice))
else if (!totalPrice.equals(other.totalPrice)) {
return false;
}
return true;
}
}

View File

@@ -1,27 +0,0 @@
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.domain.order;
/**
* Interface for writing <code>Order</code> objects.
*/
public interface OrderDao {
public void write(Order order);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,32 +62,41 @@ public class ShippingInfo {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
ShippingInfo other = (ShippingInfo) obj;
if (shipperId == null) {
if (other.shipperId != null)
if (other.shipperId != null) {
return false;
}
}
else if (!shipperId.equals(other.shipperId))
else if (!shipperId.equals(other.shipperId)) {
return false;
}
if (shippingInfo == null) {
if (other.shippingInfo != null)
if (other.shippingInfo != null) {
return false;
}
}
else if (!shippingInfo.equals(other.shippingInfo))
else if (!shippingInfo.equals(other.shippingInfo)) {
return false;
}
if (shippingTypeId == null) {
if (other.shippingTypeId != null)
if (other.shippingTypeId != null) {
return false;
}
}
else if (!shippingTypeId.equals(other.shippingTypeId))
else if (!shippingTypeId.equals(other.shippingTypeId)) {
return false;
}
return true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -85,7 +85,6 @@ public class OrderItemReader implements ItemReader<Order> {
String lineId = fieldSet.readString(0);
// start a new Order
if (Order.LINE_ID_HEADER.equals(lineId)) {
log.debug("STARTING NEW RECORD");
order = headerMapper.mapFieldSet(fieldSet);
@@ -145,7 +144,6 @@ public class OrderItemReader implements ItemReader<Order> {
else {
log.debug("Could not map LINE_ID=" + lineId);
}
}
/**

View File

@@ -10,11 +10,9 @@ import org.springframework.batch.sample.domain.order.Order;
* @since 2.0.1
*/
public class HeaderFieldExtractor implements FieldExtractor<Order> {
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
public Object[] extract(Order order) {
return new Object[] { "BEGIN_ORDER:", order.getOrderId(), dateFormat.format(order.getOrderDate()) };
}
}

View File

@@ -21,11 +21,11 @@ public class OrderValidator implements Validator {
private static final List<String> SHIPPER_IDS = new ArrayList<String>();
private static final List<String> SHIPPER_TYPES = new ArrayList<String>();
private static final long MAX_ID = 9999999999L;
private static final BigDecimal BD_MIN = new BigDecimal(0.0);
private static final BigDecimal BD_MAX = new BigDecimal(99999999.99);
private static final BigDecimal BD_PERC_MAX = new BigDecimal(100.0);
private static final BigDecimal BD_MIN = new BigDecimal("0.0");
private static final BigDecimal BD_MAX = new BigDecimal("99999999.99");
private static final BigDecimal BD_PERC_MAX = new BigDecimal("100.0");
private static final int MAX_QUANTITY = 9999;
private static final BigDecimal BD_100 = new BigDecimal(100.00);
private static final BigDecimal BD_100 = new BigDecimal("100.00");
static {
CARD_TYPES.add("VISA");
@@ -147,32 +147,34 @@ public class OrderValidator implements Validator {
}
}
String lineItemsFieldName = "lineItems";
if(!ids) {
errors.rejectValue("lineItems", "error.lineitems.id");
errors.rejectValue(lineItemsFieldName, "error.lineitems.id");
}
if(!prices) {
errors.rejectValue("lineItems", "error.lineitems.price");
errors.rejectValue(lineItemsFieldName, "error.lineitems.price");
}
if(!discounts) {
errors.rejectValue("lineItems", "error.lineitems.discount");
errors.rejectValue(lineItemsFieldName, "error.lineitems.discount");
}
if(!shippingPrices) {
errors.rejectValue("lineItems", "error.lineitems.shipping");
errors.rejectValue(lineItemsFieldName, "error.lineitems.shipping");
}
if(!handlingPrices) {
errors.rejectValue("lineItems", "error.lineitems.handling");
errors.rejectValue(lineItemsFieldName, "error.lineitems.handling");
}
if(!quantities) {
errors.rejectValue("lineItems", "error.lineitems.quantity");
errors.rejectValue(lineItemsFieldName, "error.lineitems.quantity");
}
if(!totalPrices) {
errors.rejectValue("lineItems", "error.lineitems.totalprice");
errors.rejectValue(lineItemsFieldName, "error.lineitems.totalprice");
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,11 +42,11 @@ public class Order {
}
public Date getDate() {
return date;
return date != null ? new Date(date.getTime()) : null;
}
public void setDate(Date date) {
this.date = date;
this.date = date != null ? new Date(date.getTime()) : null;
}
public List<LineItem> getLineItems() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,12 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.domain.person;
public class Child {
private String name;
public void setName(String name){
@@ -44,20 +41,29 @@ public class Child {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Child other = (Child) obj;
if (name == null) {
if (other.name != null)
return false;
}
else if (!name.equals(other.name))
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
Child other = (Child) obj;
if (name == null) {
if (other.name != null) {
return false;
}
}
else if (!name.equals(other.name)) {
return false;
}
return true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,17 +22,11 @@ import java.util.List;
import org.springframework.batch.sample.domain.order.Address;
public class Person {
private String title = "";
private String firstName = "";
private String last_name = "";
private int age = 0;
private Address address = new Address();
private List<Child> children = new ArrayList<Child>();
public Person() {
@@ -147,46 +141,69 @@ public class Person {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
Person other = (Person) obj;
if (address == null) {
if (other.address != null)
if (other.address != null) {
return false;
}
}
else if (!address.equals(other.address))
else if (!address.equals(other.address)) {
return false;
if (age != other.age)
}
if (age != other.age) {
return false;
}
if (children == null) {
if (other.children != null)
if (other.children != null) {
return false;
}
}
else if (!children.equals(other.children))
else if (!children.equals(other.children)) {
return false;
}
if (firstName == null) {
if (other.firstName != null)
if (other.firstName != null) {
return false;
}
}
else if (!firstName.equals(other.firstName))
else if (!firstName.equals(other.firstName)) {
return false;
}
if (last_name == null) {
if (other.last_name != null)
if (other.last_name != null) {
return false;
}
}
else if (!last_name.equals(other.last_name))
else if (!last_name.equals(other.last_name)) {
return false;
}
if (title == null) {
if (other.title != null)
if (other.title != null) {
return false;
}
}
else if (!title.equals(other.title))
else if (!title.equals(other.title)) {
return false;
}
return true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,28 +19,26 @@ package org.springframework.batch.sample.domain.person;
import java.util.ArrayList;
import java.util.List;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.sample.domain.order.Address;
/**
* Custom class that contains logic that would normally be be contained in
* {@link ItemReader} and {@link ItemWriter}.
* {@link org.springframework.batch.item.ItemReader} and
* {@link javax.batch.api.chunk.ItemWriter}.
*
* @author tomas.slanina
* @author Robert Kasanicky
*/
public class PersonService {
private static final int GENERATION_LIMIT = 10;
private int generatedCounter = 0;
private int processedCounter = 0;
public Person getData() {
if (generatedCounter >= GENERATION_LIMIT)
if (generatedCounter >= GENERATION_LIMIT) {
return null;
}
Person person = new Person();
Address address = new Address();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,13 +23,11 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.sample.domain.person.Person;
public class PersonWriter implements ItemWriter<Person> {
private static Log log = LogFactory.getLog(PersonWriter.class);
@Override
public void write(List<? extends Person> data) {
log.debug("Processing: " + data);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,26 +62,33 @@ public class CustomerDebit {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
CustomerDebit other = (CustomerDebit) obj;
if (debit == null) {
if (other.debit != null)
if (other.debit != null) {
return false;
}
}
else if (!debit.equals(other.debit))
else if (!debit.equals(other.debit)) {
return false;
}
if (name == null) {
if (other.name != null)
if (other.name != null) {
return false;
}
}
else if (!name.equals(other.name))
else if (!name.equals(other.name)) {
return false;
}
return true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,22 +30,22 @@ public enum CustomerOperation {
ADD('A'), UPDATE('U'), DELETE('D');
private final char code;
private static final Map<Character,CustomerOperation> codeMap;
private static final Map<Character,CustomerOperation> CODE_MAP;
private CustomerOperation(char code) {
this.code = code;
}
static{
codeMap = new HashMap<Character,CustomerOperation>();
CODE_MAP = new HashMap<Character,CustomerOperation>();
for(CustomerOperation operation:values()){
codeMap.put(operation.getCode(), operation);
CODE_MAP.put(operation.getCode(), operation);
}
}
public static CustomerOperation fromCode(char code){
if(codeMap.containsKey(code)){
return codeMap.get(code);
if(CODE_MAP.containsKey(code)){
return CODE_MAP.get(code);
}
else{
throw new IllegalArgumentException("Invalid code: [" + code + "]");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ import java.math.BigDecimal;
public class Trade implements Serializable {
private String isin = "";
private long quantity = 0;
private BigDecimal price = new BigDecimal(0);
private BigDecimal price = BigDecimal.ZERO;
private String customer = "";
private Long id;
private long version = 0;
@@ -116,36 +116,46 @@ public class Trade implements Serializable {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
Trade other = (Trade) obj;
if (customer == null) {
if (other.customer != null)
if (other.customer != null) {
return false;
}
}
else if (!customer.equals(other.customer))
else if (!customer.equals(other.customer)) {
return false;
}
if (isin == null) {
if (other.isin != null)
if (other.isin != null) {
return false;
}
}
else if (!isin.equals(other.isin))
else if (!isin.equals(other.isin)) {
return false;
}
if (price == null) {
if (other.price != null)
if (other.price != null) {
return false;
}
}
else if (!price.equals(other.price))
else if (!price.equals(other.price)) {
return false;
if (quantity != other.quantity)
}
if (quantity != other.quantity) {
return false;
if (version != other.version)
}
if (version != other.version) {
return false;
}
return true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,16 +26,14 @@ import org.springframework.batch.sample.domain.trade.InvalidCustomerLogger;
* @author Lucas Ward
*
*/
public class CommonsLoggingInvalidCustomerLogger implements
InvalidCustomerLogger {
protected static final Log logger = LogFactory.getLog(CommandLineJobRunner.class);
public class CommonsLoggingInvalidCustomerLogger implements InvalidCustomerLogger {
protected static final Log LOG = LogFactory.getLog(CommandLineJobRunner.class);
/* (non-Javadoc)
* @see org.springframework.batch.sample.domain.trade.InvalidCustomerLogger#log(org.springframework.batch.sample.domain.trade.CustomerUpdate)
*/
@Override
public void log(CustomerUpdate customerUpdate) {
logger.error("invalid customer encountered: [ " + customerUpdate + "]");
LOG.error("invalid customer encountered: [ " + customerUpdate + "]");
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,13 +25,12 @@ import org.springframework.batch.sample.domain.trade.CustomerCredit;
* @since 2.0
*/
public class CustomerCreditFieldSetMapper implements FieldSetMapper<CustomerCredit> {
public static final int ID_COLUMN = 0;
public static final int NAME_COLUMN = 1;
public static final int CREDIT_COLUMN = 2;
@Override
public CustomerCredit mapFieldSet(FieldSet fieldSet) {
CustomerCredit trade = new CustomerCredit();
trade.setId(fieldSet.readInt(ID_COLUMN));
trade.setName(fieldSet.readString(NAME_COLUMN));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,9 +27,9 @@ import org.springframework.batch.sample.domain.trade.CustomerCredit;
* @author Robert Kasanicky
*/
public class CustomerCreditIncreaseProcessor implements ItemProcessor<CustomerCredit, CustomerCredit> {
public static final BigDecimal FIXED_AMOUNT = new BigDecimal("5");
@Override
public CustomerCredit process(CustomerCredit item) throws Exception {
return item.increaseCreditBy(FIXED_AMOUNT);
}

View File

@@ -1,48 +0,0 @@
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.domain.trade.internal;
import java.util.List;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.sample.domain.trade.CustomerCredit;
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
/**
* Delegates actual writing to a custom DAO.
*
* @author Robert Kasanicky
*/
public class CustomerCreditItemWriter implements ItemWriter<CustomerCredit> {
private CustomerCreditDao customerCreditDao;
/**
* Public setter for the {@link CustomerCreditDao}.
* @param customerCreditDao the {@link CustomerCreditDao} to set
*/
public void setCustomerCreditDao(CustomerCreditDao customerCreditDao) {
this.customerCreditDao = customerCreditDao;
}
public void write(List<? extends CustomerCredit> customerCredits) throws Exception {
for (CustomerCredit customerCredit : customerCredits) {
customerCreditDao.writeCredit(customerCredit);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,17 +27,15 @@ import org.springframework.batch.sample.domain.trade.CustomerCredit;
*
*/
public class CustomerCreditUpdatePreparedStatementSetter implements ItemPreparedStatementSetter<CustomerCredit> {
public static final BigDecimal FIXED_AMOUNT = new BigDecimal(1000);
public static final String QUERY = "UPDATE CUSTOMER SET CREDIT=? WHERE ID=?";
/* (non-Javadoc)
* @see org.springframework.batch.io.support.ItemPreparedStatementSetter#setValues(java.lang.Object, java.sql.PreparedStatement)
*/
@Override
public void setValues(CustomerCredit customerCredit, PreparedStatement ps) throws SQLException {
ps.setBigDecimal(1, customerCredit.getCredit().add(FIXED_AMOUNT));
ps.setLong(2, customerCredit.getId());
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ public class CustomerCreditUpdateWriter implements ItemWriter<CustomerCredit> {
private CustomerCreditDao dao;
@Override
public void write(List<? extends CustomerCredit> customerCredits) throws Exception {
for (CustomerCredit customerCredit : customerCredits) {
if (customerCredit.getCredit().doubleValue() > creditFilter) {
@@ -42,5 +43,4 @@ public class CustomerCreditUpdateWriter implements ItemWriter<CustomerCredit> {
public void setDao(CustomerCreditDao dao) {
this.dao = dao;
}
}

View File

@@ -1,40 +0,0 @@
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.domain.trade.internal;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.batch.sample.domain.trade.CustomerDebit;
import org.springframework.jdbc.core.RowMapper;
public class CustomerDebitRowMapper implements RowMapper {
public static final String CUSTOMER_COLUMN = "customer";
public static final String PRICE_COLUMN = "price";
public Object mapRow(ResultSet rs, int ignoredRowNumber)
throws SQLException {
CustomerDebit customerDebit = new CustomerDebit();
customerDebit.setName(rs.getString(CUSTOMER_COLUMN));
customerDebit.setDebit(rs.getBigDecimal(PRICE_COLUMN));
return customerDebit;
}
}

View File

@@ -1,66 +0,0 @@
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.domain.trade.internal;
import java.sql.SQLException;
import org.springframework.batch.sample.domain.trade.CustomerCredit;
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator;
import com.ibatis.sqlmap.client.SqlMapClient;
/**
* @author Lucas Ward
*
*/
public class IbatisCustomerCreditDao implements CustomerCreditDao {
SqlMapClient sqlMapClient;
String statementId;
/* (non-Javadoc)
* @see org.springframework.batch.sample.domain.trade.internal.CustomerCreditWriter#write(org.springframework.batch.sample.domain.CustomerCredit)
*/
@Override
public void writeCredit(CustomerCredit customerCredit) {
try {
sqlMapClient.update(statementId, customerCredit);
} catch (SQLException e) {
throw new SQLStateSQLExceptionTranslator().translate("SqlMapClient operation", null, e);
}
}
/* (non-Javadoc)
* @see org.springframework.batch.item.ResourceLifecycle#close()
*/
public void close() {
}
/* (non-Javadoc)
* @see org.springframework.batch.item.ResourceLifecycle#open()
*/
public void open() {
}
public void setStatementId(String statementId) {
this.statementId = statementId;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.core.annotation.AfterWrite;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ItemStreamSupport;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.WriteFailedException;
@@ -73,7 +72,7 @@ public class TradeWriter extends ItemStreamSupport implements ItemWriter<Trade>
}
@Override
public void open(ExecutionContext executionContext) throws ItemStreamException {
public void open(ExecutionContext executionContext) {
if (executionContext.containsKey(TOTAL_AMOUNT_KEY)) {
this.totalPrice = (BigDecimal) executionContext.get(TOTAL_AMOUNT_KEY);
}

View File

@@ -15,7 +15,6 @@
*/
package org.springframework.batch.sample.domain.trade.internal.validator;
import org.springframework.batch.item.validator.ValidationException;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
import org.springframework.batch.sample.domain.trade.Trade;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,8 +32,7 @@ import org.springframework.jmx.export.notification.NotificationPublisherAware;
* @since 1.0
*/
public class JobExecutionNotificationPublisher implements ApplicationListener, NotificationPublisherAware {
protected static final Log logger = LogFactory.getLog(JobExecutionNotificationPublisher.class);
private static final Log LOG = LogFactory.getLog(JobExecutionNotificationPublisher.class);
private NotificationPublisher notificationPublisher;
@@ -58,7 +57,7 @@ public class JobExecutionNotificationPublisher implements ApplicationListener, N
public void onApplicationEvent(ApplicationEvent applicationEvent) {
if (applicationEvent instanceof SimpleMessageApplicationEvent) {
String message = applicationEvent.toString();
logger.info(message);
LOG.info(message);
publish(message);
}
}
@@ -82,5 +81,4 @@ public class JobExecutionNotificationPublisher implements ApplicationListener, N
notificationPublisher.sendNotification(notification);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,13 +18,12 @@ package org.springframework.batch.sample.jmx;
import org.aspectj.lang.JoinPoint;
import org.springframework.batch.core.StepExecution;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
/**
* Wraps calls for methods taking {@link StepExecution} as an argument and
* publishes notifications in the form of {@link ApplicationEvent}.
* publishes notifications in the form of {@link org.springframework.context.ApplicationEvent}.
*
* @author Dave Syer
*/
@@ -62,5 +61,4 @@ public class StepExecutionApplicationEventAdvice implements ApplicationEventPubl
private void publish(Object source, String message) {
applicationEventPublisher.publishEvent(new SimpleMessageApplicationEvent(source, message));
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@ public class DefaultJobLoader implements JobLoader, ApplicationContextAware {
}
}
catch (NoSuchJobException e) {
throw new IllegalStateException("Registry could not locate its own job (NoSuchJobException).");
throw new IllegalStateException("Registry could not locate its own job (NoSuchJobException).", e);
}
}
return result;

View File

@@ -1,37 +0,0 @@
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample.launch;
import java.util.Map;
/**
* @author Dave Syer
*
*/
public interface ExportedJobLoader {
void loadResource(String path);
Map<String, String> getConfigurations();
String getJob(String path);
String getProperty(String path);
void setProperty(String path, String value);
}

View File

@@ -11,9 +11,11 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* Simple producer class that sends {@link String} messages to the configured queue to be processed.
* </p>
*/
public class AmqpMessageProducer {
public static final int SEND_MESSAGE_COUNT = 10;
public static final String[] BEAN_CONFIG = { "classpath:/META-INF/spring/jobs/messaging/rabbitmq-beans.xml",
public final class AmqpMessageProducer {
private AmqpMessageProducer() {}
private static final int SEND_MESSAGE_COUNT = 10;
private static final String[] BEAN_CONFIG = { "classpath:/META-INF/spring/jobs/messaging/rabbitmq-beans.xml",
"classpath:/META-INF/spring/config-beans.xml" };
public static void main(String[] args) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,18 +20,15 @@ import java.io.IOException;
import java.io.Writer;
import org.springframework.batch.item.file.FlatFileHeaderCallback;
import org.springframework.batch.item.file.FlatFileItemReader;
import org.springframework.batch.item.file.FlatFileItemWriter;
import org.springframework.batch.item.file.LineCallbackHandler;
import org.springframework.util.Assert;
/**
* Designed to be registered with both {@link FlatFileItemReader} and
* {@link FlatFileItemWriter} and copy header line from input file to output
* file.
* Designed to be registered with both {@link org.springframework.batch.item.file.FlatFileItemReader}
* and {@link org.springframework.batch.item.file.FlatFileItemWriter} and copy header line from input
* file to output file.
*/
public class HeaderCopyCallback implements LineCallbackHandler, FlatFileHeaderCallback {
private String header = "";
public void handleLine(String line) {
@@ -41,7 +38,5 @@ public class HeaderCopyCallback implements LineCallbackHandler, FlatFileHeaderCa
public void writeHeader(Writer writer) throws IOException {
writer.write("header from input: " + header);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public class RetrySampleItemWriter<T> implements ItemWriter<T> {
int current = counter;
counter += items.size();
if (current < 3 && (counter >= 2 || counter >= 3)) {
throw new RuntimeException("Temporary error");
throw new IllegalStateException("Temporary error");
}
}

View File

@@ -4,10 +4,7 @@
version="1.0">
<persistence-unit name="customerCredit" transaction-type="RESOURCE_LOCAL">
<class>org.springframework.batch.sample.domain.trade.CustomerCredit</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
</persistence-unit>
</persistence>
</persistence>

View File

@@ -5,9 +5,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- Property values used in the application -->
<context:property-placeholder location="classpath:default.amqp.properties" />
</beans:beans>

View File

@@ -4,7 +4,7 @@
xmlns:beans="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-3.1.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<beans:bean id="amqpItemReader" class="org.springframework.batch.item.amqp.AmqpItemReader">
<beans:constructor-arg ref="inboundAmqpTemplate"/>

View File

@@ -5,8 +5,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:batch="http://www.springframework.org/schema/batch"
xsi:schemaLocation="
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<beans:import resource="classpath:/META-INF/spring/config-beans.xml"/>
<beans:import resource="classpath:/META-INF/spring/jobs/messaging/rabbitmq-beans.xml"/>

View File

@@ -6,8 +6,8 @@
xmlns:rabbit="http://www.springframework.org/schema/rabbit"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<rabbit:connection-factory id="rabbitConnectionFactory" port="${rabbitmq.port}" host="${rabbitmq.host}"/>
<rabbit:admin connection-factory="rabbitConnectionFactory"/>

View File

@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<import resource="simple-job-launcher-context.xml" />
@@ -57,5 +54,4 @@
<bean id="loader" class="org.springframework.batch.sample.launch.DefaultJobLoader">
<property name="registry" ref="jobRegistry" />
</bean>
</beans>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">
<!-- Initialise the database before every test case: -->
<jdbc:initialize-database data-source="dataSource">

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<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.xsd">
<?xml version="1.0" encoding="UTF-8"?>
<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.xsd">
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingLocations" value="classpath*:/org/springframework/batch/sample/domain/**/*.hbm.xml" />
@@ -19,5 +19,4 @@
<bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager" lazy-init="true">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
</beans>
</beans>

View File

@@ -3,7 +3,5 @@
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<sqlMap resource="ibatis-customer-credit.xml"/>
</sqlMapConfig>
</sqlMapConfig>

View File

@@ -3,7 +3,6 @@
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="Customer">
<resultMap id="result" class="org.springframework.batch.sample.domain.trade.CustomerCredit">
<result property="name" column="NAME" />
<result property="credit" column="CREDIT" />
@@ -24,5 +23,4 @@
<update id="updateCredit" parameterClass="org.springframework.batch.sample.domain.trade.CustomerCredit" >
update CUSTOMER set CREDIT = #credit# where NAME = #name#
</update>
</sqlMap>
</sqlMap>

View File

@@ -6,7 +6,7 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/batch
http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">
@@ -40,5 +40,4 @@
method="onError" />
</aop:aspect>
</aop:config>
</beans>

View File

@@ -5,8 +5,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:batch="http://www.springframework.org/schema/batch"
xsi:schemaLocation="
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<beans:import resource="classpath:/META-INF/spring/config-beans.xml"/>
<beans:import resource="classpath:/META-INF/spring/jobs/messaging/rabbitmq-beans.xml"/>

View File

@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
<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.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd">
<job id="beanWrapperMapperJob" xmlns="http://www.springframework.org/schema/batch">
<step id="step1" next="step2">
@@ -94,5 +91,4 @@
</bean>
<bean id="personWriter" class="org.springframework.batch.sample.domain.person.internal.PersonWriter" />
</beans>

View File

@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd">
<description>
<![CDATA[Sample showing usage of CompositeItemWriter.
@@ -92,5 +89,4 @@
</bean>
<bean id="fieldSetMapper" class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
</beans>

View File

@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang"
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.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd">
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd">
<job id="customerFilterJob" xmlns="http://www.springframework.org/schema/batch">
<step id="uploadCustomer">
@@ -72,5 +71,4 @@
</bean>
</property>
</bean>
</beans>

View File

@@ -1,14 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
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.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd">
<description>
The intent is to to give an example of how existing bean
@@ -41,5 +36,4 @@
</bean>
<bean id="delegateObject" class="org.springframework.batch.sample.domain.person.PersonService" />
</beans>

View File

@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<job id="footballJob" xmlns="http://www.springframework.org/schema/batch">
@@ -127,5 +126,4 @@
<property name="ignoreUnresolvablePlaceholders" value="true" />
<property name="order" value="1" />
</bean>
</beans>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:lang="http://www.springframework.org/schema/lang"
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd">
<job id="groovyJob" xmlns="http://www.springframework.org/schema/batch">
@@ -53,5 +53,4 @@
}
</lang:inline-script>
</lang:groovy>
</beans>

View File

@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd">
<description>
Showcases reading and writing of headers and footers. Copies header from input to output and adds a footer.
</description>

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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-3.1.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd">
<description>Example for Hibernate integration.</description>
@@ -42,5 +42,4 @@
<property name="queryString" value="from CustomerCredit" />
<property name="sessionFactory" ref="sessionFactory" />
</bean>
</beans>

View File

@@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- The tasklet used in this job will run in an infinite loop. This is useful for testing graceful shutdown from
multiple environments. -->
@@ -37,11 +34,6 @@
<bean class="org.springframework.batch.core.launch.support.RunIdIncrementer" />
</property>
<property name="steps">
<!--bean id="step1" parent="taskletStep">
<property name="tasklet">
<bean id="module" class="org.springframework.batch.sample.tasklet.InfiniteLoopTasklet"/>
</property>
</bean-->
<bean id="infiniteStep" parent="simpleStep">
<property name="itemReader">
<bean id="reader" class="org.springframework.batch.sample.domain.trade.internal.GeneratingTradeItemReader">
@@ -54,5 +46,4 @@
</bean>
</property>
</bean>
</beans>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<job id="ioSampleJob" xmlns="http://www.springframework.org/schema/batch">
@@ -13,7 +13,5 @@
</step>
</job>
<bean id="itemProcessor"
class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor" />
<bean id="itemProcessor" class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor" />
</beans>

View File

@@ -1,15 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="itemReader" class="org.springframework.batch.item.file.FlatFileItemReader" scope="step">
<property name="lineMapper">

View File

@@ -1,13 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
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.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="itemReader" class="org.springframework.batch.item.file.FlatFileItemReader" scope="step">
<property name="resource" value="#{jobParameters[inputFile]}" />

View File

@@ -3,7 +3,6 @@
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.xsd">
<bean id="itemReader"
class="org.springframework.batch.item.database.IbatisPagingItemReader">
<property name="queryId" value="getAllCustomerCredits" />
@@ -21,5 +20,4 @@
<bean id="sqlMapClient" class="com.ibatis.sqlmap.client.SqlMapClientBuilder" factory-method="buildSqlMapClient">
<constructor-arg value="ibatis-config.xml"/>
</bean>
</beans>

View File

@@ -1,15 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="itemReader" class="org.springframework.batch.item.database.JdbcCursorItemReader">
<property name="dataSource" ref="dataSource"/>
@@ -28,5 +21,4 @@
<property name="sql" value="UPDATE CUSTOMER set credit = :credit where id = :id" />
<property name="dataSource" ref="dataSource" />
</bean>
</beans>

View File

@@ -1,12 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
<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.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="itemReader" class="org.springframework.batch.item.database.JdbcPagingItemReader" scope="step">
<property name="dataSource" ref="dataSource" />
@@ -45,5 +41,4 @@
<property name="sql" value="UPDATE CUSTOMER set credit = :credit where id = :id" />
<property name="dataSource" ref="dataSource" />
</bean>
</beans>

View File

@@ -1,17 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:batch="http://www.springframework.org/schema/batch"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd">
<batch:job id="ioSampleJob">
<batch:step id="step1">
@@ -49,5 +42,4 @@
</bean>
</property>
</bean>
</beans>

View File

@@ -1,17 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:batch="http://www.springframework.org/schema/batch"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd">
<batch:job id="ioSampleJob">
<batch:step id="step1">
@@ -34,12 +27,12 @@
<entry key="CUST*" value-ref="customerLineTokenizer" />
</map>
</property>
<property name="fieldSetMappers">
<map>
<entry key="TRAD*" value-ref="tradeFieldSetMapper" />
<entry key="CUST*" value-ref="customerFieldSetMapper" />
</map>
</property>
<property name="fieldSetMappers">
<map>
<entry key="TRAD*" value-ref="tradeFieldSetMapper" />
<entry key="CUST*" value-ref="customerFieldSetMapper" />
</map>
</property>
</bean>
<bean id="tradeLineTokenizer"
@@ -55,7 +48,7 @@
</bean>
<bean id="tradeFieldSetMapper"
class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
<bean id="customerFieldSetMapper"
class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditFieldSetMapper" />

View File

@@ -1,13 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
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.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="itemReader"
class="org.springframework.batch.item.file.MultiResourceItemReader" scope="step">
@@ -59,5 +54,4 @@
</bean>
</property>
</bean>
</beans>

View File

@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<bean id="itemReader" class="org.springframework.batch.item.xml.StaxEventItemReader">
@@ -36,5 +33,4 @@
<bean id="outputResource" class="org.springframework.core.io.FileSystemResource">
<constructor-arg value="target/test-outputs/output.xml" />
</bean>
</beans>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<job id="jobStepJob" restartable="true" xmlns="http://www.springframework.org/schema/batch">

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<job id="loopFlowSample" xmlns="http://www.springframework.org/schema/batch">
@@ -40,5 +40,4 @@
<bean id="resettingListener" class="org.springframework.batch.sample.loop.GeneratingTradeResettingListener">
<property name="reader" ref="itemGenerator" />
</bean>
</beans>

View File

@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<job id="mailJob" xmlns="http://www.springframework.org/schema/batch">
<step id="step1" xmlns="http://www.springframework.org/schema/batch">
@@ -12,9 +11,6 @@
<skippable-exception-classes>
<include class="java.lang.RuntimeException" />
</skippable-exception-classes>
<!--
<fatal-exception-classes> <include class="org.springframework.mail.MailException"/> </fatal-exception-classes>
-->
</chunk>
</tasklet>
</step>
@@ -48,5 +44,4 @@
</list>
</property>
</bean>
</beans>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<job id="multilineJob" xmlns="http://www.springframework.org/schema/batch">
@@ -75,5 +75,4 @@
<property name="names" value="ISIN,Quantity,Price,Customer" />
<property name="columns" value="1-12, 13-15, 16-20, 21-29" />
</bean>
</beans>

View File

@@ -61,5 +61,4 @@
<bean id="itemLineTokenizer" parent="parentLineTokenizer">
<property name="names" value="LINE_ID,ITEM_ID,PRICE,DISCOUNT_PERC,DISCOUNT_AMOUNT,SHIPPING_PRICE,HANDLING_PRICE,QUANTITY,TOTAL_PRICE" />
</bean>
</beans>

View File

@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
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.xsd
http://www.springframework.org/schema/batch
http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">
http://www.springframework.org/schema/batch/spring-batch.xsd">
<import resource="multilineOrderInputTokenizers.xml" />
<import resource="multilineOrderOutputAggregators.xml" />
@@ -67,5 +65,4 @@
</bean>
</property>
</bean>
</beans>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
@@ -57,5 +57,4 @@
<bean class="org.springframework.batch.sample.domain.order.internal.extractor.LineItemFieldExtractor"/>
</property>
</bean>
</beans>

View File

@@ -3,7 +3,7 @@
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.2.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<job id="parallelJob" xmlns="http://www.springframework.org/schema/batch">
@@ -107,5 +107,4 @@
method="doStronglyTypedLogging" />
</aop:aspect>
</aop:config>
</beans>

Some files were not shown because too many files have changed in this diff Show More