public class ProductItemStreamReader extends java.lang.Object implements org.springframework.batch.item.ItemStreamReader<Product>
Modifier and Type | Field and Description |
---|---|
private CategoryPathMapper |
categoryPathMapper |
private org.springframework.batch.item.support.SingleItemPeekableItemReader<CategoryProductMap> |
categoryProductMapItemReader |
private org.springframework.batch.item.support.SingleItemPeekableItemReader<PublicFileAttribute> |
imageItemReader |
private org.springframework.batch.item.support.SingleItemPeekableItemReader<PredefAttribute> |
localisedPredefAttributeItemReader |
private org.springframework.batch.item.support.SingleItemPeekableItemReader<StringAttribute> |
localisedStringAttributeItemReader |
private org.springframework.batch.item.support.SingleItemPeekableItemReader<MoneyAttribute> |
moneyItemReader |
private org.springframework.batch.item.support.SingleItemPeekableItemReader<PredefAttribute> |
predefAttributeItemReader |
private org.springframework.batch.item.database.JdbcCursorItemReader<Product> |
productItemReader |
private org.springframework.batch.item.support.SingleItemPeekableItemReader<StringAttribute> |
stringAttributeItemReader |
private org.springframework.batch.item.support.SingleItemPeekableItemReader<ProductAttribute> |
subProductItemReader |
Constructor and Description |
---|
ProductItemStreamReader(JdbcCursorItemReaderFactory<Product> pf,
PeekableItemReaderFactory<ProductAttribute> subpf,
PeekableItemReaderFactory<StringAttribute> af,
PeekableItemReaderFactory<StringAttribute> laf,
PeekableItemReaderFactory<MoneyAttribute> mf,
PeekableItemReaderFactory<CategoryProductMap> cpmf,
PeekableItemReaderFactory<PredefAttribute> pdf,
PeekableItemReaderFactory<PredefAttribute> lpdf,
PeekableItemReaderFactory<PublicFileAttribute> imgf,
ItemStreamReaderFactory<Category> cf,
java.lang.String dsName,
int shopID) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private void |
initCategoryPathMapper(ItemStreamReaderFactory<Category> cf,
java.lang.String dsName,
int shopID) |
private <T> boolean |
isMyAttribute(Product p,
AttributeMapEntry<AttributeKey,T> a) |
void |
open(org.springframework.batch.item.ExecutionContext executionContext) |
Product |
read() |
void |
update(org.springframework.batch.item.ExecutionContext executionContext) |
private final org.springframework.batch.item.database.JdbcCursorItemReader<Product> productItemReader
private final org.springframework.batch.item.support.SingleItemPeekableItemReader<ProductAttribute> subProductItemReader
private final org.springframework.batch.item.support.SingleItemPeekableItemReader<StringAttribute> stringAttributeItemReader
private final org.springframework.batch.item.support.SingleItemPeekableItemReader<StringAttribute> localisedStringAttributeItemReader
private final org.springframework.batch.item.support.SingleItemPeekableItemReader<MoneyAttribute> moneyItemReader
private final org.springframework.batch.item.support.SingleItemPeekableItemReader<CategoryProductMap> categoryProductMapItemReader
private final org.springframework.batch.item.support.SingleItemPeekableItemReader<PredefAttribute> predefAttributeItemReader
private final org.springframework.batch.item.support.SingleItemPeekableItemReader<PredefAttribute> localisedPredefAttributeItemReader
private final org.springframework.batch.item.support.SingleItemPeekableItemReader<PublicFileAttribute> imageItemReader
private final CategoryPathMapper categoryPathMapper
@Inject public ProductItemStreamReader(JdbcCursorItemReaderFactory<Product> pf, PeekableItemReaderFactory<ProductAttribute> subpf, PeekableItemReaderFactory<StringAttribute> af, PeekableItemReaderFactory<StringAttribute> laf, PeekableItemReaderFactory<MoneyAttribute> mf, PeekableItemReaderFactory<CategoryProductMap> cpmf, PeekableItemReaderFactory<PredefAttribute> pdf, PeekableItemReaderFactory<PredefAttribute> lpdf, PeekableItemReaderFactory<PublicFileAttribute> imgf, ItemStreamReaderFactory<Category> cf, java.lang.String dsName, int shopID)
private void initCategoryPathMapper(ItemStreamReaderFactory<Category> cf, java.lang.String dsName, int shopID)
public void open(org.springframework.batch.item.ExecutionContext executionContext)
open
in interface org.springframework.batch.item.ItemStream
public void update(org.springframework.batch.item.ExecutionContext executionContext)
update
in interface org.springframework.batch.item.ItemStream
public void close() throws org.springframework.batch.item.ItemStreamException
close
in interface org.springframework.batch.item.ItemStream
org.springframework.batch.item.ItemStreamException
public Product read()
read
in interface org.springframework.batch.item.ItemReader<Product>
private <T> boolean isMyAttribute(Product p, AttributeMapEntry<AttributeKey,T> a)