use of com.odysseusinc.arachne.portal.model.solr.SolrFieldAnno in project ArachneCentralAPI by OHDSI.
the class BaseSolrServiceImpl method getSolrField.
public T getSolrField(final Field field) {
T solrField = null;
if (field.isAnnotationPresent(SolrFieldAnno.class)) {
final SolrFieldAnno solrFieldAnno = field.getAnnotation(SolrFieldAnno.class);
solrField = extractSolrField(solrFieldAnno);
solrField.setDataType(solrFieldAnno.clazz() == String.class ? field.getType() : solrFieldAnno.clazz());
solrField.setField(field);
if (StringUtils.isEmpty(solrField.getName())) {
solrField.setName(field.getName());
}
}
return solrField;
}
Aggregations