de.bild.codec.annotations.Id Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polymorphia Show documentation
Show all versions of polymorphia Show documentation
A very fast POJO codec for MongoDB (used in conjunction with the Mongo Java Driver) that handles generic types as well as polymorphic class hierarchies
package de.bild.codec.annotations;
import de.bild.codec.IdGenerator;
import de.bild.codec.ObjectIdGenerator;
import java.lang.annotation.*;
/**
* Use this annotation to mark the id field.
*/
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Id {
Class extends IdGenerator> value() default DefaultIdGenerator.class;
boolean collectible() default false;
final class DefaultIdGenerator extends ObjectIdGenerator {}
}