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

org.javers.core.metamodel.annotation.TypeName Maven / Gradle / Ivy

There is a newer version: 7.6.1
Show newest version
package org.javers.core.metamodel.annotation;

import org.javers.repository.api.JaversRepository;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Use TypeName annotation to give a distinctive type name for your Entities and ValueObjects.
 * This name will be used everywhere by JaVers, instead of fully-qualified class name.
 * 

* * TypeName is recommended if you are * using {@link JaversRepository}, * because it gives you freedom of refactoring your package and class names. *

* * Usage example: *
 *{@literal @}TypeName("Person")
 * class Person {
 *    {@literal @}Id
 *     private int id;
 *     private String name;
 * }
 * 
* * TypeName is alias for org.springframework.data.annotation.TypeAlias * from Spring Data. * * @see PropertyName * @since 1.4 * @author bartosz.walacik */ @Target(TYPE) @Retention(RUNTIME) public @interface TypeName { /** * The type name to be used when comparing and persisting */ String value(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy