Package dev.morphia.mapping
Class DiscriminatorFunction
java.lang.Object
dev.morphia.mapping.DiscriminatorFunction
Defines a function to calculate a discriminator value. This function is only applied if the existing value is the annotation default
value.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscriminatorFunction
Defines a function to use the class name for the discriminator valueabstract String
Computes the discriminator value for an Entitystatic DiscriminatorFunction
Defines a function to use the lowercase class name for the discriminator valuestatic DiscriminatorFunction
Defines a function to use the lowercase simple class name for the discriminator valuestatic DiscriminatorFunction
Defines a function to use the simple class name for the discriminator value
-
Constructor Details
-
DiscriminatorFunction
public DiscriminatorFunction()
-
-
Method Details
-
className
Defines a function to use the class name for the discriminator value- Returns:
- the function
-
lowerClassName
Defines a function to use the lowercase class name for the discriminator value- Returns:
- the function
-
lowerSimpleName
Defines a function to use the lowercase simple class name for the discriminator value- Returns:
- the function
-
simpleName
Defines a function to use the simple class name for the discriminator value- Returns:
- the function
-
compute
Computes the discriminator value for an Entity- Parameters:
type
-- Returns:
- the discriminator value
-