java - Create an useful and scalable class for SQLite Android -


i developing new android application , want create new class manage sqlite, want know best practice this.

so, have 3 or more resources in project: rss,fb,tweet , in future more resources.. every resources have 5 method getitems() , getfeed() , insert(), delete() , etc..

my actual class db manager have singleton , know not practice. don't want create god class method accessing database. :(

how can setup new class? can have piece of pseudocode learning it?

thanks!

you may consider ormlite android. provides needs powerful daos classes: insert, update, delete. ormlite's features:

  • setup classes adding java annotations.
  • powerful abstract database access object (dao) classes.
  • flexible querybuilder construct simple , complex queries.
  • supports mysql, postgres, microsoft sql server, h2, derby, hsqldb, , sqlite , can extended additional databases relatively easily.
  • provisional support db2, oracle, odbc, , netezza. contact author if database type not supported.
  • handles "compiled" sql statements repetitive query tasks.
  • supports "foreign" objects class field being object id stored in database table.
  • basic support database transactions.
  • auto generates sql create , drop database tables.
  • spring configuration support doas , class configurations.
  • support configuring of tables , fields without annotations.

here place can start


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -