mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-07-01 05:14:17 +00:00
add project adins
This commit is contained in:
parent
ad06ac5505
commit
f8f85d679d
5299 changed files with 625430 additions and 0 deletions
|
@ -0,0 +1,81 @@
|
|||
package com.adins.mss.foundation.db.dataaccess;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.adins.mss.dao.BankAccountOfBranch;
|
||||
import com.adins.mss.dao.BankAccountOfBranchDao;
|
||||
import com.adins.mss.dao.DaoSession;
|
||||
import com.adins.mss.foundation.db.DaoOpenHelper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.greenrobot.dao.query.QueryBuilder;
|
||||
|
||||
public class BankAccountOfBranchDataAccess {
|
||||
|
||||
// private static DaoOpenHelper daoOpenHelper;
|
||||
|
||||
/**
|
||||
* use to generate dao session that you can access modelDao
|
||||
*
|
||||
* @param context --> context from activity
|
||||
* @return
|
||||
*/
|
||||
protected static DaoSession getDaoSession(Context context){
|
||||
return DaoOpenHelper.getDaoSession(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* get lookupDao dao and you can access the DB
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
protected static BankAccountOfBranchDao getBankAccountOfBranchDao(Context context){
|
||||
return getDaoSession(context).getBankAccountOfBranchDao();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear session, close db and set daoOpenHelper to null
|
||||
*
|
||||
*/
|
||||
public static void closeAll(){
|
||||
DaoOpenHelper.closeAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* add lookup as list entity
|
||||
*
|
||||
* @param context
|
||||
* @param bankAccountOfBranchList
|
||||
*/
|
||||
public static void add(Context context, List<BankAccountOfBranch> bankAccountOfBranchList){
|
||||
getBankAccountOfBranchDao(context).insertInTx(bankAccountOfBranchList);
|
||||
getDaoSession(context).clear();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* delete all content in table.
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
public static void clean(Context context){
|
||||
getBankAccountOfBranchDao(context).deleteAll();
|
||||
getDaoSession(context).clear();
|
||||
}
|
||||
|
||||
public static List<BankAccountOfBranch> getAll(Context context){
|
||||
QueryBuilder<BankAccountOfBranch> qb = getBankAccountOfBranchDao(context).queryBuilder();
|
||||
qb.build();
|
||||
return qb.list();
|
||||
}
|
||||
|
||||
public static List<BankAccountOfBranch> getOneByBranchCode(Context context, String branch_code){
|
||||
QueryBuilder<BankAccountOfBranch> qb = getBankAccountOfBranchDao(context).queryBuilder();
|
||||
qb.where(BankAccountOfBranchDao.Properties.Branch_code.eq(branch_code));
|
||||
qb.build();
|
||||
return qb.list();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,509 @@
|
|||
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.QuestionSet;
|
||||
|
||||
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
|
||||
/**
|
||||
* DAO for table "MS_QUESTIONSET".
|
||||
*/
|
||||
public class QuestionSetDao extends AbstractDao<QuestionSet, String> {
|
||||
|
||||
public static final String TABLENAME = "MS_QUESTIONSET";
|
||||
|
||||
/**
|
||||
* Properties of entity QuestionSet.<br/>
|
||||
* Can be used for QueryBuilder and for referencing column names.
|
||||
*/
|
||||
public static class Properties {
|
||||
public final static Property Uuid_question_set = new Property(0, String.class, "uuid_question_set", true, "UUID_QUESTION_SET");
|
||||
public final static Property Question_group_id = new Property(1, String.class, "question_group_id", false, "QUESTION_GROUP_ID");
|
||||
public final static Property Question_group_name = new Property(2, String.class, "question_group_name", false, "QUESTION_GROUP_NAME");
|
||||
public final static Property Question_group_order = new Property(3, Integer.class, "question_group_order", false, "QUESTION_GROUP_ORDER");
|
||||
public final static Property Question_id = new Property(4, String.class, "question_id", false, "QUESTION_ID");
|
||||
public final static Property Question_label = new Property(5, String.class, "question_label", false, "QUESTION_LABEL");
|
||||
public final static Property Question_order = new Property(6, Integer.class, "question_order", false, "QUESTION_ORDER");
|
||||
public final static Property Answer_type = new Property(7, String.class, "answer_type", false, "ANSWER_TYPE");
|
||||
public final static Property Option_answers = new Property(8, String.class, "option_answers", false, "OPTION_ANSWERS");
|
||||
public final static Property Choice_filter = new Property(9, String.class, "choice_filter", false, "CHOICE_FILTER");
|
||||
public final static Property Is_mandatory = new Property(10, String.class, "is_mandatory", false, "IS_MANDATORY");
|
||||
public final static Property Max_length = new Property(11, Integer.class, "max_length", false, "MAX_LENGTH");
|
||||
public final static Property Is_visible = new Property(12, String.class, "is_visible", false, "IS_VISIBLE");
|
||||
public final static Property Is_readonly = new Property(13, String.class, "is_readonly", false, "IS_READONLY");
|
||||
public final static Property Regex = new Property(14, String.class, "regex", false, "REGEX");
|
||||
public final static Property Relevant_question = new Property(15, String.class, "relevant_question", false, "RELEVANT_QUESTION");
|
||||
public final static Property Calculate = new Property(16, String.class, "calculate", false, "CALCULATE");
|
||||
public final static Property Constraint_message = new Property(17, String.class, "constraint_message", false, "CONSTRAINT_MESSAGE");
|
||||
public final static Property Usr_crt = new Property(18, String.class, "usr_crt", false, "USR_CRT");
|
||||
public final static Property Dtm_crt = new Property(19, java.util.Date.class, "dtm_crt", false, "DTM_CRT");
|
||||
public final static Property Usr_upd = new Property(20, String.class, "usr_upd", false, "USR_UPD");
|
||||
public final static Property Dtm_upd = new Property(21, java.util.Date.class, "dtm_upd", false, "DTM_UPD");
|
||||
public final static Property Identifier_name = new Property(22, String.class, "identifier_name", false, "IDENTIFIER_NAME");
|
||||
public final static Property Uuid_scheme = new Property(23, String.class, "uuid_scheme", false, "UUID_SCHEME");
|
||||
public final static Property Lov_group = new Property(24, String.class, "lov_group", false, "LOV_GROUP");
|
||||
public final static Property Tag = new Property(25, String.class, "tag", false, "TAG");
|
||||
public final static Property Is_holiday_allowed = new Property(26, String.class, "is_holiday_allowed", false, "IS_HOLIDAY_ALLOWED");
|
||||
public final static Property Img_quality = new Property(27, String.class, "img_quality", false, "IMG_QUALITY");
|
||||
public final static Property Question_validation = new Property(28, String.class, "question_validation", false, "QUESTION_VALIDATION");
|
||||
public final static Property Question_value = new Property(29, String.class, "question_value", false, "QUESTION_VALUE");
|
||||
public final static Property Validate_err_message = new Property(30, String.class, "validate_err_message", false, "VALIDATE_ERR_MESSAGE");
|
||||
public final static Property Form_version = new Property(31, String.class, "form_version", false, "FORM_VERSION");
|
||||
public final static Property Relevant_mandatory = new Property(32, String.class, "relevant_mandatory", false, "RELEVANT_MANDATORY");
|
||||
};
|
||||
|
||||
private DaoSession daoSession;
|
||||
|
||||
private Query<QuestionSet> scheme_QuestionSetListQuery;
|
||||
|
||||
public QuestionSetDao(DaoConfig config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
public QuestionSetDao(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_QUESTIONSET\" (" + //
|
||||
"\"UUID_QUESTION_SET\" TEXT PRIMARY KEY NOT NULL ," + // 0: uuid_question_set
|
||||
"\"QUESTION_GROUP_ID\" TEXT," + // 1: question_group_id
|
||||
"\"QUESTION_GROUP_NAME\" TEXT," + // 2: question_group_name
|
||||
"\"QUESTION_GROUP_ORDER\" INTEGER," + // 3: question_group_order
|
||||
"\"QUESTION_ID\" TEXT," + // 4: question_id
|
||||
"\"QUESTION_LABEL\" TEXT," + // 5: question_label
|
||||
"\"QUESTION_ORDER\" INTEGER," + // 6: question_order
|
||||
"\"ANSWER_TYPE\" TEXT," + // 7: answer_type
|
||||
"\"OPTION_ANSWERS\" TEXT," + // 8: option_answers
|
||||
"\"CHOICE_FILTER\" TEXT," + // 9: choice_filter
|
||||
"\"IS_MANDATORY\" TEXT," + // 10: is_mandatory
|
||||
"\"MAX_LENGTH\" INTEGER," + // 11: max_length
|
||||
"\"IS_VISIBLE\" TEXT," + // 12: is_visible
|
||||
"\"IS_READONLY\" TEXT," + // 13: is_readonly
|
||||
"\"REGEX\" TEXT," + // 14: regex
|
||||
"\"RELEVANT_QUESTION\" TEXT," + // 15: relevant_question
|
||||
"\"CALCULATE\" TEXT," + // 16: calculate
|
||||
"\"CONSTRAINT_MESSAGE\" TEXT," + // 17: constraint_message
|
||||
"\"USR_CRT\" TEXT," + // 18: usr_crt
|
||||
"\"DTM_CRT\" INTEGER," + // 19: dtm_crt
|
||||
"\"USR_UPD\" TEXT," + // 20: usr_upd
|
||||
"\"DTM_UPD\" INTEGER," + // 21: dtm_upd
|
||||
"\"IDENTIFIER_NAME\" TEXT," + // 22: identifier_name
|
||||
"\"UUID_SCHEME\" TEXT," + // 23: uuid_scheme
|
||||
"\"LOV_GROUP\" TEXT," + // 24: lov_group
|
||||
"\"TAG\" TEXT," + // 25: tag
|
||||
"\"IS_HOLIDAY_ALLOWED\" TEXT," + // 26: is_holiday_allowed
|
||||
"\"IMG_QUALITY\" TEXT," + // 27: img_quality
|
||||
"\"QUESTION_VALIDATION\" TEXT," + // 28: question_validation
|
||||
"\"QUESTION_VALUE\" TEXT," + // 29: question_value
|
||||
"\"VALIDATE_ERR_MESSAGE\" TEXT," + // 30: validate_err_message
|
||||
"\"FORM_VERSION\" TEXT," + // 31: form_version
|
||||
"\"RELEVANT_MANDATORY\" TEXT);"); // 32: relevant_mandatory
|
||||
}
|
||||
|
||||
/** Drops the underlying database table. */
|
||||
public static void dropTable(Database db, boolean ifExists) {
|
||||
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"MS_QUESTIONSET\"";
|
||||
db.execSQL(sql);
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
@Override
|
||||
protected void bindValues(DatabaseStatement stmt, QuestionSet entity) {
|
||||
stmt.clearBindings();
|
||||
stmt.bindString(1, entity.getUuid_question_set());
|
||||
|
||||
String question_group_id = entity.getQuestion_group_id();
|
||||
if (question_group_id != null) {
|
||||
stmt.bindString(2, question_group_id);
|
||||
}
|
||||
|
||||
String question_group_name = entity.getQuestion_group_name();
|
||||
if (question_group_name != null) {
|
||||
stmt.bindString(3, question_group_name);
|
||||
}
|
||||
|
||||
Integer question_group_order = entity.getQuestion_group_order();
|
||||
if (question_group_order != null) {
|
||||
stmt.bindLong(4, question_group_order);
|
||||
}
|
||||
|
||||
String question_id = entity.getQuestion_id();
|
||||
if (question_id != null) {
|
||||
stmt.bindString(5, question_id);
|
||||
}
|
||||
|
||||
String question_label = entity.getQuestion_label();
|
||||
if (question_label != null) {
|
||||
stmt.bindString(6, question_label);
|
||||
}
|
||||
|
||||
Integer question_order = entity.getQuestion_order();
|
||||
if (question_order != null) {
|
||||
stmt.bindLong(7, question_order);
|
||||
}
|
||||
|
||||
String answer_type = entity.getAnswer_type();
|
||||
if (answer_type != null) {
|
||||
stmt.bindString(8, answer_type);
|
||||
}
|
||||
|
||||
String option_answers = entity.getOption_answers();
|
||||
if (option_answers != null) {
|
||||
stmt.bindString(9, option_answers);
|
||||
}
|
||||
|
||||
String choice_filter = entity.getChoice_filter();
|
||||
if (choice_filter != null) {
|
||||
stmt.bindString(10, choice_filter);
|
||||
}
|
||||
|
||||
String is_mandatory = entity.getIs_mandatory();
|
||||
if (is_mandatory != null) {
|
||||
stmt.bindString(11, is_mandatory);
|
||||
}
|
||||
|
||||
Integer max_length = entity.getMax_length();
|
||||
if (max_length != null) {
|
||||
stmt.bindLong(12, max_length);
|
||||
}
|
||||
|
||||
String is_visible = entity.getIs_visible();
|
||||
if (is_visible != null) {
|
||||
stmt.bindString(13, is_visible);
|
||||
}
|
||||
|
||||
String is_readonly = entity.getIs_readonly();
|
||||
if (is_readonly != null) {
|
||||
stmt.bindString(14, is_readonly);
|
||||
}
|
||||
|
||||
String regex = entity.getRegex();
|
||||
if (regex != null) {
|
||||
stmt.bindString(15, regex);
|
||||
}
|
||||
|
||||
String relevant_question = entity.getRelevant_question();
|
||||
if (relevant_question != null) {
|
||||
stmt.bindString(16, relevant_question);
|
||||
}
|
||||
|
||||
String calculate = entity.getCalculate();
|
||||
if (calculate != null) {
|
||||
stmt.bindString(17, calculate);
|
||||
}
|
||||
|
||||
String constraint_message = entity.getConstraint_message();
|
||||
if (constraint_message != null) {
|
||||
stmt.bindString(18, constraint_message);
|
||||
}
|
||||
|
||||
String usr_crt = entity.getUsr_crt();
|
||||
if (usr_crt != null) {
|
||||
stmt.bindString(19, usr_crt);
|
||||
}
|
||||
|
||||
java.util.Date dtm_crt = entity.getDtm_crt();
|
||||
if (dtm_crt != null) {
|
||||
stmt.bindLong(20, dtm_crt.getTime());
|
||||
}
|
||||
|
||||
String usr_upd = entity.getUsr_upd();
|
||||
if (usr_upd != null) {
|
||||
stmt.bindString(21, usr_upd);
|
||||
}
|
||||
|
||||
java.util.Date dtm_upd = entity.getDtm_upd();
|
||||
if (dtm_upd != null) {
|
||||
stmt.bindLong(22, dtm_upd.getTime());
|
||||
}
|
||||
|
||||
String identifier_name = entity.getIdentifier_name();
|
||||
if (identifier_name != null) {
|
||||
stmt.bindString(23, identifier_name);
|
||||
}
|
||||
|
||||
String uuid_scheme = entity.getUuid_scheme();
|
||||
if (uuid_scheme != null) {
|
||||
stmt.bindString(24, uuid_scheme);
|
||||
}
|
||||
|
||||
String lov_group = entity.getLov_group();
|
||||
if (lov_group != null) {
|
||||
stmt.bindString(25, lov_group);
|
||||
}
|
||||
|
||||
String tag = entity.getTag();
|
||||
if (tag != null) {
|
||||
stmt.bindString(26, tag);
|
||||
}
|
||||
|
||||
String is_holiday_allowed = entity.getIs_holiday_allowed();
|
||||
if (is_holiday_allowed != null) {
|
||||
stmt.bindString(27, is_holiday_allowed);
|
||||
}
|
||||
|
||||
String img_quality = entity.getImg_quality();
|
||||
if (img_quality != null) {
|
||||
stmt.bindString(28, img_quality);
|
||||
}
|
||||
|
||||
String question_validation = entity.getQuestion_validation();
|
||||
if (question_validation != null) {
|
||||
stmt.bindString(29, question_validation);
|
||||
}
|
||||
|
||||
String question_value = entity.getQuestion_value();
|
||||
if (question_value != null) {
|
||||
stmt.bindString(30, question_value);
|
||||
}
|
||||
|
||||
String validate_err_message = entity.getValidate_err_message();
|
||||
if (validate_err_message != null) {
|
||||
stmt.bindString(31, validate_err_message);
|
||||
}
|
||||
|
||||
String form_version = entity.getForm_version();
|
||||
if (form_version != null) {
|
||||
stmt.bindString(32, form_version);
|
||||
}
|
||||
|
||||
String relevant_mandatory = entity.getRelevant_mandatory();
|
||||
if (relevant_mandatory != null) {
|
||||
stmt.bindString(33, relevant_mandatory);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void attachEntity(QuestionSet entity) {
|
||||
super.attachEntity(entity);
|
||||
entity.__setDaoSession(daoSession);
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
@Override
|
||||
public String readKey(Cursor cursor, int offset) {
|
||||
return cursor.getString(offset + 0);
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
@Override
|
||||
public QuestionSet readEntity(Cursor cursor, int offset) {
|
||||
QuestionSet entity = new QuestionSet( //
|
||||
cursor.getString(offset + 0), // uuid_question_set
|
||||
cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // question_group_id
|
||||
cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // question_group_name
|
||||
cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3), // question_group_order
|
||||
cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // question_id
|
||||
cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // question_label
|
||||
cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6), // question_order
|
||||
cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // answer_type
|
||||
cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // option_answers
|
||||
cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // choice_filter
|
||||
cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // is_mandatory
|
||||
cursor.isNull(offset + 11) ? null : cursor.getInt(offset + 11), // max_length
|
||||
cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12), // is_visible
|
||||
cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13), // is_readonly
|
||||
cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // regex
|
||||
cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // relevant_question
|
||||
cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // calculate
|
||||
cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // constraint_message
|
||||
cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18), // usr_crt
|
||||
cursor.isNull(offset + 19) ? null : new java.util.Date(cursor.getLong(offset + 19)), // dtm_crt
|
||||
cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20), // usr_upd
|
||||
cursor.isNull(offset + 21) ? null : new java.util.Date(cursor.getLong(offset + 21)), // dtm_upd
|
||||
cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22), // identifier_name
|
||||
cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23), // uuid_scheme
|
||||
cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24), // lov_group
|
||||
cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25), // tag
|
||||
cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26), // is_holiday_allowed
|
||||
cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27), // img_quality
|
||||
cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28), // question_validation
|
||||
cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29), // question_value
|
||||
cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30), // validate_err_message
|
||||
cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31), // form_version
|
||||
cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32) // relevant_mandatory
|
||||
);
|
||||
return entity;
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
@Override
|
||||
public void readEntity(Cursor cursor, QuestionSet entity, int offset) {
|
||||
entity.setUuid_question_set(cursor.getString(offset + 0));
|
||||
entity.setQuestion_group_id(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
|
||||
entity.setQuestion_group_name(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
|
||||
entity.setQuestion_group_order(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3));
|
||||
entity.setQuestion_id(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
|
||||
entity.setQuestion_label(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
|
||||
entity.setQuestion_order(cursor.isNull(offset + 6) ? null : cursor.getInt(offset + 6));
|
||||
entity.setAnswer_type(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
|
||||
entity.setOption_answers(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
|
||||
entity.setChoice_filter(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9));
|
||||
entity.setIs_mandatory(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10));
|
||||
entity.setMax_length(cursor.isNull(offset + 11) ? null : cursor.getInt(offset + 11));
|
||||
entity.setIs_visible(cursor.isNull(offset + 12) ? null : cursor.getString(offset + 12));
|
||||
entity.setIs_readonly(cursor.isNull(offset + 13) ? null : cursor.getString(offset + 13));
|
||||
entity.setRegex(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
|
||||
entity.setRelevant_question(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
|
||||
entity.setCalculate(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
|
||||
entity.setConstraint_message(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
|
||||
entity.setUsr_crt(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
|
||||
entity.setDtm_crt(cursor.isNull(offset + 19) ? null : new java.util.Date(cursor.getLong(offset + 19)));
|
||||
entity.setUsr_upd(cursor.isNull(offset + 20) ? null : cursor.getString(offset + 20));
|
||||
entity.setDtm_upd(cursor.isNull(offset + 21) ? null : new java.util.Date(cursor.getLong(offset + 21)));
|
||||
entity.setIdentifier_name(cursor.isNull(offset + 22) ? null : cursor.getString(offset + 22));
|
||||
entity.setUuid_scheme(cursor.isNull(offset + 23) ? null : cursor.getString(offset + 23));
|
||||
entity.setLov_group(cursor.isNull(offset + 24) ? null : cursor.getString(offset + 24));
|
||||
entity.setTag(cursor.isNull(offset + 25) ? null : cursor.getString(offset + 25));
|
||||
entity.setIs_holiday_allowed(cursor.isNull(offset + 26) ? null : cursor.getString(offset + 26));
|
||||
entity.setImg_quality(cursor.isNull(offset + 27) ? null : cursor.getString(offset + 27));
|
||||
entity.setQuestion_validation(cursor.isNull(offset + 28) ? null : cursor.getString(offset + 28));
|
||||
entity.setQuestion_value(cursor.isNull(offset + 29) ? null : cursor.getString(offset + 29));
|
||||
entity.setValidate_err_message(cursor.isNull(offset + 30) ? null : cursor.getString(offset + 30));
|
||||
entity.setForm_version(cursor.isNull(offset + 31) ? null : cursor.getString(offset + 31));
|
||||
entity.setRelevant_mandatory(cursor.isNull(offset + 32) ? null : cursor.getString(offset + 32));
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
@Override
|
||||
protected String updateKeyAfterInsert(QuestionSet entity, long rowId) {
|
||||
return entity.getUuid_question_set();
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
@Override
|
||||
public String getKey(QuestionSet entity) {
|
||||
if(entity != null) {
|
||||
return entity.getUuid_question_set();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
@Override
|
||||
protected boolean isEntityUpdateable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Internal query to resolve the "questionSetList" to-many relationship of Scheme. */
|
||||
public List<QuestionSet> _queryScheme_QuestionSetList(String uuid_scheme) {
|
||||
synchronized (this) {
|
||||
if (scheme_QuestionSetListQuery == null) {
|
||||
QueryBuilder<QuestionSet> queryBuilder = queryBuilder();
|
||||
queryBuilder.where(Properties.Uuid_scheme.eq(null));
|
||||
scheme_QuestionSetListQuery = queryBuilder.build();
|
||||
}
|
||||
}
|
||||
Query<QuestionSet> query = scheme_QuestionSetListQuery.forCurrentThread();
|
||||
query.setParameter(0, uuid_scheme);
|
||||
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.getSchemeDao().getAllColumns());
|
||||
builder.append(" FROM MS_QUESTIONSET T");
|
||||
builder.append(" LEFT JOIN MS_SCHEME T0 ON T.\"UUID_SCHEME\"=T0.\"UUID_SCHEME\"");
|
||||
builder.append(' ');
|
||||
selectDeep = builder.toString();
|
||||
}
|
||||
return selectDeep;
|
||||
}
|
||||
|
||||
protected QuestionSet loadCurrentDeep(Cursor cursor, boolean lock) {
|
||||
QuestionSet entity = loadCurrent(cursor, 0, lock);
|
||||
int offset = getAllColumns().length;
|
||||
|
||||
Scheme scheme = loadCurrentOther(daoSession.getSchemeDao(), cursor, offset);
|
||||
entity.setScheme(scheme);
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
public QuestionSet 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<QuestionSet> loadAllDeepFromCursor(Cursor cursor) {
|
||||
int count = cursor.getCount();
|
||||
List<QuestionSet> list = new ArrayList<QuestionSet>(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<QuestionSet> 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<QuestionSet> queryDeep(String where, String... selectionArg) {
|
||||
Cursor cursor = db.rawQuery(getSelectDeep() + where, selectionArg);
|
||||
return loadDeepAllAndCloseCursor(cursor);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.adins.mss.coll.closingtask;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.adins.mss.coll.R;
|
||||
import com.adins.mss.coll.closingtask.models.ClosingTaskEntity;
|
||||
import com.androidquery.AQuery;
|
||||
|
||||
/**
|
||||
* Created by angga.permadi on 6/6/2016.
|
||||
*/
|
||||
public class ClosingTaskItem extends LinearLayout {
|
||||
|
||||
protected AQuery query;
|
||||
|
||||
public ClosingTaskItem(Context context) {
|
||||
super(context);
|
||||
inflate(context);
|
||||
|
||||
setId((int) (System.currentTimeMillis() / 1000));
|
||||
}
|
||||
|
||||
private void inflate(Context context) {
|
||||
View view = inflate(context, R.layout.new_closing_task_item, this);
|
||||
|
||||
if(query == null) {
|
||||
query = new AQuery(view);
|
||||
} else {
|
||||
query = query.recycle(view);
|
||||
}
|
||||
}
|
||||
|
||||
public void bind(ClosingTaskEntity entity) {
|
||||
if (entity == null) return;
|
||||
|
||||
query.id(R.id.contractNo).text(entity.getNoKontrak());
|
||||
query.id(R.id.customerName).text(entity.getCustomerName());
|
||||
// query.id(R.id.tv_no_lkp).visibility(GONE);
|
||||
// query.id(R.id.tv_no_lkp).text(entity.getNoLkp());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="@color/btn_press_color" />
|
||||
</shape>
|
|
@ -0,0 +1,6 @@
|
|||
package com.manuelpeinado.fadingactionbar.view;
|
||||
|
||||
|
||||
public interface ObservableScrollable {
|
||||
void setOnScrollChangedCallback(OnScrollChangedCallback callback);
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.adins.mss.foundation.dialog.gitonway.lib.effects;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import com.adins.libs.nineoldandroids.animation.ObjectAnimator;
|
||||
|
||||
/*
|
||||
* Copyright 2014 litao
|
||||
* https://github.com/sd6352051/NiftyDialogEffects
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
public class RotateBottom extends BaseEffects {
|
||||
|
||||
@Override
|
||||
protected void setupAnimation(View view) {
|
||||
getAnimatorSet().playTogether(
|
||||
ObjectAnimator.ofFloat(view, "rotationX", 90, 0).setDuration(mDuration),
|
||||
ObjectAnimator.ofFloat(view, "translationY", 300, 0).setDuration(mDuration),
|
||||
ObjectAnimator.ofFloat(view, "alpha", 0, 1).setDuration(mDuration * 3 / 2)
|
||||
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.adins.mss.svy;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.rule.ActivityTestRule;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.adins.mss.foundation.http.AuditDataType;
|
||||
import com.adins.mss.foundation.http.AuditDataTypeGenerator;
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
import com.adins.mss.foundation.phone.TelephonyInfo;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class AndroidQIMEITest {
|
||||
@Rule
|
||||
public ActivityTestRule activityTestRule = new ActivityTestRule(MSLoginActivity.class);
|
||||
@Mock
|
||||
Context context;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
context = InstrumentationRegistry.getTargetContext().getApplicationContext();
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void LoginActivityTest(){
|
||||
Map<String, String> imeiMap = AuditDataTypeGenerator.getListImeiFromDevice(context);
|
||||
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
assertEquals(AuditDataTypeGenerator.getAndroidId(), imeiMap.get(MssRequestType.UN_KEY_IMEI));
|
||||
} else{
|
||||
TelephonyInfo tm = TelephonyInfo.getInstance(context);
|
||||
assertEquals(tm.getImeiSIM1(), imeiMap.get(MssRequestType.UN_KEY_IMEI));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.adins.mss.logger;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.adins.mss.constant.Global;
|
||||
|
||||
/**
|
||||
* Created by angga.permadi on 4/5/2016.
|
||||
*/
|
||||
public class Logger {
|
||||
|
||||
private static final String TAG = "com.adins.mss";
|
||||
|
||||
public static void d(Object object, String message) {
|
||||
Log.d(getTag(object), message);
|
||||
}
|
||||
|
||||
public static void d(String tag, String message) {
|
||||
if (!Global.IS_DEV) return;
|
||||
Log.d(TAG, message);
|
||||
}
|
||||
|
||||
public static void e(Object object, String message) {
|
||||
Log.e(getTag(object), message);
|
||||
}
|
||||
|
||||
public static void i(Object object, String message) {
|
||||
Log.i(getTag(object), message);
|
||||
}
|
||||
|
||||
public static void printStackTrace(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
private static String getTag(Object object) {
|
||||
return object != null ? object.getClass().getSimpleName() : TAG;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.adins.mss.foundation.print.rv;
|
||||
|
||||
import com.adins.mss.foundation.http.MssRequestType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Created by angga.permadi on 4/20/2016.
|
||||
*/
|
||||
public class RVNumberRequest extends MssRequestType {
|
||||
@SerializedName("rvBlank")
|
||||
private RVEntity rvBlank;
|
||||
|
||||
public RVEntity getRvBlank() {
|
||||
return rvBlank;
|
||||
}
|
||||
|
||||
public void setRvBlank(RVEntity rvBlank) {
|
||||
this.rvBlank = rvBlank;
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 177 KiB |
|
@ -0,0 +1,27 @@
|
|||
package com.adins.mss.base.log;
|
||||
|
||||
public class SentencesSato {
|
||||
String sentence;
|
||||
int lenghtSentemce;
|
||||
|
||||
public SentencesSato() {
|
||||
|
||||
}
|
||||
|
||||
public String getSentence() {
|
||||
return sentence;
|
||||
}
|
||||
|
||||
public void setSentence(String sentence) {
|
||||
this.sentence = sentence;
|
||||
}
|
||||
|
||||
public int getLenghtSentemce() {
|
||||
return lenghtSentemce;
|
||||
}
|
||||
|
||||
public void setLenghtSentemce(int lenghtSentemce) {
|
||||
this.lenghtSentemce = lenghtSentemce;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.adins.mss.foundation.questiongenerator.form.QuestionView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/questionLuOnlineLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/questionTextLabel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0. label" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgPhotoLuOnlineAnswer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:scaleType="centerInside"
|
||||
android:visibility="visible"
|
||||
android:src="@drawable/ic_camera"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutListDocument"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/line_height"
|
||||
android:background="@color/tv_gray"/>
|
||||
|
||||
</com.adins.mss.foundation.questiongenerator.form.QuestionView>
|
|
@ -0,0 +1,48 @@
|
|||
package com.services;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
|
||||
import com.adins.mss.base.mainmenu.MainMenuActivity;
|
||||
import com.adins.mss.svy.MSMainMenuActivity;
|
||||
|
||||
public class SurveyVerificationService extends Service {
|
||||
private SurveyVerificationThread auto;
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
stopSurveyVerificationThread();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
auto = MSMainMenuActivity.verificationThread;
|
||||
startSurveyVerificationThread();
|
||||
}
|
||||
|
||||
public synchronized void startSurveyVerificationThread() {
|
||||
if (auto == null) {
|
||||
auto = new SurveyVerificationThread(getApplicationContext());
|
||||
auto.start();
|
||||
}
|
||||
else {
|
||||
auto.start();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void stopSurveyVerificationThread() {
|
||||
if (auto != null) {
|
||||
auto.requestStop();
|
||||
auto = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent arg0) {
|
||||
return null;
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
Loading…
Add table
Add a link
Reference in a new issue