All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.adorsys.multibanking.mongo.impl.BulkPaymentRepositoryImpl Maven / Gradle / Ivy

There is a newer version: 5.5.43
Show newest version
package de.adorsys.multibanking.mongo.impl;

import de.adorsys.multibanking.domain.BulkPaymentEntity;
import de.adorsys.multibanking.mongo.mapper.MongoEntityMapper;
import de.adorsys.multibanking.mongo.repository.BulkPaymentRepositoryMongodb;
import de.adorsys.multibanking.pers.spi.repository.BulkPaymentRepositoryIf;
import lombok.AllArgsConstructor;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;

@AllArgsConstructor
@Profile({"mongo", "fongo"})
@Service
public class BulkPaymentRepositoryImpl implements BulkPaymentRepositoryIf {

    private final BulkPaymentRepositoryMongodb paymentRepository;
    private final MongoEntityMapper entityMapper;

    @Override
    public void save(BulkPaymentEntity target) {
        paymentRepository.save(entityMapper.mapToBulkPaymentMongoEntity(target));
    }

    @Override
    public void delete(String id) {
        paymentRepository.deleteById(id);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy