Record Class ManyToManyProcessor
java.lang.Object
java.lang.Record
io.github.joselion.springr2dbcrelationships.processors.ManyToManyProcessor
- Record Components:
template- the r2dbc entity templateentity- the processed field entitytable- the processed field entity tablecontext- the Spring application context
- All Implemented Interfaces:
Processable<ManyToMany,List<?>>
public record ManyToManyProcessor(org.springframework.data.r2dbc.core.R2dbcEntityTemplate template, Object entity, org.springframework.data.relational.core.sql.SqlIdentifier table, org.springframework.context.ApplicationContext context)
extends Record
implements Processable<ManyToMany,List<?>>
The
OneToMany annotation processor.-
Constructor Summary
ConstructorsConstructorDescriptionManyToManyProcessor(org.springframework.data.r2dbc.core.R2dbcEntityTemplate template, Object entity, org.springframework.data.relational.core.sql.SqlIdentifier table, org.springframework.context.ApplicationContext context) Creates an instance of aManyToManyProcessorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.context.ApplicationContextcontext()Returns the value of thecontextrecord component.entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reactor.core.publisher.Mono<List<?>> persist(ManyToMany annotation, Field field) Persists the value of a field annotated with a relationship annotation.reactor.core.publisher.Mono<List<?>> populate(ManyToMany annotation, Field field) Returns aMonocontaining the value used to populate a field annotated with a relationship annotation.org.springframework.data.relational.core.sql.SqlIdentifiertable()Returns the value of thetablerecord component.org.springframework.data.r2dbc.core.R2dbcEntityTemplatetemplate()Returns the value of thetemplaterecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.joselion.springr2dbcrelationships.processors.Processable
columnNameOf, columnNameOrNull, createdColumnOf, createdColumnOf, domainFor, idColumnOf, idValueOf, inferForeignField, inferForeignField, isNew, persist, populate, save, tableIdentifierOf, tableNameOf
-
Constructor Details
-
ManyToManyProcessor
public ManyToManyProcessor(org.springframework.data.r2dbc.core.R2dbcEntityTemplate template, Object entity, org.springframework.data.relational.core.sql.SqlIdentifier table, org.springframework.context.ApplicationContext context) Creates an instance of aManyToManyProcessorrecord class.
-
-
Method Details
-
populate
Description copied from interface:ProcessableReturns aMonocontaining the value used to populate a field annotated with a relationship annotation.- Specified by:
populatein interfaceProcessable<ManyToMany,List<?>> - Parameters:
annotation- the field's annotation instancefield- the field to be populated- Returns:
- a publisher containing the value to populate
-
persist
Description copied from interface:ProcessablePersists the value of a field annotated with a relationship annotation. Then returns aMonocontaining the result of the operation.- Specified by:
persistin interfaceProcessable<ManyToMany,List<?>> - Parameters:
annotation- the field's annotation instancefield- the field to be persisted- Returns:
- a publisher containing the value os the persist operation
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
template
public org.springframework.data.r2dbc.core.R2dbcEntityTemplate template()Returns the value of thetemplaterecord component.- Specified by:
templatein interfaceProcessable<ManyToMany,List<?>> - Returns:
- the value of the
templaterecord component
-
entity
Returns the value of theentityrecord component.- Specified by:
entityin interfaceProcessable<ManyToMany,List<?>> - Returns:
- the value of the
entityrecord component
-
table
public org.springframework.data.relational.core.sql.SqlIdentifier table()Returns the value of thetablerecord component.- Specified by:
tablein interfaceProcessable<ManyToMany,List<?>> - Returns:
- the value of the
tablerecord component
-
context
public org.springframework.context.ApplicationContext context()Returns the value of thecontextrecord component.- Specified by:
contextin interfaceProcessable<ManyToMany,List<?>> - Returns:
- the value of the
contextrecord component
-