Skip to content

Commit 530cd6c

Browse files
authored
Merge pull request #1018 from Raizlabs/develop
Version 4.0.0-beta1
2 parents 74bb93c + 9497650 commit 530cd6c

File tree

347 files changed

+8204
-12085
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

347 files changed

+8204
-12085
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![Image](https://github.com/agrosner/DBFlow/blob/develop/dbflow_banner.png?raw=true)
22

3-
[![JitPack.io](https://img.shields.io/badge/JitPack.io-3.1.1-red.svg?style=flat)](https://jitpack.io/#Raizlabs/DBFlow) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%23129-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-129) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DBFlow-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1134)
3+
[![JitPack.io](https://img.shields.io/badge/JitPack.io-4.0.0-red.svg?style=flat)](https://jitpack.io/#Raizlabs/DBFlow) [![Android Weekly](http://img.shields.io/badge/Android%20Weekly-%23129-2CB3E5.svg?style=flat)](http://androidweekly.net/issues/issue-129) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DBFlow-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1134)
44

55
A robust, powerful, and very simple ORM android database library with **annotation processing**.
66

@@ -10,7 +10,7 @@ Let DBFlow make SQL code _flow_ like a _steady_ stream so you can focus on writi
1010

1111
# Why Use DBFlow
1212
DBFlow is built from a collection of the best features of many database libraries in the most efficient way possible. Also, it is built to not only make it _significantly_ easier to deal with databases on Android, but also to provide extensibility. Don't let an ORM or library get in your way, let the code you write in your applications be the best as possible.
13-
- **Extensibility**: The main table object, `Model`, is just an interface. No subclass required, but as a convenience we recommend using `BaseModel`. You can extend non-`Model` classes in different packages and use them as your DB tables. Also you can subclass other `Model` to join the `@Column` together, and again they can be in different packages.
13+
- **Extensibility**: No restrictions on inheritance of your table classes. They can be plain POJOs, no subclass required, but as a convenience we recommend using `BaseModel`. You can extend non-`Model` classes in different packages and use them as your DB tables. Also you can subclass other tables to join the `@Column` together, and again they can be in different packages.
1414
- **Speed**: Built with java's annotation processing code generation, there's almost zero runtime performance hit by using this library (only reflection is creation of the main, generated database module's constructor). This library saves hours of boilerplate code and maintenance by generating the code for you. With powerful model caching (multiple primary key `Model` too), you can surpass the speed of SQLite by reusing where possible. We have support for lazy-loading relationships on-demand such as `@ForeignKey` or `@OneToMany` that make queries happen super-fast.
1515
- **SQLite Query Flow**: The queries in this library adhere as closely as possible to SQLite native queries. `select(name, screenSize).from(Android.class).where(name.is("Nexus 5x")).and(version.is(6.0)).querySingle()`
1616
- **Open Source**: This library is fully open source and contributions are not only welcomed, but encouraged.
@@ -57,7 +57,7 @@ Add the library to the project-level build.gradle, using the apt plugin to enabl
5757
5858
apply plugin: 'com.neenbedankt.android-apt'
5959
60-
def dbflow_version = "3.1.1"
60+
def dbflow_version = "4.0.0-beta1"
6161
// or dbflow_version = "develop-SNAPSHOT" for grabbing latest dependency in your project on the develop branch
6262
// or 10-digit short-hash of a specific commit. (Useful for bugs fixed in develop, but not in a release yet)
6363
@@ -67,9 +67,11 @@ Add the library to the project-level build.gradle, using the apt plugin to enabl
6767
compile "com.github.Raizlabs.DBFlow:dbflow-core:${dbflow_version}"
6868
compile "com.github.Raizlabs.DBFlow:dbflow:${dbflow_version}"
6969
70-
// sql-cipher database encyrption (optional)
70+
// sql-cipher database encryption (optional)
7171
compile "com.github.Raizlabs.DBFlow:dbflow-sqlcipher:${dbflow_version}"
7272
73+
compile "net.zetetic:android-database-sqlcipher:${sqlcipher_version}@aar"
74+
7375
// kotlin extensions
7476
compile "com.github.Raizlabs.DBFlow:dbflow-kotlinextensions:${dbflow_version}"
7577
}

app/build.gradle

Lines changed: 0 additions & 46 deletions
This file was deleted.

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.

app/src/main/java/com/raizlabs/android/dbflow/AModel.java

Lines changed: 0 additions & 43 deletions
This file was deleted.

app/src/main/java/com/raizlabs/android/dbflow/AModelView.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

app/src/main/java/com/raizlabs/android/dbflow/AppDatabase.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/src/main/java/com/raizlabs/android/dbflow/DemoActivity.java

Lines changed: 0 additions & 44 deletions
This file was deleted.

app/src/main/java/com/raizlabs/android/dbflow/Migration1.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/src/main/java/com/raizlabs/android/dbflow/Migration2.java

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/src/main/java/com/raizlabs/android/dbflow/OtherModel.java

Lines changed: 0 additions & 19 deletions
This file was deleted.

app/src/main/java/com/raizlabs/android/dbflow/SecondAppDatabase.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/src/main/java/com/raizlabs/android/dbflow/SecondModel.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/src/main/res/layout/activity_demo.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/src/main/res/menu/menu_demo.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/src/main/res/values-w820dp/dimens.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/src/main/res/values/dimens.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/src/main/res/values/strings.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ buildscript {
33
jcenter()
44
}
55
dependencies {
6-
classpath 'com.android.tools.build:gradle:2.1.2'
7-
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
8-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
6+
classpath 'com.android.tools.build:gradle:2.1.3'
7+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
98
}
109
}
1110

dbflow-core/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
apply plugin: 'java'
22

3-
group= 'com.raizlabs.android'
4-
53
project.ext.artifactId = bt_name
64

75
targetCompatibility = JavaVersion.VERSION_1_7

dbflow/src/main/java/com/raizlabs/android/dbflow/StringUtils.java renamed to dbflow-core/src/main/java/com/raizlabs/android/dbflow/StringUtils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@ public static boolean isNotNullOrEmpty(String inString) {
1212
return inString != null && !inString.equals("") && inString.length() > 0;
1313
}
1414

15+
/**
16+
* @return true if the string is null, empty string "", or the length is less than equal to 0
17+
*/
18+
public static boolean isNullOrEmpty(String inString) {
19+
return inString == null || inString.equals("") || inString.length() <= 0;
20+
}
1521
}

0 commit comments

Comments
 (0)