Package org.bson.codecs.pojo
Class ClassModel<T>
- java.lang.Object
-
- org.bson.codecs.pojo.ClassModel<T>
-
- Type Parameters:
T- The type of the class the ClassModel represents
@Deprecated(since="2022-10-31") public final class ClassModel<T> extends java.lang.ObjectDeprecated.Usage of this API is not supported in AEM as a Cloud Service.This model represents the metadata for a class and all its properties.- Since:
- 3.5
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <S> ClassModelBuilder<S>builder(java.lang.Class<S> type)Deprecated.Creates a new Class Model builder instance using reflection.booleanequals(java.lang.Object o)Deprecated.java.lang.StringgetDiscriminator()Deprecated.Returns the discriminator key.java.lang.StringgetDiscriminatorKey()Deprecated.Gets the value for the discriminator.PropertyModel<?>getIdPropertyModel()Deprecated.Returns thePropertyModelmapped as the id property for this ClassModeljava.lang.StringgetName()Deprecated.Returns the name of the class represented by this ClassModelPropertyModel<?>getPropertyModel(java.lang.String propertyName)Deprecated.Gets aPropertyModelby the property name.java.util.List<PropertyModel<?>>getPropertyModels()Deprecated.Returns all the properties on this modeljava.lang.Class<T>getType()Deprecated.inthashCode()Deprecated.booleanhasTypeParameters()Deprecated.java.lang.StringtoString()Deprecated.booleanuseDiscriminator()Deprecated.
-
-
-
Method Detail
-
builder
public static <S> ClassModelBuilder<S> builder(java.lang.Class<S> type)
Deprecated.Creates a new Class Model builder instance using reflection.- Type Parameters:
S- the type of the class- Parameters:
type- the POJO class to reflect and configure the builder with.- Returns:
- a new Class Model builder instance using reflection on the
clazz.
-
getType
public java.lang.Class<T> getType()
Deprecated.- Returns:
- the backing class for the ClassModel
-
hasTypeParameters
public boolean hasTypeParameters()
Deprecated.- Returns:
- true if the underlying type has type parameters.
-
useDiscriminator
public boolean useDiscriminator()
Deprecated.- Returns:
- true if a discriminator should be used when storing the data.
-
getDiscriminatorKey
public java.lang.String getDiscriminatorKey()
Deprecated.Gets the value for the discriminator.- Returns:
- the discriminator value or null if not set
-
getDiscriminator
public java.lang.String getDiscriminator()
Deprecated.Returns the discriminator key.- Returns:
- the discriminator key or null if not set
-
getPropertyModel
public PropertyModel<?> getPropertyModel(java.lang.String propertyName)
Deprecated.Gets aPropertyModelby the property name.- Parameters:
propertyName- the PropertyModel's property name- Returns:
- the PropertyModel or null if the property is not found
-
getPropertyModels
public java.util.List<PropertyModel<?>> getPropertyModels()
Deprecated.Returns all the properties on this model- Returns:
- the list of properties
-
getIdPropertyModel
public PropertyModel<?> getIdPropertyModel()
Deprecated.Returns thePropertyModelmapped as the id property for this ClassModel- Returns:
- the PropertyModel for the id
-
getName
public java.lang.String getName()
Deprecated.Returns the name of the class represented by this ClassModel- Returns:
- the name
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
-