@Test void testMissingFileInRecordFileRepository() { recordFileRepository.deleteAll(); assertThrows(MissingFileException.class, () -> { sqlEntityListener.onStart(new StreamFileData(fileName, null)); }); }
@Override public RecordFile onStart(StreamFileData streamFileData) { String fileName = FilenameUtils.getName(streamFileData.getFilename()); RecordFile recordFile = recordFileRepository.findByName(fileName) .orElseThrow(() -> new MissingFileException("File not found in the database: " + fileName)); cleanup(); return recordFile; }
SqlEntityListener implements EntityListener, RecordStreamFileListener { @Override public RecordFile onStart(StreamFileData streamFileData) { String fileName = FilenameUtils.getName(streamFileData.getFilename()); RecordFile recordFile = recordFileRepository.findByName(fileName) .orElseThrow(() -> new MissingFileException("File not found in the database: " + fileName)); cleanup(); return recordFile; } }
SqlEntityListener implements EntityListener, RecordStreamFileListener { @Override public RecordFile onStart(StreamFileData streamFileData) { String fileName = FilenameUtils.getName(streamFileData.getFilename()); RecordFile recordFile = recordFileRepository.findByName(fileName) .orElseThrow(() -> new MissingFileException("File not found in the database: " + fileName)); cleanup(); return recordFile; } SqlEntityListener(SqlProperties sqlProperties, DataSource dataSource,
                             RecordFileRepository recordFileRepository, MeterRegistry meterRegistry,
                             @Qualifier(CacheConfiguration.NEVER_EXPIRE_LARGE) CacheManager cacheManager,
                             ApplicationStatusRepository applicationStatusRepository,
                             EntityRepository entityRepository, ApplicationEventPublisher eventPublisher,
                             TokenRepository tokenRepository, TokenAccountRepository tokenAccountRepository); }
SqlEntityListener implements EntityListener, RecordStreamFileListener { @Override public RecordFile onStart(StreamFileData streamFileData) { String fileName = FilenameUtils.getName(streamFileData.getFilename()); RecordFile recordFile = recordFileRepository.findByName(fileName) .orElseThrow(() -> new MissingFileException("File not found in the database: " + fileName)); cleanup(); return recordFile; } SqlEntityListener(SqlProperties sqlProperties, DataSource dataSource,
                             RecordFileRepository recordFileRepository, MeterRegistry meterRegistry,
                             @Qualifier(CacheConfiguration.NEVER_EXPIRE_LARGE) CacheManager cacheManager,
                             ApplicationStatusRepository applicationStatusRepository,
                             EntityRepository entityRepository, ApplicationEventPublisher eventPublisher,
                             TokenRepository tokenRepository, TokenAccountRepository tokenAccountRepository); @Override boolean isEnabled(); @Override RecordFile onStart(StreamFileData streamFileData); @Override void onEnd(RecordFile recordFile); @Override void onError(); @Override void onTransaction(Transaction transaction); @Override void onEntityId(EntityId entityId); @Override void onCryptoTransfer(CryptoTransfer cryptoTransfer); @Override void onNonFeeTransfer(NonFeeTransfer nonFeeTransfer); @Override void onTopicMessage(TopicMessage topicMessage); @Override void onContractResult(ContractResult contractResult); @Override void onFileData(FileData fd); @Override void onLiveHash(LiveHash liveHash); @Override void onToken(Token token); @Override void onTokenAccount(TokenAccount tokenAccount); @Override void onTokenTransfer(TokenTransfer tokenTransfer); }
SqlEntityListener implements EntityListener, RecordStreamFileListener { @Override public RecordFile onStart(StreamFileData streamFileData) { String fileName = FilenameUtils.getName(streamFileData.getFilename()); RecordFile recordFile = recordFileRepository.findByName(fileName) .orElseThrow(() -> new MissingFileException("File not found in the database: " + fileName)); cleanup(); return recordFile; } SqlEntityListener(SqlProperties sqlProperties, DataSource dataSource,
                             RecordFileRepository recordFileRepository, MeterRegistry meterRegistry,
                             @Qualifier(CacheConfiguration.NEVER_EXPIRE_LARGE) CacheManager cacheManager,
                             ApplicationStatusRepository applicationStatusRepository,
                             EntityRepository entityRepository, ApplicationEventPublisher eventPublisher,
                             TokenRepository tokenRepository, TokenAccountRepository tokenAccountRepository); @Override boolean isEnabled(); @Override RecordFile onStart(StreamFileData streamFileData); @Override void onEnd(RecordFile recordFile); @Override void onError(); @Override void onTransaction(Transaction transaction); @Override void onEntityId(EntityId entityId); @Override void onCryptoTransfer(CryptoTransfer cryptoTransfer); @Override void onNonFeeTransfer(NonFeeTransfer nonFeeTransfer); @Override void onTopicMessage(TopicMessage topicMessage); @Override void onContractResult(ContractResult contractResult); @Override void onFileData(FileData fd); @Override void onLiveHash(LiveHash liveHash); @Override void onToken(Token token); @Override void onTokenAccount(TokenAccount tokenAccount); @Override void onTokenTransfer(TokenTransfer tokenTransfer);  }