|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.db.generic.CmsUserQueryBuilder
public class CmsUserQueryBuilder
Default implementation of the user query builder.
Constructor Summary | |
---|---|
CmsUserQueryBuilder()
|
Method Summary | |
---|---|
protected void |
addAllowedOuCondition(CmsSelectQuery select,
CmsSelectQuery.TableAlias users,
List<CmsOrganizationalUnit> allowedOus)
Adds OU conditions to an SQL query. |
protected void |
addFlagCondition(CmsSelectQuery select,
CmsSelectQuery.TableAlias users,
int flags,
boolean allowCore)
Adds flag checking conditions to an SQL query. |
protected void |
addGroupCondition(CmsSelectQuery select,
CmsSelectQuery.TableAlias users,
CmsUserSearchParameters searchParams)
Adds group conditions to an SQL query. |
protected void |
addOrgUnitCondition(CmsSelectQuery select,
CmsSelectQuery.TableAlias users,
CmsOrganizationalUnit orgUnit,
boolean recursive)
Adds a check for an OU to an SQL query. |
protected void |
addSearchFilterCondition(CmsSelectQuery select,
CmsSelectQuery.TableAlias users,
CmsUserSearchParameters searchParams)
Adds a search condition to a query. |
protected void |
addSorting(CmsSelectQuery select,
CmsSelectQuery.TableAlias users,
CmsUserSearchParameters searchParams)
Adds a sort order to an SQL query. |
protected void |
addWebuserCondition(CmsSelectQuery select,
CmsOrganizationalUnit orgUnit,
CmsSelectQuery.TableAlias users)
Adds a check for the web user condition to an SQL query. |
protected String |
colDateCreated()
Column name accessor. |
protected String |
colEmail()
Column name accessor. |
protected String |
colFirstName()
Column name accessor. |
protected String |
colFlags()
Column name accessor. |
protected String |
colGroupUserGroupId()
Column name accessor. |
protected String |
colGroupUserUserId()
Column name accessor. |
protected String |
colId()
Column name accessor. |
protected String |
colLastLogin()
Column name accessor. |
protected String |
colLastName()
Column name accessor. |
protected String |
colName()
Column name accessor. |
protected String |
colOu()
Column name accessor. |
protected String |
colPassword()
Column name accessor. |
protected I_CmsQueryFragment |
createCoreCondition(CmsSelectQuery.TableAlias users)
Creates a core user check condition. |
protected I_CmsQueryFragment |
createFlagCondition(CmsSelectQuery.TableAlias users,
int flags)
Creates an SQL flag check condition. |
CmsPair<String,List<Object>> |
createUserQuery(CmsUserSearchParameters searchParams,
boolean countOnly)
Creates a query for searching users. |
protected String |
generateConcat(String... expressions)
Generates an SQL expression for concatenating several other SQL expressions. |
protected String |
generateTrim(String expression)
Generates an SQL expression for trimming whitespace from the beginning and end of a string. |
protected String |
getGroupUserSubqueryColumns()
Returns the columns that should be returned by user subqueries. |
protected String |
getSortExpression(CmsSelectQuery.TableAlias users,
CmsUserSearchParameters searchParams)
Returns the expression used for sorting the results. |
protected String |
getUserActivatedExpression(CmsSelectQuery.TableAlias users)
Returns an expression for checking whether a user is activated. |
protected String |
getUserFlagExpression(CmsSelectQuery.TableAlias users,
int flags)
Returns a bitwise AND expression with a fixed second operand. |
protected String |
getUserFullNameExpression(CmsSelectQuery.TableAlias users)
Returns the SQL expression for generating the user's full name in the format 'firstname lastname (loginname)'. |
protected CmsPair<String,List<Object>> |
makePaged(CmsSelectQuery select,
CmsUserSearchParameters params)
Creates a query which uses paging from another query. |
protected boolean |
shouldNameSubqueries()
Should return true if subqueries in a FROM clause should be named. |
protected String |
tabGroups()
Table name accessor. |
protected String |
tabGroupUsers()
Table name accessor. |
protected String |
tabUsers()
Table name accessor. |
protected boolean |
useWindowFunctionsForPaging()
Returns true if window functions should be used for paging. |
protected String |
wrapLower(String expr,
boolean caseInsensitive)
Wraps an SQL expression in a "LOWER" call conditionally. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmsUserQueryBuilder()
Method Detail |
---|
public CmsPair<String,List<Object>> createUserQuery(CmsUserSearchParameters searchParams, boolean countOnly)
searchParams
- the user search criteriacountOnly
- if true, the query will only count the total number of results instead of returning them
protected void addAllowedOuCondition(CmsSelectQuery select, CmsSelectQuery.TableAlias users, List<CmsOrganizationalUnit> allowedOus)
select
- the queryusers
- the user table aliasallowedOus
- the allowed ousprotected void addFlagCondition(CmsSelectQuery select, CmsSelectQuery.TableAlias users, int flags, boolean allowCore)
select
- the queryusers
- the user table aliasflags
- the flagsallowCore
- set to true if core users should not be filtered outprotected void addGroupCondition(CmsSelectQuery select, CmsSelectQuery.TableAlias users, CmsUserSearchParameters searchParams)
select
- the queryusers
- the user table aliassearchParams
- the search parametersprotected void addOrgUnitCondition(CmsSelectQuery select, CmsSelectQuery.TableAlias users, CmsOrganizationalUnit orgUnit, boolean recursive)
select
- the queryusers
- the user table aliasorgUnit
- the organizational unitrecursive
- if true, checks for sub-OUs tooprotected void addSearchFilterCondition(CmsSelectQuery select, CmsSelectQuery.TableAlias users, CmsUserSearchParameters searchParams)
select
- the queryusers
- the user table aliassearchParams
- the search criteriaprotected void addSorting(CmsSelectQuery select, CmsSelectQuery.TableAlias users, CmsUserSearchParameters searchParams)
select
- the queryusers
- the user table aliassearchParams
- the user search criteriaprotected void addWebuserCondition(CmsSelectQuery select, CmsOrganizationalUnit orgUnit, CmsSelectQuery.TableAlias users)
select
- the queryorgUnit
- the organizational unitusers
- the user table aliasprotected String colDateCreated()
protected String colEmail()
protected String colFirstName()
protected String colFlags()
protected String colGroupUserGroupId()
protected String colGroupUserUserId()
protected String colId()
protected String colLastLogin()
protected String colLastName()
protected String colName()
protected String colOu()
protected String colPassword()
protected I_CmsQueryFragment createCoreCondition(CmsSelectQuery.TableAlias users)
users
- the user table alias
protected I_CmsQueryFragment createFlagCondition(CmsSelectQuery.TableAlias users, int flags)
users
- the user table aliasflags
- the flags to check
protected String generateConcat(String... expressions)
expressions
- the expressions to concatenate
protected String generateTrim(String expression)
expression
- the expression to wrap
protected String getGroupUserSubqueryColumns()
protected String getSortExpression(CmsSelectQuery.TableAlias users, CmsUserSearchParameters searchParams)
users
- the user table aliassearchParams
- the search parameters
protected String getUserActivatedExpression(CmsSelectQuery.TableAlias users)
users
- the user table alias
protected String getUserFlagExpression(CmsSelectQuery.TableAlias users, int flags)
users
- the user table aliasflags
- the user flags
protected String getUserFullNameExpression(CmsSelectQuery.TableAlias users)
users
- the user table alias
protected CmsPair<String,List<Object>> makePaged(CmsSelectQuery select, CmsUserSearchParameters params)
select
- the base queryparams
- the query parameters
protected boolean shouldNameSubqueries()
protected String tabGroups()
protected String tabGroupUsers()
protected String tabUsers()
protected boolean useWindowFunctionsForPaging()
protected String wrapLower(String expr, boolean caseInsensitive)
expr
- the expression to wrapcaseInsensitive
- if false, no wrapping should occur
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |