package androidx.room; import androidx.exifinterface.media.ExifInterface; import androidx.sqlite.db.SupportSQLiteStatement; import java.util.Iterator; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; /* compiled from: EntityDeletionOrUpdateAdapter.kt */ @Metadata(d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u0011\n\u0000\n\u0002\u0010\u001c\n\u0000\b'\u0018\u0000*\u0004\b\u0000\u0010\u00012\u00020\u0002B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\u001d\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00028\u0000H$¢\u0006\u0002\u0010\u000bJ\b\u0010\f\u001a\u00020\rH$J\u0013\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\n\u001a\u00028\u0000¢\u0006\u0002\u0010\u0010J\u001b\u0010\u0011\u001a\u00020\u000f2\u000e\u0010\u0012\u001a\n\u0012\u0006\b\u0001\u0012\u00028\u00000\u0013¢\u0006\u0002\u0010\u0014J\u0014\u0010\u0011\u001a\u00020\u000f2\f\u0010\u0012\u001a\b\u0012\u0004\u0012\u00028\u00000\u0015¨\u0006\u0016"}, d2 = {"Landroidx/room/EntityDeletionOrUpdateAdapter;", ExifInterface.GPS_DIRECTION_TRUE, "Landroidx/room/SharedSQLiteStatement;", "database", "Landroidx/room/RoomDatabase;", "(Landroidx/room/RoomDatabase;)V", "bind", "", "statement", "Landroidx/sqlite/db/SupportSQLiteStatement;", "entity", "(Landroidx/sqlite/db/SupportSQLiteStatement;Ljava/lang/Object;)V", "createQuery", "", "handle", "", "(Ljava/lang/Object;)I", "handleMultiple", "entities", "", "([Ljava/lang/Object;)I", "", "room-runtime_release"}, k = 1, mv = {1, 7, 1}, xi = 48) /* loaded from: classes2.dex */ public abstract class EntityDeletionOrUpdateAdapter extends SharedSQLiteStatement { protected abstract void bind(SupportSQLiteStatement statement, T entity); @Override // androidx.room.SharedSQLiteStatement protected abstract String createQuery(); /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public EntityDeletionOrUpdateAdapter(RoomDatabase database) { super(database); Intrinsics.checkNotNullParameter(database, "database"); } public final int handle(T entity) { SupportSQLiteStatement acquire = acquire(); try { bind(acquire, entity); return acquire.executeUpdateDelete(); } finally { release(acquire); } } public final int handleMultiple(Iterable entities) { Intrinsics.checkNotNullParameter(entities, "entities"); SupportSQLiteStatement acquire = acquire(); try { Iterator it = entities.iterator(); int i = 0; while (it.hasNext()) { bind(acquire, it.next()); i += acquire.executeUpdateDelete(); } return i; } finally { release(acquire); } } public final int handleMultiple(T[] entities) { Intrinsics.checkNotNullParameter(entities, "entities"); SupportSQLiteStatement acquire = acquire(); try { int i = 0; for (T t : entities) { bind(acquire, t); i += acquire.executeUpdateDelete(); } return i; } finally { release(acquire); } } }