Skip to content

Commit a11c412

Browse files
docs: Remove proprietary references from pagination code and docs
- Replace AssetBO/AssetQuery with generic Product/ProductQuery in Javadoc examples and xdoc documentation - Remove SmartClient references from Javadoc, doc, and test comments; use generic "data grid" instead - Rename "SmartClient startRow/endRow" section to "Grid startRow/endRow Translation" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d9baa0c commit a11c412

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

modules/json/src/org/apache/axis2/json/rpc/PaginatedResponse.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* Cursor pagination requires a stable sort key and stateful server-side
5353
* tokens — added complexity with no benefit when the underlying query is
5454
* already offset-based.</li>
55-
* <li>Frontend grids (SmartClient, AG Grid, React Table) natively speak
55+
* <li>Frontend grids (AG Grid, React Table, etc.) natively speak
5656
* offset/limit via {@code startRow}/{@code endRow} or
5757
* {@code page}/{@code pageSize}. Cursor tokens require client-side
5858
* adaptation.</li>
@@ -64,8 +64,8 @@
6464
*
6565
* <h3>Usage in a service method</h3>
6666
* <pre>{@code
67-
* public PaginatedResponse<AssetBO> findAssets(AssetQuery query) {
68-
* List<AssetBO> items = dao.findList(query.getOffset(), query.getLimit());
67+
* public PaginatedResponse<Product> findProducts(ProductQuery query) {
68+
* List<Product> items = dao.findList(query.getOffset(), query.getLimit());
6969
* long total = dao.count(query);
7070
* return PaginatedResponse.of(items, query.getOffset(), query.getLimit(), total);
7171
* }

modules/json/test/org/apache/axis2/json/rpc/PaginatedResponseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public void testEnterprise_largeEntityList_lastPartialPage() {
270270

271271
@Test
272272
public void testEnterprise_virtualScroll_startRowEndRow() {
273-
// Scenario: SmartClient-style grid sends startRow=300, endRow=350.
273+
// Scenario: data grid sends startRow=300, endRow=350.
274274
// The service translates: offset = startRow, limit = endRow - startRow.
275275
int startRow = 300;
276276
int endRow = 350;

src/site/xdoc/docs/json-pagination.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ map directly to JPA/Hibernate's <code>setFirstResult(offset)</code> and
6363
<p>A typical service method delegates offset/limit to the DAO:</p>
6464

6565
<pre>
66-
public PaginatedResponse&lt;AssetBO&gt; findAssets(AssetQuery query) {
67-
List&lt;AssetBO&gt; items = dao.findList(query.getOffset(), query.getLimit());
66+
public PaginatedResponse&lt;Product&gt; findProducts(ProductQuery query) {
67+
List&lt;Product&gt; items = dao.findList(query.getOffset(), query.getLimit());
6868
long total = dao.count(query);
6969
return PaginatedResponse.of(items, query.getOffset(), query.getLimit(), total);
7070
}
@@ -132,9 +132,9 @@ if (pagination.hasMore) {
132132
}
133133
</pre>
134134

135-
<h3>SmartClient startRow/endRow</h3>
135+
<h3>Grid startRow/endRow Translation</h3>
136136
<pre>
137-
// SmartClient sends startRow=300, endRow=350
137+
// Grid sends startRow=300, endRow=350
138138
// Service translates: offset = startRow, limit = endRow - startRow
139139
int offset = startRow;
140140
int limit = endRow - startRow;
@@ -146,7 +146,7 @@ int limit = endRow - startRow;
146146
<li><strong>DAO compatibility</strong> — existing Hibernate/JPA DAOs use
147147
<code>query.setFirstResult(offset)</code> and <code>query.setMaxResults(limit)</code>.
148148
Cursor pagination requires a stable sort key and stateful server-side tokens.</li>
149-
<li><strong>Frontend grids</strong> — SmartClient, AG Grid, and React Table natively
149+
<li><strong>Frontend grids</strong> — data grids (AG Grid, React Table, etc.) natively
150150
speak offset/limit via <code>startRow</code>/<code>endRow</code> or
151151
<code>page</code>/<code>pageSize</code>.</li>
152152
<li><strong>totalCount</strong> — enables "Showing 1–50 of 1,247" UI patterns
@@ -164,7 +164,7 @@ int limit = endRow - startRow;
164164
<li>Unpaginated convenience factory</li>
165165
<li>Negative offset clamping, zero/negative limit defaults, maxLimit enforcement</li>
166166
<li>Enterprise scenarios: 8,543-item virtual scroll, soft-delete filtering,
167-
service-specific maxLimit, SmartClient startRow/endRow translation</li>
167+
service-specific maxLimit, grid startRow/endRow translation</li>
168168
<li>Request → response round-trip simulation</li>
169169
</ul>
170170

0 commit comments

Comments
 (0)