Class EmbeddedBuilder
- java.lang.Object
-
- dev.morphia.annotations.AnnotationBuilder<Embedded>
-
- dev.morphia.annotations.experimental.EmbeddedBuilder
-
- All Implemented Interfaces:
Annotation
public class EmbeddedBuilder extends AnnotationBuilder<Embedded> implements Embedded
Creates a pseudo-instance of an@Embedded
annotation.- Since:
- 2.1
Developer note.This is an experimental item. Its function and presence are subject to change. Feedback on features and usability extremely welcome.
-
-
Constructor Summary
Constructors Constructor Description EmbeddedBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<Embedded>
annotationType()
static EmbeddedBuilder
builder()
Creates a new instanceString
discriminator()
EmbeddedBuilder
discriminator(String discriminator)
Sets the discriminator valueString
discriminatorKey()
EmbeddedBuilder
discriminatorKey(String discriminatorKey)
Sets the discriminator keyboolean
useDiscriminator()
EmbeddedBuilder
useDiscriminator(boolean use)
Toggles whether or not to use the discriminatorString
value()
-
Methods inherited from class dev.morphia.annotations.AnnotationBuilder
equals, get, hashCode, put, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.annotation.Annotation
equals, hashCode, toString
-
-
-
-
Method Detail
-
builder
public static EmbeddedBuilder builder()
Creates a new instance- Returns:
- the new instance
-
annotationType
public Class<Embedded> annotationType()
- Specified by:
annotationType
in interfaceAnnotation
- Specified by:
annotationType
in classAnnotationBuilder<Embedded>
-
discriminator
public EmbeddedBuilder discriminator(String discriminator)
Sets the discriminator value- Parameters:
discriminator
- the discriminator to use- Returns:
- this
-
discriminatorKey
public EmbeddedBuilder discriminatorKey(String discriminatorKey)
Sets the discriminator key- Parameters:
discriminatorKey
- the discriminator key to use- Returns:
- this
-
useDiscriminator
public EmbeddedBuilder useDiscriminator(boolean use)
Toggles whether or not to use the discriminator- Parameters:
use
- true to use the discriminator- Returns:
- this
-
value
public String value()
-
useDiscriminator
public boolean useDiscriminator()
-
discriminatorKey
public String discriminatorKey()
-
discriminator
public String discriminator()
-
-