Record Class DbAction.Insert<T>
java.lang.Object
java.lang.Record
org.springframework.data.relational.core.conversion.DbAction.Insert<T>
- Type Parameters:
T- type of the entity for which this represents a database interaction.
- All Implemented Interfaces:
DbAction<T>, DbAction.WithDependingOn<T>, DbAction.WithEntity<T>, DbAction.WithPropertyPath<T>
public static record DbAction.Insert<T>(T entity, PersistentPropertyPath<RelationalPersistentProperty> propertyPath, DbAction.WithEntity<?> dependingOn, Map<PersistentPropertyPath<RelationalPersistentProperty>, Object> qualifiers, IdValueSource idValueSource)
extends Record
implements DbAction.WithDependingOn<T>
Represents an insert statement for a single entity that is not the root of an aggregate.
- Author:
- Jens Schauder, Mark Paluch, Tyler Van Gorder, Myeonghyeon Lee, Chirag Tailor
-
Nested Class Summary
Nested classes/interfaces inherited from interface DbAction
DbAction.AcquireLockAllRoot<T>, DbAction.AcquireLockRoot<T>, DbAction.BatchDelete<T>, DbAction.BatchDeleteRoot<T>, DbAction.BatchInsert<T>, DbAction.BatchInsertRoot<T>, DbAction.BatchWithValue<T,A, B>, DbAction.Delete<T>, DbAction.DeleteAll<T>, DbAction.DeleteAllRoot<T>, DbAction.DeleteRoot<T>, DbAction.Insert<T>, DbAction.InsertRoot<T>, DbAction.UpdateRoot<T>, DbAction.WithDependingOn<T>, DbAction.WithEntity<T>, DbAction.WithPropertyPath<T>, DbAction.WithRoot<T> -
Constructor Summary
ConstructorsConstructorDescriptionInsert(T entity, PersistentPropertyPath<RelationalPersistentProperty> propertyPath, DbAction.WithEntity<?> dependingOn, Map<PersistentPropertyPath<RelationalPersistentProperty>, Object> qualifiers, IdValueSource idValueSource) Creates an instance of aInsertrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedependingOnrecord 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.Returns the value of theidValueSourcerecord component.Returns the value of thepropertyPathrecord component.Returns the value of thequalifiersrecord component.toString()Returns a string representation of this record class.Methods inherited from interface DbAction.WithDependingOn
getQualifier
-
Constructor Details
-
Insert
public Insert(T entity, PersistentPropertyPath<RelationalPersistentProperty> propertyPath, DbAction.WithEntity<?> dependingOn, Map<PersistentPropertyPath<RelationalPersistentProperty>, Object> qualifiers, IdValueSource idValueSource) Creates an instance of aInsertrecord class.- Parameters:
entity- the value for theentityrecord componentpropertyPath- the value for thepropertyPathrecord componentdependingOn- the value for thedependingOnrecord componentqualifiers- the value for thequalifiersrecord componentidValueSource- the value for theidValueSourcerecord component
-
-
Method Details
-
getEntityType
- Specified by:
getEntityTypein interfaceDbAction<T>- Specified by:
getEntityTypein interfaceDbAction.WithDependingOn<T>- Specified by:
getEntityTypein interfaceDbAction.WithEntity<T>- Specified by:
getEntityTypein interfaceDbAction.WithPropertyPath<T>
-
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). -
entity
Returns the value of theentityrecord component.- Specified by:
entityin interfaceDbAction.WithEntity<T>- Returns:
- the value of the
entityrecord component
-
propertyPath
Returns the value of thepropertyPathrecord component.- Specified by:
propertyPathin interfaceDbAction.WithPropertyPath<T>- Returns:
- the value of the
propertyPathrecord component
-
dependingOn
Returns the value of thedependingOnrecord component.- Specified by:
dependingOnin interfaceDbAction.WithDependingOn<T>- Returns:
- the value of the
dependingOnrecord component - See Also:
-
qualifiers
Returns the value of thequalifiersrecord component.- Specified by:
qualifiersin interfaceDbAction.WithDependingOn<T>- Returns:
- the value of the
qualifiersrecord component
-
idValueSource
Returns the value of theidValueSourcerecord component.- Specified by:
idValueSourcein interfaceDbAction.WithEntity<T>- Returns:
- the value of the
idValueSourcerecord component
-