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

com.github.saphyra.randwo.label.service.create.LabelFactory Maven / Gradle / Ivy

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

import com.github.saphyra.randwo.label.domain.Label;
import com.github.saphyra.util.IdGenerator;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class LabelFactory {
    private final IdGenerator idGenerator;

    public Label create(String labelValue) {
        return Label.builder()
            .labelId(idGenerator.randomUUID())
            .labelValue(labelValue)
            .build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy