org.apache.torque.generator.control.existingtargetstrategy

## Class SkipExistingTargetFileStrategy

- java.lang.Object
- - org.apache.torque.generator.control.existingtargetstrategy.ReplaceTargetFileStrategy
  - - org.apache.torque.generator.control.existingtargetstrategy.SkipExistingTargetFileStrategy

- All Implemented Interfaces:
    ExistingTargetStrategy

      public class SkipExistingTargetFileStrategy
      extends ReplaceTargetFileStrategy

  A handler which implements the strategy to skip existing target files.
  Version:
    $Id: SkipExistingTargetFileStrategy.java 1839288 2018-08-27 09:48:33Z tv $

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `STRATEGY_NAME` The strategy name "skip".

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SkipExistingTargetFileStrategy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `beforeGeneration(String outputDirKey, String outputPath, String encoding, UnitConfiguration unitConfiguration)` Will be called before the generation is started and decides whether the generation process for this file should proceed.
    `String` | `getStrategyName()` Returns the name of the existing target strategy.

    - ### Methods inherited from class org.apache.torque.generator.control.existingtargetstrategy.ReplaceTargetFileStrategy

      `afterGeneration`

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

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

- - ### Field Detail

    - #### STRATEGY_NAME

          public static final String STRATEGY_NAME

      The strategy name "skip".
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SkipExistingTargetFileStrategy

          public SkipExistingTargetFileStrategy()

  - ### Method Detail

    - #### beforeGeneration

          public boolean beforeGeneration(String outputDirKey,
                                          String outputPath,
                                          String encoding,
                                          UnitConfiguration unitConfiguration)

      Will be called before the generation is started and decides whether the generation process for this file should proceed.
      Specified by:
        `beforeGeneration` in interface `ExistingTargetStrategy`
      Overrides:
        `beforeGeneration` in class `ReplaceTargetFileStrategy`
      Parameters:
        `outputDirKey` - the key for the output directory into which the generated file should be written, null for the default output directory.
        `outputPath` - the path to which the output should be written, relative to the output base directory.
        `unitConfiguration` - the configuration of the current configuration unit, not null.
        `encoding` - The character encoding of the generated file, or null for the platform default encoding.
      Returns:
        true if the target file does not exist, false otherwise.

    - #### getStrategyName

          public String getStrategyName()

      Returns the name of the existing target strategy.
      Specified by:
        `getStrategyName` in interface `ExistingTargetStrategy`
      Overrides:
        `getStrategyName` in class `ReplaceTargetFileStrategy`
      Returns:
        "skip"

Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.