Search in sources :

Example 1 with Property

use of org.mongodb.morphia.annotations.Property in project morphia by mongodb.

the class MappedField method getConcreteType.

/**
     * @return the concrete type of the MappedField
     */
public Class getConcreteType() {
    final Embedded e = getAnnotation(Embedded.class);
    if (e != null) {
        final Class concrete = e.concreteClass();
        if (concrete != Object.class) {
            return concrete;
        }
    }
    final Property p = getAnnotation(Property.class);
    if (p != null) {
        final Class concrete = p.concreteClass();
        if (concrete != Object.class) {
            return concrete;
        }
    }
    return getType();
}
Also used : Embedded(org.mongodb.morphia.annotations.Embedded) Property(org.mongodb.morphia.annotations.Property)

Aggregations

Embedded (org.mongodb.morphia.annotations.Embedded)1 Property (org.mongodb.morphia.annotations.Property)1