java.lang.Object
java.lang.Record
org.litebridge.orm.persistence.ManualUpsert
- All Implemented Interfaces:
StatementBuilder
public record ManualUpsert(org.litebridge.orm.persistence.UpdateBuilder updateBuilder, org.litebridge.orm.persistence.InsertBuilder insertBuilder)
extends Record
implements StatementBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionManualUpsert(org.litebridge.orm.persistence.UpdateBuilder updateBuilder, org.litebridge.orm.persistence.InsertBuilder insertBuilder) Creates an instance of aManualUpsertrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the final SQL statement.createUpdateMetaData(PreparedOperation preparedOperation) Creates the update metadata for the statement.dto()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.litebridge.orm.persistence.InsertBuilderReturns the value of theinsertBuilderrecord component.node()Returns the current query node.intnodeHash()Returns a cached copy of the AST node hash.voidSets a field value on the statement.Returns the chain of statements built so far.final StringtoString()Returns a string representation of this record class.org.litebridge.orm.persistence.UpdateBuilderReturns the value of theupdateBuilderrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.litebridge.orm.persistence.StatementBuilder
combinable, combineWith, resultType
-
Constructor Details
-
ManualUpsert
public ManualUpsert(org.litebridge.orm.persistence.UpdateBuilder updateBuilder, org.litebridge.orm.persistence.InsertBuilder insertBuilder) Creates an instance of aManualUpsertrecord class.- Parameters:
updateBuilder- the value for theupdateBuilderrecord componentinsertBuilder- the value for theinsertBuilderrecord component
-
-
Method Details
-
dto
- Specified by:
dtoin interfaceStatementBuilder
-
node
Description copied from interface:StatementBuilderReturns the current query node.- Specified by:
nodein interfaceStatementBuilder- Returns:
- the query node
-
nodeHash
public int nodeHash()Description copied from interface:StatementBuilderReturns a cached copy of the AST node hash.- Specified by:
nodeHashin interfaceStatementBuilder- Returns:
- the cached AST node hash
-
statementChain
Description copied from interface:StatementBuilderReturns the chain of statements built so far.- Specified by:
statementChainin interfaceStatementBuilder- Returns:
- The statement chain.
-
createUpdateMetaData
Description copied from interface:StatementBuilderCreates the update metadata for the statement.- Specified by:
createUpdateMetaDatain interfaceStatementBuilder- Parameters:
preparedOperation- the prepared database operation- Returns:
- the update metadata
-
setField
Description copied from interface:StatementBuilderSets a field value on the statement.- Specified by:
setFieldin interfaceStatementBuilder- Parameters:
fieldName- the name of the field to setvalue- the value to set
-
build
Description copied from interface:StatementBuilderBuilds the final SQL statement.- Specified by:
buildin interfaceStatementBuilder- Returns:
- The built statement.
-
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). -
updateBuilder
public org.litebridge.orm.persistence.UpdateBuilder updateBuilder()Returns the value of theupdateBuilderrecord component.- Returns:
- the value of the
updateBuilderrecord component
-
insertBuilder
public org.litebridge.orm.persistence.InsertBuilder insertBuilder()Returns the value of theinsertBuilderrecord component.- Returns:
- the value of the
insertBuilderrecord component
-