Annotation Interface LazySQLSelect


@Documented @Target(METHOD) @Retention(SOURCE) public @interface LazySQLSelect
Author:
Thomas Oster (mail@thomas-oster.de)
  • Element Details

    • returns

      String[] returns
      Default:
      {}
    • params

      String[] params
      Default:
      {}
    • fetchSize

      int fetchSize
      If greater than 0 sets the fetch size
      Returns:
      Default:
      0
    • returnClassName

      String returnClassName
      If set, this class will be generated as return type. If it exists or is generated by other methods also, it's properties will be checked to match. If its not set, a default name will be created as package.CurrentClassLazyDb.Result
      Default:
      ""
    • returnInterfaceName

      String returnInterfaceName
      If set, an interface with this name is generated, containing all getters and setters for this query which also is implemented by the return class
      Default:
      ""
    • additionalInterfaces

      String[] additionalInterfaces
      A list of interfaces, which is implemented by the return class
      Default:
      {}
    • additionalInterfacesC

      Class<?>[] additionalInterfacesC
      A list of interfaces, which is implemented by the return class. WARNING You cannot use class constants of generated Interfaces in the same LazyDB class. Use the string version additionalInterfaces for that.
      Default:
      {}
    • excludeColumns

      String[] excludeColumns
      The Columns with names in here are excluded from the result type. Useful for select* queries where you want to exclude certain columns.
      Returns:
      Default:
      {}
    • doNotGenerateClass

      boolean doNotGenerateClass
      If set, this class will not be generated. Useful for manually created classes until we find a better solution
      Default:
      false
    • dynamicWhereClause

      boolean dynamicWhereClause
      Default:
      false
    • useObjectAsInput

      boolean useObjectAsInput
      Default:
      false
    • manageConnectionWithDatasource

      boolean manageConnectionWithDatasource
      If true, the db-connection will be opened with a try-with-resources block. The Connection will be closed after the method has finished. If dependencyInjection is enabled, the DataSource will be injected in the LazyDB class, otherwise the DataSource will be the first parameter instead of a connection.
      Default:
      false
    • convertSqlExceptionToRuntimeException

      boolean convertSqlExceptionToRuntimeException
      If true, the SQL Excetpion will be caught and a runtime Exception will be thrown, so that the method signature does not contain a checked exception.
      Returns:
      Default:
      false
    • returnFirstOrNull

      boolean returnFirstOrNull
      If set, the mehtod will not return a list, but the first result or nothing
      Returns:
      Default:
      false
    • methodName

      String methodName
      Default:
      ""