code: public static void createIndex(PersistenceManager pm, Class<?> cls, String fieldName, 
      		boolean isUnique) {
      	DBTracer.logCall(ZooJdoHelper.class, pm, cls, fieldName, isUnique); 
      	ZooSchema s = schema(pm);
      	ZooClass c = s.getClass(cls); 
      	if (c == null) {
      		c = s.addClass(cls);
      	}
      	c.createIndex(fieldName, isUnique);
      }
docs: A convenience method for creating indices.
  Creates an index on the specified field for the current class and all sub-classes.
  The method will create a schema for the class if none exists.
  @param pm The PersistenceManager
  @param cls The class
  @param fieldName The field name
  @param isUnique Whether the index should be only allow unique keys