com.corticon.eclipse.studio.vocabulary.core

## Class VocabularyCache

- java.lang.Object
- - com.corticon.eclipse.studio.vocabulary.core.VocabularyCache

-     public class VocabularyCache
      extends java.lang.Object

  VocabularyCache provides rapid access to Vocabulary elements based on names. This class allows the system to quickly find a Vocabulary facade (e.g., IEntity) based on a caller-supplied fully-qualified name (e.g., "com.corticon.Customer"). Because the class is concerned with the mapping names to facades, it has to consider both base and localized names. Special considerations apply to attribute and association lookups: the caller can stipulate whether inherited attributes and associations should be returned.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BASE`
    `static int` | `LOCALIZED`
    `static int` | `VOCABULARY_NAME_CACHE_ELEMENTS`
    `static int` | `XML`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VocabularyCache(IVocabularyModelAPI aIVocabularyModelAPI)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dispose()`
    `IAssociationEnd` | `findAssociation(java.lang.String astrEntityName, java.lang.String astrAssociationName, int aiVocabularyNameCache)`
    `IAttribute` | `findAttribute(java.lang.String astrEntityName, java.lang.String astrAttributeName, int aiVocabularyNameCache)`
    `IEntity` | `findEntity(java.lang.String astrEntityName, int aiVocabularyNameCache)`
    `java.util.HashSet<IElement>` | `getAllApplicableDuplicateComparators(IElement aIElement, boolean abForDirectDuplicates)` Cache information used for detecting duplicate names in the Vocabulary.
    `int` | `getEntityNameCount(IEntity aIEntity, int aiVocabularyNameCache)` Return the count of the number of times the specified unqualified entity name appears in the Vocabulary.
    `boolean` | `isEmpty()` Return `true` if the cache is empty.
    `void` | `showCache()`

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

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

- - ### Field Detail

    - #### BASE

          public static final int BASE

      See Also:
        Constant Field Values

    - #### LOCALIZED

          public static final int LOCALIZED

      See Also:
        Constant Field Values

    - #### XML

          public static final int XML

      See Also:
        Constant Field Values

    - #### VOCABULARY_NAME_CACHE_ELEMENTS

          public static final int VOCABULARY_NAME_CACHE_ELEMENTS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### VocabularyCache

          public VocabularyCache(IVocabularyModelAPI aIVocabularyModelAPI)

  - ### Method Detail

    - #### dispose

          public void dispose()

    - #### findAssociation

          public IAssociationEnd findAssociation(java.lang.String astrEntityName,
                                        java.lang.String astrAssociationName,
                                        int aiVocabularyNameCache)

    - #### findAttribute

          public IAttribute findAttribute(java.lang.String astrEntityName,
                                 java.lang.String astrAttributeName,
                                 int aiVocabularyNameCache)

    - #### findEntity

          public IEntity findEntity(java.lang.String astrEntityName,
                           int aiVocabularyNameCache)

    - #### isEmpty

          public boolean isEmpty()

      Return `true` if the cache is empty.
      Returns:
        `true` if the cache is empty.

    - #### getEntityNameCount

          public int getEntityNameCount(IEntity aIEntity,
                               int aiVocabularyNameCache)

      Return the count of the number of times the specified unqualified entity name appears in the Vocabulary.
      Parameters:
        `aiVocabularyNameCache` - BASE or LOCALIZED.
        `aIEntity` - Entity to test.
      Returns:
        Integer count of number of times entity name occurs.

    - #### showCache

          public void showCache()

    - #### getAllApplicableDuplicateComparators

          public java.util.HashSet<IElement> getAllApplicableDuplicateComparators(IElement aIElement,
                                                                         boolean abForDirectDuplicates)

      Cache information used for detecting duplicate names in the Vocabulary.
      Parameters:
        `aIElement` - IElement to check.
        `abForDirectDuplicates` - `true` for direct duplicates.
      Returns:
        HashSet of direct or indirect duplicate elements.

Copyright © 2005-2013 Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.