Class AbstractSqlGenerator
java.lang.Object
de.businesscode.bcdui.wrs.specificSql.AbstractSqlGenerator
- All Implemented Interfaces:
ISqlGenerator
- Direct Known Subclasses:
MultiLevelSuggest
Convenience class for building custom ISqlGenerators
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Set<StandardBindingSet>protected List<WrsBindingItem>protected SQLStatementWithParamsFields inherited from interface de.businesscode.bcdui.wrs.load.ISqlGenerator
BCD_WKATTRIBUTE_GROUPING, BCD_WKATTRIBUTE_OTHER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetQueryMaxRowsgetDbSourceNameintgetMaxRowsgetRequestedBindingSetNames the requested bindingSet or bindingGroup names from the request document in the form Map.Entry<BsName,bsAlias> This because neither the BindingSet nor the alias need to be unique reallybooleanisEmpty()isEmptyprotected voidsetBcduiSql(String sql, List<Element> parameters) Convenience method, taking an sql in BCD-UI BindingItem notation and deriving as much information from it as needed for ISqlGenerator
-
Field Details
-
convertedSql
-
requestedBindingSetNames
-
selectedBindingItems
-
resultingBindingSets
-
selectStatementWithParams
-
parameters
-
-
Constructor Details
-
AbstractSqlGenerator
public AbstractSqlGenerator()
-
-
Method Details
-
setBcduiSql
Convenience method, taking an sql in BCD-UI BindingItem notation and deriving as much information from it as needed for ISqlGenerator- Parameters:
sql-- Throws:
BindingNotFoundException
-
getDbSourceName
Description copied from interface:ISqlGeneratorgetDbSourceName- Specified by:
getDbSourceNamein interfaceISqlGenerator- Returns:
- the database name configured for this request or null for default
-
getResolvedBindingSets
- Specified by:
getResolvedBindingSetsin interfaceISqlGenerator- Returns:
- the really selected BindingSets
-
getSelectedBindingItems
- Specified by:
getSelectedBindingItemsin interfaceISqlGenerator- Returns:
- The list of binding items in the select clause in their order.
- Throws:
Exception
-
getRequestedBindingSetNames
Description copied from interface:ISqlGeneratorgetRequestedBindingSetNames the requested bindingSet or bindingGroup names from the request document in the form Map.Entry<BsName,bsAlias> This because neither the BindingSet nor the alias need to be unique really- Specified by:
getRequestedBindingSetNamesin interfaceISqlGenerator- Returns:
-
getMaxRows
public int getMaxRows()Description copied from interface:ISqlGeneratorgetMaxRows- Specified by:
getMaxRowsin interfaceISqlGenerator- Returns:
- the max rows from the request document and server side settings, -1 if no limit
-
getClientProvidedMaxRows
public int getClientProvidedMaxRows()Description copied from interface:ISqlGeneratorgetQueryMaxRows- Specified by:
getClientProvidedMaxRowsin interfaceISqlGenerator- Returns:
- max rows purely driven by the query, ignoring other limits
-
getSelectStatement
- Specified by:
getSelectStatementin interfaceISqlGenerator- Returns:
- the selectStatement
-
isEmpty
public boolean isEmpty()Description copied from interface:ISqlGeneratorisEmpty- Specified by:
isEmptyin interfaceISqlGenerator- Returns:
- true if no query was specified from the request
-