OleksandrSamsonov / fluent-hibernate

Library to work with Hibernate by fluent API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fluent-hibernate

A library to work with Hibernate by fluent API. This library hasn't dependencies, except Hibernate libraries. It requires Java 1.6 and above. Now it can be used with Hibernate 5 only. To use the library with Hibernate 4, it should be rebuilt, using Hibernate 4 as a dependency.

Build Status

Download

Direct link

Release 0.1.4

Maven (pom.xml)
<dependency>
	<groupId>com.github.v-ladynev</groupId>
	<artifactId>fluent-hibernate-core</artifactId>
	<version>0.1.4</version>
</dependency>
Gradle (build.gradle)
'com.github.v-ladynev:fluent-hibernate-core:0.1.4'

Examples

Get all users

List<User> users = H.<User> request(User.class).list();

Getting a user with a login my_login

final String loginToFind = "my_login";
User user = H.<User> request(User.class).eq("login", loginToFind).first();

A partial objects loading

Get all users, but only with login and id properties are filled (other properties will be null).

List<User> users = H.<User> request(User.class).proj("login").proj("id")
    .transform(User.class).list();

Example Projects

Contributors

Dependency Status

Dependency Status

Progress

Throughput Graph

TODO:

Stories in Ready In Progress

About

Library to work with Hibernate by fluent API

License:Other


Languages

Language:Java 99.9%Language:Batchfile 0.1%Language:Shell 0.0%