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

de.bild.codec.annotations.DiscriminatorKey Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.8.2
Show newest version
package de.bild.codec.annotations;

import java.lang.annotation.*;

/**
 * A discriminator key is useful if you want to control the property name for which the discriminator is persisted.
 * Attention: Make sure you annotate the class hierarchy.
 * Annotating an interface (there could be more than just one) would be confusing and is therefore not supported.
 * 

* Additional note: If you use more than just one discriminator key to persist pojo classes of the same polymorphic hierarchy * pay attention not to use properties that are named by one of those discriminator keys. This may lead to wrong decodings! */ @Documented @Inherited @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface DiscriminatorKey { String value() default "_t"; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy