java.lang.Object
java.lang.Record
org.litebridge.orm.engine.ast.UpdateNode
- Record Components:
dtoClass- Mapped DTO class to update.contextDtoClass- The parent/context of the mapped DTO class.table- the table to update
- All Implemented Interfaces:
QueryNode
public record UpdateNode(@Nullable Class<?> dtoClass, @Nullable Class<?> contextDtoClass, @Nullable String table)
extends Record
implements QueryNode
Represents an UPDATE statement in the query AST.
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateNode(@Nullable Class<?> dtoClass, @Nullable Class<?> contextDtoClass, @Nullable String table) Creates an instance of aUpdateNoderecord class.UpdateNode(Class<?> dtoClass, @Nullable Class<?> contextDtoClass) Creates anUpdateNodefor updating a mapped DTO class.UpdateNode(String table) Creates anUpdateNodefor updating a table directly. -
Method Summary
Modifier and TypeMethodDescription@Nullable Class<?> Returns the value of thecontextDtoClassrecord component.@Nullable Class<?> dtoClass()Returns the value of thedtoClassrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable QueryNodeprevious()Returns the previous node in the chain, ornullif this is the root node.@Nullable Stringtable()Returns the value of thetablerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UpdateNode
Creates anUpdateNodefor updating a mapped DTO class.- Parameters:
dtoClass- Mapped DTO class to update.contextDtoClass- The parent/context of the mapped DTO class.
-
UpdateNode
Creates anUpdateNodefor updating a table directly.- Parameters:
table- Name of the table to update.
-
UpdateNode
public UpdateNode(@Nullable Class<?> dtoClass, @Nullable Class<?> contextDtoClass, @Nullable String table) Creates an instance of aUpdateNoderecord class.- Parameters:
dtoClass- the value for thedtoClassrecord componentcontextDtoClass- the value for thecontextDtoClassrecord componenttable- the value for thetablerecord component
-
-
Method Details
-
previous
Description copied from interface:QueryNodeReturns the previous node in the chain, ornullif this is the root node. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
dtoClass
Returns the value of thedtoClassrecord component.- Returns:
- the value of the
dtoClassrecord component
-
contextDtoClass
Returns the value of thecontextDtoClassrecord component.- Returns:
- the value of the
contextDtoClassrecord component
-
table
Returns the value of thetablerecord component.- Returns:
- the value of the
tablerecord component
-