public class DecodeTable
extends java.lang.Object
Title: Object Mediation Framework
Description: A table that represents decode elements for a specific field (domain).
Semantic Mapper
objects. The
mappers load such decode tables at initalization time. Decoders assist
in mapping multi-dimensional elements to a set of specific values.
For instance if a data element SecurityName in a data object
called Valuation has several possible map-able values based
on it's content (ie. 'ACML'= 'Asset Class Managed Liability',
'CDO'='Mortgage Backed Security'..); and it appears one or more
times in a given Converter then it may be a good candidate for
a decode function. Alternativley, a user would be forced to write
a complex if statement. If there are many conditions, such as statement
may be very cumbersome and repeated mappings of the same type may
result in complex and confusing mappings. By contrast when using a
decode
function the user may set up a re-usable table
and simply state SecurityName.Valuation = decode("Valuation", sourceField);
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Constructor and Description |
---|
DecodeTable(java.lang.String name,
java.lang.String defaultValue) |
Modifier and Type | Method and Description |
---|---|
void |
addElement(java.lang.String sourceValue,
java.lang.String decodeValue) |
java.lang.String |
assertDecode(java.lang.String value) |
void |
clearTable() |
java.lang.String |
decode(java.lang.String value) |
java.lang.String |
getDefault() |
java.lang.String |
getName() |
void |
initTable(java.util.Map table) |
java.util.List |
listElements() |
void |
removeElement(java.lang.String sourceValue) |
void |
setDefault(java.lang.String defaultValue) |
void |
setName(java.lang.String name) |
public DecodeTable(java.lang.String name, java.lang.String defaultValue)
public void setName(java.lang.String name)
public java.lang.String getName()
public void setDefault(java.lang.String defaultValue)
public java.lang.String getDefault()
public void addElement(java.lang.String sourceValue, java.lang.String decodeValue) throws ObjectMediationException
ObjectMediationException
public void removeElement(java.lang.String sourceValue) throws ObjectMediationException
ObjectMediationException
public java.lang.String decode(java.lang.String value)
public java.lang.String assertDecode(java.lang.String value) throws ObjectMediationException
ObjectMediationException
public void initTable(java.util.Map table)
public void clearTable()
public java.util.List listElements()
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.