Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.mdm.index.codelookup
Class UserCodeRegistry

    java.lang.Object
      com.sun.mdm.index.codelookup.UserCodeRegistry

public class UserCodeRegistry
extends java.lang.Object

UserCodeRegistry

Method Summary
`java.util.Map` | `getCodeMap()` Get map of module->code->CodeDescription
`java.util.Map` | `getCodeMapByModule(java.lang.String module)` Get map code->CodeDescription
`java.util.ArrayList` | `getCodesByModule(java.lang.String module)` Get all codes for given module.
`static UserCodeRegistry` | `getInstance()` Get instance of UserCodeRegistry.
`static UserCodeRegistry` | `getInstance(java.sql.Connection con)` Get instance of UserCodeRegistry
`UserCode` | `getUserCode(java.lang.String module, java.lang.String code)` Retrieve the UserCode from a module.
`boolean` | `hasCode(java.lang.String module, java.lang.String code)` Check if code exists.
`boolean` | `hasModule(java.lang.String module)` Check if module exists.
`void` | `traceAllCodes()` Pretty print code

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getCodeMap

    public java.util.Map getCodeMap()

  Get map of module->code->CodeDescription

  Returns:
    map of module->code->CodeDescription.

### getCodeMapByModule

    public java.util.Map getCodeMapByModule(java.lang.String module)

  Get map code->CodeDescription

  Parameters:
    `module` - Module name.
  Returns:
    map of code->CodeDescription

### getCodesByModule

    public java.util.ArrayList getCodesByModule(java.lang.String module)

  Get all codes for given module.

  Parameters:
    `module` - Module name.
  Returns:
    ArrayList of CodeDescription objects.

### getInstance

    public static UserCodeRegistry getInstance()
                                        throws CodeLookupException

  Get instance of UserCodeRegistry.

  Returns:
    UserCodeRegistry instance
  Throws:
    `CodeLookupException` - if an error is encountered.

### getInstance

    public static UserCodeRegistry getInstance(java.sql.Connection con)
                                        throws CodeLookupException

  Get instance of UserCodeRegistry

  Parameters:
    `con` - Database connection handle.
  Returns:
    UserCodeRegistry instance.
  Throws:
    `CodeLookupException` - if an error is encountered.

### getUserCode

    public UserCode getUserCode(java.lang.String module,
                                java.lang.String code)

  Retrieve the UserCode from a module.

  Parameters:
    `module` - Module name.
    `code` - Code.
  Returns:
    UserCode

### hasCode

    public boolean hasCode(java.lang.String module,
                           java.lang.String code)

  Check if code exists.

  Parameters:
    `module` - Module name.
    `code` - Code.
  Returns:
    true if the code exists, false otherwise.

### hasModule

    public boolean hasModule(java.lang.String module)

  Check if module exists.

  Parameters:
    `module` - Module name
  Returns:
    true if the module exists, false otherwise.

### traceAllCodes

    public void traceAllCodes()

  Pretty print code

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Sun Microsystems, Inc.