package com.bytedance.ug.sdk.poi.cache.db;

import X.0BT;
import X.0BV;
import X.0BW;
import X.0BY;
import X.0Fe;
import X.0Fh;
import X.0Fk;
import X.0Fo;
import X.0Fw;
import X.0G9;
import X.1DC;
import X.C1444RiC;
import X.PoR;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import java.util.HashMap;
import java.util.HashSet;

public final class PoiDatabase_Impl extends PoiDatabase {
    public volatile PoR LJIIL;

    static {
        Covode.recordClassIndex(39688);
    }

    public final 0Fw LIZ() {
        return new 0Fw(this, new HashMap(0), new HashMap(0), new String[]{"ug_poi_data"});
    }

    public final PoR LJIIIIZZ() {
        PoR poR;
        MethodCollector.i(9259);
        if (this.LJIIL != null) {
            PoR poR2 = this.LJIIL;
            MethodCollector.o(9259);
            return poR2;
        }
        synchronized (this) {
            try {
                if (this.LJIIL == null) {
                    this.LJIIL = new C1444RiC(this);
                }
                poR = this.LJIIL;
            } finally {
                MethodCollector.o(9259);
            }
        }
        return poR;
    }

    public final 0BY LIZIZ(0Fe r5) {
        1DC r3 = new 1DC(r5, new 0G9() {
            static {
                Covode.recordClassIndex(39689);
            }

            public final void LIZ() {
                if (PoiDatabase_Impl.this.LJI != null) {
                    int size = PoiDatabase_Impl.this.LJI.size();
                    for (int i = 0; i < size; i++) {
                        PoiDatabase_Impl.this.LJI.get(i);
                    }
                }
            }

            public final void LJFF(0BT r1) {
                0Fh.LIZ(r1);
            }

            public final void LIZ(0BT r2) {
                r2.LIZJ("DROP TABLE IF EXISTS `ug_poi_data`");
            }

            public final void LIZIZ(0BT r2) {
                r2.LIZJ("CREATE TABLE IF NOT EXISTS `ug_poi_data` (`poi_cache_key` TEXT NOT NULL, `search_result` TEXT, `create_time` INTEGER NOT NULL, PRIMARY KEY(`poi_cache_key`))");
                r2.LIZJ("CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)");
                r2.LIZJ("INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'b3fb7ee6f71e47806eb55724caf04143')");
            }

            public final void LIZJ(0BT r4) {
                PoiDatabase_Impl.this.LIZ = r4;
                PoiDatabase_Impl.this.LIZ(r4);
                if (PoiDatabase_Impl.this.LJI != null) {
                    int size = PoiDatabase_Impl.this.LJI.size();
                    for (int i = 0; i < size; i++) {
                        PoiDatabase_Impl.this.LJI.get(i);
                    }
                }
            }

            public final void LIZLLL(0BT r7) {
                HashMap hashMap = new HashMap(3);
                hashMap.put("poi_cache_key", new 0Fk("poi_cache_key", "TEXT", true, 1));
                hashMap.put("search_result", new 0Fk("search_result", "TEXT", false, 0));
                hashMap.put("create_time", new 0Fk("create_time", "INTEGER", true, 0));
                0Fo r4 = new 0Fo("ug_poi_data", hashMap, new HashSet(0), new HashSet(0));
                0Fo LIZ = 0Fo.LIZ(r7, "ug_poi_data");
                if (!r4.equals(LIZ)) {
                    throw new IllegalStateException("Migration didn't properly handle ug_poi_data(com.bytedance.ug.sdk.poi.cache.db.entity.PoiCacheEntity).\n Expected:\n" + r4 + "\n Found:\n" + LIZ);
                }
            }
        }, "b3fb7ee6f71e47806eb55724caf04143", "5242769faef6a2fdcff1f7ce3f7bdeed");
        0BV LIZ = 0BW.LIZ(r5.LIZIZ);
        LIZ.LIZIZ = r5.LIZJ;
        LIZ.LIZJ = r3;
        return r5.LIZ.LIZ(LIZ.LIZ());
    }
}
