Data Fabric
MDM Platform
The table below lists some useful MDM routine functions including those for mangling foreign keys. In MDM, you usually need to mangle foreign keys to accommodate to compound keys.
Function |
Description |
Syntax |
---|---|---|
getFK |
Returns one of the foreign key components by position in a mangled foreign key. Note that the position is specified by an integer starting from 0. |
For example:
which will return the second foreign key component in the composite foreign key. The output message will be "fk2". |
getWSClientTimeout |
Gets webservice client timeout information from jvm param setting. | MDM.getWSClientTimeout(String property) |
createFK |
Returns the foreign key string by a single key (String singleKey). |
For example:
which will return a foreign key created with the id provided. The output message will be "[0]". |
createFK |
Returns the foreign key string by a key list (String[] keys). |
For example:
which will return a foreign key with the ids provided. The output message will be "[0][1]". |
createReturnMessage |
Generates an error message with the content of msg
and error code of code . |
MDM.createReturnMessage(String msg, int
code) |
createReturnMessage |
Generates a report message with the content of msg
and type of type . |
MDM.createReturnMessage(String msg, String
type) |
getRepeatingElement |
Gets repeating element in an XML string according to the xpath and position. Note that the position is specified by an integer starting from 0. |
For example:
which will extract the second multi-occurrence element described by the xpath node from the XML string provided. The output message will be "size". |
hasRepeatingElement |
Checks repeating elements in an XML string according to the xpath and the text. |
For example:
which will return the result about whether the specified multi-occurrence element described by the xpath node and the text "size" exist in the XML string provided. The output message will be "true". |
listRepeatingElement |
Lists repeating elements in an XML string according to the xpath and the delimiter. Note that the delimiter is wrapped by single quotes. |
For example:
which will list all the multi-occurrence elements described by the xpath node from the XML string provided with the specified delimiter. The output message will be "color, size". |
addRepeatingElement |
Adds repeating elements in an XML string according to the xpath and the text. |
For example:
which will add a new multi-occurence element described by the combination
of the xpath node and the text to the XML string provided. The
output message will
be
. |
setLanguageVariant |
Adds or updates an ISO variant to the multilingual text value. |
For example:
which will update the EN variant to be "abc". The output message will be [EN:abc][FR:ab_fr]. |
setLanguageVariant |
Adds or updates an ISO variant to the multilingual text value with the default ISO and the sort option for the output message. If the sort option is set to "true", the message will be output in alphabetical order. |
For example:
|
getLanguageVariant |
Gets an ISO value from a multilingual text value with the default ISO fallback. If the ISO value requested is not found, the default ISO value will be returned. |
For example:
|
getLanguageVariant |
Gets an ISO value from a multilingual text value. If the ISO value requested is not found, the null value will be returned. |
For example:
|