Class AccountServiceImpl<T extends Account,R extends tech.corefinance.common.repository.CommonResourceRepository<T,String>>

java.lang.Object
tech.corefinance.account.common.service.AccountServiceImpl<T,R>
All Implemented Interfaces:
AccountService<T,R>, tech.corefinance.common.service.CommonService<String,T,R>

public abstract class AccountServiceImpl<T extends Account,R extends tech.corefinance.common.repository.CommonResourceRepository<T,String>> extends Object implements AccountService<T,R>
  • Field Details

    • random

      protected Random random
    • maxRandomIdCheck

      protected int maxRandomIdCheck
    • taskExecutor

      protected org.springframework.core.task.TaskExecutor taskExecutor
    • dbSequenceHandling

      protected tech.corefinance.common.jpa.repository.DbSequenceHandling dbSequenceHandling
  • Constructor Details

    • AccountServiceImpl

      public AccountServiceImpl(int maxRandomIdCheck, org.springframework.core.task.TaskExecutor taskExecutor, tech.corefinance.common.jpa.repository.DbSequenceHandling dbSequenceHandling, org.springframework.kafka.core.KafkaTemplate<String,Object> kafkaTemplate, AccountKafkaConfig accountKafkaConfig)
  • Method Details

    • getCategoryObject

      protected abstract Object getCategoryObject(String categoryId)
    • getTypeObject

      protected abstract Object getTypeObject(String typeId)
    • getProductObject

      protected abstract Object getProductObject(String productId)
    • getSequenceName

      protected abstract String getSequenceName()
    • copyAdditionalPropertiesFromDtoToEntity

      public <D extends tech.corefinance.common.model.CreateUpdateDto<String>> T copyAdditionalPropertiesFromDtoToEntity(D source, T dest)
      Specified by:
      copyAdditionalPropertiesFromDtoToEntity in interface tech.corefinance.common.service.CommonService<String,T extends Account,R extends tech.corefinance.common.repository.CommonResourceRepository<T,String>>
    • mapProductToAccount

      protected <D extends tech.corefinance.common.model.CreateUpdateDto<String>> T mapProductToAccount(D source, Object productObject, T dest)
    • addAsyncTaskCreateUpdateAccount

      protected List<CompletableFuture<?>> addAsyncTaskCreateUpdateAccount()
    • afterEntitySaved

      public void afterEntitySaved(T entity)
      Specified by:
      afterEntitySaved in interface tech.corefinance.common.service.CommonService<String,T extends Account,R extends tech.corefinance.common.repository.CommonResourceRepository<T,String>>
    • afterItemDeleted

      public void afterItemDeleted(T item)
      Specified by:
      afterItemDeleted in interface tech.corefinance.common.service.CommonService<String,T extends Account,R extends tech.corefinance.common.repository.CommonResourceRepository<T,String>>