138 lines
5.0 KiB
Java
138 lines
5.0 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 java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import java.util.UUID;
|
||
|
|
||
|
/* loaded from: classes3.dex */
|
||
|
public class DocumentEventDao extends AppStatsDao {
|
||
|
private static final String TAG = "DocumentEventDao";
|
||
|
private static final String ro = "Document";
|
||
|
private static Integer rr;
|
||
|
private static Integer rs = 0;
|
||
|
private static final List<AppStatsDao.FieldTemplate> rt;
|
||
|
private String id = new String();
|
||
|
private String rp = new String();
|
||
|
private Long rq = null;
|
||
|
private String oA = null;
|
||
|
private String documentType = 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("SessionKey", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_TEXT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
|
||
|
arrayList.add(new AppStatsDao.FieldTemplate("CreationTime", AppStatsDsFieldType.DS_FIELD_TYPE_DATE, AppStatsDbFieldType.DB_FIELD_TYPE_DATETIME, AppStatsDbFieldKeyType.DB_FIELD_NO_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("DocumentType", AppStatsDsFieldType.DS_FIELD_TYPE_STRING, AppStatsDbFieldType.DB_FIELD_TYPE_TEXT, AppStatsDbFieldKeyType.DB_FIELD_NO_KEY));
|
||
|
}
|
||
|
|
||
|
@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 arrayList2 = new ArrayList();
|
||
|
arrayList2.add(this.id);
|
||
|
arrayList2.add(this.oA);
|
||
|
arrayList2.add(dateStringFromEventTime(this.rq.longValue()));
|
||
|
arrayList2.add(this.rp);
|
||
|
arrayList2.add(this.documentType);
|
||
|
arrayList.add(createInsertStatement(ro, rt, arrayList2, sQLiteDatabase));
|
||
|
return arrayList;
|
||
|
}
|
||
|
|
||
|
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() {
|
||
|
DocumentEventDao documentEventDao = new DocumentEventDao();
|
||
|
documentEventDao.id = UUID.randomUUID().toString();
|
||
|
documentEventDao.rp = UUID.randomUUID().toString();
|
||
|
documentEventDao.oA = new String(this.oA.getBytes());
|
||
|
documentEventDao.documentType = new String(this.documentType.getBytes());
|
||
|
documentEventDao.rq = this.rq;
|
||
|
return documentEventDao;
|
||
|
}
|
||
|
|
||
|
public void setSessionKey(String str) {
|
||
|
this.oA = str;
|
||
|
}
|
||
|
|
||
|
public void setId(String str) {
|
||
|
this.id = str;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
public void setEnvironmentId(String str) {
|
||
|
this.rp = str;
|
||
|
}
|
||
|
|
||
|
public void setDocumentType(String str) {
|
||
|
this.documentType = str;
|
||
|
}
|
||
|
|
||
|
public void setCreationTime(Long l) {
|
||
|
this.rq = l;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
protected void setAppStatsDaoObjSize(Integer num) {
|
||
|
rr = num;
|
||
|
}
|
||
|
|
||
|
public String getSessionKey() {
|
||
|
return this.oA;
|
||
|
}
|
||
|
|
||
|
public String getId() {
|
||
|
return this.id;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
public String getEnvironmentId() {
|
||
|
return this.rp;
|
||
|
}
|
||
|
|
||
|
public String getDocumentType() {
|
||
|
return this.documentType;
|
||
|
}
|
||
|
|
||
|
public Long getCreationTime() {
|
||
|
return this.rq;
|
||
|
}
|
||
|
|
||
|
@Override // com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao
|
||
|
protected Integer getAppStatsDaoObjSize() {
|
||
|
return rr;
|
||
|
}
|
||
|
}
|