DataType declaration start with the type keyword and
are used to specify simple datatypes whose details are not explicitly
modeled and are used to
implicitly or explicitly associated with a primitive type through their name (e.g. String) or some mapping
could be associated with a java instance type
can redefine other DataType (e.g. default parameter values or additional parameter declarations)
extend the set of built-in datatypes available with the dsl platform library (String,Integer,Boolean,Date,Long,..)
DataTypes can declare any number of string,int or boolean parameter to parameterize and convey additional information. DataTypes are also identified by name, and they are used as the types of attributes.
type BarType instancetype org.foo.BarType
The openXMA dsl platform ships with a default datatype library - Library.xmadsl - with pre-defined standard datatypes like String,Integer,Long,Float,Boolean,Date,Timestamp,Double and BigDecimal. The datatypes within this library are implicitly visible to all referring elements and don't have to be manually imported. Some of this datatypes are parameterizable and therefore accept one ore more parameter values to set some additional constraints on the corresponding attribute type.
entity Customer extends BaseEntity {
String(25) firstName
Date("Full") birthDate
}For example the String(25) declaration taken from the
previous example states that the length of the text value of the
corresponding attribute is restricted to a maximum of 25
characters.