Skip to main content

ValueTypes

A ValueType describes the type of data that can be stored in a particular field of a DataElement. It specifies the format of the data and different representations in the various layers of the Application.

Several basic ValueTypes have defined in prime-core.

You can add new ValueTypes in one of 2 ways:

  • Add a ValueType to one of your Components

ValueTypes are added to the valueTypes directory.

space
└── model
├── space.xml
└── valueTypes
├── LicensePlate.xml
└── Rating.xml

The xml itself should have root tag valueType and a type attribute (e.g. elements::SimpleValueType).

<valueType name="LicensePlate" type="elements::SimpleValueType">
<description>For license plate String values.</description>
<prototype name="String"/>
</valueType>

Currently only SimpleValueTypes are supported. More ValueTypes will be coming in the near future.