Annotation Type ObjectImmutableIfReferenced


  • @Retention(RUNTIME)
    @Target({METHOD,FIELD})
    public @interface ObjectImmutableIfReferenced
    Marks object of this class as immutable if it is referenced from another object by the property annotated with this annotation from another object. Using JPA (Java Persistence API) 2.0 we are not able to use immutable objects. This annotation can be used to signal the application to deny updates to this object if it is used by another object.
    Author:
    klausj