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

org.seedstack.business.internal.migrate.FluentAssemblerAdapter Maven / Gradle / Ivy

There is a newer version: 4.5.0
Show newest version
/*
 * Copyright © 2013-2018, The SeedStack authors 
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package org.seedstack.business.internal.migrate;

import java.util.stream.Stream;
import javax.inject.Inject;
import org.javatuples.Tuple;
import org.seedstack.business.assembler.FluentAssembler;
import org.seedstack.business.assembler.dsl.AssembleMultipleWithQualifier;
import org.seedstack.business.assembler.dsl.AssemblePageWithQualifier;
import org.seedstack.business.assembler.dsl.AssembleSingleWithQualifier;
import org.seedstack.business.assembler.dsl.MergeMultipleWithQualifier;
import org.seedstack.business.assembler.dsl.MergeSingleWithQualifier;
import org.seedstack.business.domain.AggregateRoot;
import org.seedstack.business.pagination.Page;

class FluentAssemblerAdapter implements FluentAssembler {
    private final org.seedstack.business.assembler.dsl.FluentAssembler fluentAssembler;

    @Inject
    FluentAssemblerAdapter(org.seedstack.business.assembler.dsl.FluentAssembler fluentAssembler) {
        this.fluentAssembler = fluentAssembler;
    }

    @Override
    public , I> AssembleSingleWithQualifier assemble(
            A aggregateRoot) {
        return fluentAssembler.assemble(aggregateRoot);
    }

    @Override
    public , I> AssembleMultipleWithQualifier assemble(
            Stream stream) {
        return fluentAssembler.assemble(stream);
    }

    @Override
    public , I> AssembleMultipleWithQualifier assemble(
            Iterable iterable) {
        return fluentAssembler.assemble(iterable);
    }

    @Override
    public , I> AssemblePageWithQualifier assemble(
            Page page) {
        return fluentAssembler.assemble(page);
    }

    @Override
    public  AssembleSingleWithQualifier assembleTuple(
            T tuple) {
        return fluentAssembler.assembleTuple(tuple);
    }

    @Override
    public  AssembleMultipleWithQualifier assembleTuples(
            Stream stream) {
        return fluentAssembler.assembleTuples(stream);
    }

    @Override
    public  AssembleMultipleWithQualifier assembleTuples(
            Iterable iterable) {
        return fluentAssembler.assembleTuples(iterable);
    }

    @Override
    public  AssemblePageWithQualifier assembleTuples(
            Page page) {
        return fluentAssembler.assembleTuples(page);
    }

    @Override
    public  MergeSingleWithQualifier merge(D dto) {
        return fluentAssembler.merge(dto);
    }

    @Override
    public  MergeMultipleWithQualifier merge(Stream stream) {
        return fluentAssembler.merge(stream);
    }

    @Override
    public  MergeMultipleWithQualifier merge(Iterable iterable) {
        return fluentAssembler.merge(iterable);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy