T
- The type of the class the ClassModel representspublic final class ClassModel<T> extends Object
Modifier and Type | Method and Description |
---|---|
static <S> ClassModelBuilder<S> |
builder(Class<S> type)
Creates a new Class Model builder instance using reflection.
|
boolean |
equals(Object o) |
String |
getDiscriminator()
Returns the discriminator key.
|
String |
getDiscriminatorKey()
Gets the value for the discriminator.
|
FieldModel<?> |
getFieldModel(String documentFieldName)
Gets a field by the document field name.
|
List<FieldModel<?>> |
getFieldModels()
Returns all the fields on this model
|
FieldModel<?> |
getIdFieldModel()
Returns the
FieldModel mapped as the id field for this ClassModel |
String |
getName()
Returns the name of the class represented by this ClassModel
|
Class<T> |
getType() |
int |
hashCode() |
boolean |
hasTypeParameters() |
String |
toString() |
boolean |
useDiscriminator() |
public static <S> ClassModelBuilder<S> builder(Class<S> type)
S
- the type of the classtype
- the POJO class to reflect and configure the builder with.clazz
.public boolean hasTypeParameters()
public boolean useDiscriminator()
public String getDiscriminatorKey()
public String getDiscriminator()
public FieldModel<?> getFieldModel(String documentFieldName)
documentFieldName
- the fieldModel's document namepublic List<FieldModel<?>> getFieldModels()
public FieldModel<?> getIdFieldModel()
FieldModel
mapped as the id field for this ClassModelpublic String getName()