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

poussecafe.doc.model.relation.RelationFactory Maven / Gradle / Ivy

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

import poussecafe.domain.Factory;

public class RelationFactory extends Factory {

    public Relation newRelation(NewRelationParameters parameters) {
        Relation relation = newAggregateWithId(new RelationId(parameters.fromComponent.className(), parameters.toComponent.className()));
        relation.fromType(parameters.fromComponent.type());
        relation.toType(parameters.toComponent.type());
        return relation;
    }

    public static class NewRelationParameters {

        public Component fromComponent;

        public Component toComponent;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy