Search code examples
androidormcursorcloudsynchronization

Android ORM which supports sync to a cloud and database cursor interfaces


Is there an Android ORM library which exposes database cursor interface (as to work with adapters etc.) AND supports cloud sync (to any cloud service)?


Solution

  • We have been using an ORM solution for years that works VERY well in Adapters and use Cursors. We typically use the ORM tool to create a Cursor for the results, then do the following to pull the data from the Cursor:

    Individual individual = new Individual(cursor);
    name = individual.getName();
    age = individual.getAge();
    ... etc ...
    
    or
    
    String name = Individual.getName(cursor);
    int age = Individual.getAge(cursor);
    

    The tool that we use (I'm an author) is DBTools (https://github.com/jeffdcamp/dbtools-android).