All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.saphyra.randwo.key.service.create.KeyFactory Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.github.saphyra.randwo.key.service.create;

import org.springframework.stereotype.Component;

import com.github.saphyra.randwo.key.domain.Key;
import com.github.saphyra.util.IdGenerator;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
@Component
class KeyFactory {
    private final IdGenerator idGenerator;

    Key create(String keyValue) {
        return Key.builder()
            .keyId(idGenerator.randomUUID())
            .keyValue(keyValue)
            .build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy