Search in sources :

Example 1 with FlashItemDO

use of com.actionworks.flashsale.persistence.model.FlashItemDO in project flash-sale by ThoughtsBeta.

the class FlashItemRepositoryImpl method findById.

@Override
public Optional<FlashItem> findById(Long itemId) {
    FlashItemDO flashItemDO = flashItemMapper.getById(itemId);
    if (flashItemDO == null) {
        return Optional.empty();
    }
    FlashItem flashItem = FlashItemBuilder.toDomainObject(flashItemDO);
    return Optional.of(flashItem);
}
Also used : FlashItem(com.actionworks.flashsale.domain.model.entity.FlashItem) FlashItemDO(com.actionworks.flashsale.persistence.model.FlashItemDO)

Example 2 with FlashItemDO

use of com.actionworks.flashsale.persistence.model.FlashItemDO in project flash-sale by ThoughtsBeta.

the class FlashItemBuilder method toDataObjectForCreate.

public static FlashItemDO toDataObjectForCreate(FlashItem flashItem) {
    FlashItemDO flashItemDO = new FlashItemDO();
    BeanUtils.copyProperties(flashItem, flashItemDO);
    return flashItemDO;
}
Also used : FlashItemDO(com.actionworks.flashsale.persistence.model.FlashItemDO)

Aggregations

FlashItemDO (com.actionworks.flashsale.persistence.model.FlashItemDO)2 FlashItem (com.actionworks.flashsale.domain.model.entity.FlashItem)1