An open API service indexing awesome lists of open source software.

https://github.com/juanchinovas/simpledaoa

A Simple Data Access Object for Android to control your android app databases
https://github.com/juanchinovas/simpledaoa

Last synced: about 1 month ago
JSON representation

A Simple Data Access Object for Android to control your android app databases

Awesome Lists containing this project

README

        

simpleDAOa
==========

A Simple Data Access Object for Android to control your android app databases.
------------------------------------------------------------------------------
## How to use simpleDAOa?

1. Create a xml file in assets directory named dao.xml.
That file have to have the following structure
######



_id
name
dummy_column
entry_date


lincense_plate
model
entry_date
owner


2. Add the DAOa project as library in your Android project
3. Create a Instance of a singleton class **DBManager**.
And you can access all methods in this class.

==========

~~~~~ java
# Initializes a DBManager
private DBManager dbManager = DBManager.getInstance(this); //(this) a activity instance

# Read data from database

Object objct = dbManager.selectFrom("tbl_name1",null); // all rows
if (objct instanceof List) {
List ps = (List)objct;
} else if (objct != null) {
Person person = (((Person)objct).getName());
}
~~~~~