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

com.github.saphyra.randwo.item.service.create.ItemFactory Maven / Gradle / Ivy

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

import org.springframework.stereotype.Component;

import com.github.saphyra.randwo.item.domain.Item;
import com.github.saphyra.util.IdGenerator;
import lombok.RequiredArgsConstructor;

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

    public Item create() {
        return Item.builder()
            .itemId(idGenerator.randomUUID())
            .build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy