templates.factory.st Maven / Gradle / Ivy
package ;
import poussecafe.domain.Factory;
public class Factory extends Factory\<Id, , .Attributes> {
public new(Parameters parameters) {
aggregate = newAggregateWithId(parameters.id);
aggregate.attributes().name().value(parameters.name);
return aggregate;
}
public static class Parameters {
public Id id;
public String name;
}
}