Wednesday, 15 September 2010

spring batch - How do I skip/delete an item in the ItemProcessor? -



spring batch - How do I skip/delete an item in the ItemProcessor? -

i want able delete item while processing if fits specific logic. example, if item doesn't contain value i'm looking for, don't want item written out file.

i'm using class implements itemprocessor<t,t>.

do homecoming null?

return null processor below.

public class exceptionrecordvalidator implements itemprocessor<yourdto, yourdto>{ @override public yourdto process( yourdtoitem) throws exception { if(your requested value found){ homecoming yourdto ; }else{ homecoming null; } } }

spring-batch

No comments:

Post a Comment