api

API for jpa-apt

License

License

Categories

Categories

Net
GroupId

GroupId

net.dankito.jpa.annotationreader
ArtifactId

ArtifactId

api
Last Version

Last Version

1.0.0-alpha5
Release Date

Release Date

Type

Type

jar
Description

Description

api
API for jpa-apt
Project URL

Project URL

https://github.com/dankito/jpa-apt
Source Code Management

Source Code Management

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

Download api

How to add to project

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

Dependencies

compile (5)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib jar 1.3.31
org.jetbrains.kotlin : kotlin-reflect jar 1.3.31
org.eclipse.persistence : javax.persistence jar 2.1.1
org.slf4j : slf4j-api jar 1.7.25
com.fasterxml.jackson.module : jackson-module-kotlin jar 2.8.7

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

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.

Versions

Version
1.0.0-alpha5
1.0.0-alpha4
1.0-alpha3
1.0-alpha2
1.0-alpha