.. *******************************************************************************
* MetaFactory.io R2
* Technical Documentation
*
* File name : ProRef_Maps.rst
* Created by : Marnix Bochove (original text)
* Updated by : Niels de Nies
*
* MetaFactory BV Amsterdam
*******************************************************************************
.. include:: /inline-images.txt
.. include:: /metadata_include.txt
Maps
====
is a sub element of . It is a collection of
.. rubric:: Available maps
MetaFactory contains 2 hardcoded maps:
- javaTypes and
- hibernateTypes
|Loupe M| For details see: :ref:`Data type mappings `
.. rubric:: Attributes
There are no attributes for .
.. rubric:: Sub elements
.. list-table:: ** sub elements**
:widths: 15 70 15
:header-rows: 1
* - Name
- Details
- Number
* - map
- map is used to customize a javatype mapping.
- 1
.. rubric:: Sub element **map** (|eye s| singular)
.. list-table:: ** attributes**
:widths: 15 85
:header-rows: 1
:class: tight-table
* - Name
- Details
* - name
- Name of the map. Mandatory
.. list-table:: ** sub elements>**
:widths: 15 30 15 15
:header-rows: 1
:class: tight-table
* - Name
- Details
- Attributes
- Number
* - entry
- |Question S|
- key, Required
value, Required
- 0 or more
Examples
~~~~~~~~
:numref:`PR-maps-01` is an example of a project file with a mapping in order to override the mapping for Date
with org.joda.time.LocalDate instead of java.util.Date.
.. code-block:: xml
:caption: in project file
:name: PR-maps-01
:linenos:
:emphasize-lines: 5-12
...
...
In the code_instruction a map can be used by applying the MetaFactory expression language (a simple version of el). The syntax is:
.. code-block::
${map(mapName, key)}
.. rubric:: Example
.. code-block::
${map(javaTypes, big_decimal)}
which returns java.math.BigDecimal