- Author:
- Thomas Oster (mail@thomas-oster.de)
-
Required Element Summary
Required Elements
-
Optional Element Summary
Optional Elements
A list of interfaces, which is implemented by
the return class
A list of interfaces, which is implemented by
the return class.
boolean
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.
boolean
If set, this class will not be generated.
boolean
The Columns with names in here are
excluded from the result type.
int
If greater than 0 sets the fetch size
boolean
If true, the db-connection will be opened with a try-with-resources block.
If set, this class will be generated as return type.
boolean
If set, the mehtod will not return a list, but the first result or nothing
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
boolean
-
-
-
-
-
fetchSize
int fetchSize
If greater than 0 sets the fetch size
- Returns:
- Default:
- 0
-
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
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
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
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
-
-
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
-