class ActivityLogServiceImpl implements ActivityLogService {

    @Override
    public void recordActivityByApplicationId(long applicationId, ActivityType activityType) {
        applicationRepository.findById(applicationId)
                .ifPresent(application -> {
                    ActivityLog log = new ActivityLog(application, activityType);
                    activityLogRepository.save(log);
                });
    }

}