示例#1
0
  /**
   * Create related options for SQL Server extra parameters.
   *
   * @return
   */
  @SuppressWarnings("static-access")
  private RelatedOptions getExtraOptions() {
    // Connection args (common)
    RelatedOptions extraOptions = new RelatedOptions("SQL Server extra options:");

    extraOptions.addOption(
        OptionBuilder.withArgName("string")
            .hasArg()
            .withDescription("Optional schema name")
            .withLongOpt(SCHEMA)
            .create());

    extraOptions.addOption(
        OptionBuilder.withArgName("string")
            .hasArg()
            .withDescription("Optional table hints to use")
            .withLongOpt(TABLE_HINTS)
            .create());

    extraOptions.addOption(
        OptionBuilder.withDescription("Allow identity inserts")
            .withLongOpt(IDENTITY_INSERT)
            .create());

    return extraOptions;
  }
示例#2
0
  /** {@inheritDoc}. */
  @Override
  @SuppressWarnings("static-access")
  protected RelatedOptions getExtraOptions() {
    RelatedOptions extraOptions = super.getExtraOptions();

    extraOptions.addOption(
        OptionBuilder.withArgName("string")
            .hasArg()
            .withDescription("String to encode TRUE value")
            .withLongOpt(BOOLEAN_TRUE_STRING)
            .create());

    extraOptions.addOption(
        OptionBuilder.withArgName("string")
            .hasArg()
            .withDescription("String to encode FALSE value")
            .withLongOpt(BOOLEAN_FALSE_STRING)
            .create());

    return extraOptions;
  }