phoenix-hibernate-dialect

An Apache Phoenix Hibernate dialect.

Лицензия

Лицензия

Категории

Категории

Hibernate Данные ORM
Группа

Группа

com.ruesga.phoenix
Идентификатор

Идентификатор

phoenix-hibernate-dialect
Последняя версия

Последняя версия

0.0.4-hibernate5
Дата

Дата

Тип

Тип

jar
Описание

Описание

phoenix-hibernate-dialect
An Apache Phoenix Hibernate dialect.
Ссылка на сайт

Ссылка на сайт

https://github.com/jruesga/phoenix-hibernate-dialect
Система контроля версий

Система контроля версий

http://github.com/jruesga/phoenix-hibernate-dialect

Скачать phoenix-hibernate-dialect

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.ruesga.phoenix/phoenix-hibernate-dialect/ -->
<dependency>
    <groupId>com.ruesga.phoenix</groupId>
    <artifactId>phoenix-hibernate-dialect</artifactId>
    <version>0.0.4-hibernate5</version>
</dependency>
// https://jarcasting.com/artifacts/com.ruesga.phoenix/phoenix-hibernate-dialect/
implementation 'com.ruesga.phoenix:phoenix-hibernate-dialect:0.0.4-hibernate5'
// https://jarcasting.com/artifacts/com.ruesga.phoenix/phoenix-hibernate-dialect/
implementation ("com.ruesga.phoenix:phoenix-hibernate-dialect:0.0.4-hibernate5")
'com.ruesga.phoenix:phoenix-hibernate-dialect:jar:0.0.4-hibernate5'
<dependency org="com.ruesga.phoenix" name="phoenix-hibernate-dialect" rev="0.0.4-hibernate5">
  <artifact name="phoenix-hibernate-dialect" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.ruesga.phoenix', module='phoenix-hibernate-dialect', version='0.0.4-hibernate5')
)
libraryDependencies += "com.ruesga.phoenix" % "phoenix-hibernate-dialect" % "0.0.4-hibernate5"
[com.ruesga.phoenix/phoenix-hibernate-dialect "0.0.4-hibernate5"]

Зависимости

compile (9)

Идентификатор библиотеки Тип Версия
org.hibernate : hibernate-core jar 5.2.12.Final
org.apache.phoenix : phoenix-core jar 4.13.1-HBase-1.3
org.aspectj : aspectjrt jar 1.8.10
org.aspectj : aspectjweaver jar 1.8.10
org.springframework : spring-context jar 4.3.14.RELEASE
org.springframework : spring-aop jar 4.3.14.RELEASE
org.assertj : assertj-core jar 3.9.0
org.springframework : spring-instrument jar 4.3.14.RELEASE
org.zeroturnaround : zt-exec jar 1.10

test (6)

Идентификатор библиотеки Тип Версия
org.hibernate : hibernate-entitymanager jar 5.2.12.Final
org.hibernate : hibernate-c3p0 jar 5.2.12.Final
junit : junit jar 4.12
org.apache.curator : curator-test jar 4.0.0
org.apache.hbase : hbase-testing-util jar 1.3.1
com.google.guava : guava jar 14.0

Модули Проекта

Данный проект не имеет модулей.

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.

Версии библиотеки

Версия
0.0.4-hibernate5
0.0.4-hibernate4
0.0.3-hibernate5
0.0.3-hibernate4
0.0.2