Skip to content

toolarium/toolarium-enum-configuration

Repository files navigation

License Maven Central javadoc

toolarium-enum-configuration

Defines the toolarium enumeration configuration or in short enum configuration.

Getting Started

This project implements a so-called enumeration configuration that turns a Java enumeration into a set of a configuration that can be persisted.

The basic idea behind this is to solve the chicken-and-egg problem: Your software defines or expect some configuration values that are e.g. in a database. Now, in your code, you typically define a constant with which you retrieve the value. In the database you have to add the same constant with the corresponding value. From various experiences, there are often a lot of problems with.

Here comes a possible solution with this project:

  1. You simply define an enum in Java.
  2. Then add the EnumConfiguration or the EnunmValueConfigutation. Use the annotation attributes for more information.
  3. Use the EnumConfigurationProcessor to generate the output you use, e.g. SQL queries

The big advantage is that you only have one place (source code) where you define your "constant".

Installing

Add the annoation processor to you project or simple use the common build.

Built With

  • cb - The toolarium common build

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Gradle:

dependencies {
    implementation "com.github.toolarium:toolarium-enum-configuration:1.1.9"
}

Maven:

<dependency>
    <groupId>com.github.toolarium</groupId>
    <artifactId>toolarium-enum-configuration</artifactId>
    <version>1.1.9</version>
</dependency>

About

Defines the toolarium enumeration configuration.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages