poussecafe.doc.model.aggregatedoc.AggregateDoc Maven / Gradle / Ivy
package poussecafe.doc.model.aggregatedoc;
import poussecafe.attribute.Attribute;
import poussecafe.discovery.Aggregate;
import poussecafe.doc.StringNormalizer;
import poussecafe.doc.model.BoundedContextComponentDoc;
import poussecafe.domain.AggregateRoot;
import poussecafe.domain.EntityAttributes;
@Aggregate(
factory = AggregateDocFactory.class,
repository = AggregateDocRepository.class
)
public class AggregateDoc extends AggregateRoot {
public String id() {
return StringNormalizer.normalizeString(attributes().boundedContextComponentDoc().value().componentDoc().name());
}
public String className() {
return attributes().identifier().value().stringValue();
}
public static interface Attributes extends EntityAttributes {
Attribute boundedContextComponentDoc();
Attribute idClassName();
}
}