Package com.tibco.patterns.grouping

## Class StringKeyMapping

- java.lang.Object
- - com.tibco.patterns.grouping.StringKeyMapping

- All Implemented Interfaces:
    `IStringKeyMapping`

      public class StringKeyMapping
      extends java.lang.Object
      implements IStringKeyMapping

  Maintains a mapping of internal to external record keys. The external keys are general strings.
  See Also:
    `IStringKeyMapping`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StringKeyMapping()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `backmapInternalKey​(int internal_key)` | Looks up the original external key.
    `int` | `mapExternalKey​(java.lang.String external_key)` | If the external key has been encountered previously, the previously generated internal key is returned.
    `void` | `releaseForwardMap()` | Releases memory storage related to generating internal keys. After calling `releaseForwardMap()`, calls to `mapExternalKey()` will throw an exception.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StringKeyMapping

          public StringKeyMapping()

  - ### Method Detail

    - #### mapExternalKey

          public int mapExternalKey​(java.lang.String external_key)
                             throws GroupingException

      If the external key has been encountered previously, the previously generated internal key is returned. Otherwise, a new internal key is generated, stored, and returned.
      Specified by:
        `mapExternalKey` in interface `IStringKeyMapping`
      Parameters:
        `external_key` - An external key.
      Returns:
        the internal key associated to the external key.
      Throws:
        `GroupingException` - if an error occurred.

    - #### backmapInternalKey

          public java.lang.String backmapInternalKey​(int internal_key)

      Looks up the original external key.
      Specified by:
        `backmapInternalKey` in interface `IStringKeyMapping`
      Parameters:
        `internal_key` - An internal key.
      Returns:
        the external key associated to the internal key.

    - #### releaseForwardMap

          public void releaseForwardMap()

      Releases memory storage related to generating internal keys.
      After calling `releaseForwardMap()`, calls to `mapExternalKey()` will throw an exception.
      Specified by:
        `releaseForwardMap` in interface `IStringKeyMapping`