secondaryindex

## Class IndexViewExample.ExecutorParser

- java.lang.Object
- - secondaryindex.IndexViewExample.ExecutorParser

- Enclosing class:
    IndexViewExample

       class IndexViewExample.ExecutorParser
      extends Object

  Parses command line arguments.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) String` | `dataFileDir`
    `(package private) Map<String,String>` | `fieldMap` A map used to store field arguments for inserting and updating primary DB records.
    `(package private) static String` | `HOST_FLAG` Flag strings
    `(package private) String` | `hostname`
    `(package private) List<String>` | `indexFieldNames`
    `(package private) List<Object>` | `indexFieldValues`
    `(package private) static String` | `PORT_FLAG`
    `(package private) String` | `primaryKey`
    `(package private) int` | `registryPort`
    `(package private) Boolean` | `secIndexUsed` A flag used by update and delete operations.
    `(package private) static String` | `STORE_FLAG`
    `(package private) String` | `storeName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexViewExample.ExecutorParser(String[] args)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) boolean` | `checkArg(String arg)` Used to extend the base arguments to additional ones.
    `(package private) String` | `getHostname()`
    `(package private) String` | `getHostUsage()`
    `(package private) String` | `getPortUsage()`
    `(package private) int` | `getRegistryPort()`
    `(package private) String` | `getStoreName()`
    `(package private) String` | `getStoreUsage()`
    `(package private) String` | `optional(String msg)` Methods for implementing classes.
    `(package private) void` | `parseArgs()`
    `(package private) void` | `setDefaults(String storeName, String hostname, int registryPort)`
    `(package private) void` | `usage(String errorMsg)`
    `(package private) void` | `verifyArgs()` Called after parsing all args.

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

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

- - ### Field Detail

    - #### HOST_FLAG

          static final String HOST_FLAG

      Flag strings
      See Also:
        Constant Field Values

    - #### STORE_FLAG

          static final String STORE_FLAG

      See Also:
        Constant Field Values

    - #### PORT_FLAG

          static final String PORT_FLAG

      See Also:
        Constant Field Values

    - #### hostname

          String hostname

    - #### storeName

          String storeName

    - #### registryPort

          int registryPort

    - #### dataFileDir

          String dataFileDir

    - #### indexFieldNames

          List<String> indexFieldNames

    - #### indexFieldValues

          List<Object> indexFieldValues

    - #### primaryKey

          String primaryKey

    - #### fieldMap

          Map<String,String> fieldMap

      A map used to store field arguments for inserting and updating primary DB records. Map key is the field name and Map value is the field value.

    - #### secIndexUsed

          Boolean secIndexUsed

      A flag used by update and delete operations. If it is set to true, the example will update or delete all primary DB records using the user-supplied Index View key. In this case possibly more than one record is updated or deleted. If false, update or delete record using input primary DB key directly and only one record is updated or deleted at a time.

  - ### Constructor Detail

    - #### IndexViewExample.ExecutorParser

          IndexViewExample.ExecutorParser(String[] args)

  - ### Method Detail

    - #### checkArg

          boolean checkArg(String arg)

      Used to extend the base arguments to additional ones. Returns true if the argument is expected and valid. Calls usage() if the arg is recognized but invalid. Returns false if arg is not recognized.

    - #### verifyArgs

          void verifyArgs()

      Called after parsing all args. Calls usage() if all required arguments are not set.

    - #### usage

          void usage(String errorMsg)

    - #### setDefaults

          void setDefaults(String storeName,
                         String hostname,
                         int registryPort)

    - #### getHostname

          String getHostname()

    - #### getStoreName

          String getStoreName()

    - #### getRegistryPort

          int getRegistryPort()

    - #### parseArgs

          void parseArgs()

    - #### optional

          String optional(String msg)

      Methods for implementing classes.

    - #### getHostUsage

          String getHostUsage()

    - #### getStoreUsage

          String getStoreUsage()

    - #### getPortUsage

          String getPortUsage()

Copyright (c) 2011, 2014 Oracle and/or its affiliates. All rights reserved.