Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ORM for Android

 
Poornima Sharma
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

Is there any light weight ORM for Android?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out OrmLite (which I just found by searching for "orm for android" - hint, hint).
 
Poornima Sharma
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, even I have found it but I don't know if it is industry accepted or not. Or if it is stable or not.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried ORMLite and it is ok.

I am actually working on a tool myself. I am using it in one of my apps that I am developing and so far working pretty good. I still have more tests to write and some exception handling, as well as more Javadocs and documentation. When I am done, it will be open source. I just can't tell you yet where that will be. But, I'll say it will be in a very well respected place, as long as what I have done is really good. ;)

Mark
 
Poornima Sharma
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark, we will be waiting for your tool.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Poornima Sharma wrote:Thanks Mark, we will be waiting for your tool.

Umm, you did understand that you may be waiting for an indeterminate amount of time, right?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:
Poornima Sharma wrote:Thanks Mark, we will be waiting for your tool.

Umm, you did understand that you may be waiting for an indeterminate amount of time, right?


Ulf Dittmer wrote:
Poornima Sharma wrote:Thanks Mark, we will be waiting for your tool.

Umm, you did understand that you may be waiting for an indeterminate amount of time, right?


Yes, it is very much a work in progress. Trying to hide the horrible SQLite/Android apis is daunting. Just trying to make it easy to do an update statement is driving me crazy. I can do it easy way, but you won't get a return on how many rows were updated. Or just a pass through for update, but I hate an api like update(String table, ContentValues values, String whereClause, String[] whereArgs)

That is too many parameters. I will want it to be update(String sql, Object… args), I do already have update(Object domain) if you use the Annotations in the class to map it to the table.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic