Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/braisgabin/couchbase-lite-orm
A Java ORM for Couchbase Lite
https://github.com/braisgabin/couchbase-lite-orm
Last synced: about 1 month ago
JSON representation
A Java ORM for Couchbase Lite
- Host: GitHub
- URL: https://github.com/braisgabin/couchbase-lite-orm
- Owner: BraisGabin
- License: apache-2.0
- Created: 2015-01-08T11:12:53.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-29T15:35:16.000Z (over 9 years ago)
- Last Synced: 2023-03-24T05:25:35.536Z (over 1 year ago)
- Language: Java
- Size: 544 KB
- Stars: 10
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Couchbase-Lite-ORM [![Build Status](https://travis-ci.org/BraisGabin/couchbase-lite-orm.svg?branch=master)](https://travis-ci.org/BraisGabin/couchbase-lite-orm)
This is the first approach to implement an ORM for Couchbase Lite in Java. I'm still working on it.
## Main ideas
- Couchbase Lite's API is pretty good, I wont hide it.
- Couchbase Lite ORM only transform Documents to your domain Objects and vice versa.
- You won't need to extend any class.
- You will only need to annotate your classes.
- This library will not use reflection. Reflection is *too* slow.## Download
Gradle:
```groovy
compile 'com.braisgabin.couchbaseliteorm:couchbaseliteorm:0.1.0-SNAPSHOT'
provided 'com.braisgabin.couchbaseliteorm:couchbaseliteorm-compiler:0.1.0-SNAPSHOT'
```You must add the Sonatype's snapshots repository:
```groovy
repositories {
maven { url 'https://oss.sonatype.org/content/groups/public' }
}
```Or you can download the `.jar` directly from the [Sonatype's snapshots repository][snapshots].
## Easter Egg
The annotations in Java have *a* weakness: their value can't be `null`. You can read this in [the JSL][JSL]:> Note that null is not a legal element value for any element type.
For more information I recommend read this [Stack Overflow answer][so-default-null].
For this reason I'm forced to use the [magic string][magic-string] `"☕️💩"`. So, if one of your types is named `"☕️💩"` you have found the Easter Egg!
## License
Apache License 2.0[snapshots]: https://oss.sonatype.org/content/groups/public/com/braisgabin/couchbaseliteorm/
[JSL]: http://docs.oracle.com/javase/specs/jls/se7/html/jls-9.html#jls-9.7.1
[so-default-null]: http://stackoverflow.com/a/1178272/842697
[magic-string]: http://en.wikipedia.org/wiki/Magic_string