Class Repositories

java.lang.Object
wtf.metio.yosql.tooling.gradle.Repositories

public abstract class Repositories extends Object
The `repositories` configuration can be used to control how `YoSQL` outputs repositories.
  • Constructor Details

    • Repositories

      public Repositories()
  • Method Details

    • getAllowedCallPrefixes

      @Input public abstract org.gradle.api.provider.ListProperty<String> getAllowedCallPrefixes()
      Returns:
      Configures which name prefixes are allowed for statements that are calling stored procedures.
    • getAllowedReadPrefixes

      @Input public abstract org.gradle.api.provider.ListProperty<String> getAllowedReadPrefixes()
      Returns:
      Configures which name prefixes are allowed for statements that are reading data from your database.
    • getAllowedWritePrefixes

      @Input public abstract org.gradle.api.provider.ListProperty<String> getAllowedWritePrefixes()
      Returns:
      Configures which name prefixes are allowed for statements that are writing data to your database.
    • getBasePackageName

      @Input public abstract org.gradle.api.provider.Property<String> getBasePackageName()
      Returns:
      The base package name for all repositories
    • getGenerateInterfaces

      @Input public abstract org.gradle.api.provider.Property<Boolean> getGenerateInterfaces()
      Returns:
      Generate interfaces for all repositories
    • getValidateMethodNamePrefixes

      @Input public abstract org.gradle.api.provider.Property<Boolean> getValidateMethodNamePrefixes()
      Returns:
      Validate user given names against list of allowed prefixes per type.
    • getInjectConverters

      @Input public abstract org.gradle.api.provider.Property<Boolean> getInjectConverters()
      Returns:
      Toggles whether converters should be injected as constructor parameters.
    • getExecuteOnce

      @Input public abstract org.gradle.api.provider.Property<Boolean> getExecuteOnce()
      Returns:
      Generate methods that are executed once with the given parameters
    • getExecuteBatch

      @Input public abstract org.gradle.api.provider.Property<Boolean> getExecuteBatch()
      Returns:
      Generate methods that are executed as batch
    • getUsePreparedStatement

      @Input public abstract org.gradle.api.provider.Property<Boolean> getUsePreparedStatement()
      Returns:
      Should `PreparedStatement`s be used instead of `Statement`s
    • getCatchAndRethrow

      @Input public abstract org.gradle.api.provider.Property<Boolean> getCatchAndRethrow()
      Returns:
      Catch exceptions during SQL execution and re-throw them as RuntimeExceptions
    • getWritesReturnUpdateCount

      @Input public abstract org.gradle.api.provider.Property<Boolean> getWritesReturnUpdateCount()
      Returns:
      Writing method which are using `ReturningMode.NONE` return the number of affected rows instead.
    • getThrowOnMultipleResults

      @Input public abstract org.gradle.api.provider.Property<Boolean> getThrowOnMultipleResults()
      Returns:
      Throw an exception in case a statement using `ReturningMode.SINGLE` produces more than 1 result.
    • getCreateConnection

      @Input public abstract org.gradle.api.provider.Property<Boolean> getCreateConnection()
      Returns:
      Controls whether the generated code should create/open connection itself or use a given connection.
    • getGenerateConnectionOverloads

      @Input public abstract org.gradle.api.provider.Property<Boolean> getGenerateConnectionOverloads()
      Returns:
      Generate both a DataSource-based method and a Connection-taking overload for every statement.
    • asConfiguration

      public wtf.metio.yosql.models.immutables.RepositoriesConfiguration asConfiguration()
    • configureConventions

      public void configureConventions()