Package com.ads.mm.etl.xml.mapping

# Class MMMappingUtil

java.lang.Object
com.ads.mm.etl.xml.mapping.MMMappingUtil

public class MMMappingUtil extends Object

Author:
  Syed Abdul Rahim

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `COLUMN_NAME`
  `static final String`
  `DATATYPE_NAME`
  `static final String`
  `ENTITY_UID`
  `static final String`
  `ENV_BUSINESS_ENTITY_TYPE`
  `static final String`
  `ENVIRONMENT_NAME`
  `static final String`
  `LENGTH_NAME`
  `static final String`
  `PRECSION_NAME`
  `static final String`
  `SCALE_NAME`
  `static final String`
  `SYSTEM_NAME`
  `static final String`
  `TABLE_BUSINESS_ENTITY_TYPE`
  `static final String`
  `TABLE_NAME`
  `static final String`
  `TABLE_TYPE`
  `static final String`
  `XPATH_NAME`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MMMappingUtil()`
  `MMMappingUtil(String path)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addTableToSupportSystem(String systemName, String environmentName, String schema, String tableName)`
  `void`
  `addTableToSupportSystem(String systemName, String environmentName, String schema, String tableName, String tableXpath)`
  `static int`
  `countWordOccurence(String source, String toFind)`
  `void`
  `createMapping(MMMapping mapping, String tokenType, String token)`
  `void`
  `decrementTabCount()`
  `MMDBTable`
  `ensureTableExists(MMSystemMap systemMap, String systemName, String environmentName, String schema, String tableName)`
  `MMDBTable`
  `ensureTableExists(MMSystemMap systemMap, String systemName, String environmentName, String schema, String tableName, String xPath)`
  `void`
  `fillMappings(String mappingIds)`
  `void`
  `fillMappingsInfo(String mappingIds)`
  `String`
  `generateUUID()`
  `static String`
  `getAppPath()`
  `int`
  `getColumnCount()`
  `int`
  `getEnvironmentCount()`
  `MMMapping`
  `getMapping(String mappingId)`
  `Iterable<MMMapping>`
  `getMappings()`
  `static int`
  `getPreserveCount()`
  `MMSystemMap`
  `getSourceSystems()`
  `MMSystemMap`
  `getSupportSystems()`
  `int`
  `getSystemCount()`
  `int`
  `getTabCount()`
  `int`
  `getTableCount()`
  `MMSystemMap`
  `getTargetSystems()`
  `String`
  `getUUID()`
  `int`
  `incrementColumnCount()`
  `int`
  `incrementEnvironmentCount()`
  `int`
  `incrementSystemCount()`
  `void`
  `incrementTabCount()`
  `int`
  `incrementTableCount()`
  `int`
  `incrementUniqueCount()`
  `int`
  `incrementUniqueCount(int count)`
  `boolean`
  `isGenerateGUID()`
  `boolean`
  `isGenerateUniqueId()`
  `boolean`
  `isTreatLengthAsPrecision()`
  `boolean`
  `isValidObject(MMDBValidator mmdbVal)`
  `int`
  `nextColumnCount()`
  `int`
  `nextEnvironmentCount()`
  `int`
  `nextSystemCount()`
  `int`
  `nextTableCount()`
  `static void`
  `printArrayList(ArrayList al, StringBuilder sbu, boolean printTabs, int tabCount)`
  `static void`
  `printTabsInNewLine(StringBuilder sbu, int tabCount)`
  `void`
  `saveMapping(MMMapping mapping, String tokenType, String token)`
  `void`
  `setAddUnsuedMetadata(MMSystemMap.Type type, boolean val)`
  `static void`
  `setAppPath(String path)`
  `void`
  `setFillMetadata(MMSystemMap.Type type, boolean val)`
  `void`
  `setGenerateGUID(boolean b)`
  `void`
  `setGenerateUniqueId(boolean aGenerateUniqueId)`
  `static void`
  `setPreserveCount(int aPreserveCount)`
  `void`
  `setSourceSystems(MMSystemMap _sourceSystems)`
  `void`
  `setSupportSystems(MMSystemMap _supportSystems)`
  `void`
  `setTabCount(int tabCount)`
  `void`
  `setTargetSystems(MMSystemMap _targetSystems)`
  `void`
  `setTreatLengthAsPrecision(boolean treatLengthAsPrecision)`

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

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

- ## Field Details

  - ### SYSTEM_NAME

    public static final String SYSTEM_NAME
    See Also:
      - Constant Field Values

  - ### ENVIRONMENT_NAME

    public static final String ENVIRONMENT_NAME
    See Also:
      - Constant Field Values

  - ### TABLE_NAME

    public static final String TABLE_NAME
    See Also:
      - Constant Field Values

  - ### ENTITY_UID

    public static final String ENTITY_UID
    See Also:
      - Constant Field Values

  - ### TABLE_TYPE

    public static final String TABLE_TYPE
    See Also:
      - Constant Field Values

  - ### COLUMN_NAME

    public static final String COLUMN_NAME
    See Also:
      - Constant Field Values

  - ### DATATYPE_NAME

    public static final String DATATYPE_NAME
    See Also:
      - Constant Field Values

  - ### LENGTH_NAME

    public static final String LENGTH_NAME
    See Also:
      - Constant Field Values

  - ### PRECSION_NAME

    public static final String PRECSION_NAME
    See Also:
      - Constant Field Values

  - ### SCALE_NAME

    public static final String SCALE_NAME
    See Also:
      - Constant Field Values

  - ### XPATH_NAME

    public static final String XPATH_NAME
    See Also:
      - Constant Field Values

  - ### TABLE_BUSINESS_ENTITY_TYPE

    public static final String TABLE_BUSINESS_ENTITY_TYPE
    See Also:
      - Constant Field Values

  - ### ENV_BUSINESS_ENTITY_TYPE

    public static final String ENV_BUSINESS_ENTITY_TYPE
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### MMMappingUtil

    public MMMappingUtil()

  - ### MMMappingUtil

    public MMMappingUtil(String path)

- ## Method Details

  - ### getMapping

    public MMMapping getMapping(String mappingId)

  - ### createMapping

    public void createMapping(MMMapping mapping, String tokenType, String token)

  - ### saveMapping

    public void saveMapping(MMMapping mapping, String tokenType, String token)

  - ### fillMappings

    public void fillMappings(String mappingIds) throws Exception
    Throws:
      `Exception`

  - ### fillMappingsInfo

    public void fillMappingsInfo(String mappingIds)

  - ### ensureTableExists

    public MMDBTable ensureTableExists(MMSystemMap systemMap, String systemName, String environmentName, String schema, String tableName)

  - ### ensureTableExists

    public MMDBTable ensureTableExists(MMSystemMap systemMap, String systemName, String environmentName, String schema, String tableName, String xPath)

  - ### addTableToSupportSystem

    public void addTableToSupportSystem(String systemName, String environmentName, String schema, String tableName)

  - ### addTableToSupportSystem

    public void addTableToSupportSystem(String systemName, String environmentName, String schema, String tableName, String tableXpath)

  - ### isGenerateUniqueId

    public boolean isGenerateUniqueId()
    Returns:
      the generateUniqueId

  - ### setGenerateUniqueId

    public void setGenerateUniqueId(boolean aGenerateUniqueId)
    Parameters:
      `aGenerateUniqueId` - the generateUniqueId to set

  - ### setGenerateGUID

    public void setGenerateGUID(boolean b)

  - ### incrementUniqueCount

    public int incrementUniqueCount()

  - ### incrementUniqueCount

    public int incrementUniqueCount(int count)

  - ### getSystemCount

    public int getSystemCount()

  - ### nextSystemCount

    public int nextSystemCount()

  - ### incrementSystemCount

    public int incrementSystemCount()

  - ### getEnvironmentCount

    public int getEnvironmentCount()

  - ### nextEnvironmentCount

    public int nextEnvironmentCount()

  - ### incrementEnvironmentCount

    public int incrementEnvironmentCount()

  - ### getTableCount

    public int getTableCount()

  - ### nextTableCount

    public int nextTableCount()

  - ### incrementTableCount

    public int incrementTableCount()

  - ### getColumnCount

    public int getColumnCount()

  - ### nextColumnCount

    public int nextColumnCount()

  - ### incrementColumnCount

    public int incrementColumnCount()

  - ### printTabsInNewLine

    public static void printTabsInNewLine(StringBuilder sbu, int tabCount)

  - ### printArrayList

    public static void printArrayList(ArrayList al, StringBuilder sbu, boolean printTabs, int tabCount)

  - ### isGenerateGUID

    public boolean isGenerateGUID()
    Returns:
      the generateGUID

  - ### getTabCount

    public int getTabCount()
    Returns:
      the tabCount

  - ### setTabCount

    public void setTabCount(int tabCount)
    Parameters:
      `tabCount` - the tabCount to set

  - ### incrementTabCount

    public void incrementTabCount()

  - ### decrementTabCount

    public void decrementTabCount()

  - ### generateUUID

    public String generateUUID()

  - ### getAppPath

    public static String getAppPath()
    Returns:
      the appPath

  - ### setAppPath

    public static void setAppPath(String path)
    Parameters:
      `path` - the appPath to set

  - ### isValidObject

    public boolean isValidObject(MMDBValidator mmdbVal)
    Parameters:
      `mmdbVal` -
    Returns:
      boolean

  - ### countWordOccurence

    public static int countWordOccurence(String source, String toFind)

  - ### isTreatLengthAsPrecision

    public boolean isTreatLengthAsPrecision()
    Returns:
      the treatLengthAsPrecision

  - ### setTreatLengthAsPrecision

    public void setTreatLengthAsPrecision(boolean treatLengthAsPrecision)
    Parameters:
      `treatLengthAsPrecision` - the treatLengthAsPrecision to set

  - ### getPreserveCount

    public static int getPreserveCount()
    Returns:
      the preserveCount

  - ### setPreserveCount

    public static void setPreserveCount(int aPreserveCount)
    Parameters:
      `aPreserveCount` - the preserveCount to set

  - ### getSourceSystems

    public MMSystemMap getSourceSystems()
    Returns:
      the _sourceSystems

  - ### getTargetSystems

    public MMSystemMap getTargetSystems()
    Returns:
      the _targetSystems

  - ### getSupportSystems

    public MMSystemMap getSupportSystems()
    Returns:
      the _supportSystems

  - ### setSourceSystems

    public void setSourceSystems(MMSystemMap _sourceSystems)
    Parameters:
      `_sourceSystems` - the _sourceSystems to set

  - ### setTargetSystems

    public void setTargetSystems(MMSystemMap _targetSystems)
    Parameters:
      `_targetSystems` - the _targetSystems to set

  - ### setSupportSystems

    public void setSupportSystems(MMSystemMap _supportSystems)
    Parameters:
      `_supportSystems` - the _supportSystems to set

  - ### getMappings

    public Iterable<MMMapping> getMappings()

  - ### getUUID

    public String getUUID()
    Returns:
      the uuid

  - ### setAddUnsuedMetadata

    public void setAddUnsuedMetadata(MMSystemMap.Type type, boolean val)

  - ### setFillMetadata

    public void setFillMetadata(MMSystemMap.Type type, boolean val)