Datarobot for Android - API

Datarobot for Android is a lightweight framework, which frees you from the burden of dealing with Androids SQLite database directly if you don't want to and let's you access it directly if you have to.

License

License

Categories

Categories

Data
GroupId

GroupId

com.arconsis
ArtifactId

ArtifactId

datarobot.api
Last Version

Last Version

0.1.5
Release Date

Release Date

Type

Type

jar
Description

Description

Datarobot for Android - API
Datarobot for Android is a lightweight framework, which frees you from the burden of dealing with Androids SQLite database directly if you don't want to and let's you access it directly if you have to.
Project URL

Project URL

https://github.com/arconsis/datarobot
Project Organization

Project Organization

arconsis IT-Solutions GmbH
Source Code Management

Source Code Management

https://github.com/arconsis/datarobot.git

Download datarobot.api

How to add to project

<!-- https://jarcasting.com/artifacts/com.arconsis/datarobot.api/ -->
<dependency>
    <groupId>com.arconsis</groupId>
    <artifactId>datarobot.api</artifactId>
    <version>0.1.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.arconsis/datarobot.api/
implementation 'com.arconsis:datarobot.api:0.1.5'
// https://jarcasting.com/artifacts/com.arconsis/datarobot.api/
implementation ("com.arconsis:datarobot.api:0.1.5")
'com.arconsis:datarobot.api:jar:0.1.5'
<dependency org="com.arconsis" name="datarobot.api" rev="0.1.5">
  <artifact name="datarobot.api" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.arconsis', module='datarobot.api', version='0.1.5')
)
libraryDependencies += "com.arconsis" % "datarobot.api" % "0.1.5"
[com.arconsis/datarobot.api "0.1.5"]

Dependencies

compile (1)

Group / Artifact Type Version
com.google.android : android jar 4.0.1.2

Project Modules

There are no modules declared in this project.

#droitatedDB License Version

The name

droitatedDB is a shortened version of Android annotated DB.

Android annotated DB

The result is droitatedDB

At a glance

droitatedDB is a lightweight framework, which frees you from the burden of dealing with the Android SQLite database directly if you don't want to but lets you access it directly if you need to.

With an annotation based approach you are able to get a database up and running in no time. Simply annotate your data classes and let droitatedDB do the work.

Features

  • Annotation based implementation
  • No hard coded Strings in your code
  • Code generation for the ceremonial tasks
  • Compile time protection when renaming fields or tables
  • Fall back to Android default API is always possible

Download

Add the android-apt plugin to your project-level build.gradle:

buildscript {
  repositories {
    mavenCentral()
   }
  dependencies {
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
  }
}

After that, apply inside your module-level build.gradle the android-apt plugin and add droitatedDB dependencies:

apply plugin: 'android-apt'

apt {
  arguments {
    manifest variant.outputs[0]?.processResources?.manifestFile
  }
}

dependencies {
  apt 'org.droitateddb:processor:0.1.9'
  compile 'org.droitateddb:api:0.1.9'
}

How do I use DroitatedDb?

For the full Tutorial check out our Wiki here: Tutorial
First we need to create our database:

@Update
@Persistence(dbName = "my_database.db", dbVersion = 1)
public class PersistenceConfig implements DbUpdate {
    @Override
    public void onUpdate(SQLiteDatabase db, int oldVersion, int newVersion) {
        // here you can put your update code, when changing the database version
    }
}

After that we can create our first entitiy:

@Entity
public class User {

   @PrimaryKey
   @AutoIncrement
   @Column
   private Integer _id;
   @Column
   private String name;

	public User() {
		//droitatedDB needs an empty constructor
	}
   
   public User(String name) {
   		this.name = name;
   }
   
   //...
}

Now we can store data:

EntityService userService = new EntityService(context, User.class);
userService.save(new User("Bob"));

And read data:

EntityService userService = new EntityService(context, User.class);
List<User> allUsers = userService.get();

Documentation

Check out the documentation and introduction here

JavaDocs

Get into the API details reading the technical API

Release notes

Check out the release notes, to see what's new in droitatedDB

com.arconsis

arconsis IT-Solutions GmbH

TECHNOLOGICAL EXCELLENCE AND PASSION

Versions

Version
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1