Namespace: Consultingwerk.OERA.Query
Class 
FilteredDsQueryString Copy to Clipboard
Parent classes:
Inherits: Consultingwerk.OERA.Query.DSQueryString
Implements: Consultingwerk.OERA.IDSQueryString, Consultingwerk.OERA.Query.IQueryMap, Consultingwerk.OERA.Query.IThrowsErrorsOnInvalidSourceMapping

File:FilteredDsQueryString
Purpose:An overload class for DSQueryString to provide for default
filtering like a globally used Company Id based on login.
Syntax:See NewDSQueryString in Consultingwerk.OeraTests.SCL769.OrderCustomer.OrderDataAccess
Description:Typically the business logic will be implemented in the data access class
of business entity by overwriting the NewDSQueryString method. There this
class will be instantiated and replaces the normally DSQueryString instance.
There the 'default' filter options (based on the specific business rules)
are set.
Author(s):Richard Kelters / Consultingwerk Ltd.
Created:Tue Feb 06 11:53:02 CET 2018



Top Method Summary
Options Name Purpose
+ AddFilter (character, character, CharacterList) Add record to the eFilter temp-table.
+ AddQueryWhere (character, character, character) Inserts a new expression to query's prepare string for a specified buffer.
Inherited from Consultingwerk.OERA.Query.QueryString
+ CHARACTER BuildQueryString (handle) Builds the QueryString for the Query
Inherited from Consultingwerk.OERA.Query.QueryString
+ CHARACTER CheckIndex (handle) Returns the Index information of the query used for a buffer
Inherited from Consultingwerk.OERA.Query.QueryString
# ClearQuery () Clears the internal state to allow parsing another query string
Inherited from Consultingwerk.OERA.Query.QueryString
+ CHARACTER ColumnSource (character) Returns the name of the column from the source (database) column
Inherited from Consultingwerk.OERA.Query.DSQueryString
+ Debug () Displays debug-information
Inherited from Consultingwerk.OERA.Query.QueryString
+ CHARACTER DefaultQuery () Manipulate the default query with 'default' application/business logic filters. For instance login company ID.
Overrides Consultingwerk.OERA.Query.DSQueryString:DefaultQuery ()
# CHARACTER EscapeKnownFunction (character) Escapes the brackets around known ABL functions in the query string
Inherited from Consultingwerk.OERA.Query.QueryString
+ LOGICAL InsertToQuery (handle) Insert the QueryString into the query
Inherited from Consultingwerk.OERA.Query.QueryString
# ParseListQueryExpression (ListQueryExpression, integer, integer) Parses a ListQueryExpression instance
Inherited from Consultingwerk.OERA.Query.QueryString
# ParseQuery (character) Parses the logical buffer's target query and stores it for transformation to the datasource query.
Inherited from Consultingwerk.OERA.Query.QueryString
# ParseQuery (IQueryExpression, ListSortField) Parses the logical buffer's target query and stores it for transformation to the datasource query.
Inherited from Consultingwerk.OERA.Query.QueryString
# ParseSortExpression (character) Parses the Sort Expression
Inherited from Consultingwerk.OERA.Query.QueryString
- CHARACTER SourceBufferFilterWhereString (character, handle) Create where string for source buffer based on filter.

Top Constructor Summary
Options Name Purpose
+ FilteredDsQueryString (character, DataAccess, character, logical) Constructor for the DSQueryString class
+ FilteredDsQueryString (IQueryExpression, ListSortField, IDSQueryStringSource, character, logical, logical) Constructor for the DSQueryString class

Top Property Summary
Options Name Purpose
# Consultingwerk.OERA.DataAccess DataAccess
+ LOGICAL FilterUsingInnerJoin
Inherited from Consultingwerk.OERA.Query.QueryString
# Consultingwerk.OERA.Query.IDSQueryStringSource Instance
Inherited from Consultingwerk.OERA.Query.DSQueryString
# CHARACTER Table
Inherited from Consultingwerk.OERA.Query.DSQueryString
+ LOGICAL ThrowErrorsOnInvalidSourceMapping
Inherited from Consultingwerk.OERA.Query.QueryString


Method Detail
Top

PUBLIC AddFilter (character, character, CharacterList)

Purpose: Add record to the eFilter temp-table.
Notes:

Parameters:
pcTable CHARACTER
Temp-table name that needs to get filled.
pcField CHARACTER
Source buffer name plus dot plus field name.
poList Consultingwerk.Framework.Collections.CharacterList
List of values the field in the source buffer may have.
Top

PUBLIC AddQueryWhere (character, character, character)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Inserts a new expression to query's prepare string for a
specified buffer.
Notes:

Parameters:
pcBuffer CHARACTER
The name of the Buffer
pcExpression CHARACTER
The new expression
pcAndOr CHARACTER
Specifies what operator is used to add the new expression to existing expression(s), AND (default) / OR
Top

PUBLIC CHARACTER BuildQueryString (handle)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Builds the QueryString for the Query
Notes:

Parameters:
phQuery HANDLE
The HANDLE of the QUERY widget
Returns CHARACTER
The Query String
Top

PUBLIC CHARACTER CheckIndex (handle)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Returns the Index information of the query used for a buffer
Notes: For debugging/logging purposes only

Parameters:
phBuffer HANDLE
The handle to the buffer to return index information for
Returns CHARACTER
The index information of the query used for the buffer handle
Top

PROTECTED ClearQuery ()

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Clears the internal state to allow parsing another query string
Notes:

Top

PUBLIC CHARACTER ColumnSource (character)

Inherited from Consultingwerk.OERA.Query.DSQueryString
Purpose: Returns the name of the column from the source (database) column
Notes: Invokes the SourceColumn method in the DataAccess class

Parameters:
pcColumn CHARACTER
The name of the temp-table column
Returns CHARACTER
The name of the source (database) column
Top

PUBLIC Debug ()

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Displays debug-information
Notes:

Top

PUBLIC CHARACTER DefaultQuery ()

Overrides Consultingwerk.OERA.Query.DSQueryString:DefaultQuery ()
Purpose: Manipulate the default query with 'default' application/business logic
filters. For instance login company ID.
Notes: Also has the ability to have several values for one field so that for
instance the 'default' query is restricted to more than one login company ID.
Typically the business logic will be implemented in the data access class
of business entity by overwriting the NewDSQueryString method. There this
class will be instantiated and replaces the normally DSQueryString instance.
Than one or more CharacterList are instantiated before calling the AddFilter
method one or more times in this class.

Returns CHARACTER
default query string
Top

PROTECTED CHARACTER EscapeKnownFunction (character)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Escapes the brackets around known ABL functions in the query string
Notes: SCL-1201, workaround for parsing issues with RECID() or ROWID()
function used in the query string

Parameters:
pcQueryString CHARACTER
The Query String to escape
Returns CHARACTER
The query string with the escaped brackets
Top

PUBLIC LOGICAL InsertToQuery (handle)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Insert the QueryString into the query
Notes: Actually performs QUERY-PREPARE on the Query-Handle

Parameters:
phQuery HANDLE
The HANDLE of the QUERY widget
Returns LOGICAL
True if successful
Top

PROTECTED ParseListQueryExpression (ListQueryExpression, integer, integer)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Parses a ListQueryExpression instance
Notes: See main comments

Parameters:
poQuery Consultingwerk.ListQueryExpression
The ListQueryExpression to parse
piExpressionCount INTEGER
The count of expressions in the query expression
piParenthesesCount INTEGER
The count of parentheses in the query expression
Top

PROTECTED ParseQuery (character)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Parses the logical buffer's target query and stores it for
transformation to the datasource query.
Notes: See main comments

Parameters:
pcQuery CHARACTER
The QueryString to parse
Top

PROTECTED ParseQuery (IQueryExpression, ListSortField)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Parses the logical buffer's target query and stores it for
transformation to the datasource query.
Notes: See main comments

Parameters:
poQueryExpression Consultingwerk.IQueryExpression
The QueryExpression to parse
poQuerySort Consultingwerk.ListSortField
The ListSortField for the query
Top

PROTECTED ParseSortExpression (character)

Inherited from Consultingwerk.OERA.Query.QueryString
Purpose: Parses the Sort Expression
Notes:

Parameters:
pcSort CHARACTER
The sort expression to parse
Top

PRIVATE CHARACTER SourceBufferFilterWhereString (character, handle)

Purpose: Create where string for source buffer based on filter.
Notes: For instance: '(Customer.Salesrep EQ "BBB" OR Customer.Salesrep EQ "HXM")'

Parameters:
pcTempTableName CHARACTER
temp-table name that needs to get filled
phSourceBuffer HANDLE
source buffer handle to validate fieldnames
Returns CHARACTER
where string


Constructor Detail
Top

PUBLIC FilteredDsQueryString (character, DataAccess, character, logical)

Purpose: Constructor for the DSQueryString class
Notes: Alternative Constructor that allows setting of the
FilterUsingInnerJoin property of the QueryString class.

Parameters:
pcQueryString CHARACTER
The query string from the current read request
phInstance Consultingwerk.OERA.DataAccess
The reference to the owning DataAccess class (for call backs)
pcTable CHARACTER
The name of the temp-table this DSQueryString instance is providing source query manipulation for
plFilterUsingInnerJoin LOGICAL
The value for the FilterUsingInnerJoin property
Top

PUBLIC FilteredDsQueryString (IQueryExpression, ListSortField, IDSQueryStringSource, character, logical, logical)

Purpose: Constructor for the DSQueryString class
Notes: Alternative Constructor that allows setting of the
FilterUsingInnerJoin property of the QueryString class

Parameters:
poQueryExpression Consultingwerk.IQueryExpression
The query string from the current read request
poQuerySort Consultingwerk.ListSortField
The list of sort fields
phInstance Consultingwerk.OERA.Query.IDSQueryStringSource
The reference to the owning DataAccess class (for call backs)
pcTable CHARACTER
The name of the temp-table this DSQueryString instance is providing source query manipulation for
plFilterUsingInnerJoin LOGICAL
The value for the FilterUsingInnerJoin property
plThrowErrorsOnInvalidSourceMapping LOGICAL
Throw errors on invalid source field mapping


Property Detail
Top

PROTECTED Consultingwerk.OERA.DataAccess DataAccess


Returns Consultingwerk.OERA.DataAccess
Top

PUBLIC LOGICAL FilterUsingInnerJoin

Inherited from Consultingwerk.OERA.Query.QueryString

Returns LOGICAL
Top

PROTECTED Consultingwerk.OERA.Query.IDSQueryStringSource Instance

Inherited from Consultingwerk.OERA.Query.DSQueryString

Returns Consultingwerk.OERA.Query.IDSQueryStringSource
Top

PROTECTED CHARACTER Table

Inherited from Consultingwerk.OERA.Query.DSQueryString

Returns CHARACTER
Top

PUBLIC LOGICAL ThrowErrorsOnInvalidSourceMapping

Inherited from Consultingwerk.OERA.Query.QueryString

Returns LOGICAL


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.12.2024 13:00:20