io.github.joselion.springr2dbcrelationships.processors.ManyToOneProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-r2dbc-relationships Show documentation
Show all versions of spring-r2dbc-relationships Show documentation
Spring R2DBC annotations to handle entity relationships
The newest version!
package io.github.joselion.springr2dbcrelationships.processors;
import static java.util.function.Predicate.not;
import static org.springframework.data.relational.core.query.Criteria.where;
import static org.springframework.data.relational.core.query.Query.query;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Stream;
import org.eclipse.jdt.annotation.Nullable;
import org.springframework.context.ApplicationContext;
import org.springframework.data.r2dbc.core.R2dbcEntityTemplate;
import org.springframework.data.relational.core.sql.SqlIdentifier;
import io.github.joselion.springr2dbcrelationships.annotations.ManyToOne;
import io.github.joselion.springr2dbcrelationships.annotations.OneToMany;
import io.github.joselion.springr2dbcrelationships.exceptions.RelationshipException;
import io.github.joselion.springr2dbcrelationships.helpers.Commons;
import io.github.joselion.springr2dbcrelationships.helpers.Reflect;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.util.context.Context;
/**
* The {@link ManyToOne} annotation processor.
*
* @param template the r2dbc entity template
* @param entity the processed field entity
* @param table the processed field entity table
* @param context the Spring application context
*/
public record ManyToOneProcessor(
R2dbcEntityTemplate template,
Object entity,
SqlIdentifier table,
ApplicationContext context
) implements Processable {
@Override
public Mono
© 2015 - 2025 Weber Informatics LLC | Privacy Policy