197 lines
7.4 KiB
Java
197 lines
7.4 KiB
Java
|
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 ImgClassificationEventDao extends AppStatsDao implements Cloneable {
|
||
|
private static final String TAG = "ImgClassificationEventDao";
|
||
|
private static final String ro = "ClassificationEvent";
|
||
|
private static Integer rr;
|
||
|
private static Integer rs = 0;
|
||
|
private static final List<AppStatsDao.FieldTemplate> rt;
|
||
|
private String id;
|
||
|
private String rG = new String();
|
||
|
private long startTime = 0;
|
||
|
private long rZ = 0;
|
||
|
private String sa = new String();
|
||
|
private float sb = -5000.0f;
|
||
|
private String imageID = null;
|
||
|
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("StartTime", AppStatsDsFieldType.DS_FIELD_TYPE_DATE, AppStatsDbFieldType.DB_FIELD_TYPE_DATETIME, AppStatsDbFieldKeyType.DB_FIELD_NO_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("ClassificationResult", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_TEXT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
|
||
|
arrayList.add(new AppStatsDao.FieldTemplate("ClassificationConfidence", AppStatsDsFieldType.DS_FIELD_TYPE_FLOAT, AppStatsDbFieldType.DB_FIELD_TYPE_FLOAT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
|
||
|
arrayList.add(new AppStatsDao.FieldTemplate("ImageID", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_GUID, AppStatsDbFieldKeyType.DB_FIELD_FOREIGN_KEY));
|
||
|
arrayList.add(new AppStatsDao.FieldTemplate("SessionKey", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_TEXT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
|
||
|
}
|
||
|
|
||
|
public ImgClassificationEventDao() {
|
||
|
this.id = new String();
|
||
|
this.id = super.generateNewUniqueID();
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
protected Integer getAppStatsDaoObjSize() {
|
||
|
Integer num;
|
||
|
synchronized (this) {
|
||
|
num = rr;
|
||
|
}
|
||
|
return num;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
protected void setAppStatsDaoObjSize(Integer num) {
|
||
|
synchronized (this) {
|
||
|
rr = num;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
protected Integer getAppStatsDaoObjSizeInstCnt() {
|
||
|
Integer num;
|
||
|
synchronized (this) {
|
||
|
num = rs;
|
||
|
}
|
||
|
return num;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
protected void setAppStatsDaoObjSizeInstCnt(Integer num) {
|
||
|
synchronized (this) {
|
||
|
rs = num;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
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
|
||
|
/* renamed from: clone */
|
||
|
public ImgClassificationEventDao mo279clone() {
|
||
|
return (ImgClassificationEventDao) super.mo279clone();
|
||
|
}
|
||
|
|
||
|
@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.rZ)));
|
||
|
arrayList.add(String.valueOf(this.sa));
|
||
|
arrayList.add(Float.valueOf(this.sb));
|
||
|
arrayList.add(String.valueOf(this.imageID));
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
protected AppStatsDao createDaoSampleSizingObj() {
|
||
|
ImgClassificationEventDao imgClassificationEventDao = new ImgClassificationEventDao();
|
||
|
imgClassificationEventDao.id = UUID.randomUUID().toString();
|
||
|
imgClassificationEventDao.rG = UUID.randomUUID().toString();
|
||
|
imgClassificationEventDao.startTime = this.startTime;
|
||
|
imgClassificationEventDao.rZ = this.rZ;
|
||
|
imgClassificationEventDao.sa = new String(this.sa.getBytes());
|
||
|
imgClassificationEventDao.sb = this.sb;
|
||
|
imgClassificationEventDao.imageID = UUID.randomUUID().toString();
|
||
|
return imgClassificationEventDao;
|
||
|
}
|
||
|
|
||
|
public void setStopTime(long j) {
|
||
|
this.rZ = j;
|
||
|
}
|
||
|
|
||
|
public void setStartTime(long j) {
|
||
|
this.startTime = j;
|
||
|
}
|
||
|
|
||
|
public void setSessionKey(String str) {
|
||
|
this.oA = str;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
public void setInstanceId(String str) {
|
||
|
this.rG = str;
|
||
|
}
|
||
|
|
||
|
public void setImageID(String str) {
|
||
|
this.imageID = str;
|
||
|
}
|
||
|
|
||
|
public void setId(String str) {
|
||
|
this.id = str;
|
||
|
}
|
||
|
|
||
|
public void setClassificationResult(String str) {
|
||
|
this.sa = str;
|
||
|
}
|
||
|
|
||
|
public void setClassificationConfidence(float f) {
|
||
|
this.sb = f;
|
||
|
}
|
||
|
|
||
|
public long getStopTime() {
|
||
|
return this.rZ;
|
||
|
}
|
||
|
|
||
|
public long getStartTime() {
|
||
|
return this.startTime;
|
||
|
}
|
||
|
|
||
|
public String getSessionKey() {
|
||
|
return this.oA;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
public String getInstanceId() {
|
||
|
return this.rG;
|
||
|
}
|
||
|
|
||
|
public String getImageID() {
|
||
|
return this.imageID;
|
||
|
}
|
||
|
|
||
|
public String getId() {
|
||
|
return this.id;
|
||
|
}
|
||
|
|
||
|
public String getClassificationResult() {
|
||
|
return this.sa;
|
||
|
}
|
||
|
|
||
|
public float getClassificationConfidence() {
|
||
|
return this.sb;
|
||
|
}
|
||
|
}
|