private void ensureIndexesFromClassAnnotation(MappedClass mc, boolean background) {
ArrayList<Annotation> idxs = mc.getAnnotations(Indexes.class);
if (idxs != null)
for (Annotation ann : idxs) {
Indexes idx = (Indexes) ann;
if (idx != null && idx.value() != null && idx.value().length > 0)
for (Index index : idx.value()) {
BasicDBObject fields = QueryImpl.parseFieldsString(index.value(), mc.getClazz(), mapr, !index.disableValidation());
ensureIndex(mc.getClazz(), index.name(), fields, index.unique(), index.dropDups(), index.background() ? index.background() : background, index.sparse() ? index.sparse() : false, index.expireAfterSeconds());
}
}
}