Class DtoMergeInsertStep

java.lang.Object
org.litebridge.orm.api.merge.MergeInsertStep
org.litebridge.orm.api.merge.DtoMergeInsertStep

public final class DtoMergeInsertStep extends MergeInsertStep
DTO-mode merge step for setting up WHEN NOT MATCHED INSERT clause.
  • Constructor Details

    • DtoMergeInsertStep

      public DtoMergeInsertStep(String table, LitebridgeContext litebridgeContext)
      Creates a new DtoMergeInsertStep instance.
      Parameters:
      table - name of the table to insert data into
      litebridgeContext - the Litebridge context
  • Method Details

    • insert

      public MergeTerminal insert(Object dto)
      Creates a WHEN NOT MATCHED INSERT clause inserting the specified DTO/entity.
      Parameters:
      dto - the DTO/entity to insert
      Returns:
      the insert clause terminal
    • insert

      public InsertValuesStep insert(String... fields)
      Creates a WHEN NOT MATCHED INSERT clause inserting values into the specified DTO/entity fields.
      Overrides:
      insert in class MergeInsertStep
      Parameters:
      fields - the DTO/entity fields to insert
      Returns:
      step to specify the values to insert
    • insert

      public InsertValuesStep insert(Iterable<String> fields)
      Creates a WHEN NOT MATCHED INSERT clause inserting values into the specified DTO/entity fields.
      Overrides:
      insert in class MergeInsertStep
      Parameters:
      fields - the DTO/entity fields to insert
      Returns:
      step to specify the values to insert