All Downloads are FREE. Search and download functionalities are using the official Maven repository.

arez.persist.Persist Maven / Gradle / Ivy

The newest version!
package arez.persist;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import javax.annotation.Nonnull;

/**
 * Annotation applied to observable properties that direct Arez to persist the property.
 */
@Documented
@Target( ElementType.METHOD )
public @interface Persist
{
  /**
   * Return the name used to persist the property.
   * If unspecified and the method is named according to javabeans getter conventions then the java bean property name
   * will be used, otherwise the name of the method will be used. It should be notes that during the code generation
   * the name will also be used to look up the setter used to restore the property. So if the property is named
   * {@code expanded} then the library will expect a setter method named {@code setExpanded}.
   *
   * 

It should be noted that production mode persistent properties that are not persisted across * reloads will use synthetic keys as an optimization strategy.

* * @return the name used to persist the property. */ @Nonnull String name() default ""; /** * The key identifying the store where the observable data is stored. * The name of the store must comply with the requirements for a java identifier. * * @return the key identifying the store where the observable data is stored. */ @Nonnull String store() default ""; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy