public class S_PreparedSelector extends Object
Modifier and Type | Field and Description |
---|---|
static String |
STATEMENTKEY_ADMIN_MODE_SUFFIX
The suffix to apply to statement keys when the select occurs in admin
discover mode.
|
Constructor and Description |
---|
S_PreparedSelector(S_LibrarySession session)
Constructs a S_PreparedSelector.
|
S_PreparedSelector(S_LibrarySession session,
String key,
boolean distinct,
AttributeValue searchTarget,
AttributeValue[] auxSearchTargets,
String[] bypassSecAliases,
String joinCondition,
String searchSelection,
SortSpecification sort,
boolean recursive,
String language,
int maxItemCount,
int rowNumber,
String hint,
AttributeValue[] bindValues)
Constructs a S_PreparedSelector.
|
S_PreparedSelector(S_LibrarySession session,
String key,
boolean distinct,
AttributeValue searchTarget,
AttributeValue[] auxSearchTargets,
String searchSelection,
SortSpecification sort,
boolean recursive,
String language,
int maxItemCount,
int rowNumber,
String hint,
AttributeValue[] bindValues)
Constructs a S_PreparedSelector.
|
S_PreparedSelector(S_LibrarySession session,
String key,
boolean distinct,
AttributeValue searchTarget,
AttributeValue[] auxSearchTargets,
String joinCondition,
String searchSelection,
SortSpecification sort,
boolean recursive,
String language,
int maxItemCount,
int rowNumber,
String hint,
AttributeValue[] bindValues)
Constructs a S_PreparedSelector.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applySortSpecificationDefaults()
Applies the primary search target settings as the default class/alias for
the current sort specification.
|
AttributeValue[] |
getAuxiliarySearchTargets()
Returns the auxiliary search targets.
|
AttributeValue[] |
getBindValues()
Gets the bind values to use in the select statement.
|
String[] |
getBypassSecurityAliases()
Returns the bypass security aliases that was
set using setBypassSecurityAliases().
|
static String |
getClassFromTarget(AttributeValue target)
Deprecated.
9.3.3.0 use
PreparedSelector.getClassNameFromTarget |
ColumnDescriptor[] |
getColumnDescriptors()
Gets the column descriptors to use in the select statement.
|
String |
getHint()
Gets the SQL hint to use for the main select.
|
int |
getItemCount()
Returns the row count of the search.
|
S_LibraryObject[] |
getItems()
Returns the entire search results as an array.
|
String |
getJoinCondition()
Returns the join condition that was set using setJoinCondition().
|
int |
getMaxItemCount()
Returns the maximum number of items that will be returned by
getItems . |
String |
getPrimarySearchAlias()
Returns the alias used for the primary search class.
|
String |
getPrimarySearchClass()
Returns the search class that was previously set.
|
AttributeValue |
getPrimarySearchTarget()
Returns the primary search target.
|
String |
getSearchLanguage()
Returns the search language in effect.
|
AttributeValueTable[] |
getSearchResults()
Returns the entire search results as an array.
|
String |
getSearchSelection()
Returns the search selection that was set using setSearchSelection()
|
S_LibrarySession |
getSession()
Returns the session being used by this Selector.
|
SortSpecification |
getSortSpecification()
Returns the Sort Specification.
|
int |
getStartingRowNumber()
Returns the starting row number.
|
String |
getStatementKey()
Returns the statement key.
|
boolean |
isDistinct()
Returns true if distinct searching is enabled with respect to classes.
|
boolean |
isRecursiveSearch()
Returns true if recursive searching is enabled with respect to classes.
|
protected String |
resolveStatementKey(S_LibraryObjectSelector sel)
Resolve the statement key.
|
void |
setAuxiliarySearchTargets(AttributeValue[] targets)
Sets the auxiliary search targets.
|
void |
setBindValues(AttributeValue[] bindValues)
Sets the bind values to use in the select statement.
|
void |
setBypassSecurityAliases(String[] bypassSecAliases)
Sets the aliases that indicates which PO classes should not have
the security clause applied.
|
void |
setColumnDescriptors(ColumnDescriptor[] colDescs)
Sets the column descriptors to use in the select statement.
|
void |
setDistinct(boolean distinct)
Sets whether to use "distinct" clause.
|
void |
setHint(String hint)
Sets the SQL hint to use for the main select.
|
void |
setJoinCondition(String joinCondition)
Sets the join condition.
|
void |
setMaxItemCount(int maxItemCount)
Sets the maximum number of items that will be returned by
getItems . |
void |
setPrimarySearchClass(String className)
Sets the primary search target, specifying the class name only.
|
void |
setPrimarySearchTarget(AttributeValue target)
Sets the primary search target.
|
void |
setRecursiveSearch(boolean recursive)
Enables/disables recursive searching with respect to classes.
|
void |
setSearchLanguage(String language)
Sets the search language.
|
void |
setSearchSelection(String searchSelection)
Sets the search selection.
|
void |
setSortSpecification(SortSpecification sort)
Sets the Sort Specification.
|
void |
setStartingRowNumber(int rowNumber)
Sets the starting row number.
|
void |
setStatementKey(String key)
Sets the statement key.
|
public static final String STATEMENTKEY_ADMIN_MODE_SUFFIX
public S_PreparedSelector(S_LibrarySession session) throws IfsException
session
- the current session.IfsException
- if the operation failspublic S_PreparedSelector(S_LibrarySession session, String key, boolean distinct, AttributeValue searchTarget, AttributeValue[] auxSearchTargets, String searchSelection, SortSpecification sort, boolean recursive, String language, int maxItemCount, int rowNumber, String hint, AttributeValue[] bindValues) throws IfsException
session
- the current sessionkey
- the statement keydistinct
- whether to select with "distinct" clausesearchTarget
- the primary search targetauxSearchTargets
- the auxiliary search targetssearchSelection
- the search selectionsort
- the sort specificationrecursive
- whether the search should include subclasseslanguage
- the search language to usemaxItemCount
- maximum number of items to selectrowNumber
- the starting row number for the returned resultshint
- the SQL hint to use for the main selectbindValues
- the bind valuesIfsException
- if the operation failspublic S_PreparedSelector(S_LibrarySession session, String key, boolean distinct, AttributeValue searchTarget, AttributeValue[] auxSearchTargets, String joinCondition, String searchSelection, SortSpecification sort, boolean recursive, String language, int maxItemCount, int rowNumber, String hint, AttributeValue[] bindValues) throws IfsException
session
- the current sessionkey
- the statement keydistinct
- whether to select with "distinct" clausesearchTarget
- the primary search targetauxSearchTargets
- the auxiliary search targetsjoinCondition
- the join conditionsearchSelection
- the search selectionsort
- the sort specificationrecursive
- whether the search should include subclasseslanguage
- the search language to usemaxItemCount
- maximum number of items to selectrowNumber
- the starting row number for the returned resultshint
- the SQL hint to use for the main selectbindValues
- the bind valuesIfsException
- if the operation failspublic S_PreparedSelector(S_LibrarySession session, String key, boolean distinct, AttributeValue searchTarget, AttributeValue[] auxSearchTargets, String[] bypassSecAliases, String joinCondition, String searchSelection, SortSpecification sort, boolean recursive, String language, int maxItemCount, int rowNumber, String hint, AttributeValue[] bindValues) throws IfsException
This is the compelte variant.
session
- the current sessionkey
- the statement keydistinct
- whether to select with "distinct" clausesearchTarget
- the primary search targetauxSearchTargets
- the auxiliary search targetsbypassSecAliases
- the aliases that indicates bypassing security for POsjoinCondition
- the join conditionsearchSelection
- the search selectionsort
- the sort specificationrecursive
- whether the search should include subclasseslanguage
- the search language to usemaxItemCount
- maximum number of items to selectrowNumber
- the starting row number for the returned resultshint
- the SQL hint to use for the main selectbindValues
- the bind valuesIfsException
- if the operation failspublic S_LibrarySession getSession() throws IfsException
IfsException
- if the operation failspublic String getStatementKey() throws IfsException
IfsException
- if the operation fails.public boolean isDistinct() throws IfsException
IfsException
- if the operation fails.public SortSpecification getSortSpecification() throws IfsException
IfsException
- if the operation fails.public AttributeValue getPrimarySearchTarget() throws IfsException
The AttributeValue returned encapulates the class name (as the AttributeValue's name) and the alias (as the AttributeValue's value).
IfsException
- if operation fails.public String getPrimarySearchClass() throws IfsException
IfsException
- if operation fails.public String getPrimarySearchAlias() throws IfsException
IfsException
- if operation fails.public AttributeValue[] getAuxiliarySearchTargets() throws IfsException
The AttributeValues returned encapulate the class name (as the AttributeValue's name) and the alias (as the AttributeValue's value).
IfsException
- if operation fails.public String getJoinCondition() throws IfsException
IfsException
- if operation fails.public String[] getBypassSecurityAliases() throws IfsException
IfsException
- if operation fails.public String getSearchSelection() throws IfsException
IfsException
- if operation fails.public boolean isRecursiveSearch() throws IfsException
IfsException
- if the operation fails.public String getSearchLanguage() throws IfsException
A value of null indicates that the default language should be used.
IfsException
- if operation fails.public int getMaxItemCount() throws IfsException
getItems
.
A value of zero indicates that there is no limit on the desired number of items.
IfsException
- if the operation fails.public int getStartingRowNumber() throws IfsException
The value is 1-based, meaning that if the value is set to 101, the first 100 rows will be skipped. A value of zero or less is treated the same same as a setting of 1, indicating that no rows are skipped.
IfsException
- if the operation fails.public String getHint() throws IfsException
IfsException
- if the operation fails.public AttributeValue[] getBindValues() throws IfsException
IfsException
- if the operation fails.public ColumnDescriptor[] getColumnDescriptors() throws IfsException
IfsException
- if the operation fails.public static String getClassFromTarget(AttributeValue target) throws IfsException
PreparedSelector.getClassNameFromTarget
target
- the search target specification.IfsException
- if operation fails.public void setStatementKey(String key) throws IfsException
key
- the statement key.IfsException
- if operation fails.public void setDistinct(boolean distinct) throws IfsException
distinct
- the distinct indication.IfsException
- if operation fails.public void setPrimarySearchTarget(AttributeValue target) throws IfsException
target
- the search class.IfsException
- if operation fails.public void setPrimarySearchClass(String className) throws IfsException
className
- the search class.IfsException
- if operation fails.public void setAuxiliarySearchTargets(AttributeValue[] targets) throws IfsException
targets
- the auxiliary search targets.IfsException
- if operation fails.public void setSortSpecification(SortSpecification sort) throws IfsException
sort
- the sort specificaion.IfsException
- if the operation fails.protected void applySortSpecificationDefaults() throws IfsException
IfsException
- if the operation fails.public void setJoinCondition(String joinCondition) throws IfsException
joinCondition
- the join conditionIfsException
- if operation fails.public void setBypassSecurityAliases(String[] bypassSecAliases) throws IfsException
bypassSecAliases
- the bypass security aliasesIfsException
- if operation fails.public void setSearchSelection(String searchSelection) throws IfsException
searchSelection
- the search selection.IfsException
- if operation fails.public void setRecursiveSearch(boolean recursive) throws IfsException
recursive
- true for enabled.IfsException
- if the operation fails.public void setSearchLanguage(String language) throws IfsException
A value of null indicates that the default language should be used.
language
- the search languageIfsException
- if operation fails.public void setMaxItemCount(int maxItemCount) throws IfsException
getItems
.
A value of zero indicates that there is no limit on the desired number of items.
maxItemCount
- maximum number of items that will be returnedIfsException
- if the operation fails.public void setStartingRowNumber(int rowNumber) throws IfsException
The value is 1-based, meaning that if the value is set to 101, the first 100 rows will be skipped. A value of zero or less is treated the same same as a setting of 1, indicating that no rows are skipped.
rowNumber
- the starting row numberIfsException
- if the operation fails.public void setHint(String hint) throws IfsException
hint
- the SQL hintIfsException
- if the operation fails.public void setBindValues(AttributeValue[] bindValues) throws IfsException
bindValues
- the bind valuesIfsException
- if the operation fails.public void setColumnDescriptors(ColumnDescriptor[] colDescs) throws IfsException
colDescs
- the column descriptorsIfsException
- if the operation fails.public S_LibraryObject[] getItems() throws IfsException
IfsException
- if operation fails.public AttributeValueTable[] getSearchResults() throws IfsException
IfsException
- if operation fails.public int getItemCount() throws IfsException
IfsException
- if operation fails.protected String resolveStatementKey(S_LibraryObjectSelector sel) throws IfsException
Append a suffix if this is a PublicObject query and the session is in admin discover mode.
IfsException
- if operation fails.Copyright © 2023. All rights reserved.