jpa-apt

Reads the JPA (Java Persistence API) annotations of all entities and creates a metamodel from them so that it can be processed by subsequent libraries, e. g. an EntityManager or a JPA provider.

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.dankito.jpa.annotationreader
Идентификатор

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

jpa-apt
Последняя версия

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

1.0.0-alpha5
Дата

Дата

Тип

Тип

jar
Описание

Описание

jpa-apt
Reads the JPA (Java Persistence API) annotations of all entities and creates a metamodel from them so that it can be processed by subsequent libraries, e. g. an EntityManager or a JPA provider.
Ссылка на сайт

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

https://github.com/dankito/jpa-apt
Система контроля версий

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

https://github.com/dankito/jpa-apt

Скачать jpa-apt

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

<!-- https://jarcasting.com/artifacts/net.dankito.jpa.annotationreader/jpa-apt/ -->
<dependency>
    <groupId>net.dankito.jpa.annotationreader</groupId>
    <artifactId>jpa-apt</artifactId>
    <version>1.0.0-alpha5</version>
</dependency>
// https://jarcasting.com/artifacts/net.dankito.jpa.annotationreader/jpa-apt/
implementation 'net.dankito.jpa.annotationreader:jpa-apt:1.0.0-alpha5'
// https://jarcasting.com/artifacts/net.dankito.jpa.annotationreader/jpa-apt/
implementation ("net.dankito.jpa.annotationreader:jpa-apt:1.0.0-alpha5")
'net.dankito.jpa.annotationreader:jpa-apt:jar:1.0.0-alpha5'
<dependency org="net.dankito.jpa.annotationreader" name="jpa-apt" rev="1.0.0-alpha5">
  <artifact name="jpa-apt" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.dankito.jpa.annotationreader', module='jpa-apt', version='1.0.0-alpha5')
)
libraryDependencies += "net.dankito.jpa.annotationreader" % "jpa-apt" % "1.0.0-alpha5"
[net.dankito.jpa.annotationreader/jpa-apt "1.0.0-alpha5"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
net.dankito.jpa.annotationreader : api jar 1.0.0-alpha5
com.squareup : javapoet jar 1.9.0

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

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

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

jpa-apt

If you need anyhow the JPA entity configuration, jpa-apt reads it for you.

It is an Annotation Processor for the APT build step so the JPA configuration gets read at build time and there's no costly annotation reading with reflection at application start up.

Setup

Gradle:

// so that generated meta model is visible from code
sourceSets {
    main.java.srcDirs += 'build/generated/'
}

dependencies {
  compile 'net.dankito.jpa.annotationreader:jpa-apt:1.0-alpha'
  kapt 'net.dankito.jpa.annotationreader:jpa-apt:1.0-alpha'
}

Maven:

<dependency>
   <groupId>net.dankito.jpa.annotationreader</groupId>
   <artifactId>jpa-apt</artifactId>
   <version>1.0-alpha</version>
</dependency>

Usage

private fun loadGeneratedModel(): JPAEntityConfiguration {
        val generatedConfigs = net.dankito.jpa.apt.generated.GeneratedEntityConfigs()

        val generatedEntityConfigs = generatedConfigs.getGeneratedEntityConfigs()
    }

License

Copyright 2017 dankito

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.

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

Версия
1.0.0-alpha5
1.0.0-alpha4
1.0-alpha3
1.0-alpha2
1.0-alpha