/*
 * QQQ - Low-code Application Framework for Engineers.
 * Copyright (C) 2021-2022.  Kingsrook, LLC
 * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
 * contact@kingsrook.com
 * https://github.com/Kingsrook/
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package com.kingsrook.qqq.backend.core.model.actions.tables.insert;


import java.util.List;
import com.kingsrook.qqq.backend.core.actions.QBackendTransaction;
import com.kingsrook.qqq.backend.core.model.actions.AbstractTableActionInput;
import com.kingsrook.qqq.backend.core.model.data.QRecord;


/*******************************************************************************
 ** Input data for the Insert action
 **
 *******************************************************************************/
public class InsertInput extends AbstractTableActionInput
{
   private QBackendTransaction transaction;
   private List<QRecord>       records;

   private boolean skipUniqueKeyCheck = false;



   /*******************************************************************************
    **
    *******************************************************************************/
   public InsertInput()
   {
   }



   /*******************************************************************************
    ** Getter for transaction
    **
    *******************************************************************************/
   public QBackendTransaction getTransaction()
   {
      return transaction;
   }



   /*******************************************************************************
    ** Setter for transaction
    **
    *******************************************************************************/
   public void setTransaction(QBackendTransaction transaction)
   {
      this.transaction = transaction;
   }



   /*******************************************************************************
    ** Fluent setter for transaction
    **
    *******************************************************************************/
   public InsertInput withTransaction(QBackendTransaction transaction)
   {
      this.transaction = transaction;
      return (this);
   }



   /*******************************************************************************
    ** Getter for records
    **
    *******************************************************************************/
   public List<QRecord> getRecords()
   {
      return records;
   }



   /*******************************************************************************
    ** Setter for records
    **
    *******************************************************************************/
   public void setRecords(List<QRecord> records)
   {
      this.records = records;
   }



   /*******************************************************************************
    ** Getter for skipUniqueKeyCheck
    **
    *******************************************************************************/
   public boolean getSkipUniqueKeyCheck()
   {
      return skipUniqueKeyCheck;
   }



   /*******************************************************************************
    ** Setter for skipUniqueKeyCheck
    **
    *******************************************************************************/
   public void setSkipUniqueKeyCheck(boolean skipUniqueKeyCheck)
   {
      this.skipUniqueKeyCheck = skipUniqueKeyCheck;
   }



   /*******************************************************************************
    ** Fluent setter for skipUniqueKeyCheck
    **
    *******************************************************************************/
   public InsertInput withSkipUniqueKeyCheck(boolean skipUniqueKeyCheck)
   {
      this.skipUniqueKeyCheck = skipUniqueKeyCheck;
      return (this);
   }

}
