package com.hp.isomorphic.client.issues;

import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.data.DataSourceField;
import com.smartgwt.client.types.FieldType;

public class FullGridSampleDataSource extends DataSource {
	private static final int INITIAL_RECORD_COUNT = 20000;
	
	public FullGridSampleDataSource() {
		DataSourceField dsIdField = new DataSourceField("idField", FieldType.TEXT, "ID");
		DataSourceField dsStatusField = new DataSourceField("statusField", FieldType.TEXT, "Status");
		DataSourceField dscontentField = new DataSourceField("contentField", FieldType.TEXT, "Text");
		DataSourceField dsSortField = new DataSourceField("sortField", FieldType.INTEGER, "Sort");

		dsIdField.setPrimaryKey(true);
		setFields(dsIdField, dsStatusField, dscontentField, dsSortField);
		
		setCacheData(GridData.createRecords(INITIAL_RECORD_COUNT));
		setClientOnly(true);
	}
}
