public interface IDfQueryBuilder extends IDfQueryDefinition
IDfQueryManager.newQueryBuilder()
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATE_FORMAT_DEFAULT
Default date format.
|
static java.lang.String |
OBJ_TYPE_DEFAULT
Represents default object type.
|
static java.lang.String |
OBJ_TYPE_UNDEFINED
Represents undefined object type.
|
QUERY_DEF_TYPE_BUILDER, QUERY_DEF_TYPE_PASSTHROUGH, QUERY_DEF_TYPE_UNDEFINED
Modifier and Type | Method and Description |
---|---|
void |
addASCIIOrderByAttribute(java.lang.String attrName,
boolean isAsc)
Specifies an attribute to sort the results list using an ASCII sort.
|
void |
addASCIIOrderByAttribute(java.lang.String attrName,
boolean isAsc,
java.lang.String type)
Specifies an attribute to sort the results list using an ASCII sort.
|
IDfExpressionScope |
addExpressionScope(java.lang.String source)
Adds an expression scope.
|
void |
addFacetDefinition(DfFacetDefinition definition)
Adds a facet definition to this query.
|
IDfLocationQueryScope |
addLocationScope(java.lang.String source,
IDfId locationId,
boolean isDescend,
boolean isExcluded)
Adds a location scope.
|
IDfLocationQueryScope |
addLocationScope(java.lang.String source,
java.lang.String locationPath,
boolean isDescend)
Adds a location scope.
|
IDfLocationQueryScope |
addLocationScope(java.lang.String source,
java.lang.String locationPath,
boolean isDescend,
boolean isExcluded)
Adds a location scope.
|
void |
addMetadataHighlightAttribute(java.lang.String attrName)
Specifies an metadata attribute to highlight.
|
void |
addOrderByAttribute(java.lang.String attrName,
boolean isAsc)
Specifies an attribute to sort the results list.
|
void |
addOrderByAttribute(java.lang.String attrName,
boolean isAsc,
java.util.Locale locale)
Specifies an attribute to sort the results list.
|
void |
addOrderByAttribute(java.lang.String attrName,
boolean isAsc,
java.util.Locale locale,
java.lang.String type)
Specifies an attribute to sort the results list.
|
void |
addOrderByAttribute(java.lang.String attrName,
boolean isAsc,
java.lang.String type)
Specifies an attribute to sort the results list.
|
IDfPartitionScope |
addPartitionScope(java.lang.String source,
java.lang.String partitionName)
Adds a partition scope.
|
void |
addResultAttribute(java.lang.String attrName)
Adds a result attribute.
|
void |
addResultAttribute(java.lang.String attrName,
boolean isRepeating,
int dataType)
Adds a result attribute and forcefully set the repeating attribute.
|
java.lang.Integer |
getAttributeDataType(java.lang.String attrName)
Call this function to get the data type of an attribute.
|
java.lang.String |
getDateFormat()
Retrieves the date format to be used to interpret the Date values.
|
java.lang.Iterable<DfFacetDefinition> |
getFacetsDefinition()
Returns the list of facet definition for this query.
|
java.lang.String |
getLocale()
Return the locale to be used for this particular query.
|
java.lang.Integer |
getMaxHitcount()
Returns the maximum number of results to be counted and returned as the hitcount.
|
java.lang.Integer |
getMaxResultsForFacets()
Returns the maximum number of results used to compute facets.
|
IDfEnumeration |
getMetadataHighlightAttributes()
Provides an enumeration of the metadata highlight attributes as String objects.
|
java.lang.String |
getObjectType()
Retrieves search object type (such as
dm_document ). |
IDfEnumeration |
getOrderByAttributes()
Provides an enumeration of the order attributes as IDfOrderConstraint objects.
|
int |
getResultAttrCount()
Gets the number of result attributes in this query.
|
IDfEnumeration |
getResultAttributes()
Provides an enumeration of the result attributes as String objects.
|
IDfExpressionSet |
getRootExpressionSet()
Provides access to the root expression set of the query.
|
int |
getScopeCount()
Retrieves the query scope count.
|
IDfEnumeration |
getScopes()
Retrieves an enumeration of the query scopes as IDfQueryScope objects.
|
java.lang.Boolean |
isAttributeRepeating(java.lang.String attrName)
Call this function to check if an attribute is repeating or not.
|
boolean |
isCutoffMessageRetrieved()
Indicates if the query needs to retrieve the cutoff message.
|
boolean |
isDatabaseSearchRequested()
Allows to check if RDBMS search semantics are requested.
|
boolean |
isFullTextCompliant()
Checks whether this query builder is full-text compliant.
|
boolean |
isHitcountRetrieved()
Indicates if the query needs to retrieve the hitcount separately : if facets are asked, the hitcount will be returned
even if this method returned false.
|
boolean |
isIncludeAllVersions()
Allows to check if all versions of the objects are expected to be included into the query results.
|
boolean |
isIncludeHiddenObjects()
Allows to check if hidden objects are expected to be included into the query results.
|
boolean |
isRangeAccessSupported()
Indicates if only one part of the matching results can be retrieved, from one lowerbound index to an upperbound one
|
IDfExpressionSet |
newExpressionSet()
Factory method to create an expression set not connected to the query.
|
void |
removeAllOrderByAttributes()
Removes all the order attributes.
|
void |
removeMetadataHighlightAttribute(java.lang.String attrName)
Removes an metadata highlight attribute.
|
void |
removeOrderByAttribute(java.lang.String attrName)
Removes an order attribute.
|
void |
setCutoffMessageRetrieved(boolean cutoffMessageRetrieved)
Sets an option to retrieve the cutoff message.
|
void |
setDatabaseSearchRequested(boolean isRequested)
Sets RDBMS semantics request option for the query.
|
void |
setDateFormat(java.lang.String dateFormat)
Sets the date format to be used to interpret the Date values.
|
void |
setHitcountRetrieved(boolean isHitcountAsked)
Sets an option to retrieve the hitcount
This option is taken into account only if the backend is xPlore.
|
void |
setIncludeAllVersions(boolean isInclude)
Sets an option to include all versions of the objects into the query results.
|
void |
setIncludeHiddenObjects(boolean isInclude)
Sets an option to include hidden objects into the query results.
|
void |
setLocale(java.lang.String locale)
Set a locale to be used for this particular query.
|
void |
setMaxHitcount(java.lang.Integer maxHitcount)
Sets the maximum number of results to be counted and returned as the hitcount.
|
void |
setMaxResultsForFacets(int max)
Sets the maximum number of results to be used to compute facets.
|
void |
setObjectType(java.lang.String objectType)
Sets the object type (such as
dm_document ) for the query. |
void |
setRootExpressionSet(IDfExpressionSet expressionSet)
Sets root expression set for the query.
|
copy, getMaxResultCount, getMaxResultPerSource, getMetadataMgr, getQueryDefinitionType, isQueryBuilder, setMaxResultCount, setMaxResultPerSource
addSelectedSource, clearSelectedSources, getSelectedSourceCount, getSelectedSources, removeSelectedSource
static final java.lang.String OBJ_TYPE_UNDEFINED
static final java.lang.String OBJ_TYPE_DEFAULT
static final java.lang.String DATE_FORMAT_DEFAULT
int getScopeCount()
IDfEnumeration getScopes()
IDfLocationQueryScope addLocationScope(java.lang.String source, java.lang.String locationPath, boolean isDescend) throws DfSearchException, DfException
getLocationPath()
on the IDfLocationQueryScope
returned. Hence it
allows adding a location scope when the source is unavailable, the exception will be thrown and handled when the
query is generated or run.source
- The source scope. It must be a repository.locationPath
- The path scope inside the source repository.isDescend
- Whether the scope includes sub-folders.DfSearchException
- If the source is not a repository.DfException
- If a server error occurs.addLocationScope(String, String, boolean, boolean)
IDfLocationQueryScope addLocationScope(java.lang.String source, java.lang.String locationPath, boolean isDescend, boolean isExcluded) throws DfSearchException, DfException
getLocationPath()
on the IDfLocationQueryScope
returned. Hence it
allows adding a location scope when the source is unavailable, the exception will be thrown and handled when the
query is generated or run.source
- The source scope. It must be a repository.locationPath
- The path scope inside the source repository.isDescend
- Whether the scope includes sub-folders.isExcluded
- Whether the scope should be an excluded scope.DfSearchException
- If the source is not a repository.DfException
- If a server error occurs.addLocationScope(String, String, boolean)
IDfLocationQueryScope addLocationScope(java.lang.String source, IDfId locationId, boolean isDescend, boolean isExcluded) throws DfSearchException, DfException
getLocationPath()
on the IDfLocationQueryScope
returned. Hence it
allows adding a location scope when the source is unavailable, the exception will be thrown and handled when the
query is generated or run.source
- The source scope. It must be a repository.locationId
- The id for the folder inside the source repository.isDescend
- Whether the scope includes sub-folders.isExcluded
- Whether the scope should be an excluded scope.DfSearchException
- If the source is not a repository.DfException
- If a server error occurs.addLocationScope(String, String, boolean)
IDfExpressionScope addExpressionScope(java.lang.String source)
getRootExpressionSet()
)
on either a given Documentum repository source or on all external sources.
To create your expression you first need to create the scope then access its IDfExpressionSet.
IDfExpressionScope
myScope = myQueryBuilder.addExpressionScope(mySource);IDfExpressionSet
expression = myScope.getExpression()
; expression.addFullTextExpression(myFTExpression)
source
- The target source of the scope. Target source can be a Documentum repository or IDfExpressionScope.ALL_ECI_SOURCES for all external sources. The expression is ignored and a warning is issued if the target source is the name of a specific external source.API
.IDfExpressionScope
,
IDfExpressionSet
IDfPartitionScope addPartitionScope(java.lang.String source, java.lang.String partitionName) throws DfSearchException, DfException
source
- the targeted source.partitionName
- the name of the partition.DfSearchException
- If the source is not a repository.DfException
- If a server error occurs.java.lang.String getObjectType()
dm_document
). Only one object type is supported per query.void setObjectType(java.lang.String objectType)
dm_document
) for the query. Only one object type is supported per
query.objectType
- The name of the type.boolean isFullTextCompliant()
true
if this query builder is full-text compliant; false
otherwise.boolean isDatabaseSearchRequested()
true
if RDBMS search semantics are requested.void setDatabaseSearchRequested(boolean isRequested)
isRequested
- boolean isIncludeHiddenObjects()
true
if hidden objects are to be included.void setIncludeHiddenObjects(boolean isInclude)
isInclude
- boolean isIncludeAllVersions()
true
, if all versions are to be included.void setIncludeAllVersions(boolean isInclude)
isInclude
- java.lang.String getDateFormat()
DATE_FORMAT_DEFAULT
void setDateFormat(java.lang.String dateFormat)
dateFormat
- DATE_FORMAT_DEFAULT
IDfExpressionSet getRootExpressionSet()
void setRootExpressionSet(IDfExpressionSet expressionSet)
expressionSet
- An object representing a set of search expressions.IDfExpressionSet newExpressionSet()
getRootExpressionSet()
as a preferred method.int getResultAttrCount()
getResultAttributes()
IDfEnumeration getResultAttributes()
addResultAttribute(String)
void addResultAttribute(java.lang.String attrName)
A result attribute is an attribute to be returned in the results list. A result attribute must be a name of an attribute defined in the object type of this query or a specific attribute as defined below.
"summary" is a specific attribute. It indicates that an extract of the document parts matching the query should be returned for each result. It is not returned if the snapshot is not available (if the indexer is not available or on a pre-5.3 repository).
Note: the attribute 'r_content_size' is deprecated. If it is used as a result attribute, it will be transformed into r_full_content_size in the results list.
Additional attributes may be returned in the results without being specified in the result list. This is the case
for external sources. External sources do not take into account the result attributes specified here.
The attributes returned by external sources are specific to each FS2 Adapter definition.
Several search specific attributes are also systematically added in the results (sequence number, score, source name...).
Results attributes are unique. Adding the same attribute twice only adds it once.
attrName
- Attributes names such as: r_object_id, object_name, summary, i_is_reference.void addResultAttribute(java.lang.String attrName, boolean isRepeating, int dataType)
A result attribute is an attribute to be returned in the results list. A result attribute must be a name of an attribute defined in the object type of this query or a specific attribute as defined below.
"exclusive_string_repeating" is a specific attribute. It indicates that an extract of the document parts matching the query should be returned for each result. It is not returned if the snapshot is not available (if the indexer is not available or on a pre-5.3 repository).
Note: the attribute 'r_content_size' is deprecated. If it is used as a result attribute, it will be transformed into r_full_content_size in the results list.
Additional attributes may be returned in the results without being specified in the result list. This is the case
for external sources. External sources do not take into account the result attributes specified here.
The attributes returned by external sources are specific to each FS2 Adapter definition.
Several search specific attributes are also systematically added in the results (sequence number, score, source name...).
Results attributes are unique. Adding the same attribute twice only adds it once.
attrName
- Attributes names such as: exclusive_string_repeating.isRepeating
- Whether this attribute is repeating. This parameter will override the repeating attribute of a field in object type.dataType
- The repeating data type can be IDfValue.DF_BOOLEAN, IDfValue.DF_DOUBLE, IDfValue.DF_ID, IDfValue.DF_INTEGER, IDfValue.DF_STRING or IDfValue.DF_TIME.java.lang.Boolean isAttributeRepeating(java.lang.String attrName)
attrName
- Attributes names such as: exclusive_string_repeating.java.lang.Integer getAttributeDataType(java.lang.String attrName)
attrName
- Attributes names such as: exclusive_string_repeating.void addOrderByAttribute(java.lang.String attrName, boolean isAsc)
attrName
- the query results are sorted by the attribute attrName.isAsc
- you can sort in ascending or descending order. If this boolean is set to true, the query results is
sorted in ascending order.addOrderByAttribute(String, boolean, java.util.Locale)
,
addASCIIOrderByAttribute(String, boolean)
void addOrderByAttribute(java.lang.String attrName, boolean isAsc, java.lang.String type)
attrName
- the query results are sorted by the attribute attrName.isAsc
- you can sort in ascending or descending order. If this boolean is set to true, the query results is
sorted in ascending order.type
- type of the attribute, may be XMLQueryConstants.ATTR_EXPR_DATA_TYPE_STRING, XMLQueryConstants.ATTR_EXPR_DATA_TYPE_INTEGER or XMLQueryConstants.ATTR_EXPR_DATA_TYPE_DOUBLE.
Type is only supported by xQuery and will be ignored in DQL queries. Type is required ONLY when you need to order by a string field as integer or double.addOrderByAttribute(String, boolean, java.util.Locale)
,
addASCIIOrderByAttribute(String, boolean)
void addOrderByAttribute(java.lang.String attrName, boolean isAsc, java.util.Locale locale)
attrName
- the query results are sorted by the attribute attrName.isAsc
- you can sort in ascending or descending order. If this boolean is set to true, the query results is
sorted in ascending order.locale
- define a specific locale to use to sort the results.
This Locale is only supported by xPlore since 1.3 and is ignored in DQL queries.addOrderByAttribute(String, boolean)
,
addASCIIOrderByAttribute(String, boolean)
void addOrderByAttribute(java.lang.String attrName, boolean isAsc, java.util.Locale locale, java.lang.String type)
attrName
- the query results are sorted by the attribute attrName.isAsc
- you can sort in ascending or descending order. If this boolean is set to true, the query results is
sorted in ascending order.locale
- define a specific locale to use to sort the results.
This Locale is only supported by xPlore since 1.3 and is ignored in DQL queries.type
- type of the attribute, may be XMLQueryConstants.ATTR_EXPR_DATA_TYPE_STRING, XMLQueryConstants.ATTR_EXPR_DATA_TYPE_INTEGER or XMLQueryConstants.ATTR_EXPR_DATA_TYPE_DOUBLE.
Type is only supported by xQuery and will be ignored in DQL queries. Type is required ONLY when you need to order by a string field as integer or double.addOrderByAttribute(String, boolean)
,
addASCIIOrderByAttribute(String, boolean)
void addASCIIOrderByAttribute(java.lang.String attrName, boolean isAsc)
attrName
- the query results are sorted by the attribute attrName.isAsc
- you can sort in ascending or descending order. If this boolean is set to true, the query results is
sorted in ascending order.addOrderByAttribute(String, boolean)
,
addOrderByAttribute(String, boolean, java.util.Locale)
void addASCIIOrderByAttribute(java.lang.String attrName, boolean isAsc, java.lang.String type)
attrName
- the query results are sorted by the attribute attrName.isAsc
- you can sort in ascending or descending order. If this boolean is set to true, the query results is
sorted in ascending order.type
- type of the attribute, may be XMLQueryConstants.ATTR_EXPR_DATA_TYPE_STRING, XMLQueryConstants.ATTR_EXPR_DATA_TYPE_INTEGER or XMLQueryConstants.ATTR_EXPR_DATA_TYPE_DOUBLE.
Type is only supported by xQuery and will be ignored in DQL queries. Type is required ONLY when you need to order by a string field as integer or double.addOrderByAttribute(String, boolean)
,
addOrderByAttribute(String, boolean, java.util.Locale)
void removeOrderByAttribute(java.lang.String attrName)
attrName
- the name of the order attribute to removevoid removeAllOrderByAttributes()
IDfEnumeration getOrderByAttributes()
addOrderByAttribute(String,boolean)
void addFacetDefinition(DfFacetDefinition definition)
java.lang.Iterable<DfFacetDefinition> getFacetsDefinition()
void setMaxResultsForFacets(int max)
java.lang.Integer getMaxResultsForFacets()
boolean isCutoffMessageRetrieved()
true
if the cutoff message should be retrieved.void setCutoffMessageRetrieved(boolean cutoffMessageRetrieved)
cutoffMessageRetrieved
- Whether the cutoff message should be retrieved.boolean isRangeAccessSupported()
true
if there is only one source and if range access is supported by it.boolean isHitcountRetrieved()
true
if the hitcount is retrieved.void setHitcountRetrieved(boolean isHitcountAsked)
isHitcountAsked
- void setMaxHitcount(java.lang.Integer maxHitcount)
java.lang.Integer getMaxHitcount()
void setLocale(java.lang.String locale)
java.lang.String getLocale()
void addMetadataHighlightAttribute(java.lang.String attrName)
attrName
- the highlight metadata attribute attrName.void removeMetadataHighlightAttribute(java.lang.String attrName)
attrName
- the name of the metadata highlight attribute to removeIDfEnumeration getMetadataHighlightAttributes()
#addMetadataHighlightAttribute(String,boolean)
Copyright 1994-2023 OpenText Corporation. All rights reserved.