use of io.jans.orm.annotation.DataEntry in project jans by JanssenProject.
the class BaseEntryManager method isUseEntryForceUpdate.
protected boolean isUseEntryForceUpdate(Class<?> entryClass) {
if (!isSupportForceUpdate()) {
return false;
}
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 dataEntry = ReflectHelper.getAnnotationByType(entryAnnotations, DataEntry.class);
if (dataEntry == null) {
return false;
}
return ((DataEntry) dataEntry).forceUpdate();
}
use of io.jans.orm.annotation.DataEntry in project jans by JanssenProject.
the class BaseEntryManager method isConfigurationEntry.
protected boolean isConfigurationEntry(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);
DataEntry dataEntry = (DataEntry) ReflectHelper.getAnnotationByType(entryAnnotations, DataEntry.class);
if (dataEntry == null) {
return false;
}
return dataEntry.configurationDefinition();
}
use of io.jans.orm.annotation.DataEntry in project jans by JanssenProject.
the class BaseEntryManager method getEntrySortByProperties.
protected String[] getEntrySortByProperties(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, DataEntry.class);
if (annotation == null) {
return null;
}
return ((DataEntry) annotation).sortBy();
}
use of io.jans.orm.annotation.DataEntry in project jans by JanssenProject.
the class BaseEntryManager method getEntrySortByNames.
protected String[] getEntrySortByNames(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, DataEntry.class);
if (annotation == null) {
return null;
}
return ((DataEntry) annotation).sortByName();
}
Aggregations