All Projects → xjodoin → Torpedoquery

xjodoin / Torpedoquery

Licence: apache-2.0
Type safe Hibernate query builder (HQL)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Torpedoquery

Query Validator
Compile time validation for HQL and JPQL queries in Java code
Stars: ✭ 70 (-9.09%)
Mutual labels:  hibernate, jpa
Kotlin Spring Boot Jpa Rest Api Demo
Build a Restful API with Kotlin, Spring Boot, Mysql, Jpa and Hibernate
Stars: ✭ 67 (-12.99%)
Mutual labels:  hibernate, jpa
Jeddict
Jakarta EE 8 (Java EE) & MicroProfile 3.2 application generator and modeler
Stars: ✭ 358 (+364.94%)
Mutual labels:  hibernate, jpa
Hunt Entity
An object-relational mapping (ORM) framework for D language (Similar to JPA / Doctrine), support PostgreSQL and MySQL.
Stars: ✭ 51 (-33.77%)
Mutual labels:  hibernate, jpa
Ee7 Jaxrs Sample
Building RESTful APIs with Java EE 7 and JAXRS
Stars: ✭ 15 (-80.52%)
Mutual labels:  hibernate, jpa
Angularjs Springmvc Sample Boot
A RESTful sample using Spring Boot, Spring MVC, Spring Data and Angular/Bootstrap.
Stars: ✭ 309 (+301.3%)
Mutual labels:  hibernate, jpa
Hibernate Orm
Hibernate's core Object/Relational Mapping functionality
Stars: ✭ 4,806 (+6141.56%)
Mutual labels:  hibernate, jpa
FluentJPA
Fluent API for writing typesafe SQL queries in Java for JPA.
Stars: ✭ 87 (+12.99%)
Mutual labels:  jpa, hibernate
Todo List App
Spring Boot 1.3.2, Spring Data Hibernate H2, REST, Angular 1.5.3, Bootstrap, Maven.
Stars: ✭ 6 (-92.21%)
Mutual labels:  hibernate, jpa
Jpa Spec
A JPA Query By Specification framework.
Stars: ✭ 620 (+705.19%)
Mutual labels:  hibernate, jpa
Atom
Java course materials
Stars: ✭ 293 (+280.52%)
Mutual labels:  hibernate, jpa
Hibernate Basics
Samples for "Hibernate, how the magic is really done?" talk
Stars: ✭ 44 (-42.86%)
Mutual labels:  hibernate, jpa
Spring Boot Mysql Rest Api Tutorial
Building a Restful CRUD API using Spring Boot, Mysql, JPA and Hibernate
Stars: ✭ 279 (+262.34%)
Mutual labels:  hibernate, jpa
Micronaut Data
Ahead of Time Data Repositories
Stars: ✭ 352 (+357.14%)
Mutual labels:  hibernate, jpa
Easyee
开源 JavaEE 企业级快速开发平台。提供了 Spring Boot, Struts2, Hibernate, MyBatis, Shiro, EasyUI 等技术,包含完整的权限管理系统等。提供自动化代码生成器。 Open source JaveEE enterprise-class rapid development of the basic platform. Integration of Spring Boot, Struts2, Hibernate, MyBatis, Shiro, EasyUI and other technologies, including the integrity of the rights management. Provides an automated code generator.
Stars: ✭ 275 (+257.14%)
Mutual labels:  hibernate, jpa
Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (+5997.4%)
Mutual labels:  hibernate, jpa
spring-boot-jpa
A Spring Boot microservices reference application using Spring Data JPA
Stars: ✭ 25 (-67.53%)
Mutual labels:  jpa, hibernate
jpa2ddl
JPA Schema Generator Plugin
Stars: ✭ 104 (+35.06%)
Mutual labels:  jpa, hibernate
Hibernate Springboot
Collection of best practices for Java persistence performance in Spring Boot applications
Stars: ✭ 589 (+664.94%)
Mutual labels:  hibernate, jpa
Javaee7 Petclinic
Java EE 7 Petclinic
Stars: ✭ 31 (-59.74%)
Mutual labels:  hibernate, jpa

TorpedoQuery

Get supported org.torpedoquery:org.torpedoquery with the Tidelift Subscription

Status

Build Status Maven Central Javadoc license

Simple and powerful query builder for your project. Can be use with any existing Hibernate or JPA application.
Stop wasting your time to maintain complex HQL queries and start today with the new generation of query builder.

Quick start

First add this import static org.torpedoquery.jpa.Torpedo.*;

1. Create simple select

	Entity entity = from(Entity.class);
	org.torpedoquery.jpa.Query<Entity> select = select(entity);

2. Create scalar queries

	Entity entity = from(Entity.class);
	org.torpedoquery.jpa.Query<String> select = select(entity.getCode());

3. How to execute your query

	Entity entity = from(Entity.class);
	org.torpedoquery.jpa.Query<Entity> select = select(entity);
	List<Entity> entityList = select.list(entityManager);

4. Create simple condition

	Entity entity = from(Entity.class);
	where(entity.getCode()).eq("mycode");
	org.torpedoquery.jpa.Query<Entity> select = select(entity);

5. Create join on your entities

	Entity entity = from(Entity.class);
	SubEntity subEntity = innerJoin(entity.getSubEntities());
	org.torpedoquery.jpa.Query<String[]> select = select(entity.getCode(), subEntity.getName());

6. Group your conditions

	Entity from = from(Entity.class);
	OnGoingLogicalCondition condition = condition(from.getCode()).eq("test").or(from.getCode()).eq("test2");
	where(from.getName()).eq("test").and(condition);
	Query<Entity> select = select(from);

How to Improve It

Create your own fork of xjodoin/torpedoquery

To share your changes, submit a pull request.

Don't forget to add new units tests on your change.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].