Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pedrycz/nohibernate-core
Non-relational data mapping for Hibernate, useful for persisting Java interfaces
https://github.com/pedrycz/nohibernate-core
hibernate java nosql sql
Last synced: 5 days ago
JSON representation
Non-relational data mapping for Hibernate, useful for persisting Java interfaces
- Host: GitHub
- URL: https://github.com/pedrycz/nohibernate-core
- Owner: pedrycz
- License: apache-2.0
- Created: 2017-04-23T07:53:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-04T13:23:28.000Z (over 7 years ago)
- Last Synced: 2024-11-22T05:27:59.976Z (2 months ago)
- Topics: hibernate, java, nosql, sql
- Language: Java
- Homepage:
- Size: 78.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
NoHibernate
==========NoHibernate provides mapping of Hibernate managed entities in non-relational way. It is especially useful for storing in database interfaces with many different child classes, which is almost impossible with pure Hibernate.
[![](https://jitpack.io/v/ppedrycz/nohibernate-core.svg)](https://jitpack.io/#ppedrycz/nohibernate-core)
### Gradle setup
```gradle
repositories {
...
maven {
url 'https://jitpack.io'
}
}dependencies {
...
compile("com.github.ppedrycz:nohibernate-core:0.2")
}
```### Maven setup
```xml
jitpack.io
https://jitpack.io
com.github.ppedrycz
nohibernate-core
0.2
```
### Library initialization
```Java
public class MyApplication {
public static void main(String[] args) {
NoHibernateUtils.setClassLoader(MyApplication.class.getClassLoader());
/* rest of your code */}
}
```### Example usage
```Java
public class Geometry { /* fields, getters, setters */ }
public class Point extends Geometry { /* fields, getters, setters */ }
public class Rectangle extends Geometry { /* fields, getters, setters */ }
public class Circle extends Geometry { /* fields, getters, setters */ }
public class Square extends Geometry { /* fields, getters, setters */ }
public class Polygon extends Geometry { /* fields, getters, setters */ }
public class Triangle extends Geometry { /* fields, getters, setters */ }@Entity
public class Sprite {/* constructors, other fields, getters, setters */
@Type(type = NoHibernate.Type.BASIC)
private Geometry geometry;}
```