package ru.ydn.wicket.wicketorientdb.model;

import java.util.Collection;

import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.Model;

import com.orientechnologies.orient.core.index.OIndex;
import com.orientechnologies.orient.core.metadata.schema.OClass;

/**
 * {@link SortableDataProvider} for listing of {@link OIndex}es
 */
public class OIndexiesDataProvider extends
		AbstractJavaSortableDataProvider<OIndex<?>, String>
{

	private static final long serialVersionUID = 1L;

	public OIndexiesDataProvider(OClass oClass, boolean allIndexes)
	{
		this(new OClassModel(oClass), Model.<Boolean> of(allIndexes));
	}

	public OIndexiesDataProvider(final IModel<OClass> oClassModel,
			final IModel<Boolean> allIndexiesModel)
	{
		super(new ListOIndexiesModel(oClassModel, allIndexiesModel));
	}

	public OIndexiesDataProvider(IModel<Collection<OIndex<?>>> dataModel) {
		super(dataModel);
	}

	@Override
	public IModel<OIndex<?>> model(OIndex<?> object) {
		return new OIndexModel(object);
	}

}

@@ -937,32 +937,135 @@
 iesModel));%0A%09%7D%0A%0A
+%09public OIndexiesDataProvider(AbstractListModel%3COIndex%3C?%3E%3E indexesModel)%0A%09%7B%0A%09%09super(indexesModel);%0A%09%7D%0A%0A
 %09public OIndexie

Add option for OIndexiesDataProvider to use schema indexes model. For Orienteer#19.