示例#1
0
 @SuppressWarnings("deprecation")
 private List<Index> collectFieldIndexes(final MappedClass mc) {
   List<Index> list = new ArrayList<Index>();
   for (final MappedField mf : mc.getPersistenceFields()) {
     if (mf.hasAnnotation(Indexed.class)) {
       final Indexed indexed = mf.getAnnotation(Indexed.class);
       list.add(convert(indexed, mf.getNameToStore()));
     } else if (mf.hasAnnotation(Text.class)) {
       final Text text = mf.getAnnotation(Text.class);
       list.add(convert(text, mf.getNameToStore()));
     }
   }
   return list;
 }