Search in sources :

Example 1 with LdapEntry

use of org.gluu.site.ldap.persistence.annotation.LdapEntry in project oxCore by GluuFederation.

the class AbstractEntryManager method getEntrySortBy.

protected String[] getEntrySortBy(Class<?> entryClass) {
    if (entryClass == null) {
        throw new MappingException("Entry class is null");
    }
    // Check if entry is LDAP Entry
    List<Annotation> entryAnnotations = ReflectHelper.getClassAnnotations(entryClass, LDAP_ENTRY_TYPE_ANNOTATIONS);
    Annotation annotation = ReflectHelper.getAnnotationByType(entryAnnotations, LdapEntry.class);
    if (annotation == null) {
        return null;
    }
    return ((LdapEntry) annotation).sortBy();
}
Also used : LdapEntry(org.gluu.site.ldap.persistence.annotation.LdapEntry) Annotation(java.lang.annotation.Annotation) MappingException(org.gluu.site.ldap.persistence.exception.MappingException)

Aggregations

Annotation (java.lang.annotation.Annotation)1 LdapEntry (org.gluu.site.ldap.persistence.annotation.LdapEntry)1 MappingException (org.gluu.site.ldap.persistence.exception.MappingException)1