{
metadata.setIndexName(clazz.getSimpleName());
}
Index idx = clazz.getAnnotation(Index.class);
IndexCollection indexes = clazz.getAnnotation(IndexCollection.class);
EntityType entityType = (EntityType) kunderaMetadata.getApplicationMetadata()
.getMetaModelBuilder(metadata.getPersistenceUnit()).getManagedTypes().get(clazz);
List<String> columnsNameToBeIndexed = new ArrayList<String>();
Map<String, com.impetus.kundera.index.Index> indexedColumnsMap = new HashMap<String, com.impetus.kundera.index.Index>();
if (null != indexes)
{
if (indexes.columns() != null && indexes.columns().length != 0)
{
metadata.setIndexable(true);
for (com.impetus.kundera.index.Index indexedColumn : indexes.columns())
{
if (indexedColumn.type().equals("composite"))
{
// means comma seperated list of columns
metadata.addIndexProperty(