.. ******************************************************************************* * MetaFactory.io R2 * Technical Documentation * * File name : EL_Maps.rst * Created by : Marnix Bochove (original text) * Updated by : Niels de Nies * * MetaFactory BV Amsterdam ******************************************************************************* .. include:: /inline-images.txt Data type mappings ================== MetaFactory contains 2 hardcoded maps (javaTypes and hibernateTypes). The maps functionality should be used to modify a built-in map or to add your own map (but this functionality is not implemented yet). The following maps are defined by MetaFactory: - javaTypes - maps pattern type (key) to java type (value) - hibernateTypes - maps pattern type (key) to hibernate type (value) .. list-table:: javaTypes :widths: 30 30 :header-rows: 1 * - Pattern type - Java type * - big_decimal - java.math.BigDecimal * - binary - byte[] * - blob - java.sql.Blob * - boolean - boolean * - byte - byte * - calendar_date - java.util.Calendar * - calendar - java.util.Calendar * - character - Character * - clob - java.sql.Clob * - Date - java.util.Date * - DateTime - java.util.Date * - double - double * - Double - Double * - float - float * - Float - Float * - int - int * - integer - int * - Integer - Integer * - long - long * - Long - Long * - short - short * - String - String * - text - String * - time - java.sql.Time * - timestamp - java.sql.Timestamp * - void - void * - yes_no - boolean .. list-table:: hibernateTypes :widths: 30 30 :header-rows: 1 * - Pattern type - Hibernate type * - big_decimal - big_decimal * - binary - binary * - blob - blob * - boolean - boolean * - Boolean - boolean * - byte - byte * - calendar_date - calendar_date * - calendar - calendar * - character - character * - clob - clob * - Date - date * - DateTime - timestamp * - double - double * - Double - double * - float - float * - Float - float * - integer - integer * - Integer - integer * - long - long * - Long - long * - short - short * - Short - short * - String - string * - text - text * - time - time * - timestamp - timestamp * - yes_no - yes_no In the pattern 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