add project adins

This commit is contained in:
Alfrid Sanjaya Leo Putra 2024-07-25 14:44:22 +07:00
commit f8f85d679d
5299 changed files with 625430 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,146 @@
package com.adins.mss.dao;
import android.database.Cursor;
import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.Property;
import de.greenrobot.dao.internal.DaoConfig;
import de.greenrobot.dao.database.Database;
import de.greenrobot.dao.database.DatabaseStatement;
import com.adins.mss.dao.Sync;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "MS_SYNC".
*/
public class SyncDao extends AbstractDao<Sync, String> {
public static final String TABLENAME = "MS_SYNC";
/**
* Properties of entity Sync.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property Uuid_sync = new Property(0, String.class, "uuid_sync", true, "UUID_SYNC");
public final static Property Tabel_name = new Property(1, String.class, "tabel_name", false, "TABEL_NAME");
public final static Property Lov_group = new Property(2, String.class, "lov_group", false, "LOV_GROUP");
public final static Property Dtm_upd = new Property(3, java.util.Date.class, "dtm_upd", false, "DTM_UPD");
public final static Property Flag = new Property(4, Integer.class, "flag", false, "FLAG");
public final static Property Flag_hardsync = new Property(5, String.class, "flag_hardsync", false, "FLAG_HARDSYNC");
};
public SyncDao(DaoConfig config) {
super(config);
}
public SyncDao(DaoConfig config, DaoSession daoSession) {
super(config, daoSession);
}
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"MS_SYNC\" (" + //
"\"UUID_SYNC\" TEXT PRIMARY KEY NOT NULL ," + // 0: uuid_sync
"\"TABEL_NAME\" TEXT," + // 1: tabel_name
"\"LOV_GROUP\" TEXT," + // 2: lov_group
"\"DTM_UPD\" INTEGER," + // 3: dtm_upd
"\"FLAG\" INTEGER," + // 4: flag
"\"FLAG_HARDSYNC\" TEXT);"); // 5: flag_hardsync
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MS_SYNC\"";
db.execSQL(sql);
}
/** @inheritdoc */
@Override
protected void bindValues(DatabaseStatement stmt, Sync entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getUuid_sync());
String tabel_name = entity.getTabel_name();
if (tabel_name != null) {
stmt.bindString(2, tabel_name);
}
String lov_group = entity.getLov_group();
if (lov_group != null) {
stmt.bindString(3, lov_group);
}
java.util.Date dtm_upd = entity.getDtm_upd();
if (dtm_upd != null) {
stmt.bindLong(4, dtm_upd.getTime());
}
Integer flag = entity.getFlag();
if (flag != null) {
stmt.bindLong(5, flag);
}
String flag_hardsync = entity.getFlag_hardsync();
if (flag_hardsync != null) {
stmt.bindString(6, flag_hardsync);
}
}
/** @inheritdoc */
@Override
public String readKey(Cursor cursor, int offset) {
return cursor.getString(offset + 0);
}
/** @inheritdoc */
@Override
public Sync readEntity(Cursor cursor, int offset) {
Sync entity = new Sync( //
cursor.getString(offset + 0), // uuid_sync
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // tabel_name
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // lov_group
cursor.isNull(offset + 3) ? null : new java.util.Date(cursor.getLong(offset + 3)), // dtm_upd
cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4), // flag
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5) // flag_hardsync
);
return entity;
}
/** @inheritdoc */
@Override
public void readEntity(Cursor cursor, Sync entity, int offset) {
entity.setUuid_sync(cursor.getString(offset + 0));
entity.setTabel_name(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setLov_group(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
entity.setDtm_upd(cursor.isNull(offset + 3) ? null : new java.util.Date(cursor.getLong(offset + 3)));
entity.setFlag(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4));
entity.setFlag_hardsync(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
}
/** @inheritdoc */
@Override
protected String updateKeyAfterInsert(Sync entity, long rowId) {
return entity.getUuid_sync();
}
/** @inheritdoc */
@Override
public String getKey(Sync entity) {
if(entity != null) {
return entity.getUuid_sync();
} else {
return null;
}
}
/** @inheritdoc */
@Override
protected boolean isEntityUpdateable() {
return true;
}
}

View file

@ -0,0 +1,302 @@
package com.adins.mss.dao;
import java.util.List;
import java.util.ArrayList;
import android.database.Cursor;
import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.Property;
import de.greenrobot.dao.internal.SqlUtils;
import de.greenrobot.dao.internal.DaoConfig;
import de.greenrobot.dao.database.Database;
import de.greenrobot.dao.database.DatabaseStatement;
import de.greenrobot.dao.query.Query;
import de.greenrobot.dao.query.QueryBuilder;
import com.adins.mss.dao.Kompetisi;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* DAO for table "MS_KOMPETISI".
*/
public class KompetisiDao extends AbstractDao<Kompetisi, String> {
public static final String TABLENAME = "MS_KOMPETISI";
/**
* Properties of entity Kompetisi.<br/>
* Can be used for QueryBuilder and for referencing column names.
*/
public static class Properties {
public final static Property Uuid_kompetisi = new Property(0, String.class, "uuid_kompetisi", true, "UUID_KOMPETISI");
public final static Property MembershipProgramCode = new Property(1, String.class, "membershipProgramCode", false, "MEMBERSHIP_PROGRAM_CODE");
public final static Property MembershipProgramName = new Property(2, String.class, "membershipProgramName", false, "MEMBERSHIP_PROGRAM_NAME");
public final static Property MembershipProgramPriorityCode = new Property(3, String.class, "membershipProgramPriorityCode", false, "MEMBERSHIP_PROGRAM_PRIORITY_CODE");
public final static Property MembershipProgramStatus = new Property(4, String.class, "membershipProgramStatus", false, "MEMBERSHIP_PROGRAM_STATUS");
public final static Property MembershipProgramExpiredDate = new Property(5, String.class, "membershipProgramExpiredDate", false, "MEMBERSHIP_PROGRAM_EXPIRED_DATE");
public final static Property MembershipProgramStartDate = new Property(6, String.class, "membershipProgramStartDate", false, "MEMBERSHIP_PROGRAM_START_DATE");
public final static Property GracePeriode = new Property(7, String.class, "gracePeriode", false, "GRACE_PERIODE");
public final static Property MembershipProgramLogo = new Property(8, String.class, "membershipProgramLogo", false, "MEMBERSHIP_PROGRAM_LOGO");
public final static Property Uuid_user = new Property(9, String.class, "uuid_user", false, "UUID_USER");
};
private DaoSession daoSession;
private Query<Kompetisi> user_KompetisiListQuery;
public KompetisiDao(DaoConfig config) {
super(config);
}
public KompetisiDao(DaoConfig config, DaoSession daoSession) {
super(config, daoSession);
this.daoSession = daoSession;
}
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"MS_KOMPETISI\" (" + //
"\"UUID_KOMPETISI\" TEXT PRIMARY KEY NOT NULL ," + // 0: uuid_kompetisi
"\"MEMBERSHIP_PROGRAM_CODE\" TEXT," + // 1: membershipProgramCode
"\"MEMBERSHIP_PROGRAM_NAME\" TEXT," + // 2: membershipProgramName
"\"MEMBERSHIP_PROGRAM_PRIORITY_CODE\" TEXT," + // 3: membershipProgramPriorityCode
"\"MEMBERSHIP_PROGRAM_STATUS\" TEXT," + // 4: membershipProgramStatus
"\"MEMBERSHIP_PROGRAM_EXPIRED_DATE\" TEXT," + // 5: membershipProgramExpiredDate
"\"MEMBERSHIP_PROGRAM_START_DATE\" TEXT," + // 6: membershipProgramStartDate
"\"GRACE_PERIODE\" TEXT," + // 7: gracePeriode
"\"MEMBERSHIP_PROGRAM_LOGO\" TEXT," + // 8: membershipProgramLogo
"\"UUID_USER\" TEXT);"); // 9: uuid_user
}
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MS_KOMPETISI\"";
db.execSQL(sql);
}
/** @inheritdoc */
@Override
protected void bindValues(DatabaseStatement stmt, Kompetisi entity) {
stmt.clearBindings();
stmt.bindString(1, entity.getUuid_kompetisi());
String membershipProgramCode = entity.getMembershipProgramCode();
if (membershipProgramCode != null) {
stmt.bindString(2, membershipProgramCode);
}
String membershipProgramName = entity.getMembershipProgramName();
if (membershipProgramName != null) {
stmt.bindString(3, membershipProgramName);
}
String membershipProgramPriorityCode = entity.getMembershipProgramPriorityCode();
if (membershipProgramPriorityCode != null) {
stmt.bindString(4, membershipProgramPriorityCode);
}
String membershipProgramStatus = entity.getMembershipProgramStatus();
if (membershipProgramStatus != null) {
stmt.bindString(5, membershipProgramStatus);
}
String membershipProgramExpiredDate = entity.getMembershipProgramExpiredDate();
if (membershipProgramExpiredDate != null) {
stmt.bindString(6, membershipProgramExpiredDate);
}
String membershipProgramStartDate = entity.getMembershipProgramStartDate();
if (membershipProgramStartDate != null) {
stmt.bindString(7, membershipProgramStartDate);
}
String gracePeriode = entity.getGracePeriode();
if (gracePeriode != null) {
stmt.bindString(8, gracePeriode);
}
String membershipProgramLogo = entity.getMembershipProgramLogo();
if (membershipProgramLogo != null) {
stmt.bindString(9, membershipProgramLogo);
}
String uuid_user = entity.getUuid_user();
if (uuid_user != null) {
stmt.bindString(10, uuid_user);
}
}
@Override
protected void attachEntity(Kompetisi entity) {
super.attachEntity(entity);
entity.__setDaoSession(daoSession);
}
/** @inheritdoc */
@Override
public String readKey(Cursor cursor, int offset) {
return cursor.getString(offset + 0);
}
/** @inheritdoc */
@Override
public Kompetisi readEntity(Cursor cursor, int offset) {
Kompetisi entity = new Kompetisi( //
cursor.getString(offset + 0), // uuid_kompetisi
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // membershipProgramCode
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // membershipProgramName
cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // membershipProgramPriorityCode
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // membershipProgramStatus
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // membershipProgramExpiredDate
cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // membershipProgramStartDate
cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // gracePeriode
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // membershipProgramLogo
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9) // uuid_user
);
return entity;
}
/** @inheritdoc */
@Override
public void readEntity(Cursor cursor, Kompetisi entity, int offset) {
entity.setUuid_kompetisi(cursor.getString(offset + 0));
entity.setMembershipProgramCode(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
entity.setMembershipProgramName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
entity.setMembershipProgramPriorityCode(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
entity.setMembershipProgramStatus(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
entity.setMembershipProgramExpiredDate(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
entity.setMembershipProgramStartDate(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
entity.setGracePeriode(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
entity.setMembershipProgramLogo(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
entity.setUuid_user(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
}
/** @inheritdoc */
@Override
protected String updateKeyAfterInsert(Kompetisi entity, long rowId) {
return entity.getUuid_kompetisi();
}
/** @inheritdoc */
@Override
public String getKey(Kompetisi entity) {
if(entity != null) {
return entity.getUuid_kompetisi();
} else {
return null;
}
}
/** @inheritdoc */
@Override
protected boolean isEntityUpdateable() {
return true;
}
/** Internal query to resolve the "kompetisiList" to-many relationship of User. */
public List<Kompetisi> _queryUser_KompetisiList(String uuid_user) {
synchronized (this) {
if (user_KompetisiListQuery == null) {
QueryBuilder<Kompetisi> queryBuilder = queryBuilder();
queryBuilder.where(Properties.Uuid_user.eq(null));
user_KompetisiListQuery = queryBuilder.build();
}
}
Query<Kompetisi> query = user_KompetisiListQuery.forCurrentThread();
query.setParameter(0, uuid_user);
return query.list();
}
private String selectDeep;
protected String getSelectDeep() {
if (selectDeep == null) {
StringBuilder builder = new StringBuilder("SELECT ");
SqlUtils.appendColumns(builder, "T", getAllColumns());
builder.append(',');
SqlUtils.appendColumns(builder, "T0", daoSession.getUserDao().getAllColumns());
builder.append(" FROM MS_KOMPETISI T");
builder.append(" LEFT JOIN MS_USER T0 ON T.\"UUID_USER\"=T0.\"UUID_USER\"");
builder.append(' ');
selectDeep = builder.toString();
}
return selectDeep;
}
protected Kompetisi loadCurrentDeep(Cursor cursor, boolean lock) {
Kompetisi entity = loadCurrent(cursor, 0, lock);
int offset = getAllColumns().length;
User user = loadCurrentOther(daoSession.getUserDao(), cursor, offset);
entity.setUser(user);
return entity;
}
public Kompetisi loadDeep(Long key) {
assertSinglePk();
if (key == null) {
return null;
}
StringBuilder builder = new StringBuilder(getSelectDeep());
builder.append("WHERE ");
SqlUtils.appendColumnsEqValue(builder, "T", getPkColumns());
String sql = builder.toString();
String[] keyArray = new String[] { key.toString() };
Cursor cursor = db.rawQuery(sql, keyArray);
try {
boolean available = cursor.moveToFirst();
if (!available) {
return null;
} else if (!cursor.isLast()) {
throw new IllegalStateException("Expected unique result, but count was " + cursor.getCount());
}
return loadCurrentDeep(cursor, true);
} finally {
cursor.close();
}
}
/** Reads all available rows from the given cursor and returns a list of new ImageTO objects. */
public List<Kompetisi> loadAllDeepFromCursor(Cursor cursor) {
int count = cursor.getCount();
List<Kompetisi> list = new ArrayList<Kompetisi>(count);
if (cursor.moveToFirst()) {
if (identityScope != null) {
identityScope.lock();
identityScope.reserveRoom(count);
}
try {
do {
list.add(loadCurrentDeep(cursor, false));
} while (cursor.moveToNext());
} finally {
if (identityScope != null) {
identityScope.unlock();
}
}
}
return list;
}
protected List<Kompetisi> loadDeepAllAndCloseCursor(Cursor cursor) {
try {
return loadAllDeepFromCursor(cursor);
} finally {
cursor.close();
}
}
/** A raw-style query where you can pass any WHERE clause and arguments. */
public List<Kompetisi> queryDeep(String where, String... selectionArg) {
Cursor cursor = db.rawQuery(getSelectDeep() + where, selectionArg);
return loadDeepAllAndCloseCursor(cursor);
}
}

View file

@ -0,0 +1,148 @@
package com.adins.mss.foundation.questiongenerator;
import com.adins.mss.constant.Global;
import com.adins.mss.dao.Lookup;
import com.adins.mss.dao.ReceiptVoucher;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
//import com.adins.util.Tool;
public class OptionAnswerBean extends Lookup implements Serializable {
private boolean selected;
//Glen 3 Oct 2014
private String lovCode;
public OptionAnswerBean() {
}
public OptionAnswerBean(String code, String value) {
setCode(code);
setValue(value);
}
public OptionAnswerBean(String code, String value, String lovCode) {
setCode(code);
setValue(value);
this.lovCode = lovCode;
}
public OptionAnswerBean(ReceiptVoucher rv, int index){
setUuid_lookup(rv.getUuid_receipt_voucher());
setCode(rv.getUuid_receipt_voucher());
setValue(rv.getRv_number());
setSequence(index);
setDtm_upd(rv.getDtm_crt());
setLov_group(rv.getFlag_sources());
setIs_active(Global.TRUE_STRING);
setIs_deleted(Global.FALSE_STRING);
}
public OptionAnswerBean(ReceiptVoucher rv){
setUuid_lookup(rv.getUuid_receipt_voucher());
setCode(rv.getUuid_receipt_voucher());
setValue(rv.getRv_number());
setDtm_upd(rv.getDtm_crt());
setLov_group(rv.getFlag_sources());
setIs_active(Global.TRUE_STRING);
setIs_deleted(Global.FALSE_STRING);
}
public OptionAnswerBean(Lookup lookup) {
setUuid_lookup(lookup.getUuid_lookup());
setOption_id(lookup.getOption_id());
setCode(lookup.getCode());
setValue(lookup.getValue());
setFilter1(lookup.getFilter1());
setFilter2(lookup.getFilter2());
setFilter3(lookup.getFilter3());
setFilter4(lookup.getFilter4());
setFilter5(lookup.getFilter5());
setIs_active(lookup.getIs_active());
setIs_deleted(lookup.getIs_deleted());
setSequence(lookup.getSequence());
// setLookup_id(lookup.getLookup_id());
setUsr_crt(lookup.getUsr_crt());
setDtm_crt(lookup.getDtm_crt());
setUsr_upd(lookup.getUsr_upd());
setDtm_upd(lookup.getDtm_upd());
setUuid_question_set(lookup.getUuid_question_set());
setLov_group(lookup.getLov_group());
}
public static List<OptionAnswerBean> getOptionList(List<Lookup> lookupList) {
List<OptionAnswerBean> optionAnswers = new ArrayList<OptionAnswerBean>();
for (Lookup lookup : lookupList) {
OptionAnswerBean oA = new OptionAnswerBean(lookup);
optionAnswers.add(oA);
}
return optionAnswers;
}
public static List<OptionAnswerBean> getOptionListFromRv(List<ReceiptVoucher> vouchers) {
List<OptionAnswerBean> optionAnswers = new ArrayList<OptionAnswerBean>();
for (int i=0; i<vouchers.size(); i++) {
OptionAnswerBean oA = new OptionAnswerBean(vouchers.get(i),i);
optionAnswers.add(oA);
}
return optionAnswers;
}
public static String optionAnswerToString(List<OptionAnswerBean> beans) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < beans.size(); i++) {
OptionAnswerBean bean = beans.get(i);
sb.append(bean.getValue());
if (i < beans.size() - 1)
sb.append(Global.DELIMETER_DATA);
}
return sb.toString();
}
public static String optionToSelectedString(List<OptionAnswerBean> beans) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < beans.size(); i++) {
OptionAnswerBean bean = beans.get(i);
sb.append(bean.getUuid_lookup());
if (i < beans.size() - 1)
sb.append(Global.DELIMETER_DATA);
}
return sb.toString();
}
public static OptionAnswerBean getOptionAnswerByValue(List<OptionAnswerBean> beans, String value) {
OptionAnswerBean optBean = null;
for (OptionAnswerBean bean : beans) {
if (value.equals(bean.getValue())) {
optBean = bean;
break;
}
}
return optBean;
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
this.selected = selected;
}
public String toString() {
return getValue();
}
public String getLovCode() {
return lovCode;
}
public void setLovCode(String lovCode) {
this.lovCode = lovCode;
}
}

View file

@ -0,0 +1,103 @@
package com.adins.mss.foundation.questiongenerator;
import android.graphics.Bitmap;
import androidx.appcompat.app.AppCompatActivity;
import android.widget.ImageView;
import android.widget.TextView;
import com.adins.mss.base.crashlytics.FireCrash;
import java.util.List;
public abstract class DynamicQuestion extends AppCompatActivity {
/* STATIC REF */
private static TextView txtDetailInFocus;
private static TextView txtInFocus;
private static ImageView thumbInFocus;
private static ImageView thumbLocationInfo;
private static QuestionBean questionInFocus;
private static List<QuestionBean> listOfQuestion;
public static List<QuestionBean> getListOfQuestion() {
return listOfQuestion;
}
public static void setTxtInFocus(TextView v) {
txtInFocus = v;
}
public static void setTxtInFocusText(String text) {
if (txtInFocus != null) txtInFocus.setText(text);
txtInFocus = null;
questionInFocus = null;
}
public static TextView getTxtDetailInFocus() {
return txtDetailInFocus;
}
public static void setTxtDetailInFocus(String text) {
txtDetailInFocus.setText(text);
txtDetailInFocus = null;
txtDetailInFocus = null;
}
public static void setTxtDetailInFocus(TextView v) {
txtDetailInFocus = v;
}
public static QuestionBean getQuestionInFocus() {
return questionInFocus;
}
public static void setQuestionInFocus(QuestionBean questionInFocus) {
DynamicQuestion.questionInFocus = questionInFocus;
}
public static void saveImage(byte[] bytes) {
try {
questionInFocus.setImgAnswer(bytes);
} catch (Exception e) {
FireCrash.log(e);
e.printStackTrace();
}
}
public static void saveImageLocation(byte[] bytes) {
questionInFocus.setImgLocation(bytes);
}
public static ImageView getThumbInFocus() {
return thumbInFocus;
}
public static void setThumbInFocus(ImageView v) {
thumbInFocus = v;
}
public static void setThumbInFocusImage(Bitmap bm) {
thumbInFocus.setImageBitmap(bm);
thumbInFocus = null;
questionInFocus = null;
}
public static ImageView getThumbLocationInfo() {
return thumbLocationInfo;
}
public static void setThumbLocationInfo(ImageView value) {
thumbLocationInfo = value;
}
public static void setThumbLocationInfoImage(Bitmap bm) {
thumbLocationInfo.setImageBitmap(bm);
thumbLocationInfo = null;
questionInFocus = null;
}
}

View file

@ -0,0 +1,150 @@
package com.adins.mss.foundation.image;
import android.app.Activity;
import android.database.Cursor;
import android.media.ExifInterface;
import android.net.Uri;
import android.provider.MediaStore;
import java.io.File;
import java.io.IOException;
public class ExifFromGallery {
private File exifFile; // It's the file passed from constructor
private String exifFilePath; // file in Real Path format
private Activity parentActivity; // Parent Activity
private String exifFilePath_withoutext;
private String ext;
private ExifInterface exifInterface;
private Boolean exifValid = false;
;
// Exif TAG
// for API Level 8, Android 2.2
private String exif_DATETIME = "";
private String exif_FLASH = "";
private String exif_FOCAL_LENGTH = "";
private String exif_GPS_DATESTAMP = "";
private String exif_GPS_LATITUDE = "";
private String exif_GPS_LATITUDE_REF = "";
private String exif_GPS_LONGITUDE = "";
private String exif_GPS_LONGITUDE_REF = "";
private String exif_GPS_PROCESSING_METHOD = "";
private String exif_GPS_TIMESTAMP = "";
private String exif_IMAGE_LENGTH = "";
private String exif_IMAGE_WIDTH = "";
private String exif_MAKE = "";
private String exif_MODEL = "";
private String exif_ORIENTATION = "";
private String exif_WHITE_BALANCE = "";
// Constructor from path
public ExifFromGallery(String fileString, Activity parent) {
exifFile = new File(fileString);
parentActivity = parent;
exifFilePath = fileString;
PrepareExif();
}
// Constructor from URI
public ExifFromGallery(Uri fileUri, Activity parent) {
exifFile = new File(fileUri.toString());
parentActivity = parent;
exifFilePath = getRealPathFromURI(fileUri);
PrepareExif();
}
public ExifInterface getExif() {
return exifInterface;
}
private void PrepareExif() {
int dotposition = exifFilePath.lastIndexOf(".");
exifFilePath_withoutext = exifFilePath.substring(0, dotposition);
ext = exifFilePath.substring(dotposition + 1, exifFilePath.length());
if (ext.equalsIgnoreCase("jpg")) {
try {
exifInterface = new ExifInterface(exifFilePath);
ReadExifTag();
exifValid = true;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
private void ReadExifTag() {
exif_DATETIME = exifInterface.getAttribute(ExifInterface.TAG_DATETIME);
exif_FLASH = exifInterface.getAttribute(ExifInterface.TAG_FLASH);
exif_FOCAL_LENGTH = exifInterface
.getAttribute(ExifInterface.TAG_FOCAL_LENGTH);
exif_GPS_DATESTAMP = exifInterface
.getAttribute(ExifInterface.TAG_GPS_DATESTAMP);
exif_GPS_LATITUDE = exifInterface
.getAttribute(ExifInterface.TAG_GPS_LATITUDE);
exif_GPS_LATITUDE_REF = exifInterface
.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF);
exif_GPS_LONGITUDE = exifInterface
.getAttribute(ExifInterface.TAG_GPS_LONGITUDE);
exif_GPS_LONGITUDE_REF = exifInterface
.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF);
exif_GPS_PROCESSING_METHOD = exifInterface
.getAttribute(ExifInterface.TAG_GPS_PROCESSING_METHOD);
exif_GPS_TIMESTAMP = exifInterface
.getAttribute(ExifInterface.TAG_GPS_TIMESTAMP);
exif_IMAGE_LENGTH = exifInterface
.getAttribute(ExifInterface.TAG_IMAGE_LENGTH);
exif_IMAGE_WIDTH = exifInterface
.getAttribute(ExifInterface.TAG_IMAGE_WIDTH);
exif_MAKE = exifInterface.getAttribute(ExifInterface.TAG_MAKE);
exif_MODEL = exifInterface.getAttribute(ExifInterface.TAG_MODEL);
exif_ORIENTATION = exifInterface
.getAttribute(ExifInterface.TAG_ORIENTATION);
exif_WHITE_BALANCE = exifInterface
.getAttribute(ExifInterface.TAG_WHITE_BALANCE);
}
private String getRealPathFromURI(Uri contentUri) {
String[] proj = {MediaStore.Images.Media.DATA};
Cursor cursor = parentActivity.getContentResolver().query(contentUri, proj, null,
null, null);
int column_index = cursor
.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
return cursor.getString(column_index);
}
public String getSummary() {
if (!exifValid) {
return ("Invalide EXIF!");
} else {
return (exifFilePath + " : \n" +
"Name without extension: " + exifFilePath_withoutext + "\n"
+ "with extension: " + ext + "\n" +
"Date Time: " + exif_DATETIME + "\n" + "Flash: "
+ exif_FLASH + "\n" + "Focal Length: " + exif_FOCAL_LENGTH
+ "\n" + "GPS Date Stamp: " + exif_GPS_DATESTAMP + "\n"
+ "GPS Latitude: " + exif_GPS_LATITUDE + "\n"
+ "GPS Latitute Ref: " + exif_GPS_LATITUDE_REF + "\n"
+ "GPS Longitude: " + exif_GPS_LONGITUDE + "\n"
+ "GPS Longitude Ref: " + exif_GPS_LONGITUDE_REF + "\n"
+ "Processing Method: " + exif_GPS_PROCESSING_METHOD + "\n"
+ "GPS Time Stamp: " + exif_GPS_TIMESTAMP + "\n"
+ "Image Length: " + exif_IMAGE_LENGTH + "\n"
+ "Image Width: " + exif_IMAGE_WIDTH + "\n" + "Make: "
+ exif_MAKE + "\n" + "Model: " + exif_MODEL + "\n"
+ "Orientation: " + exif_ORIENTATION + "\n"
+ "White Balance: " + exif_WHITE_BALANCE + "\n");
}
}
}

View file

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/logContainer">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="@+id/logItem">
<ImageView
android:id="@+id/logIcon"
android:layout_width="35dp"
android:layout_height="wrap_content"
android:src="@drawable/task_highpriority"
android:layout_gravity="center_vertical"
android:padding="2dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:id="@+id/taskHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="10dp"
app:contentPadding="5dp"
app:cardElevation="@dimen/card_shadow"
android:layout_margin="@dimen/card_margin"
app:cardBackgroundColor="@color/fontColorWhite">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="0.3">
<TextView
android:id="@+id/taskName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:text="Sample Name"
android:textAppearance="?android:attr/textAppearanceSmall"
android:drawableLeft="@drawable/ic_person_color"
android:drawablePadding="5dp" />
<TextView
android:id="@+id/taskForm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:text="Sample Form"
android:textAppearance="?android:attr/textAppearanceSmall"
android:drawableLeft="@drawable/ic_form_color"
android:drawablePadding="5dp" />
<TextView
android:id="@+id/taskCollResult"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/collection_result"
android:visibility="gone"
android:textAppearance="?android:attr/textAppearanceSmall"
android:drawableLeft="@drawable/ic_coll_result"
android:drawablePadding="5dp" />
</LinearLayout>
<TextView
android:id="@+id/txtTime"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text="17/07/2017 \n 13:00"
android:layout_gravity="center|end"
android:gravity="end"
android:textAlignment="textEnd"
android:textSize="10dp" />
<ImageView
android:id="@+id/imgPrint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:layout_gravity="center"
android:src="@drawable/ic_print"
android:visibility="gone"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View file

@ -0,0 +1,225 @@
package com.adins.mss.base.dynamicform;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.adins.mss.base.GlobalData;
import com.adins.mss.base.PrintActivity;
import com.adins.mss.base.R;
import com.adins.mss.base.commons.SecondHelper;
import com.adins.mss.base.crashlytics.FireCrash;
import com.adins.mss.base.util.ByteFormatter;
import com.adins.mss.base.util.LocaleHelper;
import com.adins.mss.base.util.SecondFormatter;
import com.adins.mss.base.util.Utility;
import com.adins.mss.constant.Global;
import com.adins.mss.dao.PrintResult;
import com.adins.mss.dao.Scheme;
import com.adins.mss.dao.TaskH;
import com.adins.mss.foundation.db.dataaccess.GeneralParameterDataAccess;
import com.adins.mss.foundation.db.dataaccess.PrintResultDataAccess;
import com.adins.mss.foundation.db.dataaccess.SchemeDataAccess;
import com.adins.mss.foundation.db.dataaccess.TaskDDataAccess;
import com.adins.mss.foundation.db.dataaccess.TaskHDataAccess;
import java.util.List;
import java.util.Locale;
import zj.com.cn.bluetooth.sdk.Main_Activity1;
public class SendResultActivity extends Activity implements OnClickListener {
public static String rvNumber = null;
private static SendResultActivity INSTANCE = null;
TextView txtResult;
TextView txtTimeSent;
TextView txtDateSize;
ImageView imgHeader;
private String taskId;
private TaskH taskH;
//private boolean isPrintable;
private boolean error;
private Button btnOk;
private Button btnPrintPage;
public static SendResultActivity getInstance() {
return INSTANCE;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.send_result_layout);
initialize();
}
@Override
protected void onResume() {
super.onResume();
if (rvNumber != null && !rvNumber.isEmpty()) {
btnPrintPage.setVisibility(View.GONE);
}
Utility.freeMemory();
}
@Override
protected void attachBaseContext(Context newBase) {
Context context = newBase;
Locale locale;
try{
locale = new Locale(GlobalData.getSharedGlobalData().getLocale());
context = LocaleHelper.wrap(newBase, locale);
} catch (Exception e) {
locale = new Locale(LocaleHelper.ENGLSIH);
context = LocaleHelper.wrap(newBase, locale);
} finally {
super.attachBaseContext(context);
}
}
private void initialize() {
rvNumber = null;
INSTANCE = this;
txtResult = (TextView) findViewById(R.id.txtResult);
txtTimeSent = (TextView) findViewById(R.id.txtTimeSent);
txtDateSize = (TextView) findViewById(R.id.txtDataSize);
imgHeader = (ImageView) findViewById(R.id.imgHeader);
//bong 9 apr 15 - add button to page print
btnPrintPage = (Button) findViewById(R.id.btnPrintPage);
btnOk = (Button) findViewById(R.id.btnOK);
btnOk.setOnClickListener(this);
btnPrintPage.setOnClickListener(this);
Bundle extras = getIntent().getExtras();
this.error = extras.getBoolean(Global.BUND_KEY_SURVEY_ERROR);
if (error) {
String errMessage = extras.getString(Global.BUND_KEY_SURVEY_ERROR_MSG);
if (errMessage == null)
txtResult.setText(extras.getString(Global.BUND_KEY_SEND_RESULT));
else txtResult.setText(errMessage);
imgHeader.setImageResource(R.drawable.ic_submit_error);
this.taskId = extras.getString(Global.BUND_KEY_TASK_ID);
if (taskId.contains("refused"))
taskId = "Connection Refused";
txtTimeSent.setText(taskId);
btnPrintPage.setVisibility(View.GONE);
txtDateSize.setVisibility(View.GONE);
if (taskId.contains("been deleted")) {
imgHeader.setVisibility(View.GONE);
}
} else {
String result = extras.getString(Global.BUND_KEY_SEND_RESULT);
//this.isPrintable = extras.getBoolean(Global.BUND_KEY_TASK_IS_PRINTABLE);
try {
this.taskId = extras.getString(Global.BUND_KEY_TASK_ID);
String time = extras.getString(Global.BUND_KEY_SEND_TIME);
String seconds = SecondFormatter.secondsToString(Long.parseLong(time));
String mTime = getString(R.string.time) + seconds;
String size = extras.getString(Global.BUND_KEY_SEND_SIZE);
String bytes = ByteFormatter.formatByteSize(Long.parseLong(size));
String mSize = getString(R.string.size) + bytes;
txtTimeSent.setText(mTime);
txtDateSize.setText(mSize);
} catch (Exception e) {
FireCrash.log(e);
txtTimeSent.setVisibility(View.GONE);
txtDateSize.setVisibility(View.GONE);
}
txtResult.setText(result);
//TODO bong cek jika bukan taskId maka pakai uuid nya
try {
taskH = TaskHDataAccess.getOneTaskHeader(getApplicationContext(), taskId);
Scheme scheme = SchemeDataAccess.getOne(getApplicationContext(), taskH.getUuid_scheme());
if (scheme != null) {
String uuidUser = GlobalData.getSharedGlobalData().getUser().getUuid_user();
boolean isTaskPaid = TaskDDataAccess.isTaskPaid(SendResultActivity.this,
uuidUser, taskH.getUuid_task_h());
boolean isRVinFront = GeneralParameterDataAccess.isRvInFrontEnable(SendResultActivity.this, uuidUser);
if (isRVinFront) {
btnPrintPage.setVisibility(View.GONE);
} else if (!scheme.getIs_printable().equals("1") || !isTaskPaid) {
btnPrintPage.setVisibility(View.GONE);
} else {
btnPrintPage.setVisibility(View.VISIBLE);
/*btnPrintPage.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO pindah ke halaman print
Intent intent = new Intent(getApplicationContext(), PrintActivity.class);
intent.putExtra("taskId", taskId);
startActivity(intent);
finish();
}
});*/
}
}
} catch (Exception e) {
FireCrash.log(e);
// TODO: handle exception
}
}
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
int id = v.getId();
if (id == R.id.btnOK) {
onBackPressed();
} else if (id == R.id.btnPrintPage) {
//Nendi: 2019-01-15 ~ Bugfix: Print result not available
List<PrintResult> items = PrintResultDataAccess.getAll(v.getContext(), taskId);
if (items.size() == 0) {
TaskManager.generatePrintResult(v.getContext(), taskH);
}
SecondHelper.Companion.doPrint(this, taskId, "submit");
// if (!GlobalData.getSharedGlobalData().getListPrinter().isEmpty()) {
// final String[] listPrinterDevice = GlobalData.getSharedGlobalData().getListPrinter().split(",");
// CharSequence printers[] = new CharSequence[listPrinterDevice.length];
// for (int i = 0; i < listPrinterDevice.length; i++) {
// String printer[] = listPrinterDevice[i].split("@");
// printers[i] = printer[0];
// }
// AlertDialog.Builder builder = new AlertDialog.Builder(this);
// builder.setTitle("Choose Printer Driver");
// builder.setItems(printers, new DialogInterface.OnClickListener() {
// @Override
// public void onClick(DialogInterface dialog, int which) {
// String printer[] = listPrinterDevice[which].split("@");
// if ("0".equalsIgnoreCase(printer[1])) {
// Intent intent = new Intent(SendResultActivity.this, PrintActivity.class);
// //intent.putExtra(name, value);
// intent.putExtra("taskId", taskId);
// intent.putExtra("source", "submit");
// startActivity(intent);
// } else {
// Intent intent = new Intent(SendResultActivity.this, Main_Activity1.class);
// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// intent.putExtra("taskId", taskId);
// intent.putExtra("source", "submit");
// startActivity(intent);
// }
//
// }
// });
// builder.show();
// }
}
}
}

View file

@ -0,0 +1,160 @@
package com.adins.mss.dao;
import com.adins.mss.dao.DaoSession;
import de.greenrobot.dao.DaoException;
import com.adins.mss.base.util.ExcludeFromGson;
import com.google.gson.annotations.SerializedName;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
/**
* Entity mapped to table "TR_COLLECTIONHISTORY".
*/
public class CollectionHistory {
/** Not-null value. */
@SerializedName("uuid_collection_history")
private String uuid_collection_history;
@SerializedName("last_update")
private java.util.Date last_update;
@SerializedName("description")
private String description;
@SerializedName("usr_crt")
private String usr_crt;
@SerializedName("dtm_crt")
private java.util.Date dtm_crt;
@SerializedName("uuid_user")
private String uuid_user;
/** Used to resolve relations */
private transient DaoSession daoSession;
/** Used for active entity operations. */
private transient CollectionHistoryDao myDao;
private User user;
private String user__resolvedKey;
public CollectionHistory() {
}
public CollectionHistory(String uuid_collection_history) {
this.uuid_collection_history = uuid_collection_history;
}
public CollectionHistory(String uuid_collection_history, java.util.Date last_update, String description, String usr_crt, java.util.Date dtm_crt, String uuid_user) {
this.uuid_collection_history = uuid_collection_history;
this.last_update = last_update;
this.description = description;
this.usr_crt = usr_crt;
this.dtm_crt = dtm_crt;
this.uuid_user = uuid_user;
}
/** called by internal mechanisms, do not call yourself. */
public void __setDaoSession(DaoSession daoSession) {
this.daoSession = daoSession;
myDao = daoSession != null ? daoSession.getCollectionHistoryDao() : null;
}
/** Not-null value. */
public String getUuid_collection_history() {
return uuid_collection_history;
}
/** Not-null value; ensure this value is available before it is saved to the database. */
public void setUuid_collection_history(String uuid_collection_history) {
this.uuid_collection_history = uuid_collection_history;
}
public java.util.Date getLast_update() {
return last_update;
}
public void setLast_update(java.util.Date last_update) {
this.last_update = last_update;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getUsr_crt() {
return usr_crt;
}
public void setUsr_crt(String usr_crt) {
this.usr_crt = usr_crt;
}
public java.util.Date getDtm_crt() {
return dtm_crt;
}
public void setDtm_crt(java.util.Date dtm_crt) {
this.dtm_crt = dtm_crt;
}
public String getUuid_user() {
return uuid_user;
}
public void setUuid_user(String uuid_user) {
this.uuid_user = uuid_user;
}
/** To-one relationship, resolved on first access. */
public User getUser() {
String __key = this.uuid_user;
if (user__resolvedKey == null || user__resolvedKey != __key) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
UserDao targetDao = daoSession.getUserDao();
User userNew = targetDao.load(__key);
synchronized (this) {
user = userNew;
user__resolvedKey = __key;
}
}
return user;
}
public void setUser(User user) {
synchronized (this) {
this.user = user;
uuid_user = user == null ? null : user.getUuid_user();
user__resolvedKey = uuid_user;
}
}
/** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */
public void delete() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.delete(this);
}
/** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */
public void update() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.update(this);
}
/** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */
public void refresh() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.refresh(this);
}
}

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="@string/title_mn_paymenthistory"
android:id="@+id/action_payment_history"/>
<item android:title="@string/title_mn_installmentschedule"
android:id="@+id/action_installment_schedule"/>
<item android:title="@string/title_mn_collection_history"
android:id="@+id/action_collection_history"/>
</menu>

View file

@ -0,0 +1,75 @@
package com.adins.mss.odr.products;
import android.content.Context;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.adins.mss.base.util.Utility;
import com.adins.mss.dao.Product;
import com.adins.mss.foundation.db.dataaccess.ProductDataAccess;
import com.adins.mss.odr.R;
import com.adins.mss.odr.products.adapter.ProductListAdapter;
import com.google.firebase.analytics.FirebaseAnalytics;
import org.acra.ACRA;
import java.util.List;
/**
* Created by muhammad.aap on 11/15/2018.
*/
public class FragmentProduct extends Fragment {
private List<Product> productList;
private RecyclerView list;
private ProductListAdapter adapter;
private FirebaseAnalytics screenName;
@Override
public void onAttach(Context context) {
super.onAttach(context);
setHasOptionsMenu(true);
ACRA.getErrorReporter().putCustomData("LAST_CLASS_ACCESSED", getClass().getSimpleName());
}
@Override
public void onDestroyView() {
super.onDestroyView();
Utility.freeMemory();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
screenName = FirebaseAnalytics.getInstance(getActivity());
View view = inflater.inflate(R.layout.fragment_product, container, false);
list = (RecyclerView) view.findViewById(R.id.productList);
GridLayoutManager layoutManager = new GridLayoutManager(getActivity(), 2);
list.setHasFixedSize(true);
list.setLayoutManager(layoutManager);
productList = ProductDataAccess.getAllByIsActive(getActivity());
adapter = new ProductListAdapter(getActivity(), productList);
list.setAdapter(adapter);
return view;
}
@Override
public void onResume() {
super.onResume();
//Set Firebase screen name
screenName.setCurrentScreen(getActivity(), getString(R.string.screen_name_marketing_report), null);
getActivity().setTitle(getString(com.adins.mss.base.R.string.title_mn_products));
}
@Override
public void onPause() {
super.onPause();
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

View file

@ -0,0 +1,908 @@
package com.adins.mss.dao;
import android.content.Context;
import java.util.ArrayList;
import java.util.List;
import com.adins.mss.base.Backup;
import com.adins.mss.dao.DaoSession;
import de.greenrobot.dao.DaoException;
import com.adins.mss.base.util.ExcludeFromGson;
import com.adins.mss.foundation.db.dataaccess.TaskHDataAccess;
import com.google.gson.annotations.SerializedName;
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
/**
* Entity mapped to table "TR_TASK_H".
*/
public class TaskH {
/** Not-null value. */
@SerializedName("uuid_task_h")
private String uuid_task_h;
@SerializedName("task_id")
private String task_id;
@SerializedName("status")
private String status;
@SerializedName("is_printable")
private String is_printable;
@SerializedName("customer_name")
private String customer_name;
@SerializedName("customer_phone")
private String customer_phone;
@SerializedName("customer_address")
private String customer_address;
@SerializedName("notes")
private String notes;
@SerializedName("submit_date")
private java.util.Date submit_date;
@SerializedName("submit_duration")
private String submit_duration;
@SerializedName("submit_size")
private String submit_size;
@SerializedName("submit_result")
private String submit_result;
@SerializedName("assignment_date")
private java.util.Date assignment_date;
@SerializedName("print_count")
private Integer print_count;
@SerializedName("draft_date")
private java.util.Date draft_date;
@SerializedName("usr_crt")
private String usr_crt;
@SerializedName("dtm_crt")
private java.util.Date dtm_crt;
@SerializedName("priority")
private String priority;
@SerializedName("latitude")
private String latitude;
@SerializedName("longitude")
private String longitude;
@SerializedName("scheme_last_update")
private java.util.Date scheme_last_update;
@SerializedName("is_verification")
private String is_verification;
@SerializedName("is_preview_server")
private String is_preview_server;
@SerializedName("uuid_user")
private String uuid_user;
@SerializedName("voice_note")
private byte[] voice_note;
@SerializedName("uuid_scheme")
private String uuid_scheme;
@SerializedName("zip_code")
private String zip_code;
@SerializedName("start_date")
private java.util.Date start_date;
@SerializedName("open_date")
private java.util.Date open_date;
@SerializedName("appl_no")
private String appl_no;
@ExcludeFromGson
@SerializedName("is_prepocessed")
private String is_prepocessed;
@SerializedName("last_saved_question")
private Integer last_saved_question;
@SerializedName("is_reconciled")
private String is_reconciled;
@SerializedName("pts_date")
private java.util.Date pts_date;
@ExcludeFromGson
@SerializedName("access_mode")
private String access_mode;
@SerializedName("rv_number")
private String rv_number;
@SerializedName("status_rv")
private String status_rv;
@SerializedName("no_rangka")
private String no_rangka;
@SerializedName("no_plat")
private String no_plat;
@SerializedName("no_mesin")
private String no_mesin;
@SerializedName("flag")
private String flag;
@ExcludeFromGson
@SerializedName("message")
private String message;
@SerializedName("form_version")
private String form_version;
@SerializedName("flag_survey")
private String flag_survey;
@SerializedName("uuid_resurvey_user")
private String uuid_resurvey_user;
@SerializedName("resurvey_suggested")
private String resurvey_suggested;
@SerializedName("verification_notes")
private String verification_notes;
@SerializedName("od")
private String od;
@SerializedName("amt_due")
private String amt_due;
@SerializedName("inst_no")
private String inst_no;
@SerializedName("status_code")
private String status_code;
@SerializedName("uuid_account")
private String uuid_account;
@SerializedName("uuid_product")
private String uuid_product;
@SerializedName("reference_number")
private String reference_number;
@SerializedName("data_dukcapil")
private String data_dukcapil;
@SerializedName("seq_no")
private Integer seq_no;
@SerializedName("batch_id")
private String batch_id;
@SerializedName("survey_location")
private String survey_location;
/** Used to resolve relations */
private transient DaoSession daoSession;
/** Used for active entity operations. */
private transient TaskHDao myDao;
private User user;
private String user__resolvedKey;
private Scheme scheme;
private String scheme__resolvedKey;
private List<ImageResult> imageResultList;
private List<ReceiptVoucher> receiptVoucherList;
private List<TaskD> taskDList;
private List<ErrorLog> errorLogList;
private List<Timeline> timelineList;
private List<TaskHSequence> taskHSequenceList;
public TaskH() {
}
public TaskH(String uuid_task_h) {
this.uuid_task_h = uuid_task_h;
}
public TaskH(String uuid_task_h, String task_id, String status, String is_printable, String customer_name, String customer_phone, String customer_address, String notes, java.util.Date submit_date, String submit_duration, String submit_size, String submit_result, java.util.Date assignment_date, Integer print_count, java.util.Date draft_date, String usr_crt, java.util.Date dtm_crt, String priority, String latitude, String longitude, java.util.Date scheme_last_update, String is_verification, String is_preview_server, String uuid_user, byte[] voice_note, String uuid_scheme, String zip_code, java.util.Date start_date, java.util.Date open_date, String appl_no, String is_prepocessed, Integer last_saved_question, String is_reconciled, java.util.Date pts_date, String access_mode, String rv_number, String status_rv, String no_rangka, String no_plat, String no_mesin, String flag, String message, String form_version, String flag_survey, String uuid_resurvey_user, String resurvey_suggested, String verification_notes, String od, String amt_due, String inst_no, String status_code, String uuid_account, String uuid_product, String reference_number, String data_dukcapil, Integer seq_no, String batch_id, String survey_location) {
this.uuid_task_h = uuid_task_h;
this.task_id = task_id;
this.status = status;
this.is_printable = is_printable;
this.customer_name = customer_name;
this.customer_phone = customer_phone;
this.customer_address = customer_address;
this.notes = notes;
this.submit_date = submit_date;
this.submit_duration = submit_duration;
this.submit_size = submit_size;
this.submit_result = submit_result;
this.assignment_date = assignment_date;
this.print_count = print_count;
this.draft_date = draft_date;
this.usr_crt = usr_crt;
this.dtm_crt = dtm_crt;
this.priority = priority;
this.latitude = latitude;
this.longitude = longitude;
this.scheme_last_update = scheme_last_update;
this.is_verification = is_verification;
this.is_preview_server = is_preview_server;
this.uuid_user = uuid_user;
this.voice_note = voice_note;
this.uuid_scheme = uuid_scheme;
this.zip_code = zip_code;
this.start_date = start_date;
this.open_date = open_date;
this.appl_no = appl_no;
this.is_prepocessed = is_prepocessed;
this.last_saved_question = last_saved_question;
this.is_reconciled = is_reconciled;
this.pts_date = pts_date;
this.access_mode = access_mode;
this.rv_number = rv_number;
this.status_rv = status_rv;
this.no_rangka = no_rangka;
this.no_plat = no_plat;
this.no_mesin = no_mesin;
this.flag = flag;
this.message = message;
this.form_version = form_version;
this.flag_survey = flag_survey;
this.uuid_resurvey_user = uuid_resurvey_user;
this.resurvey_suggested = resurvey_suggested;
this.verification_notes = verification_notes;
this.od = od;
this.amt_due = amt_due;
this.inst_no = inst_no;
this.status_code = status_code;
this.uuid_account = uuid_account;
this.uuid_product = uuid_product;
this.reference_number = reference_number;
this.data_dukcapil = data_dukcapil;
this.seq_no = seq_no;
this.batch_id = batch_id;
this.survey_location = survey_location;
}
/** called by internal mechanisms, do not call yourself. */
public void __setDaoSession(DaoSession daoSession) {
this.daoSession = daoSession;
myDao = daoSession != null ? daoSession.getTaskHDao() : null;
}
/** Not-null value. */
public String getUuid_task_h() {
return uuid_task_h;
}
/** Not-null value; ensure this value is available before it is saved to the database. */
public void setUuid_task_h(String uuid_task_h) {
this.uuid_task_h = uuid_task_h;
}
public String getTask_id() {
return task_id;
}
public void setTask_id(String task_id) {
this.task_id = task_id;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getIs_printable() {
return is_printable;
}
public void setIs_printable(String is_printable) {
this.is_printable = is_printable;
}
public String getCustomer_name() {
return customer_name;
}
public void setCustomer_name(String customer_name) {
this.customer_name = customer_name;
}
public String getCustomer_phone() {
return customer_phone;
}
public void setCustomer_phone(String customer_phone) {
this.customer_phone = customer_phone;
}
public String getCustomer_address() {
return customer_address;
}
public void setCustomer_address(String customer_address) {
this.customer_address = customer_address;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public java.util.Date getSubmit_date() {
return submit_date;
}
public void setSubmit_date(java.util.Date submit_date) {
this.submit_date = submit_date;
}
public String getSubmit_duration() {
return submit_duration;
}
public void setSubmit_duration(String submit_duration) {
this.submit_duration = submit_duration;
}
public String getSubmit_size() {
return submit_size;
}
public void setSubmit_size(String submit_size) {
this.submit_size = submit_size;
}
public String getSubmit_result() {
return submit_result;
}
public void setSubmit_result(String submit_result) {
this.submit_result = submit_result;
}
public java.util.Date getAssignment_date() {
return assignment_date;
}
public void setAssignment_date(java.util.Date assignment_date) {
this.assignment_date = assignment_date;
}
public Integer getPrint_count() {
return print_count;
}
public void setPrint_count(Integer print_count) {
this.print_count = print_count;
}
public java.util.Date getDraft_date() {
return draft_date;
}
public void setDraft_date(java.util.Date draft_date) {
this.draft_date = draft_date;
}
public String getUsr_crt() {
return usr_crt;
}
public void setUsr_crt(String usr_crt) {
this.usr_crt = usr_crt;
}
public java.util.Date getDtm_crt() {
return dtm_crt;
}
public void setDtm_crt(java.util.Date dtm_crt) {
this.dtm_crt = dtm_crt;
}
public String getPriority() {
return priority;
}
public void setPriority(String priority) {
this.priority = priority;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public java.util.Date getScheme_last_update() {
return scheme_last_update;
}
public void setScheme_last_update(java.util.Date scheme_last_update) {
this.scheme_last_update = scheme_last_update;
}
public String getIs_verification() {
return is_verification;
}
public void setIs_verification(String is_verification) {
this.is_verification = is_verification;
}
public String getIs_preview_server() {
return is_preview_server;
}
public void setIs_preview_server(String is_preview_server) {
this.is_preview_server = is_preview_server;
}
public String getUuid_user() {
return uuid_user;
}
public void setUuid_user(String uuid_user) {
this.uuid_user = uuid_user;
}
public byte[] getVoice_note() {
return voice_note;
}
public void setVoice_note(byte[] voice_note) {
this.voice_note = voice_note;
}
public String getUuid_scheme() {
return uuid_scheme;
}
public void setUuid_scheme(String uuid_scheme) {
this.uuid_scheme = uuid_scheme;
}
public String getZip_code() {
return zip_code;
}
public void setZip_code(String zip_code) {
this.zip_code = zip_code;
}
public java.util.Date getStart_date() {
return start_date;
}
public void setStart_date(java.util.Date start_date) {
this.start_date = start_date;
}
public java.util.Date getOpen_date() {
return open_date;
}
public void setOpen_date(java.util.Date open_date) {
this.open_date = open_date;
}
public String getAppl_no() {
return appl_no;
}
public void setAppl_no(String appl_no) {
this.appl_no = appl_no;
}
public String getIs_prepocessed() {
return is_prepocessed;
}
public void setIs_prepocessed(String is_prepocessed) {
this.is_prepocessed = is_prepocessed;
}
public Integer getLast_saved_question() {
return last_saved_question;
}
public void setLast_saved_question(Integer last_saved_question) {
this.last_saved_question = last_saved_question;
}
public String getIs_reconciled() {
return is_reconciled;
}
public void setIs_reconciled(String is_reconciled) {
this.is_reconciled = is_reconciled;
}
public java.util.Date getPts_date() {
return pts_date;
}
public void setPts_date(java.util.Date pts_date) {
this.pts_date = pts_date;
}
public String getAccess_mode() {
return access_mode;
}
public void setAccess_mode(String access_mode) {
this.access_mode = access_mode;
}
public String getRv_number() {
return rv_number;
}
public void setRv_number(String rv_number) {
this.rv_number = rv_number;
}
public String getStatus_rv() {
return status_rv;
}
public void setStatus_rv(String status_rv) {
this.status_rv = status_rv;
}
public String getNo_rangka() {
return no_rangka;
}
public void setNo_rangka(String no_rangka) {
this.no_rangka = no_rangka;
}
public String getNo_plat() {
return no_plat;
}
public void setNo_plat(String no_plat) {
this.no_plat = no_plat;
}
public String getNo_mesin() {
return no_mesin;
}
public void setNo_mesin(String no_mesin) {
this.no_mesin = no_mesin;
}
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getForm_version() {
return form_version;
}
public void setForm_version(String form_version) {
this.form_version = form_version;
}
public String getFlag_survey() {
return flag_survey;
}
public void setFlag_survey(String flag_survey) {
this.flag_survey = flag_survey;
}
public String getUuid_resurvey_user() {
return uuid_resurvey_user;
}
public void setUuid_resurvey_user(String uuid_resurvey_user) {
this.uuid_resurvey_user = uuid_resurvey_user;
}
public String getResurvey_suggested() {
return resurvey_suggested;
}
public void setResurvey_suggested(String resurvey_suggested) {
this.resurvey_suggested = resurvey_suggested;
}
public String getVerification_notes() {
return verification_notes;
}
public void setVerification_notes(String verification_notes) {
this.verification_notes = verification_notes;
}
public String getOd() {
return od;
}
public void setOd(String od) {
this.od = od;
}
public String getAmt_due() {
return amt_due;
}
public void setAmt_due(String amt_due) {
this.amt_due = amt_due;
}
public String getInst_no() {
return inst_no;
}
public void setInst_no(String inst_no) {
this.inst_no = inst_no;
}
public String getStatus_code() {
return status_code;
}
public void setStatus_code(String status_code) {
this.status_code = status_code;
}
public String getUuid_account() {
return uuid_account;
}
public void setUuid_account(String uuid_account) {
this.uuid_account = uuid_account;
}
public String getUuid_product() {
return uuid_product;
}
public void setUuid_product(String uuid_product) {
this.uuid_product = uuid_product;
}
public String getReference_number() {
return reference_number;
}
public void setReference_number(String reference_number) {
this.reference_number = reference_number;
}
public String getData_dukcapil() {
return data_dukcapil;
}
public void setData_dukcapil(String data_dukcapil) {
this.data_dukcapil = data_dukcapil;
}
public Integer getSeq_no() {
return seq_no;
}
public void setSeq_no(Integer seq_no) {
this.seq_no = seq_no;
}
public String getBatch_id() {
return batch_id;
}
public void setBatch_id(String batch_id) {
this.batch_id = batch_id;
}
public String getSurvey_location() {
return survey_location;
}
public void setSurvey_location(String survey_location) {
this.survey_location = survey_location;
}
/** To-one relationship, resolved on first access. */
public User getUser() {
String __key = this.uuid_user;
if (user__resolvedKey == null || user__resolvedKey != __key) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
UserDao targetDao = daoSession.getUserDao();
User userNew = targetDao.load(__key);
synchronized (this) {
user = userNew;
user__resolvedKey = __key;
}
}
return user;
}
public void setUser(User user) {
synchronized (this) {
this.user = user;
uuid_user = user == null ? null : user.getUuid_user();
user__resolvedKey = uuid_user;
}
}
/** To-one relationship, resolved on first access. */
public Scheme getScheme() {
String __key = this.uuid_scheme;
if (scheme__resolvedKey == null || scheme__resolvedKey != __key) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
SchemeDao targetDao = daoSession.getSchemeDao();
Scheme schemeNew = targetDao.load(__key);
synchronized (this) {
scheme = schemeNew;
scheme__resolvedKey = __key;
}
}
return scheme;
}
public void setScheme(Scheme scheme) {
synchronized (this) {
this.scheme = scheme;
uuid_scheme = scheme == null ? null : scheme.getUuid_scheme();
scheme__resolvedKey = uuid_scheme;
}
}
/** To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity. */
public List<ImageResult> getImageResultList() {
if (imageResultList == null) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
ImageResultDao targetDao = daoSession.getImageResultDao();
List<ImageResult> imageResultListNew = targetDao._queryTaskH_ImageResultList(uuid_task_h);
synchronized (this) {
if(imageResultList == null) {
imageResultList = imageResultListNew;
}
}
}
return imageResultList;
}
/** Resets a to-many relationship, making the next get call to query for a fresh result. */
public synchronized void resetImageResultList() {
imageResultList = null;
}
/** To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity. */
public List<ReceiptVoucher> getReceiptVoucherList() {
if (receiptVoucherList == null) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
ReceiptVoucherDao targetDao = daoSession.getReceiptVoucherDao();
List<ReceiptVoucher> receiptVoucherListNew = targetDao._queryTaskH_ReceiptVoucherList(uuid_task_h);
synchronized (this) {
if(receiptVoucherList == null) {
receiptVoucherList = receiptVoucherListNew;
}
}
}
return receiptVoucherList;
}
/** Resets a to-many relationship, making the next get call to query for a fresh result. */
public synchronized void resetReceiptVoucherList() {
receiptVoucherList = null;
}
/** To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity. */
public List<TaskD> getTaskDList() {
if (taskDList == null) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
TaskDDao targetDao = daoSession.getTaskDDao();
List<TaskD> taskDListNew = targetDao._queryTaskH_TaskDList(uuid_task_h);
synchronized (this) {
if(taskDList == null) {
taskDList = taskDListNew;
}
}
}
return taskDList;
}
/** Resets a to-many relationship, making the next get call to query for a fresh result. */
public synchronized void resetTaskDList() {
taskDList = null;
}
/** To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity. */
public List<ErrorLog> getErrorLogList() {
if (errorLogList == null) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
ErrorLogDao targetDao = daoSession.getErrorLogDao();
List<ErrorLog> errorLogListNew = targetDao._queryTaskH_ErrorLogList(uuid_task_h);
synchronized (this) {
if(errorLogList == null) {
errorLogList = errorLogListNew;
}
}
}
return errorLogList;
}
/** Resets a to-many relationship, making the next get call to query for a fresh result. */
public synchronized void resetErrorLogList() {
errorLogList = null;
}
/** To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity. */
public List<Timeline> getTimelineList() {
if (timelineList == null) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
TimelineDao targetDao = daoSession.getTimelineDao();
List<Timeline> timelineListNew = targetDao._queryTaskH_TimelineList(uuid_task_h);
synchronized (this) {
if(timelineList == null) {
timelineList = timelineListNew;
}
}
}
return timelineList;
}
/** Resets a to-many relationship, making the next get call to query for a fresh result. */
public synchronized void resetTimelineList() {
timelineList = null;
}
/** To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity. */
public List<TaskHSequence> getTaskHSequenceList() {
if (taskHSequenceList == null) {
if (daoSession == null) {
throw new DaoException("Entity is detached from DAO context");
}
TaskHSequenceDao targetDao = daoSession.getTaskHSequenceDao();
List<TaskHSequence> taskHSequenceListNew = targetDao._queryTaskH_TaskHSequenceList(uuid_task_h);
synchronized (this) {
if(taskHSequenceList == null) {
taskHSequenceList = taskHSequenceListNew;
}
}
}
return taskHSequenceList;
}
/** Resets a to-many relationship, making the next get call to query for a fresh result. */
public synchronized void resetTaskHSequenceList() {
taskHSequenceList = null;
}
/** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */
public void delete() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.delete(this);
}
/** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */
public void update() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.update(this);
}
/** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */
public void refresh() {
if (myDao == null) {
throw new DaoException("Entity is detached from DAO context");
}
myDao.refresh(this);
}
}

View file

@ -0,0 +1,74 @@
package com.adins.mss.base.dynamicform.form.models;
import com.adins.mss.base.util.ExcludeFromGson;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import java.util.List;
/**
* Created by gigin.ginanjar on 07/10/2016.
*/
public class LookupCriteriaBean implements Serializable {
@SerializedName("type")
private String type;
@SerializedName("isHide")
private String isHide;
@SerializedName("code")
private String code;
@SerializedName("value")
private String value;
@SerializedName("defAns")
private List<ParameterAnswer> parameterAnswers;
@ExcludeFromGson
private boolean selected;
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
this.selected = selected;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getIsHide() {
return isHide;
}
public void setIsHide(String isHide) {
this.isHide = isHide;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public List<ParameterAnswer> getParameterAnswers() {
return parameterAnswers;
}
public void setParameterAnswers(List<ParameterAnswer> parameterAnswers) {
this.parameterAnswers = parameterAnswers;
}
}