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

com.speedment.jpastreamer.builder.standard.internal.BaseBuilderState Maven / Gradle / Ivy

There is a newer version: 3.0.4
Show newest version
/*
 * JPAstreamer - Express JPA queries with Java Streams
 * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved.
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details.
 *
 * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE
 */
package com.speedment.jpastreamer.builder.standard.internal;

import com.speedment.jpastreamer.pipeline.Pipeline;
import com.speedment.jpastreamer.renderer.Renderer;
import com.speedment.jpastreamer.streamconfiguration.StreamConfiguration;

import static java.util.Objects.requireNonNull;

final class BaseBuilderState {

    private final Factories factories;
    private final StreamConfiguration streamConfiguration;
    private final Pipeline pipeline;
    private final Renderer renderer;

    BaseBuilderState(final Factories factories,
                     final StreamConfiguration streamConfiguration,
                     final Renderer renderer) {
        this.factories = requireNonNull(factories);
        this.streamConfiguration = requireNonNull(streamConfiguration);
        this.renderer = requireNonNull(renderer);
        this.pipeline = InjectedFactories.INSTANCE.pipeline().createPipeline(streamConfiguration.entityClass());
    }

    Factories factories() {
        return factories;
    }

    StreamConfiguration streamConfiguration() {
        return streamConfiguration;
    }

    Pipeline pipeline() {
        return pipeline;
    }

    Renderer renderer() {
        return renderer;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy