de.thksystems.persistence.hibernate.immutable.Mutable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mugwort Show documentation
Show all versions of mugwort Show documentation
Commons for persistence, hibernate, xstreams, enterprise, spring, servlets, ...
/*
* tksCommons / mugwort
*
* Author : Thomas Kuhlmann (ThK-Systems, http://oss.thk-systems.de) License : LGPL (https://www.gnu.org/licenses/lgpl.html)
*/
package de.thksystems.persistence.hibernate.immutable;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marks the field as mutable.
*
* Only useful for entities marked as {@link Immutable}. In other entities it is ignored!!
*
* Use it with caution and never use it for business fields, just for technical fields!!!
*
* @author Thomas Kuhlmann (kuhl025), arvato D1CS, extern
*/
@Documented
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Mutable {
/**
* The value can be set only once from null
to some non-null value.
*/
boolean finall() default false;
}