Business object - Using custom data types

You might need to create a business object with a date that only indicates the year instead of the standard month, day, year format. For example, an insurance company might need a business object that captures the model year of a vehicle.

The following JSON defines a simple business object with the datatype for the Vehicle Year field set to year. The object references the CFFACT.PHYSICAL_OBJECT table.

{
	"logicalObjectName": "cookbook_simple_physical_object",
	"tableName": "CFFACT.PHYSICAL_OBJECT",
	"tableKeyId": "PHYSICAL_OBJECT_TYPE_ID",
	"cfObjectStereoType": "physical_object",
	"definition": {
		"columns": [
		{
			"logicalField": "Vehicle ID",
			"physicalField": "PHYSICAL_OBJECT_TYPE_ID",
			"required": true, "prominence":1
		},
		{
			"logicalField": "OBJECT_ID",
			"physicalField": "PHYSICAL_OBJECT_TYPE_ID",
			"required": true, "prominence":1
		},
		{
			"logicalField": "Vehicle Model",
			"physicalField": "PHYSICAL_OBJECT_MODEL_ID",
			"required": true, "prominence":1
		}
		{
			"logicalField": "Vehicle Make",
			"physicalField": "PHYSICAL_OBJECT_MAKE_ID",
			"required": true, "prominence":1
		}
		{
			"logicalField": "Vehicle Color",
			"physicalField": "PHYSICAL_OBJECT_COLOR_ID",
			"required": true, "prominence":1
		}
		{
			"logicalField": "Vehicle Year",
			"physicalField": "MANUFACTURE_DATE",
			"required": false,
                     "readOnly": false,
                     "datatype": "year",
                     "prominence":1
		}]
	}
}