| | |
| | | import android.text.TextUtils; |
| | | |
| | | import com.basic.security.utils.Constants; |
| | | import com.basic.security.utils.FrameUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | |
| | | |
| | | public static Map<String, List<String>> tableColumnNames = new HashMap<>(); |
| | | |
| | | public static Map<String, String> cursorToModelAdapter(Cursor cursor, String table) { |
| | | public static Map<String, String> cursorToModelAdapter(Cursor cursor, String table) {// |
| | | Map<String, String> modelAdapter = new HashMap<>(); |
| | | String[] columnNames = cursor.getColumnNames(); |
| | | for (String columnName : columnNames) { |
| | |
| | | try { |
| | | String sql = "select * from "+table+" where id = '" + id + "'"; |
| | | if (Constants.printSql) { |
| | | System.out.println("findById="+sql); |
| | | System.out.println("findById="+sql |
| | | // + " " + FrameUtil.getFrames() |
| | | ); |
| | | } |
| | | cursor = DatabaseManager.getDatabase().rawQuery(sql, null); |
| | | if (cursor.moveToFirst()) { |