Interface XPathBasicQuery
-
- All Superinterfaces:
XPathQueryBase
- All Known Subinterfaces:
XPathQuery
public interface XPathBasicQuery extends XPathQueryBase
Provides an interface to basic XPath queries.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XPathBasicQueryaddSort(java.lang.String attribute, boolean ascending)Adds a sort direction.XPathBasicQuerysetAmount(int amount)Sets the maximum number of objects (=page size) to retrieve.XPathBasicQuerysetDepth(int depth)Sets the retrieval depth of this query.XPathBasicQuerysetOffset(int offset)Sets the paging offset for object retrieval.XPathBasicQuerysetVariable(java.lang.String name, boolean value)Sets a variable with a value of typeBooleanXPathBasicQuerysetVariable(java.lang.String name, double value)Sets a variable with a value of typeDoubleXPathBasicQuerysetVariable(java.lang.String name, int value)Sets a variable with a value of typeIntegerXPathBasicQuerysetVariable(java.lang.String name, long value)Sets a variable with a value of typeLongXPathBasicQuerysetVariable(java.lang.String name, IMendixIdentifier identifier)Sets a variable with a value of typeIMendixIdentifierXPathBasicQuerysetVariable(java.lang.String name, IMendixObject object)Sets a variable with a value of typeIMendixObjectXPathBasicQuerysetVariable(java.lang.String name, java.lang.String value)Sets a variable with a value of typeStringXPathBasicQuerysetVariable(java.lang.String name, java.math.BigDecimal value)Sets a variable with a value of typeBigDecimal-
Methods inherited from interface com.mendix.datastorage.XPathQueryBase
execute, executeAggregateDouble, executeAggregateLong, executeRaw, setVariable
-
-
-
-
Method Detail
-
setAmount
XPathBasicQuery setAmount(int amount)
Sets the maximum number of objects (=page size) to retrieve.- Parameters:
amount- the maximum number of objects- Returns:
- the updated query instance
-
setOffset
XPathBasicQuery setOffset(int offset)
Sets the paging offset for object retrieval.- Parameters:
offset- the index of the first object to retrieve- Returns:
- the updated query instance
-
addSort
XPathBasicQuery addSort(java.lang.String attribute, boolean ascending)
Adds a sort direction. This affects the sort of the objects that are retrieved. When multiple sorts are added each subsequent sort objects that are equal according to the earlier values- Parameters:
attribute- the attribute on which should be sortedascending- the direction of the sort. If this value is true it sorts from the smallest value to the largest. If it is false it sorts from the largest value to the smallest.- Returns:
- the updated query instance
-
setDepth
XPathBasicQuery setDepth(int depth)
Sets the retrieval depth of this query. It determines until which level IMendixIdentifiers are resolved to IMendixObjects.- Parameters:
depth- the retrieval depth- Returns:
- the updated query instance
-
setVariable
XPathBasicQuery setVariable(java.lang.String name, java.math.BigDecimal value)
Sets a variable with a value of typeBigDecimalAdds a
BigDecimalvariable In XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.- Specified by:
setVariablein interfaceXPathQueryBase- Parameters:
name- name of variables referenced in the expression (without '$') and their valuesvalue- variable that represents a literalBigDecimalvalue- Returns:
- the updated query instance
-
setVariable
XPathBasicQuery setVariable(java.lang.String name, boolean value)
Sets a variable with a value of typeBooleanIn XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.
- Specified by:
setVariablein interfaceXPathQueryBase- Parameters:
name- name of variables referenced in the expression (without '$') and their valuesvalue- variable that represents a literalBooleanvalue- Returns:
- the updated query instance
-
setVariable
XPathBasicQuery setVariable(java.lang.String name, double value)
Sets a variable with a value of typeDoubleIn XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.
- Specified by:
setVariablein interfaceXPathQueryBase- Parameters:
name- name of variables referenced in the expression (without '$') and their valuesvalue- variable that represents a literalDoublevalue- Returns:
- the updated query instance
-
setVariable
XPathBasicQuery setVariable(java.lang.String name, int value)
Sets a variable with a value of typeIntegerIn XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.
- Specified by:
setVariablein interfaceXPathQueryBase- Parameters:
name- name of variables referenced in the expression (without '$') and their valuesvalue- variable that represents a literalIntegervalue- Returns:
- the updated query instance
-
setVariable
XPathBasicQuery setVariable(java.lang.String name, long value)
Sets a variable with a value of typeLongIn XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.
- Specified by:
setVariablein interfaceXPathQueryBase- Parameters:
name- name of variables referenced in the expression (without '$') and their valuesvalue- variable that represents a literalLongvalue- Returns:
- the updated query instance
-
setVariable
XPathBasicQuery setVariable(java.lang.String name, IMendixObject object)
Sets a variable with a value of typeIMendixObjectIn XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.
- Specified by:
setVariablein interfaceXPathQueryBase- Parameters:
name- name of variables referenced in the expression (without '$') and their valuesobject- variable that represents aIMendixObjectvalue. Will be replaced by it's identifier in the query- Returns:
- the updated query instance
-
setVariable
XPathBasicQuery setVariable(java.lang.String name, IMendixIdentifier identifier)
Sets a variable with a value of typeIMendixIdentifierIn XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.
- Specified by:
setVariablein interfaceXPathQueryBase- Parameters:
name- name of variables referenced in the expression (without '$') and their valuesidentifier- variable that represents an identifier of an object- Returns:
- the updated query instance
-
setVariable
XPathBasicQuery setVariable(java.lang.String name, java.lang.String value)
Sets a variable with a value of typeStringIn XPath queries it is possible to add variables. A variable can be denoted with '$', e.g. a valid query syntax could be '//Entity.Ref[field >= $limit]'.
- Specified by:
setVariablein interfaceXPathQueryBase- Parameters:
name- name of variables referenced in the expression (without '$') and their valuesvalue- variable that represents a literalStringvalue- Returns:
- the updated query instance
-
-