public class MappedClass extends Object
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.
|
static void |
addInterestingAnnotation(Class<? extends Annotation> annotation) |
com.mongodb.DBObject |
callLifecycleMethods(Class<? extends Annotation> event,
Object entity,
com.mongodb.DBObject dbObj)
Call the lifecycle methods
|
boolean |
containsJavaFieldName(String name)
Check java field name that will stored in mongodb
|
boolean |
equals(Object o) |
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() |
int |
hashCode() |
static boolean |
isSupportedType(Class<?> clazz)
Checks to see if it a Map/Set/List or a property supported by the MongoDB java driver
|
String |
toString() |
void |
update() |
void |
validate() |
public static void addInterestingAnnotation(Class<? extends Annotation> annotation)
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 com.mongodb.DBObject callLifecycleMethods(Class<? extends Annotation> event, Object entity, com.mongodb.DBObject dbObj)
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 © 2016. All rights reserved.