poussecafe.doc.model.relation.InternalRelationDataAccess Maven / Gradle / Ivy
package poussecafe.doc.model.relation;
import java.util.List;
import poussecafe.discovery.DataAccessImplementation;
import poussecafe.storage.internal.InternalDataAccess;
import poussecafe.storage.internal.InternalStorage;
import static java.util.stream.Collectors.toList;
@DataAccessImplementation(
aggregateRoot = Relation.class,
dataImplementation = RelationData.class,
storageName = InternalStorage.NAME
)
public class InternalRelationDataAccess extends InternalDataAccess implements RelationDataAccess {
@Override
public List findWithFromClass(String className) {
return findAll().stream().filter(data -> data.identifier().value().fromClass().equals(className)).collect(toList());
}
}