Record Class DbAction.DeleteRoot<T>
java.lang.Object
java.lang.Record
org.springframework.data.relational.core.conversion.DbAction.DeleteRoot<T>
- Type Parameters:
T- type of the entity for which this represents a database interaction.
- All Implemented Interfaces:
DbAction<T>
public static record DbAction.DeleteRoot<T>(Object id, Class<T> getEntityType, @Nullable Number previousVersion)
extends Record
implements DbAction<T>
Represents a delete statement for a aggregate root when only the ID is known.
Note that deletes for contained entities that reference the root are to be represented by separate
DbActions.
- 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
ConstructorsConstructorDescriptionDeleteRoot(Object id, Class<T> getEntityType, @Nullable Number previousVersion) Creates an instance of aDeleteRootrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegetEntityTyperecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.@Nullable NumberReturns the value of thepreviousVersionrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
DeleteRoot
Creates an instance of aDeleteRootrecord class.- Parameters:
id- the value for theidrecord componentgetEntityType- the value for thegetEntityTyperecord componentpreviousVersion- the value for thepreviousVersionrecord component
-
-
Method Details
-
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
getEntityType
Returns the value of thegetEntityTyperecord component.- Specified by:
getEntityTypein interfaceDbAction<T>- Returns:
- the value of the
getEntityTyperecord component
-
previousVersion
Returns the value of thepreviousVersionrecord component.- Returns:
- the value of the
previousVersionrecord component
-