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 String
protected Set<StandardBindingSet>
protected List<WrsBindingItem>
protected SQLStatementWithParams
Fields inherited from interface de.businesscode.bcdui.wrs.load.ISqlGenerator
BCD_WKATTRIBUTE_GROUPING, BCD_WKATTRIBUTE_OTHER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getQueryMaxRowsgetDbSourceNameint
getMaxRowsgetRequestedBindingSetNames 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 reallyboolean
isEmpty()
isEmptyprotected void
setBcduiSql
(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:ISqlGenerator
getDbSourceName- Specified by:
getDbSourceName
in interfaceISqlGenerator
- Returns:
- the database name configured for this request or null for default
-
getResolvedBindingSets
- Specified by:
getResolvedBindingSets
in interfaceISqlGenerator
- Returns:
- the really selected BindingSets
-
getSelectedBindingItems
- Specified by:
getSelectedBindingItems
in interfaceISqlGenerator
- Returns:
- The list of binding items in the select clause in their order.
- Throws:
Exception
-
getRequestedBindingSetNames
Description copied from interface:ISqlGenerator
getRequestedBindingSetNames 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:
getRequestedBindingSetNames
in interfaceISqlGenerator
- Returns:
-
getMaxRows
public int getMaxRows()Description copied from interface:ISqlGenerator
getMaxRows- Specified by:
getMaxRows
in 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:ISqlGenerator
getQueryMaxRows- Specified by:
getClientProvidedMaxRows
in interfaceISqlGenerator
- Returns:
- max rows purely driven by the query, ignoring other limits
-
getSelectStatement
- Specified by:
getSelectStatement
in interfaceISqlGenerator
- Returns:
- the selectStatement
-
isEmpty
public boolean isEmpty()Description copied from interface:ISqlGenerator
isEmpty- Specified by:
isEmpty
in interfaceISqlGenerator
- Returns:
- true if no query was specified from the request
-