Package org.bson.codecs.pojo
Class PropertyModelBuilder<T>
- java.lang.Object
-
- org.bson.codecs.pojo.PropertyModelBuilder<T>
-
- Type Parameters:
T- the type of the property
@Deprecated(since="2022-10-31") public final class PropertyModelBuilder<T> extends java.lang.ObjectDeprecated.Usage of this API is not supported in AEM as a Cloud Service.A builder for programmatically creatingPropertyModels.- Since:
- 3.5
- See Also:
PropertyModel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PropertyModel<T>build()Deprecated.Creates thePropertyModel.PropertyModelBuilder<T>codec(Codec<T> codec)Deprecated.Sets a custom codec for the propertyPropertyModelBuilder<T>discriminatorEnabled(boolean discriminatorEnabled)Deprecated.Enables or disables the use of a discriminator when serializingjava.lang.StringgetName()Deprecated.PropertyAccessor<T>getPropertyAccessor()Deprecated.Returns thePropertyAccessorPropertySerialization<T>getPropertySerialization()Deprecated.java.util.List<java.lang.annotation.Annotation>getReadAnnotations()Deprecated.Returns the read annotations, to be applied when serializing to BSONjava.lang.StringgetReadName()Deprecated.java.util.List<java.lang.annotation.Annotation>getWriteAnnotations()Deprecated.Returns the write annotations, to be applied when deserializing from BSONjava.lang.StringgetWriteName()Deprecated.java.lang.BooleanisDiscriminatorEnabled()Deprecated.booleanisReadable()Deprecated.Property is readable.booleanisWritable()Deprecated.Property is writable.PropertyModelBuilder<T>propertyAccessor(PropertyAccessor<T> propertyAccessor)Deprecated.Sets thePropertyAccessorPropertyModelBuilder<T>propertySerialization(PropertySerialization<T> propertySerialization)Deprecated.Sets thePropertySerializationcheckerPropertyModelBuilder<T>readAnnotations(java.util.List<java.lang.annotation.Annotation> annotations)Deprecated.Sets the read annotations, to be applied when serializing to BSONPropertyModelBuilder<T>readName(java.lang.String readName)Deprecated.Sets the readName, the key for this property when deserializing the data from BSON.java.lang.StringtoString()Deprecated.PropertyModelBuilder<T>writeAnnotations(java.util.List<java.lang.annotation.Annotation> writeAnnotations)Deprecated.Sets the writeAnnotations, to be applied when deserializing from BSONPropertyModelBuilder<T>writeName(java.lang.String writeName)Deprecated.Sets the writeName, the key for this property when serializing the data into BSON.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Deprecated.- Returns:
- the property name
-
getReadName
public java.lang.String getReadName()
Deprecated.- Returns:
- the name of the property to use as the key when deserializing the data from BSON.
-
readName
public PropertyModelBuilder<T> readName(java.lang.String readName)
Deprecated.Sets the readName, the key for this property when deserializing the data from BSON.Note: A null means this property will not used when deserializing.
- Parameters:
readName- the name of the property to use as the key when deserializing the data from BSON.- Returns:
- this
-
getWriteName
public java.lang.String getWriteName()
Deprecated.- Returns:
- the name of the property to use as the key when serializing the data into BSON.
-
writeName
public PropertyModelBuilder<T> writeName(java.lang.String writeName)
Deprecated.Sets the writeName, the key for this property when serializing the data into BSON.Note: A null means this property will not be serialized.
- Parameters:
writeName- the name of the property to use as the key when serializing the data into BSON.- Returns:
- this
-
codec
public PropertyModelBuilder<T> codec(Codec<T> codec)
Deprecated.Sets a custom codec for the property- Parameters:
codec- the custom codec for the property- Returns:
- this
-
propertySerialization
public PropertyModelBuilder<T> propertySerialization(PropertySerialization<T> propertySerialization)
Deprecated.Sets thePropertySerializationchecker- Parameters:
propertySerialization- checks if a property should be serialized- Returns:
- this
-
getPropertySerialization
public PropertySerialization<T> getPropertySerialization()
Deprecated.- Returns:
- the
PropertySerializationchecker
-
getReadAnnotations
public java.util.List<java.lang.annotation.Annotation> getReadAnnotations()
Deprecated.Returns the read annotations, to be applied when serializing to BSON- Returns:
- the read annotations
-
readAnnotations
public PropertyModelBuilder<T> readAnnotations(java.util.List<java.lang.annotation.Annotation> annotations)
Deprecated.Sets the read annotations, to be applied when serializing to BSON- Parameters:
annotations- the read annotations- Returns:
- this
-
getWriteAnnotations
public java.util.List<java.lang.annotation.Annotation> getWriteAnnotations()
Deprecated.Returns the write annotations, to be applied when deserializing from BSON- Returns:
- the write annotations
-
writeAnnotations
public PropertyModelBuilder<T> writeAnnotations(java.util.List<java.lang.annotation.Annotation> writeAnnotations)
Deprecated.Sets the writeAnnotations, to be applied when deserializing from BSON- Parameters:
writeAnnotations- the writeAnnotations- Returns:
- this
-
isWritable
public boolean isWritable()
Deprecated.Property is writable.- Returns:
- true if can be deserialized from BSON
-
isReadable
public boolean isReadable()
Deprecated.Property is readable.- Returns:
- true if can be serialized to BSON
-
isDiscriminatorEnabled
public java.lang.Boolean isDiscriminatorEnabled()
Deprecated.- Returns:
- true or false if a discriminator should be used when serializing or null if not set
-
discriminatorEnabled
public PropertyModelBuilder<T> discriminatorEnabled(boolean discriminatorEnabled)
Deprecated.Enables or disables the use of a discriminator when serializing- Parameters:
discriminatorEnabled- the useDiscriminator value- Returns:
- this
-
getPropertyAccessor
public PropertyAccessor<T> getPropertyAccessor()
Deprecated.Returns thePropertyAccessor- Returns:
- the PropertyAccessor
-
propertyAccessor
public PropertyModelBuilder<T> propertyAccessor(PropertyAccessor<T> propertyAccessor)
Deprecated.Sets thePropertyAccessor- Parameters:
propertyAccessor- the PropertyAccessor- Returns:
- this
-
build
public PropertyModel<T> build()
Deprecated.Creates thePropertyModel.- Returns:
- the PropertyModel
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-