org.seedstack.business.internal.migrate.FluentAssemblerAdapter Maven / Gradle / Ivy
/*
* 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);
}
}