Class AbstractGeneratorOptions

java.lang.Object
org.brapi.schematools.core.options.AbstractGeneratorOptions
All Implemented Interfaces:
Options, Validatable
Direct Known Subclasses:
GraphQLGeneratorOptions, OpenAPIGeneratorOptions

public class AbstractGeneratorOptions extends Object implements Options
Abstract class for all Generator Options
  • Constructor Details

    • AbstractGeneratorOptions

      public AbstractGeneratorOptions()
  • Method Details

    • override

      public void override(AbstractGeneratorOptions overrideOptions)
      Overrides the values in this Options Object from the provided Options Object if they are non-null
      Parameters:
      overrideOptions - the options which will be used to override this Options Object
    • getPluralFor

      public final String getPluralFor(@NonNull @NonNull String name)
      Gets the Pluralised name for a specific Primary Model. For example plural name of Study, would be 'Studies' by default. Use setPluralFor(java.lang.String, java.lang.String) to override this value.
      Parameters:
      name - the name of the Primary Model
      Returns:
      the pluralised name for a specific Primary Model
    • getPluralFor

      public final String getPluralFor(@NonNull @NonNull BrAPIType type)
      Gets the pluralised name for a specific Primary Model. For example plural name of Study, would be 'Studies' by default. Use setPluralFor(java.lang.String, java.lang.String) to override this value.
      Parameters:
      type - the Primary Model
      Returns:
      the pluralised name for a specific Primary Model
    • setPluralFor

      public AbstractGeneratorOptions setPluralFor(String name, String pluralisedName)
      Sets the pluralised name for a specific primary model. For example the id parameter (or field) name of Study, would be 'studyDbiId' by default.
      Parameters:
      name - the name of the primary model
      pluralisedName - the pluralised name for a specific primary model.
      Returns:
      the options for chaining