what-the-bank/sources/com/kofax/kmc/kut/utilities/appstats/dao/ImageProcessEventDao.java

191 lines
7.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.kmc.kut.utilities.appstats.dao;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;
import com.kofax.kmc.kut.utilities.appstats.AppStatsDsExportHandler;
import com.kofax.kmc.kut.utilities.appstats.AppStatsSqLiteDs;
import com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao;
import com.kofax.kmc.kut.utilities.appstats.type.AppStatsDbFieldKeyType;
import com.kofax.kmc.kut.utilities.appstats.type.AppStatsDbFieldType;
import com.kofax.kmc.kut.utilities.appstats.type.AppStatsDsFieldType;
import com.kofax.kmc.kut.utilities.appstats.type.AppStatsDsOpType;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/* loaded from: classes3.dex */
public class ImageProcessEventDao extends AppStatsDao implements Cloneable {
private static final String TAG = "ImageProcessEventDao";
private static final String ro = "ImageProcessorEvent";
private static Integer rr;
private static Integer rs = 0;
private static final List<AppStatsDao.FieldTemplate> rt;
String id;
private long rR;
int resultCode;
private long startTime;
private String rG = new String();
String rS = new String();
String rT = new String();
String rU = new String();
private String oA = null;
static {
ArrayList arrayList = new ArrayList();
rt = arrayList;
arrayList.add(new AppStatsDao.FieldTemplate("ID", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_GUID, AppStatsDbFieldKeyType.DB_FIELD_PRIMARY_KEY));
arrayList.add(new AppStatsDao.FieldTemplate("InstanceID", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_GUID, AppStatsDbFieldKeyType.DB_FIELD_FOREIGN_KEY));
arrayList.add(new AppStatsDao.FieldTemplate("StopTime", AppStatsDsFieldType.DS_FIELD_TYPE_DATE, AppStatsDbFieldType.DB_FIELD_TYPE_DATETIME, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
arrayList.add(new AppStatsDao.FieldTemplate("StartTime", AppStatsDsFieldType.DS_FIELD_TYPE_DATE, AppStatsDbFieldType.DB_FIELD_TYPE_DATETIME, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
arrayList.add(new AppStatsDao.FieldTemplate("ResultCode", AppStatsDsFieldType.DS_FIELD_TYPE_INTEGER, AppStatsDbFieldType.DB_FIELD_TYPE_INTEGER, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
arrayList.add(new AppStatsDao.FieldTemplate("ProcessingProfile", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_TEXT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
arrayList.add(new AppStatsDao.FieldTemplate("SourceImageID", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_GUID, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
arrayList.add(new AppStatsDao.FieldTemplate("ProcessedImageID", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_GUID, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
arrayList.add(new AppStatsDao.FieldTemplate("SessionKey", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_TEXT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
}
public ImageProcessEventDao() {
this.id = new String();
this.id = super.generateNewUniqueID();
}
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
public List<SQLiteStatement> getWriteToDbStatements(SQLiteDatabase sQLiteDatabase) {
SQLiteStatement createInsertStatement;
ArrayList arrayList = new ArrayList();
arrayList.add(String.valueOf(this.id));
arrayList.add(String.valueOf(this.rG));
arrayList.add(String.valueOf(dateStringFromEventTime(this.startTime)));
arrayList.add(String.valueOf(dateStringFromEventTime(this.rR)));
arrayList.add(Integer.valueOf(this.resultCode));
arrayList.add(String.valueOf(this.rS));
arrayList.add(String.valueOf(this.rT));
arrayList.add(String.valueOf(this.rU));
arrayList.add(String.valueOf(this.oA));
if (this.dsOperation == AppStatsDsOpType.APP_STATS_DS_UPDATE) {
createInsertStatement = createUpdateStatement(ro, this.id, rt, arrayList, sQLiteDatabase);
} else {
createInsertStatement = createInsertStatement(ro, rt, arrayList, sQLiteDatabase);
}
ArrayList arrayList2 = new ArrayList();
arrayList2.add(createInsertStatement);
return arrayList2;
}
public static long countRows() {
return AppStatsSqLiteDs.getInstance().countrows(ro);
}
public static void export(String str, AppStatsDsExportHandler appStatsDsExportHandler) {
export(str, appStatsDsExportHandler, ro, rt);
}
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
protected AppStatsDao createDaoSampleSizingObj() {
ImageProcessEventDao imageProcessEventDao = new ImageProcessEventDao();
imageProcessEventDao.id = UUID.randomUUID().toString();
imageProcessEventDao.rG = UUID.randomUUID().toString();
imageProcessEventDao.startTime = this.startTime;
imageProcessEventDao.rR = this.rR;
imageProcessEventDao.rU = this.rU;
imageProcessEventDao.rT = this.rT;
imageProcessEventDao.rS = this.rS;
imageProcessEventDao.resultCode = this.resultCode;
return imageProcessEventDao;
}
public void setStartTime(long j) {
this.startTime = j;
}
public void setSourceImage(String str) {
this.rT = str;
}
public void setSessionKey(String str) {
this.oA = str;
}
public void setResultCode(int i) {
this.resultCode = i;
}
public void setProcessingProfile(String str) {
this.rS = str;
}
public void setProcessedImage(String str) {
this.rU = str;
}
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
public void setInstanceId(String str) {
this.rG = str;
}
public void setId(String str) {
this.id = str;
}
public void setEndTime(long j) {
this.rR = j;
}
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
protected void setAppStatsDaoObjSizeInstCnt(Integer num) {
rs = num;
}
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
protected void setAppStatsDaoObjSize(Integer num) {
rr = num;
}
public long getStartTime() {
return this.startTime;
}
public String getSourceImage() {
return this.rT;
}
public String getSessionKey() {
return this.oA;
}
public int getResultCode() {
return this.resultCode;
}
public String getProcessingProfile() {
return this.rS;
}
public String getProcessedImage() {
return this.rU;
}
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
public String getInstanceId() {
return this.rG;
}
public String getId() {
return this.id;
}
public long getEndTime() {
return this.rR;
}
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
protected Integer getAppStatsDaoObjSizeInstCnt() {
return rs;
}
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
protected Integer getAppStatsDaoObjSize() {
return rr;
}
}