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

poussecafe.doc.adapters.CreateAggregateDocData Maven / Gradle / Ivy

There is a newer version: 0.29.0
Show newest version
package poussecafe.doc.adapters;

import java.io.Serializable;
import poussecafe.attribute.Attribute;
import poussecafe.attribute.AttributeBuilder;
import poussecafe.discovery.MessageImplementation;
import poussecafe.doc.commands.CreateAggregateDoc;
import poussecafe.doc.model.boundedcontextdoc.BoundedContextDocId;

@MessageImplementation(message = CreateAggregateDoc.class)
@SuppressWarnings("serial")
public class CreateAggregateDocData implements Serializable, CreateAggregateDoc {

    @Override
    public Attribute boundedContextId() {
        return AttributeBuilder.stringId(BoundedContextDocId.class)
                .read(() -> boundedContextDocId)
                .write(value -> boundedContextDocId = value)
                .build();
    }

    private String boundedContextDocId;

    @Override
    public Attribute className() {
        return AttributeBuilder.single(String.class)
                .read(() -> className)
                .write(value -> className = value)
                .build();
    }

    private String className;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy