field = clasz.getField(fieldName);
} catch (Exception e1) {
throw new RuntimeException(e1);
}
if (field.isAnnotationPresent(Indexed.class)) {
Indexed indexed = field.getAnnotation(Indexed.class);
BasicDBObject obj = new BasicDBObject();
obj.put(fieldName, indexed.value().toInt());
collection.ensureIndex(obj);
}
}
}