Package com.ecom.winners.transformers
Class TransactionProcessor
java.lang.Object
com.ecom.winners.transformers.TransactionProcessor
- All Implemented Interfaces:
org.springframework.batch.item.ItemProcessor<TransactionDTO,
Transaction>
public class TransactionProcessor
extends Object
implements org.springframework.batch.item.ItemProcessor<TransactionDTO,Transaction>
TransactionProcessor is an implementation of ItemProcessor functional interface(SAM)
for user's transactions.
It maps the user's transactions from CSV file into User entity.
It checks for the existence of user in the database.
If the user doesn't exist, it won't do the transformation and returns null.
- See Also:
-
AllArgsConstructor
ItemProcessor
TransactionDTO
Transaction
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
TransactionProcessor
public TransactionProcessor()
-
-
Method Details
-
process
- Specified by:
process
in interfaceorg.springframework.batch.item.ItemProcessor<TransactionDTO,
Transaction>
-