public class PreparedSelectorSpecification extends Object
Modifier and Type | Field and Description |
---|---|
static String |
OPTIONS_FOLDERINDEX_PARTITIONS_ENABLED
The name of the advanced PreparedSelector option that indicates
whether FolderIndex partitions are to be used.
|
static String |
OPTIONS_SMART_VIEWS_ENABLED
The name of the advanced PreparedSelector option that indicates
whether Smart Views are to be used.
|
static String |
STATEMENTKEY_ADMIN_MODE_SUFFIX
The suffix to apply to statement keys when the select occurs in admin
discover mode.
|
Constructor and Description |
---|
PreparedSelectorSpecification()
Constructs a PreparedSelectorSpecification.
|
Modifier and Type | Method and Description |
---|---|
void |
forceResolve(LibrarySessionInterface sess)
Force a Resolve of this instance.
|
void |
forceResolveForCountQuery(LibrarySessionInterface sess)
Force a Resolve of this instance for a getItemCount() call.
|
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 were
set using setBypassSecurityAliases().
|
ColumnDescriptor[] |
getColumnDescriptors()
Gets the column descriptors to use in the select statement.
|
AttributeValue[] |
getGeneratedCompleteBindValues()
Gets the generated complete set of Bind Values used
in this query, including the bind values used for security.
|
String[] |
getGeneratedCompleteSqlFragments()
Gets the generated complete SQL fragments.
|
String |
getGeneratedCompleteSqlString()
Gets the generated complete SQL string.
|
SearchTarget[] |
getGeneratedSearchTargets()
Gets the generated Statement Key.
|
String |
getGeneratedStatementKey()
Gets the generated Statement Key.
|
String |
getHint()
Gets the SQL hint to use for the main select.
|
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 . |
AttributeValueTable |
getPreparedSelectorOptions()
Gets the advanced PreparedSelector options.
|
AttributeValue |
getPrimarySearchTarget()
Returns the primary search target.
|
String |
getSearchLanguage()
Returns the search language in effect.
|
String |
getSearchSelection()
Returns the search selection that was set using setSearchSelection()
|
AttributeValueTable |
getSearchTargetsTable()
Gets the SearchTargets table, which holds info used to generate
the SearchTarget objects.
|
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 |
isFolderIndexPartitionsEnabled()
Gets the search target option for determining whether to use
FolderIndex partitions for generating the FRQ clause.
|
boolean |
isRecursiveSearch()
Returns true if recursive searching is enabled with respect to classes.
|
boolean |
isSmartViewsEnabled()
Gets the search target option for determining whether to use "Smart views"
for generating the FROM clause to use explicit table joins instead of
the odmv_ views.
|
void |
resolve(LibrarySessionInterface sess)
Resolve this instance.
|
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 the indication as to whether a "select distinct" will be
used.
|
void |
setGeneratedCompleteBindValues(AttributeValue[] values)
Sets the generated complete set of Bind Values used
in this query, including the bind values used for security.
|
void |
setGeneratedCompleteSqlFragments(String[] fragments)
Sets the generated SQL fragments.
|
void |
setGeneratedCompleteSqlString(String sqlString)
Sets the generated complete SQL string.
|
void |
setGeneratedSearchTargets(SearchTarget[] targets)
Sets the generated search targets.
|
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 |
setPreparedSelectorOptions(AttributeValueTable options)
Sets the advanced PreparedSelector options.
|
void |
setPrimarySearchTarget(AttributeValue target)
Sets the primary search target.
|
void |
setRecursiveSearch(boolean recursive)
Enables/disables recursive searching with respect to the primary
search target.
|
void |
setSearchLanguage(String language)
Sets the search language.
|
void |
setSearchSelection(String searchSelection)
Sets the search selection.
|
void |
setSearchTargetsTable(AttributeValueTable targetsTable)
Sets the SearchTargets table, which holds info used to generate
the SearchTarget objects.
|
void |
setSortSpecification(SortSpecification sort)
Sets the Sort Specification.
|
void |
setSortSpecification(String sortCondition)
Sets the Sort Specification for the specified string.
|
void |
setStartingRowNumber(int rowNumber)
Sets the starting row number.
|
void |
setStatementKey(String key)
Sets the statement key.
|
public static final String OPTIONS_SMART_VIEWS_ENABLED
public static final String OPTIONS_FOLDERINDEX_PARTITIONS_ENABLED
public static final String STATEMENTKEY_ADMIN_MODE_SUFFIX
public PreparedSelectorSpecification()
public String getStatementKey()
public SortSpecification getSortSpecification()
public AttributeValue getPrimarySearchTarget()
The AttributeValue returned encapulates the class name (as the AttributeValue's name) and the alias (as the AttributeValue's value).
public AttributeValue[] getAuxiliarySearchTargets()
The AttributeValues returned encapulate the class name (as the AttributeValue's name) and the alias (as the AttributeValue's value).
public ColumnDescriptor[] getColumnDescriptors()
public String[] getBypassSecurityAliases()
public String getJoinCondition()
public String getSearchSelection()
public boolean isDistinct()
public boolean isRecursiveSearch()
public String getSearchLanguage()
A value of null indicates that the default language should be used.
public int getMaxItemCount()
getItems
.
A value of zero indicates that there is no limit on the desired number of items.
public int getStartingRowNumber()
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.
public String getHint()
public AttributeValue[] getBindValues()
public AttributeValueTable getPreparedSelectorOptions()
public boolean isSmartViewsEnabled() throws IfsException
IfsException
- if the operation failspublic boolean isFolderIndexPartitionsEnabled() throws IfsException
IfsException
- if the operation failspublic AttributeValueTable getSearchTargetsTable()
targetsTable
- the SearchTargets tablepublic String getGeneratedStatementKey()
public SearchTarget[] getGeneratedSearchTargets()
public String getGeneratedCompleteSqlString()
public String[] getGeneratedCompleteSqlFragments()
public AttributeValue[] getGeneratedCompleteBindValues()
public void setStatementKey(String key)
key
- the statement keypublic void setDistinct(boolean distinct)
distinct
- true if distinct is used; false otherwisepublic void setPrimarySearchTarget(AttributeValue target)
target
- the primary search targetpublic void setAuxiliarySearchTargets(AttributeValue[] targets)
targets
- the auxiliary search targetspublic void setSortSpecification(String sortCondition)
sortCondition
- the sort conditionpublic void setSortSpecification(SortSpecification sort)
sort
- the sort specificaionpublic void setColumnDescriptors(ColumnDescriptor[] colDescs)
colDescs
- the column descriptorspublic void setBypassSecurityAliases(String[] bypassSecAliases)
bypassSecAliases
- the bypass security aliasespublic void setJoinCondition(String joinCondition)
joinCondition
- the join conditionpublic void setSearchSelection(String searchSelection)
searchSelection
- the search selectionpublic void setRecursiveSearch(boolean recursive)
A setting of true is the default - meaning that the search results can include objects of the specific class indicated or one of its subclasses. A setting of false indicates that only instances of the exact class specified for the primary search target are returned.
This legacy setting only applies to the primary search target, and not any auxiliary search targets. Use the PreparedSelectorGenerator Macro EXACT_TYPE to specify this behavior for any search target. this more generally.
recursive
- true for enabled.IfsException
- if the operation fails.public void setSearchLanguage(String language)
A value of null indicates that the default language should be used.
language
- the search languagepublic void setMaxItemCount(int maxItemCount)
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 returnedpublic void setStartingRowNumber(int rowNumber)
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 numberpublic void setHint(String hint)
hint
- the SQL hintpublic void setBindValues(AttributeValue[] bindValues)
bindValues
- the bind valuespublic void setPreparedSelectorOptions(AttributeValueTable options)
options
- the advanced PreparedSelector optionspublic void setSearchTargetsTable(AttributeValueTable targetsTable)
targetsTable
- the SearchTargets tablepublic void setGeneratedSearchTargets(SearchTarget[] targets)
targets
- the generated search targetspublic void setGeneratedCompleteSqlString(String sqlString)
sqlString
- the generated complete SQL stringpublic void setGeneratedCompleteSqlFragments(String[] fragments)
fragments
- the generated SQL fragments.public void setGeneratedCompleteBindValues(AttributeValue[] values)
values
- the generated complete set of Bind Values.public void resolve(LibrarySessionInterface sess) throws IfsException
The normal resolve assumes that either getItems() or
getSearchResults() will be invoked on the PreparedSelector.
If getItemCount() is invoked instead, this instance
will get re-resolved using forceResolveForCountQuery()
.
sess
- the session contextIfsException
- if operation fails.public void forceResolve(LibrarySessionInterface sess) throws IfsException
sess
- the session contextIfsException
- if operation fails.public void forceResolveForCountQuery(LibrarySessionInterface sess) throws IfsException
sess
- the session contextIfsException
- if operation fails.Copyright © 2025. All rights reserved.