169 lines
6.1 KiB
Java
169 lines
6.1 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.mobile.sdk._internal.impl.extraction.kta.g;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class SessEventDao extends AppStatsDao {
|
|
private static final String TAG = "SessEventDao";
|
|
private static final String ro = "SessionEvent";
|
|
private static Integer rr;
|
|
private static Integer rs = 0;
|
|
private static final List<AppStatsDao.FieldTemplate> rt;
|
|
private String id;
|
|
private String response;
|
|
private String type;
|
|
private String rp = new String();
|
|
private String oA = null;
|
|
private String category = "";
|
|
private Long se = 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("EnvironmentID", 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));
|
|
arrayList.add(new AppStatsDao.FieldTemplate("Category", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_TEXT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
|
|
arrayList.add(new AppStatsDao.FieldTemplate(g.JN, AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_TEXT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
|
|
arrayList.add(new AppStatsDao.FieldTemplate("EventTime", AppStatsDsFieldType.DS_FIELD_TYPE_DATE, AppStatsDbFieldType.DB_FIELD_TYPE_DATETIME, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
|
|
arrayList.add(new AppStatsDao.FieldTemplate("Response", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_TEXT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
|
|
arrayList.add(new AppStatsDao.FieldTemplate("DocumentID", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_GUID, AppStatsDbFieldKeyType.DB_FIELD_FOREIGN_KEY));
|
|
}
|
|
|
|
public SessEventDao() {
|
|
this.id = new String();
|
|
this.id = super.generateNewUniqueID();
|
|
}
|
|
|
|
@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;
|
|
}
|
|
}
|
|
|
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
|
public List<SQLiteStatement> getWriteToDbStatements(SQLiteDatabase sQLiteDatabase) {
|
|
ArrayList arrayList = new ArrayList();
|
|
arrayList.add(this.id);
|
|
arrayList.add(this.rp);
|
|
arrayList.add(this.oA);
|
|
arrayList.add(this.category);
|
|
arrayList.add(this.type);
|
|
arrayList.add(dateStringFromEventTime(this.se.longValue()));
|
|
arrayList.add(this.response);
|
|
arrayList.add("");
|
|
ArrayList arrayList2 = new ArrayList();
|
|
arrayList2.add(createInsertStatement(ro, rt, arrayList, sQLiteDatabase));
|
|
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() {
|
|
SessEventDao sessEventDao = new SessEventDao();
|
|
sessEventDao.id = UUID.randomUUID().toString();
|
|
sessEventDao.rp = UUID.randomUUID().toString();
|
|
sessEventDao.oA = new String(this.oA.getBytes());
|
|
sessEventDao.se = this.se;
|
|
sessEventDao.type = new String(this.type.getBytes());
|
|
sessEventDao.response = new String(this.response.getBytes());
|
|
return sessEventDao;
|
|
}
|
|
|
|
public void setType(String str) {
|
|
this.type = str;
|
|
}
|
|
|
|
public void setSessionKey(String str) {
|
|
this.oA = str;
|
|
}
|
|
|
|
public void setResponse(String str) {
|
|
this.response = str;
|
|
}
|
|
|
|
public void setId(String str) {
|
|
this.id = str;
|
|
}
|
|
|
|
public void setEventTime(Long l) {
|
|
this.se = l;
|
|
}
|
|
|
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
|
public void setEnvironmentId(String str) {
|
|
this.rp = str;
|
|
}
|
|
|
|
public void setCategory(String str) {
|
|
this.category = str;
|
|
}
|
|
|
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
|
protected void setAppStatsDaoObjSize(Integer num) {
|
|
rr = num;
|
|
}
|
|
|
|
public String getType() {
|
|
return this.type;
|
|
}
|
|
|
|
public String getSessionKey() {
|
|
return this.oA;
|
|
}
|
|
|
|
public String getResponse() {
|
|
return this.response;
|
|
}
|
|
|
|
public String getId() {
|
|
return this.id;
|
|
}
|
|
|
|
public Long getEventTime() {
|
|
return this.se;
|
|
}
|
|
|
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
|
public String getEnvironmentId() {
|
|
return this.rp;
|
|
}
|
|
|
|
public String getCategory() {
|
|
return this.category;
|
|
}
|
|
|
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
|
protected Integer getAppStatsDaoObjSize() {
|
|
return rr;
|
|
}
|
|
}
|