@Test void onTokenAccount() throws Exception { String tokenId1 = "0.0.3"; String tokenId2 = "0.0.5"; String accountId1 = "0.0.7"; String accountId2 = "0.0.11"; TokenAccount tokenAccount1 = getTokenAccount(tokenId1, accountId1); TokenAccount tokenAccount2 = getTokenAccount(tokenId2, "0.0.11"); sqlEntityListener.onTokenAccount(tokenAccount1); sqlEntityListener.onTokenAccount(tokenAccount2); completeFileAndCommit(); assertEquals(2, tokenAccountRepository.count()); assertExistsAndEquals(tokenAccountRepository, tokenAccount1, new TokenAccount.Id(EntityId .of(tokenId1, EntityTypeEnum.TOKEN), EntityId.of(accountId1, ACCOUNT))); assertExistsAndEquals(tokenAccountRepository, tokenAccount2, new TokenAccount.Id(EntityId .of(tokenId2, EntityTypeEnum.TOKEN), EntityId.of(accountId2, ACCOUNT))); }
@Override public void onTokenAccount(TokenAccount tokenAccount) throws ImporterException { tokenAccountRepository.save(tokenAccount); }
SqlEntityListener implements EntityListener, RecordStreamFileListener { @Override public void onTokenAccount(TokenAccount tokenAccount) throws ImporterException { tokenAccountRepository.save(tokenAccount); } }
SqlEntityListener implements EntityListener, RecordStreamFileListener { @Override public void onTokenAccount(TokenAccount tokenAccount) throws ImporterException { tokenAccountRepository.save(tokenAccount); } 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 void onTokenAccount(TokenAccount tokenAccount) throws ImporterException { tokenAccountRepository.save(tokenAccount); } 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 void onTokenAccount(TokenAccount tokenAccount) throws ImporterException { tokenAccountRepository.save(tokenAccount); } 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);  }