content: package androidx.work.impl.model;
  
  import android.database.Cursor;
  import android.os.CancellationSignal;
  import androidx.room.EntityInsertionAdapter;
  import androidx.room.RoomDatabase;
  import androidx.room.RoomSQLiteQuery;
  import androidx.room.SharedSQLiteStatement;
  import androidx.room.util.DBUtil;
  import androidx.room.util.StringUtil;
  import androidx.sqlite.db.SupportSQLiteStatement;
  import androidx.work.Data;
  import java.util.ArrayList;
  import java.util.List;
  
  public final class WorkProgressDao_Impl implements WorkProgressDao {
      private final RoomDatabase __db;
      private final EntityInsertionAdapter<WorkProgress> __insertionAdapterOfWorkProgress;
      private final SharedSQLiteStatement __preparedStmtOfDelete;
      private final SharedSQLiteStatement __preparedStmtOfDeleteAll;
  
      public WorkProgressDao_Impl(RoomDatabase __db2) {
          this.__db = __db2;
          this.__insertionAdapterOfWorkProgress = new EntityInsertionAdapter<WorkProgress>(__db2) {
              public void bind(SupportSQLiteStatement stmt, WorkProgress value) {
                  if (value.mWorkSpecId == null) {
                      stmt.bindNull(1);
                  } else {
                      stmt.bindString(1, value.mWorkSpecId);
                  }
                  byte[] byteArrayInternal = Data.toByteArrayInternal(value.mProgress);
                  if (byteArrayInternal == null) {
                      stmt.bindNull(2);
                  } else {
                      stmt.bindBlob(2, byteArrayInternal);
                  }
              }
  
              public String createQuery() {
                  return "INSERT OR REPLACE INTO `WorkProgress` (`work_spec_id`,`progress`) VALUES (?,?)";
              }
          };
          this.__preparedStmtOfDelete = new SharedSQLiteStatement(__db2) {
              public String createQuery() {
                  return "DELETE from WorkProgress where work_spec_id=?";
              }
          };
          this.__preparedStmtOfDeleteAll = new SharedSQLiteStatement(__db2) {
              public String createQuery() {
                  return "DELETE FROM WorkProgress";
              }
          };
      }
  
      public void delete(String workSpecId) {
          this.__db.assertNotSuspendingTransaction();
          SupportSQLiteStatement acquire = this.__preparedStmtOfDelete.acquire();
          if (workSpecId == null) {
              acquire.bindNull(1);
          } else {
              acquire.bindString(1, workSpecId);
          }
          this.__db.beginTransaction();
          try {
              acquire.executeUpdateDelete();
              this.__db.setTransactionSuccessful();
          } finally {
              this.__db.endTransaction();
              this.__preparedStmtOfDelete.release(acquire);
          }
      }
  
      public void deleteAll() {
          this.__db.assertNotSuspendingTransaction();
          SupportSQLiteStatement acquire = this.__preparedStmtOfDeleteAll.acquire();
          this.__db.beginTransaction();
          try {
              acquire.executeUpdateDelete();
              this.__db.setTransactionSuccessful();
          } finally {
              this.__db.endTransaction();
              this.__preparedStmtOfDeleteAll.release(acquire);
          }
      }
  
      public Data getProgressForWorkSpecId(String workSpecId) {
          RoomSQLiteQuery acquire = RoomSQLiteQuery.acquire("SELECT progress FROM WorkProgress WHERE work_spec_id=?", 1);
          if (workSpecId == null) {
              acquire.bindNull(1);
          } else {
              acquire.bindString(1, workSpecId);
          }
          this.__db.assertNotSuspendingTransaction();
          Cursor query = DBUtil.query(this.__db, acquire, false, (CancellationSignal) null);
          try {
              return query.moveToFirst() ? Data.fromByteArray(query.getBlob(0)) : null;
          } finally {
              query.close();
              acquire.release();
          }
      }
  
      public List<Data> getProgressForWorkSpecIds(List<String> list) {
          StringBuilder newStringBuilder = StringUtil.newStringBuilder();
          newStringBuilder.append("SELECT progress FROM WorkProgress WHERE work_spec_id IN (");
          int size = list.size();
          StringUtil.appendPlaceholders(newStringBuilder, size);
          newStringBuilder.append(")");
          RoomSQLiteQuery acquire = RoomSQLiteQuery.acquire(newStringBuilder.toString(), size + 0);
          int i = 1;
          for (String next : list) {
              if (next == null) {
                  acquire.bindNull(i);
              } else {
                  acquire.bindString(i, next);
              }
              i++;
          }
          this.__db.assertNotSuspendingTransaction();
          Cursor query = DBUtil.query(this.__db, acquire, false, (CancellationSignal) null);
          try {
              ArrayList arrayList = new ArrayList(query.getCount());
              while (query.moveToNext()) {
                  arrayList.add(Data.fromByteArray(query.getBlob(0)));
              }
              return arrayList;
          } finally {
              query.close();
              acquire.release();
          }
      }
  
      public void insert(WorkProgress progress) {
          this.__db.assertNotSuspendingTransaction();
          this.__db.beginTransaction();
          try {
              this.__insertionAdapterOfWorkProgress.insert(progress);
              this.__db.setTransactionSuccessful();
          } finally {
              this.__db.endTransaction();
          }
      }
  }
  