poussecafe.doc.model.entitydoc.EntityDoc Maven / Gradle / Ivy
package poussecafe.doc.model.entitydoc;
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 = EntityDocFactory.class,
repository = EntityDocRepository.class
)
public class EntityDoc extends AggregateRoot {
void idClassName(String idClassName) {
attributes().idClassName().value(idClassName);
}
public String id() {
return StringNormalizer.normalizeString(attributes().boundedContextComponentDoc().value().componentDoc().name());
}
public static interface Attributes extends EntityAttributes {
Attribute boundedContextComponentDoc();
Attribute idClassName();
}
}