Package de.businesscode.bcdui.wrs.load
Class Wrq2Sql
- java.lang.Object
-
- de.businesscode.bcdui.wrs.load.Wrq2Sql
-
- All Implemented Interfaces:
ISqlGenerator
public class Wrq2Sql extends java.lang.Object implements ISqlGenerator
Takes a Wrq and generates SQL from it
-
-
Field Summary
Fields Modifier and Type Field Description protected Bindings
bindings
protected int
clientProvidedMaxRows
protected int
effectiveMaxRows
protected org.w3c.dom.Document
requestDoc
protected WrqQueryBuilder
wrqQueryBuilder
protected static java.lang.String
wrqTransformGrs2UnionXsltStatic
-
Fields inherited from interface de.businesscode.bcdui.wrs.load.ISqlGenerator
BCD_WKATTRIBUTE_GROUPING, BCD_WKATTRIBUTE_OTHER
-
-
Constructor Summary
Constructors Constructor Description Wrq2Sql(IRequestOptions options)
We are initialized for each wrq:WrqRequest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getClientProvidedMaxRows()
getQueryMaxRowsjava.lang.String
getDbSourceName()
getDbSourceNameint
getMaxRows()
getMaxRowsjava.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>>
getRequestedBindingSetNames()
This is the binding sets / groups named in the Wrqjava.util.Set<StandardBindingSet>
getResolvedBindingSets()
java.util.List<WrsBindingItem>
getSelectedBindingItems()
SQLStatementWithParams
getSelectStatement()
boolean
isEmpty()
isEmpty
-
-
-
Field Detail
-
bindings
protected final Bindings bindings
-
effectiveMaxRows
protected int effectiveMaxRows
-
clientProvidedMaxRows
protected int clientProvidedMaxRows
-
wrqQueryBuilder
protected WrqQueryBuilder wrqQueryBuilder
-
requestDoc
protected final org.w3c.dom.Document requestDoc
-
wrqTransformGrs2UnionXsltStatic
protected static java.lang.String wrqTransformGrs2UnionXsltStatic
-
-
Constructor Detail
-
Wrq2Sql
public Wrq2Sql(IRequestOptions options) throws java.lang.Exception
We are initialized for each wrq:WrqRequest.- Parameters:
options
-- Throws:
java.lang.Exception
-
-
Method Detail
-
getSelectStatement
public SQLStatementWithParams getSelectStatement()
- Specified by:
getSelectStatement
in interfaceISqlGenerator
- Returns:
- the selectStatement
-
getDbSourceName
public java.lang.String getDbSourceName()
Description copied from interface:ISqlGenerator
getDbSourceName- Specified by:
getDbSourceName
in interfaceISqlGenerator
- Returns:
- the database name configured for this request or null for default
-
getRequestedBindingSetNames
public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.String>> getRequestedBindingSetNames()
This is the binding sets / groups named in the Wrq- Specified by:
getRequestedBindingSetNames
in interfaceISqlGenerator
- Returns:
- See Also:
ISqlGenerator.getRequestedBindingSetNames()
-
getResolvedBindingSets
public java.util.Set<StandardBindingSet> getResolvedBindingSets()
- Specified by:
getResolvedBindingSets
in interfaceISqlGenerator
- Returns:
- the really selected BindingSets
-
getSelectedBindingItems
public java.util.List<WrsBindingItem> getSelectedBindingItems() throws java.lang.Exception
- Specified by:
getSelectedBindingItems
in interfaceISqlGenerator
- Returns:
- The list of binding items in the select clause in their order.
- Throws:
java.lang.Exception
-
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
-
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
-
-