package com.mars.helios.heliosweb.client;

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

public class MyDS extends DataSource {

    public MyDS() {
        DataSourceField field1 = new DataSourceField("FirstName", FieldType.TEXT, "FirstName");
        field1.setPrimaryKey(true);
        DataSourceField field2 = new DataSourceField("LastName", FieldType.TEXT, "LastName");
        field2.setPrimaryKey(true);
        DataSourceField field3 = new DataSourceField("Period", FieldType.TEXT, "Period");
        field3.setPrimaryKey(true);
        DataSourceField field4 = new DataSourceField("Value", FieldType.TEXT, "Value");

        setFields(field1, field2, field3, field4);
        setClientOnly(true);
        setDataFormat(DSDataFormat.JSON);
//        setDataURL("sampleData.json");
    }
}
