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

poussecafe.doc.model.aggregatedoc.AggregateDocData Maven / Gradle / Ivy

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

import java.io.Serializable;
import poussecafe.attribute.Attribute;
import poussecafe.doc.model.BoundedContextComponentDoc;
import poussecafe.doc.model.BoundedContextComponentDocData;

@SuppressWarnings("serial")
public class AggregateDocData implements AggregateDoc.Attributes, Serializable {

    @Override
    public Attribute identifier() {
        return new Attribute() {
            @Override
            public AggregateDocId value() {
                return AggregateDocId.ofClassName(className);
            }

            @Override
            public void value(AggregateDocId value) {
                className = value.stringValue();
            }
        };
    }

    private String className;

    @Override
    public Attribute boundedContextComponentDoc() {
        return new Attribute() {
            @Override
            public BoundedContextComponentDoc value() {
                return componentDoc.adapt();
            }

            @Override
            public void value(BoundedContextComponentDoc value) {
                componentDoc = BoundedContextComponentDocData.adapt(value);
            }
        };
    }

    private BoundedContextComponentDocData componentDoc;

    @Override
    public Attribute idClassName() {
        return new Attribute() {
            @Override
            public String value() {
                return idClassName;
            }

            @Override
            public void value(String value) {
                idClassName = value;
            }
        };
    }

    private String idClassName;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy