* @return Object of ColumnInfo.
*/
private ColumnInfo getColumn(TableInfo tableInfo, Attribute column, PropertyIndex indexedColumn,
String[] orderByColumns)
{
ColumnInfo columnInfo = new ColumnInfo();
if (column.getJavaType().isAnnotationPresent(OrderBy.class))
{
OrderBy order = (OrderBy) column.getJavaType().getAnnotation(OrderBy.class);
orderByColumns = order.value().split("\\s*,\\s*");
}
columnInfo.setOrderBy(getOrderByColumn(orderByColumns, column));
if (column.getJavaType().isEnum())
{
columnInfo.setType(String.class);
}
else
{
columnInfo.setType(column.getJavaType());
}
columnInfo.setColumnName(((AbstractAttribute) column).getJPAColumnName());
if (indexedColumn != null && indexedColumn.getName() != null)
{
columnInfo.setIndexable(true);
IndexInfo indexInfo = new IndexInfo(((AbstractAttribute) column).getJPAColumnName(),
indexedColumn.getMax(), indexedColumn.getMin(), indexedColumn.getIndexType(),
indexedColumn.getName());
tableInfo.addToIndexedColumnList(indexInfo);
// Add more if required