public void adjust()

in service/src/main/java/org/apache/fineract/cn/provisioner/internal/repository/TenantCassandraRepository.java [68:79]


  public void adjust(final @Nonnull String tenantIdentifier, final @Nonnull Consumer<TenantEntity> adjustment)
  {
    final Mapper<TenantEntity> tenantEntityMapper = this.getMappingManager().mapper(TenantEntity.class);
    final TenantEntity tenantEntity = tenantEntityMapper.get(tenantIdentifier);
    if (tenantEntity == null) {
      throw ServiceException.notFound("Tenant {0} not found!", tenantIdentifier);
    }

    adjustment.accept(tenantEntity);

    tenantEntityMapper.save(tenantEntity);
  }