2010-01-24 22:09:50 +01:00
|
|
|
package com.metaweb.gridlock.model;
|
|
|
|
|
2010-01-25 23:51:25 +01:00
|
|
|
import java.io.Serializable;
|
2010-01-27 02:48:42 +01:00
|
|
|
import java.util.Properties;
|
2010-01-25 23:51:25 +01:00
|
|
|
|
|
|
|
import org.json.JSONException;
|
2010-02-01 20:16:09 +01:00
|
|
|
import org.json.JSONWriter;
|
2010-01-25 23:51:25 +01:00
|
|
|
|
2010-02-01 20:16:09 +01:00
|
|
|
import com.metaweb.gridlock.Jsonizable;
|
|
|
|
|
|
|
|
public class Column implements Serializable, Jsonizable {
|
2010-01-25 23:51:25 +01:00
|
|
|
private static final long serialVersionUID = -1063342490951563563L;
|
|
|
|
|
2010-01-24 22:09:50 +01:00
|
|
|
public int cellIndex;
|
|
|
|
public String headerLabel;
|
|
|
|
public Class valueType;
|
2010-01-25 23:51:25 +01:00
|
|
|
|
2010-02-01 20:16:09 +01:00
|
|
|
@Override
|
|
|
|
public void write(JSONWriter writer, Properties options)
|
|
|
|
throws JSONException {
|
2010-01-25 23:51:25 +01:00
|
|
|
|
2010-02-01 20:16:09 +01:00
|
|
|
writer.object();
|
|
|
|
writer.key("cellIndex"); writer.value(cellIndex);
|
|
|
|
writer.key("headerLabel"); writer.value(headerLabel);
|
|
|
|
writer.key("valueType"); writer.value(valueType == null ? null : valueType.getSimpleName());
|
|
|
|
writer.endObject();
|
2010-01-25 23:51:25 +01:00
|
|
|
}
|
2010-01-24 22:09:50 +01:00
|
|
|
}
|