Package org.bson.codecs.pojo
Class ClassModelBuilder<T>
java.lang.Object
org.bson.codecs.pojo.ClassModelBuilder<T>
- Type Parameters:
T- The type of the class the ClassModel represents
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
A builder for programmatically creating
ClassModels.- Since:
- 3.5
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionannotations(List<Annotation> annotations) Deprecated.Sets the annotations for the modelbuild()Deprecated.Creates a new ClassModel instance based on the mapping data provided.conventions(List<Convention> conventions) Deprecated.Sets the conventions to apply to the modeldiscriminator(String discriminator) Deprecated.Sets the discriminator to be used when storing instances of the modeled typediscriminatorKey(String discriminatorKey) Deprecated.Sets the discriminator key to be used when storing instances of the modeled typeenableDiscriminator(boolean discriminatorEnabled) Deprecated.Enables or disables the use of a discriminator when serializingDeprecated.Deprecated.Deprecated.Deprecated.IdGenerator<?> Deprecated.Deprecated.Deprecated.getProperty(String propertyName) Deprecated.Gets a property by the property name.Deprecated.getType()Deprecated.idGenerator(IdGenerator<?> idGenerator) Deprecated.Sets the IdGenerator for the ClassModelidPropertyName(String idPropertyName) Deprecated.Designates a property as the_idproperty for this type.instanceCreatorFactory(InstanceCreatorFactory<T> instanceCreatorFactory) Deprecated.Sets the InstanceCreatorFactory for the ClassModelbooleanremoveProperty(String propertyName) Deprecated.Remove a property from the buildertoString()Deprecated.Deprecated.Sets the type of the modelDeprecated.
-
Method Details
-
idGenerator
Deprecated.Sets the IdGenerator for the ClassModel- Parameters:
idGenerator- the IdGenerator- Returns:
- this
- Since:
- 3.10
-
getIdGenerator
Deprecated.- Returns:
- the IdGenerator for the ClassModel, or null if not set
- Since:
- 3.10
-
instanceCreatorFactory
public ClassModelBuilder<T> instanceCreatorFactory(InstanceCreatorFactory<T> instanceCreatorFactory) Deprecated.Sets the InstanceCreatorFactory for the ClassModel- Parameters:
instanceCreatorFactory- the InstanceCreatorFactory- Returns:
- this
-
getInstanceCreatorFactory
Deprecated.- Returns:
- the InstanceCreatorFactory for the ClassModel
-
type
Deprecated.Sets the type of the model- Parameters:
type- the type of the class- Returns:
- the builder to configure the class being modeled
-
getType
Deprecated.- Returns:
- the type if set or null
-
conventions
Deprecated.Sets the conventions to apply to the model- Parameters:
conventions- a list of conventions- Returns:
- this
-
getConventions
Deprecated.- Returns:
- the conventions o apply to the model
-
annotations
Deprecated.Sets the annotations for the model- Parameters:
annotations- a list of annotations- Returns:
- this
-
getAnnotations
Deprecated.- Returns:
- the annotations on the modeled type if set or null
-
discriminator
Deprecated.Sets the discriminator to be used when storing instances of the modeled type- Parameters:
discriminator- the discriminator value- Returns:
- this
-
getDiscriminator
Deprecated.- Returns:
- the discriminator to be used when storing instances of the modeled type or null if not set
-
discriminatorKey
Deprecated.Sets the discriminator key to be used when storing instances of the modeled type- Parameters:
discriminatorKey- the discriminator key value- Returns:
- this
-
getDiscriminatorKey
Deprecated.- Returns:
- the discriminator key to be used when storing instances of the modeled type or null if not set
-
enableDiscriminator
Deprecated.Enables or disables the use of a discriminator when serializing- Parameters:
discriminatorEnabled- true to enable the use of a discriminator- Returns:
- this
-
useDiscriminator
Deprecated.- Returns:
- true if a discriminator should be used when serializing, otherwise false
-
idPropertyName
Deprecated.Designates a property as the_idproperty for this type. If another property is currently marked as the_idproperty, that setting is cleared in favor of the named property.- Parameters:
idPropertyName- the property name to use for the_idproperty, a null value removes the set idPropertyName.- Returns:
- this
-
getIdPropertyName
Deprecated.- Returns:
- the designated
_idproperty name for this type or null if not set
-
removeProperty
Deprecated.Remove a property from the builder- Parameters:
propertyName- the actual property name in the POJO and not thedocumentPropertyName.- Returns:
- returns true if the property matched and was removed
-
getProperty
Deprecated.Gets a property by the property name.- Parameters:
propertyName- the name of the property to find.- Returns:
- the property or null if the property is not found
-
getPropertyModelBuilders
Deprecated.- Returns:
- the properties on the modeled type
-
build
Deprecated.Creates a new ClassModel instance based on the mapping data provided.- Returns:
- the new instance
-
toString
Deprecated.
-