Brahma Hibernate Utils

An annotaion processor to keep track of @Entity classes

Лицензия

Лицензия

Категории

Категории

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

Группа

com.gozefo.brahma
Идентификатор

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

brahma-hibernateutils
Последняя версия

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

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Brahma Hibernate Utils
An annotaion processor to keep track of @Entity classes
Ссылка на сайт

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

https://github.com/gozefo/brahma-hibernateutils
Система контроля версий

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

http://github.com/gozefo/brahma-hibernateutils/tree/master

Скачать brahma-hibernateutils

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

<!-- https://jarcasting.com/artifacts/com.gozefo.brahma/brahma-hibernateutils/ -->
<dependency>
    <groupId>com.gozefo.brahma</groupId>
    <artifactId>brahma-hibernateutils</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.gozefo.brahma/brahma-hibernateutils/
implementation 'com.gozefo.brahma:brahma-hibernateutils:1.0.1'
// https://jarcasting.com/artifacts/com.gozefo.brahma/brahma-hibernateutils/
implementation ("com.gozefo.brahma:brahma-hibernateutils:1.0.1")
'com.gozefo.brahma:brahma-hibernateutils:jar:1.0.1'
<dependency org="com.gozefo.brahma" name="brahma-hibernateutils" rev="1.0.1">
  <artifact name="brahma-hibernateutils" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.gozefo.brahma', module='brahma-hibernateutils', version='1.0.1')
)
libraryDependencies += "com.gozefo.brahma" % "brahma-hibernateutils" % "1.0.1"
[com.gozefo.brahma/brahma-hibernateutils "1.0.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.squareup : javapoet jar 1.9.0
javax.persistence : persistence-api jar 1.0.2

provided (1)

Идентификатор библиотеки Тип Версия
com.google.auto.service : auto-service jar 1.0-rc4

test (2)

Идентификатор библиотеки Тип Версия
com.google.testing.compile : compile-testing jar 0.15
junit : junit jar 4.12

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

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

CircleCI Maven metadata URI codecov

Bramha-HibernateUtils

An annotation processor which auto generates a list of all classes with @Entity annotation.

About

Simplify registration of entity classes in Dropwizard by auto generating a list of classes with @Entity annotation.

Example

Here's two entity classes that need to be registered.

package com.example.hibernateutils

import javax.persistence.Entity;

@Entity 
public class Vishnu {
    
}
package com.example.hibernateutils

import javax.persistence.Entity;

@Entity 
public class Shiva {
    
}

Adding entity classes to hibernate bundle is as simple as passing the generated array

 private final HibernateBundle<Config> hibernateBundle =
            new HibernateBundle<Config>(Brahma_HibernateUtils.entityAnnotatedClasses[0],
                    Brahma_HibernateUtils.entityAnnotatedClasses) {

                public DataSourceFactory getDataSourceFactory(Config configuration) {
                    return configuration.getDataSourceFactory();
                }
            };

Generated Code

package com.brahma.utils;

import com.example.HelloWorld;
import java.lang.Class;

public final class Brahma_HibernateUtils {
  public static final Class[] entityAnnotatedClasses = new Class[] {
    Vishnu.class,
    Shiva.class
  }
  ;
}

Project Brahma

This repo is a part of project brahma, a suite of annotation processors built with ♥️ by folks at Gozefo enginnering to remove boilerplate in our java projects.

Download

<!-- https://mvnrepository.com/artifact/com.gozefo.brahma/brahma-hibernateutils -->
<dependency>
    <groupId>com.gozefo.brahma</groupId>
    <artifactId>brahma-hibernateutils</artifactId>
    <version>1.0.1</version>
</dependency>

License

MIT License

Copyright (c) 2018 gozefo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

Версия
1.0.1