if (!Ext.ClassManager.isCreated("Portfolio.dynapp.model.Column")) {

	Ext.define("Portfolio.dynapp.model.Column", {

		extend: "Ext.data.Model",

		alternateClassName: [
			"Ext.dynapp.model.Column"
		],

		fields: [
			{ type: "string", name: "type",mapping: "type",
				convert: function(value, record) {
					var datatype;
					if (value) {
						if (value.indexOf("(") == -1) {
							datatype = value;
						}
						else {
							record.set("len", value.substr(value.indexOf("(") + 1, value.indexOf(")") - value.indexOf("(") - 1));
							datatype = value.substr(0, value.indexOf("("));
						}
						if (record.data.xpdpath.length > 0) {
							datatype = "property";
						}
					}
					return datatype;
				}
			},
			{ type: "int", name: "len" },
			{ type: "string", name: "name", mapping: "name" },
			{ type: "auto", name: "title", mapping: "title" },
			{ type: "string", name: "edtcde", mapping: "edtcde" },
			{ type: "string", name: "edtword", mapping: "edtword" },
			{ type: "boolean", name: "isRowId", mapping: "isRowId" },
			{ type: "boolean", name: "isTitle", mapping: "isTitle" },
			{ type: "boolean", name: "isMandatory", mapping: "isMandatory" },
			{ type: "boolean", name: "syncBoth", mapping: "syncBoth" },
			{ type: "string", name: "uitype", mapping: "uitype" },
			{ type: "int", name: "ccsid", mapping: "ccsid" },
			{ type: "string", name: "fmt", mapping: "fmt" },
			{ type: "string", name: "sep", mapping: "sep" },
			{ type: "string", name: "xpdpath", mapping: "xpdpath" },
			{ type: "auto", name: "form", mapping: "form" },
			{ type: "auto", name: "grid", mapping: "grid" },
			{ type: "auto", name: "enumerator", mapping: "enumerator" },
			{ type: "boolean", name: "drop" },
			{ type: "string", name: "was" }
		]
	});
}
