use of io.jans.orm.reflect.property.PropertyAnnotation in project jans by JanssenProject.
the class SqlEntryManager method createEntities.
protected <T> List<T> createEntities(String baseDN, Class<T> entryClass, PagedResult<EntryData> searchResult) {
ParsedKey keyWithInum = toSQLKey(baseDN);
List<PropertyAnnotation> propertiesAnnotations = getEntryPropertyAnnotations(entryClass);
List<T> entries = createEntities(entryClass, propertiesAnnotations, keyWithInum, searchResult.getEntries().toArray(new EntryData[searchResult.getEntriesCount()]));
return entries;
}
use of io.jans.orm.reflect.property.PropertyAnnotation in project jans by JanssenProject.
the class SqlFilterConverter method determineMultiValuedByType.
private Boolean determineMultiValuedByType(String attributeName, Map<String, PropertyAnnotation> propertiesAnnotationsMap) {
if ((attributeName == null) || (propertiesAnnotationsMap == null)) {
return null;
}
if (StringHelper.equalsIgnoreCase(attributeName, SqlEntryManager.OBJECT_CLASS)) {
return false;
}
PropertyAnnotation propertyAnnotation = propertiesAnnotationsMap.get(attributeName);
if ((propertyAnnotation == null) || (propertyAnnotation.getParameterType() == null)) {
return null;
}
Class<?> parameterType = propertyAnnotation.getParameterType();
boolean isMultiValued = parameterType.equals(Object[].class) || parameterType.equals(String[].class) || ReflectHelper.assignableFrom(parameterType, List.class) || ReflectHelper.assignableFrom(parameterType, AttributeEnum[].class);
return isMultiValued;
}
Aggregations