Difference between revisions of "GetRecordCount"
From LongJump Support Wiki
imported>Aeric |
imported>Aeric |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:getRecordCount}} | {{DISPLAYTITLE:getRecordCount}} | ||
Gets a count of records in {{#ifeq: {{PAGENAME}}|Java API:Composite Objects|a [[Composite Object]]|an Object}} that match specified filtering criteria. | Gets a count of records in {{#ifeq: {{PAGENAME}}|Java API:Composite Objects|a [[Composite Object]]|an Object}} that match specified filtering criteria. | ||
<!-- SHOULD NO LONGER BE TRUE. REMOVE WHEN Suresh | <!-- SHOULD NO LONGER BE TRUE. REMOVE WHEN VERIFIED BY Suresh. (promised 29 Sep 2011) | ||
{{Note|This operation is only available for composite objects, at the moment, so the filtering criteria must include at least one <i>composite-object field</i>, of the form <tt>alias[...].field_name</tt>.) For example: <tt>order_items.products.product_name</tt>. (The presence of the composite-object field induces composite-object processing, instead of normal-object processing.)}} | {{Note|This operation is only available for composite objects, at the moment, so the filtering criteria must include at least one <i>composite-object field</i>, of the form <tt>alias[...].field_name</tt>.) For example: <tt>order_items.products.product_name</tt>. (The presence of the composite-object field induces composite-object processing, instead of normal-object processing.)}} | ||
--> | --> | ||
;Syntax: | ;Syntax: | ||
:<syntaxhighlight lang="java" enclose="div"> | :<syntaxhighlight lang="java" enclose="div"> | ||
int count = Functions.getRecordCount(String | int count = Functions.getRecordCount(String objectName, String criteria); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
;Parameters: | ;Parameters: | ||
:; | :;objectName:The object name or identifier | ||
:;criteria:A [[JAVA API:Filter Expressions in JAVA APIs|filter expression]] that specifies records to select{{#ifeq: {{PAGENAME}}|Java API:Composite Objects|, where a field name of the form <tt>alias[.alias...].*</tt> or <tt>alias[.alias...].field</tt> indicates a [[Composite Object]] search|}}. | :;criteria:A [[JAVA API:Filter Expressions in JAVA APIs|filter expression]] that specifies records to select{{#ifeq: {{PAGENAME}}|Java API:Composite Objects|, where a field name of the form <tt>alias[.alias...].*</tt> or <tt>alias[.alias...].field</tt> indicates a [[Composite Object]] search|}}. | ||
Latest revision as of 18:34, 30 September 2011
Gets a count of records in an Object that match specified filtering criteria.
- Syntax
int count = Functions.getRecordCount(String objectName, String criteria);
- Parameters
-
- objectName
- The object name or identifier
- criteria
- A filter expression that specifies records to select.
- Returns
- An integer containing a count of records that match the selection criteria.