com.ibm.commerce.foundation.server.services.valuemapping

Class ValueMappingService

  • java.lang.Object
    • com.ibm.commerce.foundation.server.services.valuemapping.ValueMappingService


  • public class ValueMappingService
    extends java.lang.Object
    A value mapping service to resolve the relationship configuration between external and internal keys of business objects. The purpose of this service is to retrieve value mapping between external and internal values of business objects.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.List getExternalKeyRelationships(java.lang.Object internalName)
      Returns a list value mappings for the specified internal name.
      java.lang.Object getExternalValue(java.lang.Object internalName, java.lang.Object internalValue)
      This method returns the external value to the specified internal value.
      static ValueMappingService getInstance(java.lang.String componentId)
      Returns an instance of the value mapping service.
      java.util.List getInternalKeyRelationships(java.lang.Object externalName)
      Returns the value mappings for the specified external name.
      java.lang.Object getInternalValue(java.lang.Object externalName, java.lang.Object externalValue)
      This method returns the internal value to the specified external value.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static ValueMappingService getInstance(java.lang.String componentId)
        Returns an instance of the value mapping service.
        Parameters:
        componentId - The component identifier of the configuration to retrieve.
        Returns:
        An instance of the value mapping service.
      • getExternalKeyRelationships

        public java.util.List getExternalKeyRelationships(java.lang.Object internalName)
        Returns a list value mappings for the specified internal name. These relationships can be used to resolve the internal and external values based on external and internal values.
        Parameters:
        internalName - The internal key object.
        Returns:
        The value mappings for the specified internal name. If no mapping exists, an empty list is returned.
      • getInternalKeyRelationships

        public java.util.List getInternalKeyRelationships(java.lang.Object externalName)
        Returns the value mappings for the specified external name. These relationships can be used to resolve the internal and external values based on external and internal values.
        Parameters:
        externalName - The external key object.
        Returns:
        The value mappings for the specified external name. If no mapping exists, an empty list is returned.
      • getExternalValue

        public java.lang.Object getExternalValue(java.lang.Object internalName,
                                                 java.lang.Object internalValue)
        This method returns the external value to the specified internal value. Based on the internal name, the default value mapping is used to return the appropriate external value.
        Parameters:
        internalName - The internal name of the value to convert.
        internalValue - The internal value to convert to the external value.
        Returns:
        The external value that is associated with the specified internal value. If no value mapping exists or the value cannot be mapped, then the internal value returned.
      • getInternalValue

        public java.lang.Object getInternalValue(java.lang.Object externalName,
                                                 java.lang.Object externalValue)
        This method returns the internal value to the specified external value. Based on the external name, the default value mapping is used to return the appropriate internal value.
        Parameters:
        externalName - The internal name of the value to convert.
        externalValue - The internal value to convert to the external value.
        Returns:
        The internal value that is associated with the specified external value. If no value mapping exists or the value cannot be mapped, then the external value is returned.