All Projects → jruesga → phoenix-hibernate-dialect

jruesga / phoenix-hibernate-dialect

Licence: Apache-2.0 license
An Apache Phoenix Hibernate dialect

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to phoenix-hibernate-dialect

MiniDao
An powerful enhanced toolkit of SpringJdbc for simplify development
Stars: ✭ 200 (+900%)
Mutual labels:  jpa, hibernate
Spring Boot 2 Oauth2 Authorization Jwt
Spring Boot 2 OAuth2 JWT Authorization server implementation with Database for Users and Clients (JPA, Hibernate, MySQL)
Stars: ✭ 115 (+475%)
Mutual labels:  jpa, hibernate
Sample Boot Hibernate
Spring Boot + JPA ( Hibernate ) + Java8 [ DDD Sample ]
Stars: ✭ 97 (+385%)
Mutual labels:  jpa, hibernate
Torpedoquery
Type safe Hibernate query builder (HQL)
Stars: ✭ 77 (+285%)
Mutual labels:  jpa, hibernate
Jpa Hibernate Tutorials
Hibernate Tutorials with Spring Boot and Spring-Data-JPA
Stars: ✭ 186 (+830%)
Mutual labels:  jpa, hibernate
Hibernate Performance
Samples for "Hibernate performance tuning" talk
Stars: ✭ 87 (+335%)
Mutual labels:  jpa, hibernate
Spring Kotlin Exposed
playground for spring-boot 2.*, kotlin , jetbrains-exposed, postgres, jsonb, flyway, docker
Stars: ✭ 106 (+430%)
Mutual labels:  jpa, hibernate
Hunt Entity
An object-relational mapping (ORM) framework for D language (Similar to JPA / Doctrine), support PostgreSQL and MySQL.
Stars: ✭ 51 (+155%)
Mutual labels:  jpa, hibernate
Minidao
轻量级JAVA持久层,类似Mybatis一样的用法,基于SpringJdbc实现更轻量
Stars: ✭ 177 (+785%)
Mutual labels:  jpa, hibernate
Hibernate Reactive
A reactive API for Hibernate ORM, supporting non-blocking database drivers and a reactive style of interaction with the database.
Stars: ✭ 167 (+735%)
Mutual labels:  jpa, hibernate
Curso Sistemas Web Com Spring Javascript Bootstrap
Stars: ✭ 74 (+270%)
Mutual labels:  jpa, hibernate
Spring Framework Petclinic
A Spring Framework application based on JSP, Spring MVC, Spring Data JPA, Hibernate and JDBC
Stars: ✭ 251 (+1155%)
Mutual labels:  jpa, hibernate
Query Validator
Compile time validation for HQL and JPQL queries in Java code
Stars: ✭ 70 (+250%)
Mutual labels:  jpa, hibernate
Jplusone
Tool for automatic detection and asserting "N+1 SELECT problem" occurences in JPA based Spring Boot Java applications and finding origin of JPA issued SQL statements in general
Stars: ✭ 91 (+355%)
Mutual labels:  jpa, hibernate
Kotlin Spring Boot Jpa Rest Api Demo
Build a Restful API with Kotlin, Spring Boot, Mysql, Jpa and Hibernate
Stars: ✭ 67 (+235%)
Mutual labels:  jpa, hibernate
Hibernate Orm Tutorials
40+ source code Examples/Tutorials/Guides of Hibernate ORM Framework
Stars: ✭ 106 (+430%)
Mutual labels:  jpa, hibernate
Javaee7 Petclinic
Java EE 7 Petclinic
Stars: ✭ 31 (+55%)
Mutual labels:  jpa, hibernate
Hibernate Basics
Samples for "Hibernate, how the magic is really done?" talk
Stars: ✭ 44 (+120%)
Mutual labels:  jpa, hibernate
Jersey Jwt
Example of REST API with JWT authentication using Jersey, Jackson, Undertow, Weld, Hibernate and Arquillian.
Stars: ✭ 131 (+555%)
Mutual labels:  jpa, hibernate
Spring Boot Postgresql Jpa Hibernate Rest Api Demo
Building RESTful APIs with Spring Boot, PostgreSQL, JPA and Hibernate
Stars: ✭ 209 (+945%)
Mutual labels:  jpa, hibernate

phoenix-hibernate-dialect

Description

An Apache Phoenix Hibernate dialect.

Build

Maven Central Bintray Build Status GitHub release Apache 2.0

The project builds with maven. Just type the next command in the project root directory.

mvn clean install

To deploy to Bintray, just type the next command in the project root directory. Replace <gpg.passphrase> with your current Gpg passphrase.

mvn -Pdeploy -Dgpg.passphrase=<gpg.passphrase> clean deploy

Requirements

Build againsts Hibernate 5 requires Java 8 and AspectJ 1.8.x.

Usage

Add the following dependency to your pom.xml.

    <dependencies>
        ...
        <dependency>
            <groupId>com.ruesga.phoenix</groupId>
            <artifactId>phoenix-hibernate-dialect</artifactId>
            <version>0.0.4-hibernate5</version>
        </dependency>
        ...
    </dependencies>

Register the dialect in your persistence unit in the persistence.xml file.

    <persistence-unit name="jpa" transaction-type="RESOURCE_LOCAL">
        <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
        <properties>
            ...
            <property name="javax.persistence.jdbc.driver" value="org.apache.phoenix.jdbc.PhoenixDriver" />
            <property name="javax.persistence.jdbc.url" value="jdbc:phoenix:<server:ip>:<path>" />
            <property name="javax.persistence.jdbc.user" value="" />
            <property name="javax.persistence.jdbc.password" value="" />
            <property name="hibernate.dialect" value="com.ruesga.phoenix.dialect.PhoenixDialect" />
            ...
        </properties>
    </persistence-unit>

If you want to use indexes, just add the following properties to your client and server hbase-site.xml configuration.

    <configuration>
        ...
        <property>
            <name>hbase.regionserver.wal.codec</name>
            <value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value>
        </property>
        ...
    </configuration>
Using SpringBoot?

If you want to use the library inside an SpringBoot app, you must ensure that the context in the aspects is updated by importing the one responsible for initializing the load time weaving into the spring-boot configuration:

@SpringBootApplication
@ImportResource(locations = "classpath:/META-INF/ctx.spring.weaving.xml")
public class MySpringBootApplication {
    public static void main(final String[] args) {
        DynamicInstrumentationLoader.waitForInitialized();
        DynamicInstrumentationLoader.initLoadTimeWeavingContext();
        SpringApplication.run(...);
    }
}

Want to contribute?

Just file new issues/feature request or send pull requests.

Licenses

This source was released under the terms of Apache 2.0 license.

The test database is a partial subset of the MySQL Employees Sample Database released under the Creative Commons Attribution-Share Alike 3.0 Unported License

Copyright (C) 2017 Jorge Ruesga

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.
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].