Class ConverterImpl
java.lang.Object
de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
de.hybris.platform.sap.sapcommonbol.common.businessobject.impl.ConverterImpl
- All Implemented Interfaces:
BackendAware,BusinessObject,MessageListHolder,Converter,Serializable,Cloneable
Converter implementation. For details see the specifying interface
Converter- See Also:
-
Field Summary
Fields inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
backendObject, backendType, bobMessages, bobState, extensionData, genericFactory, handle, moduleConfigurationAccess, techKeyFields inherited from interface de.hybris.platform.sap.sapcommonbol.common.businessobject.interf.Converter
BO_TYPEFields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertUnitID2UnitKey(String unitID) Converts the unit ID (examplePCfor en_US) into the unit key (exampleST)convertUnitKey2UnitID(String unitKey) Converts the unit key (exampleST) into the language dependent ID (examplePCfor en_US)getCurrencyScale(String sapCurrencyCode) Retrieves the number of decimal places for a currency (which might be an ISO currency but doesn't need to be).protected BigDecimalgetMinimumScaleValue(int scale) getMinimumScaleValue(String unitKey) intgetUnitScale(String unitKey) Retrieves the number of decimal places for units according to ERP/CRM customizing.Methods inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
addExtensionData, addMessage, clearMessages, clearMessages, clearOwnMessages, clone, copyMessages, copyMessages, createUniqueHandle, destroy, determineBackendObject, equals, getBackendBusinessObject, getBackendBusinessObject, getBackendType, getExtensionData, getExtensionDataValues, getExtensionMap, getHandle, getMessageList, getModuleConfigurationAccess, getOwnMessageList, getSubObjectIterator, getTechKey, hasHandle, hashCode, hasMessages, hasOwnMessages, init, isValid, logMessage, removeExtensionData, removeExtensionDataValues, setBackendObject, setBackendType, setExtensionMap, setGenericFactory, setHandle, setInvalid, setModuleConfigurationAccess, setTechKey, setValid, toString
-
Constructor Details
-
ConverterImpl
public ConverterImpl()
-
-
Method Details
-
getBackendService
- Returns:
- the backendService
- Throws:
BackendException
-
convertUnitID2UnitKey
Description copied from interface:ConverterConverts the unit ID (examplePCfor en_US) into the unit key (exampleST)- Specified by:
convertUnitID2UnitKeyin interfaceConverter- Parameters:
unitID- language dependent unit ID- Returns:
- unit key
- Throws:
BusinessObjectException
-
convertUnitKey2UnitID
Description copied from interface:ConverterConverts the unit key (exampleST) into the language dependent ID (examplePCfor en_US)- Specified by:
convertUnitKey2UnitIDin interfaceConverter- Parameters:
unitKey- language independent unit key- Returns:
- language dependent unit ID
- Throws:
BusinessObjectException
-
getCurrencyScale
Description copied from interface:ConverterRetrieves the number of decimal places for a currency (which might be an ISO currency but doesn't need to be).
Basis is the ERP/CRM customizing in tables TCURX and TCURC.
Examples: USD typically has 2 decimal places, JPY has zero.- Specified by:
getCurrencyScalein interfaceConverter- Parameters:
sapCurrencyCode- currency code. Must be available in customizing tabke TCURC- Returns:
- number of decimal places
- Throws:
BusinessObjectException
-
getUnitScale
Description copied from interface:ConverterRetrieves the number of decimal places for units according to ERP/CRM customizing. This is relevant for UI display in case the unit amount is not an integer.- Specified by:
getUnitScalein interfaceConverter- Parameters:
unitKey- the language independet unit key. Must be available in customizing table T006- Returns:
- the number of decimal places for UI display
- Throws:
BusinessObjectException
-
getMinimumScaleValue
- Specified by:
getMinimumScaleValuein interfaceConverter- Parameters:
unitKey- the language independet unit key. Must be available in customizing table T006- Returns:
- BigDecimal representing the smallest value given a scale
- Throws:
BusinessObjectException
-
getMinimumScaleValue
-