GroovyBeans Annotations

annotations for simplifying beans in Groovy

License

License

Categories

Categories

Groovy Languages
GroupId

GroupId

com.chrylis.groovybeans
ArtifactId

ArtifactId

groovybeans-annotations
Last Version

Last Version

0.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

GroovyBeans Annotations
annotations for simplifying beans in Groovy

Download groovybeans-annotations

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
javax.xml.bind : jaxb-api jar 2.3.0
com.sun.xml.bind : jaxb-core jar 2.3.0
com.sun.xml.bind : jaxb-impl jar 2.3.0

provided (2)

Group / Artifact Type Version
org.eclipse.persistence : javax.persistence jar 2.1.0
org.codehaus.groovy : groovy-all pom 2.5.2

test (2)

Group / Artifact Type Version
org.spockframework : spock-core jar 1.2-RC2-groovy-2.5
org.apache.commons : commons-lang3 jar 3.8

Project Modules

There are no modules declared in this project.

GroovyBeans Toolkit

Groovy makes writing JVM applications a lot simpler, but even though it removes a lot of the low-level boilerplate, a significant amount of "pattern" boilerplate often remains. Using Groovy’s unique compile-time transformation facility, the GroovyBeans Toolkit provides macros that help automate common software patterns. All of the features in GBT are applied statically at compile-time and require no runtime dependencies or overhead except for the actual logic being executed.

Annotations

@GbtId and @GbtVersion

Add simple JPA Id and Version properties to a class. Particularly useful for defining consistent project-wide settings as meta-annotations.

@TwoWayRelationship

Transparently manages two-way relationships between classes (such as @OneToOne), ensuring that using the setter on either end results in a consistent state. Takes care of edge cases such as dangling replaced relationships.

@Subrecord and @SubrecordOf

Manage the common pattern where a main table has special-purpose auxiliary subrecords, such as password-reset tokens for a user table. Automatically sets up ID mapping from the main class, a managed two-way relationship, and a JPA @OneToOne mapping.

Usage

Add this Maven dependency to your project:

<parent>
    <groupId>com.chrylis.groovybeans</groupId>
    <artifactId>groovybeans-annotations</artifactId>
    <version>${groovybeans.version}</version>
</parent>

GBT does not need to be available at runtime, but if you’re using annotation collectors, you may need to include it in multiple modules if you use provided scope.

Examples of all of the transforms are available in the -examples module, and Spock specs for the transforms are intended to be readable.

Eclipse

Note
Since some of the transforms depend on compiling multiple classes at once, Eclipse’s Groovy support will sometimes produce spurious errors in the code view. If they show up, they will generally go away on a clean-and-build.

Versions

Version
0.1.3
0.1.2
0.1.1
0.1.0