Package de.businesscode.bcdui.wrs.load
Class WrqBindingSetVirtual
java.lang.Object
de.businesscode.bcdui.wrs.load.WrqBindingSetVirtual
- All Implemented Interfaces:
BindingSet
,WrqBindingSet
,Serializable
,Cloneable
- Direct Known Subclasses:
WrqBindingSetFromDerivedTable
,WrqBindingSetFromTableReference
Represents a virtual BindingSet derived on runtime from parts of a Wrs
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.businesscode.bcdui.binding.BindingSet
BindingSet.SECURITY_OPS
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<String,
BindingItem> protected final SqlFromSubSelect
protected String
protected Set<StandardBindingSet>
protected String
protected final SQLStatementWithParams
protected String
Fields inherited from interface de.businesscode.bcdui.binding.BindingSet
DEFAULT_DATABASE_SOURCENAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRelation
(Relation p_relation) adds a new relation into ArrayListvoid
assurePermissionDefined
(BindingSet.SECURITY_OPS operation) we check here if the application has set up the subjectSettings.void
assurePermitted
(BindingSet.SECURITY_OPS operation) check if given operation is permitted according to permissions set on subject in scopeGets a BindingItem by its unique name and throws an Exception if it is not present.get
(Collection<String> keys) Get binding items by ids.getBindingItemFromRelation
(Relation pRelation, String itemName) Method getBindingItemFromRelationgetBindingItemNamesabstract String
Gets the database name the table of the BindingSet is located in.Retrieves the list of key BindingItems for this binding set which may contain no entries.getName()
Gets the unique name of the BindingSet.All non-virtual BindingSets that were used at the end, BindingGroups are being resolved to the actually used BindingSetsSQL alias of this BindingSet during this queryReturns a table expression and if it is a complex one (subselect with where for example) it may come with variables to be bound as host variablesabstract SQLStatementWithParams
getSubjectFilterExpression
(WrqInfo wrqInfo) Return SubjectFilters to be applied for our virtual BindingSetGets theSubjectFilters
definition for this BindingSet which may be null.Returns a table reference.A list of Wrq modifier classes to be applied on all requests for this BindingSet before generating the SQL This is completely transparent to the caller, the answer Wrs does show the original WrsRequestboolean
boolean
tells if this binding-set contains an itemboolean
Tests if the BindingSet hat key BindingItems.boolean
Tells if the binding set has subject filters.boolean
isAllowSelectAllColumnsboolean
isBackendCanBypassSubjectFilter
-
Field Details
-
tableName
-
name
-
sqlAlias
-
bindingItems
-
wrqModifiers
-
resolvedBindingSets
-
sqlStatementWithParams
-
currentSelect
-
-
Constructor Details
-
WrqBindingSetVirtual
- Throws:
Exception
-
-
Method Details
-
getResolvedBindingSets
Description copied from interface:BindingSet
All non-virtual BindingSets that were used at the end, BindingGroups are being resolved to the actually used BindingSets- Specified by:
getResolvedBindingSets
in interfaceBindingSet
- Returns:
-
getSqlAlias
Description copied from interface:WrqBindingSet
SQL alias of this BindingSet during this query- Specified by:
getSqlAlias
in interfaceWrqBindingSet
- Returns:
-
getName
Description copied from interface:BindingSet
Gets the unique name of the BindingSet.- Specified by:
getName
in interfaceBindingSet
- Returns:
- The unique BindingSet name.
-
hasSubjectFilters
public boolean hasSubjectFilters()Description copied from interface:BindingSet
Tells if the binding set has subject filters.- Specified by:
hasSubjectFilters
in interfaceBindingSet
- Returns:
- True, if there is at least one SubjectFilter inside this BindingSet.
-
getSubjectFilters
Description copied from interface:BindingSet
Gets theSubjectFilters
definition for this BindingSet which may be null.- Specified by:
getSubjectFilters
in interfaceBindingSet
- Returns:
SubjectFilters
for given BindingSet or null
-
getJdbcResourceName
Description copied from interface:BindingSet
Gets the database name the table of the BindingSet is located in.- Specified by:
getJdbcResourceName
in interfaceBindingSet
- Returns:
- All tables need to be on the same database, so here we return one from a random resolved BindingSet
-
isBackendCanBypassSubjectFilter
public boolean isBackendCanBypassSubjectFilter()Description copied from interface:BindingSet
isBackendCanBypassSubjectFilter- Specified by:
isBackendCanBypassSubjectFilter
in interfaceBindingSet
- Returns:
- true if it is allowed for the backend to bypass SubjectFilters
-
isAllowSelectAllColumns
public boolean isAllowSelectAllColumns()Description copied from interface:BindingSet
isAllowSelectAllColumns- Specified by:
isAllowSelectAllColumns
in interfaceBindingSet
- Returns:
- true if it is allowed to select all columns from this BindingSet.
-
get
Description copied from interface:BindingSet
Gets a BindingItem by its unique name and throws an Exception if it is not present.- Specified by:
get
in interfaceBindingSet
- Parameters:
key
- The name of the BindingItem.- Returns:
- A BindingItem with the specified name.
- Throws:
BindingNotFoundException
- If there is no BindingItem with the denoted name.
-
hasItem
Description copied from interface:BindingSet
tells if this binding-set contains an item- Specified by:
hasItem
in interfaceBindingSet
- Returns:
-
hasCustomItem
public boolean hasCustomItem()- Specified by:
hasCustomItem
in interfaceBindingSet
- Returns:
- TRUE if contains at least one custom element from
StandardNamespaceContext.CUST_NAMESPACE
-
get
Description copied from interface:BindingSet
Get binding items by ids.- Specified by:
get
in interfaceBindingSet
- Throws:
BindingNotFoundException
- See Also:
-
getBindingItemNames
Description copied from interface:BindingSet
getBindingItemNames- Specified by:
getBindingItemNames
in interfaceBindingSet
- Returns:
- names of all items defined in the bindingSet
-
getBindingItemFromRelation
public BindingItem getBindingItemFromRelation(Relation pRelation, String itemName) throws BindingException Description copied from interface:BindingSet
Method getBindingItemFromRelation- Specified by:
getBindingItemFromRelation
in interfaceBindingSet
itemName
- - requested binding item name- Returns:
- BindingItem object or null if not found
- Throws:
BindingException
-
hasKeyBindingItems
public boolean hasKeyBindingItems()Description copied from interface:BindingSet
Tests if the BindingSet hat key BindingItems.- Specified by:
hasKeyBindingItems
in interfaceBindingSet
- Returns:
- True, if there is a BindingItem which is declared as key item.
-
getKeyBindingItems
Description copied from interface:BindingSet
Retrieves the list of key BindingItems for this binding set which may contain no entries.- Specified by:
getKeyBindingItems
in interfaceBindingSet
- Returns:
- An array of the BindingItems with the isKey attribute set to "true".
-
addRelation
Description copied from interface:BindingSet
adds a new relation into ArrayList- Specified by:
addRelation
in interfaceBindingSet
-
getRelations
- Specified by:
getRelations
in interfaceBindingSet
-
getWriteProcessing
- Specified by:
getWriteProcessing
in interfaceBindingSet
-
assurePermissionDefined
public void assurePermissionDefined(BindingSet.SECURITY_OPS operation) throws SecurityMissingForBindingException Description copied from interface:BindingSet
we check here if the application has set up the subjectSettings. In case it is set up, the binding-set HAS TO define the Security context for given operation otherwise we throwSecurityMissingException
- Specified by:
assurePermissionDefined
in interfaceBindingSet
- Parameters:
operation
- - to assure the permission is defined for- Throws:
SecurityMissingForBindingException
-
assurePermitted
Description copied from interface:BindingSet
check if given operation is permitted according to permissions set on subject in scope- Specified by:
assurePermitted
in interfaceBindingSet
- Parameters:
operation
- - to assure permission for- Throws:
SecurityException
-
getSecurity
- Specified by:
getSecurity
in interfaceBindingSet
- Returns:
- security context to this binding, may be NULL if no security configured
-
getWrqModifiers
Description copied from interface:BindingSet
A list of Wrq modifier classes to be applied on all requests for this BindingSet before generating the SQL This is completely transparent to the caller, the answer Wrs does show the original WrsRequest- Specified by:
getWrqModifiers
in interfaceBindingSet
- Returns:
-
getTableReference
Description copied from interface:BindingSet
Returns a table reference. Can be a plain table name (with alias) or a join of tables- Specified by:
getTableReference
in interfaceBindingSet
- Returns:
-
getSQLStatementWithParams
Description copied from interface:BindingSet
Returns a table expression and if it is a complex one (subselect with where for example) it may come with variables to be bound as host variables- Specified by:
getSQLStatementWithParams
in interfaceBindingSet
- Returns:
-
getSubjectFilterExpression
public abstract SQLStatementWithParams getSubjectFilterExpression(WrqInfo wrqInfo) throws BindingException Return SubjectFilters to be applied for our virtual BindingSet- Specified by:
getSubjectFilterExpression
in interfaceWrqBindingSet
- Returns:
- Throws:
BindingException
-