Search in sources :

Example 1 with ObjectClass

use of io.jans.orm.annotation.ObjectClass in project jans by JanssenProject.

the class BaseEntryManager method getTypeObjectClasses.

protected String[] getTypeObjectClasses(Class<?> entryClass) {
    // Check if entry is LDAP Entry
    List<Annotation> entryAnnotations = ReflectHelper.getClassAnnotations(entryClass, LDAP_ENTRY_TYPE_ANNOTATIONS);
    // Get object classes
    Annotation ldapObjectClass = ReflectHelper.getAnnotationByType(entryAnnotations, ObjectClass.class);
    if (ldapObjectClass == null) {
        return EMPTY_STRING_ARRAY;
    }
    if (StringHelper.isEmpty(((ObjectClass) ldapObjectClass).value())) {
        return EMPTY_STRING_ARRAY;
    }
    return new String[] { ((ObjectClass) ldapObjectClass).value() };
}
Also used : CustomObjectClass(io.jans.orm.annotation.CustomObjectClass) ObjectClass(io.jans.orm.annotation.ObjectClass) PropertyAnnotation(io.jans.orm.reflect.property.PropertyAnnotation) Annotation(java.lang.annotation.Annotation)

Aggregations

CustomObjectClass (io.jans.orm.annotation.CustomObjectClass)1 ObjectClass (io.jans.orm.annotation.ObjectClass)1 PropertyAnnotation (io.jans.orm.reflect.property.PropertyAnnotation)1 Annotation (java.lang.annotation.Annotation)1