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
- Host: GitHub
- URL: https://github.com/juanchinovas/simpledaoa
- Owner: juanchinovas
- Created: 2014-12-27T15:58:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-27T17:47:11.000Z (over 10 years ago)
- Last Synced: 2025-02-02T07:13:34.069Z (3 months ago)
- Language: Java
- Homepage:
- Size: 566 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
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());
}
~~~~~