https://github.com/stariy95/cayenne-android-demo
Demo Android app using Apache Cayenne ORM framework
https://github.com/stariy95/cayenne-android-demo
android apache-cayenne demo-app
Last synced: 3 months ago
JSON representation
Demo Android app using Apache Cayenne ORM framework
- Host: GitHub
- URL: https://github.com/stariy95/cayenne-android-demo
- Owner: stariy95
- License: apache-2.0
- Created: 2017-12-15T15:20:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-22T09:56:19.000Z (almost 8 years ago)
- Last Synced: 2025-02-23T15:45:53.411Z (8 months ago)
- Topics: android, apache-cayenne, demo-app
- Language: Java
- Homepage:
- Size: 176 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Demo Android app using Apache Cayenne ORM framework
This is a demo Android app that uses Cayenne ORM.
Cayenne 4.0.B2 is used in this demo.
Min Android SDK version is 19 (Android 4.4).## Customizations done
Following parts where modified/added in order to launch Cayenne runtime:
* Custom [resource locator](https://github.com/stariy95/cayenne-android-demo/blob/master/app/src/main/java/org/apache/cayenne/demo/android/cayenne/AssetsResourceLocator.java) that can handle Cayenne XML files loading from Android assets (it uses custom URL schema + handler hack)
* Network activity is explicitly allowed on UI thread (see [AppModule](https://github.com/stariy95/cayenne-android-demo/blob/master/app/src/main/java/org/apache/cayenne/demo/android/service/AppModule.java) class) as Cayenne temp-id generator looks up local host address (maybe this should be changed in Cayenne).
* Custom SchemaUpdateStrategy (see [UpdateSchemaStrategy](https://github.com/stariy95/cayenne-android-demo/blob/master/app/src/main/java/org/apache/cayenne/demo/android/cayenne/UpdateSchemaStrategy.java) class) that allows to compare and migrate DB structure on every start (Uses existing cayenne-dbsync module).## Third-party dependencies
* Dagger 2.13 is used as a DI framework
* slf4j-android 1.7.25 - binding of slf4j to Android logging
* Additionally this project requires SNAPSHOT version of *sqldroid* SQLite JDBC driver.
You can clone https://github.com/SQLDroid/SQLDroid and build it from sources, no modifications required.## Limitations
* This project is not compatible with proguard