public class MappedClass extends Object
Modifier and Type | Field and Description |
---|---|
static List<Class<? extends Annotation>> |
interestingAnnotations
Annotations we are interested in looking for.
|
Constructor and Description |
---|
MappedClass(Class<?> clazz,
Mapper mapper)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(Class<? extends Annotation> clazz,
Annotation ann)
Adds the given Annotation to the internal list for the given Class.
|
com.mongodb.DBObject |
callLifecycleMethods(Class<? extends Annotation> event,
Object entity,
com.mongodb.DBObject dbObj,
Mapper mapper)
Call the lifecycle methods
|
boolean |
containsJavaFieldName(String name)
Check java field name that will stored in mongodb
|
boolean |
equals(Class<?> clazz) |
boolean |
equals(MappedClass clazz) |
boolean |
equals(Object obj) |
Annotation |
getAnnotation(Class<? extends Annotation> clazz) |
List<Annotation> |
getAnnotations(Class<? extends Annotation> clazz) |
Class<?> |
getClazz() |
String |
getCollectionName() |
Embedded |
getEmbeddedAnnotation() |
Entity |
getEntityAnnotation() |
List<MappedField> |
getFieldsAnnotatedWith(Class<? extends Annotation> clazz)
Returns fields annotated with the clazz
|
Annotation |
getFirstAnnotation(Class<? extends Annotation> clazz)
Returns the first found Annotation, or null.
|
Field |
getIdField() |
List<org.mongodb.morphia.mapping.MappedClass.ClassMethodPair> |
getLifecycleMethods(Class<Annotation> clazz) |
MappedField |
getMappedField(String storedName)
Returns the MappedField by the name that it will stored in mongodb as
|
MappedField |
getMappedFieldByJavaField(String name)
Returns MappedField for a given java field name on the this MappedClass
|
MappedField |
getMappedIdField() |
Mapper |
getMapper() |
List<MappedField> |
getPersistenceFields() |
Map<Class<? extends Annotation>,List<Annotation>> |
getRelevantAnnotations() |
static boolean |
isSupportedType(Class<?> clazz)
Checks to see if it a Map/Set/List or a property supported by the MangoDB java driver
|
String |
toString() |
void |
update() |
void |
validate() |
public static final List<Class<? extends Annotation>> interestingAnnotations
public void update()
public void addAnnotation(Class<? extends Annotation> clazz, Annotation ann)
public List<org.mongodb.morphia.mapping.MappedClass.ClassMethodPair> getLifecycleMethods(Class<Annotation> clazz)
public List<MappedField> getFieldsAnnotatedWith(Class<? extends Annotation> clazz)
public MappedField getMappedField(String storedName)
public boolean containsJavaFieldName(String name)
public MappedField getMappedFieldByJavaField(String name)
public static boolean isSupportedType(Class<?> clazz)
public void validate()
public boolean equals(MappedClass clazz)
public boolean equals(Class<?> clazz)
public com.mongodb.DBObject callLifecycleMethods(Class<? extends Annotation> event, Object entity, com.mongodb.DBObject dbObj, Mapper mapper)
public Field getIdField()
public Entity getEntityAnnotation()
public Embedded getEmbeddedAnnotation()
public Map<Class<? extends Annotation>,List<Annotation>> getRelevantAnnotations()
public Annotation getFirstAnnotation(Class<? extends Annotation> clazz)
clazz
- The Annotation to find.public Annotation getAnnotation(Class<? extends Annotation> clazz)
public List<Annotation> getAnnotations(Class<? extends Annotation> clazz)
public List<MappedField> getPersistenceFields()
public String getCollectionName()
public Class<?> getClazz()
public Mapper getMapper()
public MappedField getMappedIdField()
Copyright © 2015. All rights reserved.