public interface StatementConfiguration
Statement configuration means mainly its name and parameters controlling creation of SQL string.
Modifier and Type | Method and Description |
---|---|
Class<?> |
baseClass()
Returns base class.
|
Map<String,Object> |
generateParameterMap()
Map of parameters to construct statement in runtime.
|
Set<String> |
generateParametersAcceptingNull()
Returns parameters for which null doesn't mean to skip row.
|
Long |
limit()
Gets maximum number of rows to be loaded.
|
void |
limit(Long limit)
Sets maximum number of rows to be loaded.
|
Long |
offset()
Gets result set offset.
|
void |
offset(Long offset)
Sets result set offset.
|
String |
statementName()
Returns statement name.
|
String statementName()
Statement name can be represented in two ways:
baseClass()
returns null - name must be full path to sql file including file extension.baseClass()
returns real class - name is just a part of path. Full name (and full path) is
concatenation of base classes' path this name and .sql extension.Statement name may not be null.
baseClass()
Class<?> baseClass()
Base class has two functions:
Statements generated from java comments use as a base class the same class from which they were extracted.
statementName()
Map<String,Object> generateParameterMap()
Map contains parameters which can be used as each of three possibilities:
In runtime if parameter is used as a SQL parameter and has null value or is missing at all - it means to skip
statement row. Exception to this rule are parameters returned by generateParametersAcceptingNull()
.
generateParametersAcceptingNull()
Set<String> generateParametersAcceptingNull()
This is useful mainly in Insert statements, rarely otherwise.
generateParameterMap()
Long limit()
void limit(Long limit)
limit
- limitLong offset()
void offset(Long offset)
offset
- offsetCopyright © 2014–2015 Vracon s.r.o.. All rights reserved.