• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

smartsheet / smartsheet-java-sdk / #69

09 Oct 2026 07:01AM UTC coverage: 60.094% (+0.4%) from 59.734%
#69

push

github

web-flow
Merge pull request #195 from jhinkey-smartsheet/jim.hinkey/document-checking-children-type

Describe the items of the TokenPaginatedResult returned by  getWorkspaceChildren and getFolderChildren

4626 of 7698 relevant lines covered (60.09%)

0.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.42
/src/main/java/com/smartsheet/api/models/AbstractRow.java
1
/*
2
 * Copyright (C) 2025 Smartsheet
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package com.smartsheet.api.models;
18

19
import com.fasterxml.jackson.annotation.JsonIgnore;
20
import com.smartsheet.api.models.enums.AccessLevel;
21
import com.smartsheet.api.models.format.Format;
22

23
import java.util.Date;
24
import java.util.List;
25

26
public abstract class AbstractRow<TColumn extends Column, TCell extends Cell> extends IdentifiableModel<Long> {
1 ✔
27
    @Override
28
    @JsonIgnore(false)
29
    public Long getId() {
30
        return super.getId();
1 ✔
31
    }
32

33
    @Override
34
    @JsonIgnore(false)
35
    public IdentifiableModel<Long> setId(Long id) {
36
        super.setId(id);
1 ✔
37
        return this;
1 ✔
38
    }
39

40
    @JsonIgnore
41
    public Long getRowId() {
42
        return super.getId();
1 ✔
43
    }
44

45
    /**
46
     * Set the Row ID
47
     */
48
    @JsonIgnore
49
    @SuppressWarnings("unchecked")
50
    public <T extends AbstractRow<TColumn, TCell>> T setRowId(Long id) {
51
        super.setId(id);
1 ✔
52
        return (T) this;
1 ✔
53
    }
54

55
    /**
56
     * Represents the Sheet ID.
57
     */
58
    private Long sheetId;
59

60
    /**
61
     * Represents the row number.
62
     */
63
    private Integer rowNumber;
64

65
    /**
66
     * Represents the parent row number.
67
     */
68
    private Integer parentRowNumber;
69

70
    /**
71
     * Represents the cells for this row.
72
     */
73
    private List<TCell> cells;
74

75
    /**
76
     * Represents the discussions for this row.
77
     */
78
    private List<Discussion> discussions;
79

80
    /**
81
     * Represents the attachments for this row.
82
     */
83
    private List<Attachment> attachments;
84

85
    /**
86
     * Represents the proof for this row.
87
     */
88
    private Proof proof;
89

90
    /**
91
     * Represents the columns for this row.
92
     */
93
    private List<TColumn> columns;
94

95
    /**
96
     * Represents the date and time the row was created.
97
     */
98
    private Date createdAt;
99

100
    /**
101
     * Represents the date and time the row was modified.
102
     */
103
    private Date modifiedAt;
104

105
    /**
106
     * A read-only flag to indicate if the row is expanded or collapsed.
107
     */
108
    private Boolean expanded;
109

110
    /**
111
     * The version number that is incremented every time a sheet is modified.
112
     */
113
    private Integer version;
114

115
    /**
116
     * The user's permissions on the sheet.
117
     */
118
    private AccessLevel accessLevel;
119

120
    /**
121
     * Indicates if the row is locked. Defaults to false
122
     **/
123
    private Boolean locked;
124

125
    /**
126
     * Indicates if the row is locked for the current user. Defaults to false.
127
     **/
128
    private Boolean lockedForUser;
129

130
    /**
131
     * Represents the {@link Format} for this cell.
132
     */
133
    private Format format;
134

135
    /**
136
     * Represents the parent row ID.
137
     */
138
    private Long parentId;
139

140
    /**
141
     * Represents the sibling row ID
142
     */
143
    private Long siblingId;
144

145
    /**
146
     * Represents the URL to the row of the sheet
147
     */
148
    private String permalink;
149

150
    /**
151
     * Indicates if the row is filtered out by a column filter
152
     */
153
    private Boolean filteredOut;
154

155
    /**
156
     * Indicates if the sheet is a project sheet with dependencies enabled and this row is in the critical path
157
     */
158
    private Boolean inCriticalPath;
159

160
    /**
161
     * Represents the conditional {@link Format} for this row.
162
     */
163
    private Format conditionalFormat;
164

165
    /**
166
     * Indicates if the row should be put at the top of the sheet
167
     */
168
    private Boolean toTop;
169

170
    /**
171
     * Indicates if the row should be put at the bottom of the sheet
172
     */
173
    private Boolean toBottom;
174

175
    /**
176
     * Indicates if the row should be put above the specified sibling row
177
     */
178
    private Boolean above;
179

180
    /**
181
     * Indent a row (applicable for update only)
182
     */
183
    private Integer indent;
184

185
    /**
186
     * Outdent a row (applicable for update only)
187
     */
188
    private Integer outdent;
189

190
    /**
191
     * User object containing name and email of the creator of this row
192
     */
193
    private User createdBy;
194

195
    /**
196
     * User object containing name and email of the last person to modify this row
197
     */
198
    private User modifiedBy;
199

200
    /**
201
     * Gets the user's permissions on the sheet.
202
     *
203
     * @return the access level
204
     */
205
    public AccessLevel getAccessLevel() {
206
        return accessLevel;
1 ✔
207
    }
208

209
    /**
210
     * Sets the user's permissions on the sheet.
211
     *
212
     * @param accessLevel the new access level
213
     */
214
    @SuppressWarnings("unchecked")
215
    public <T extends AbstractRow<TColumn, TCell>> T setAccessLevel(AccessLevel accessLevel) {
216
        this.accessLevel = accessLevel;
1 ✔
217
        return (T) this;
1 ✔
218
    }
219

220
    /**
221
     * Gets the version number that is incremented every time a sheet is modified.
222
     *
223
     * @return the version
224
     */
225
    public Integer getVersion() {
226
        return version;
1 ✔
227
    }
228

229
    /**
230
     * Sets the version number that is incremented every time a sheet is modified..
231
     *
232
     * @param version the new version
233
     */
234
    @SuppressWarnings("unchecked")
235
    public <T extends AbstractRow<TColumn, TCell>> T setVersion(Integer version) {
236
        this.version = version;
×
237
        return (T) this;
×
238
    }
239

240
    /**
241
     * Checks if the row is expanded.
242
     *
243
     * @return true, if is expanded
244
     */
245
    public Boolean isExpanded() {
246
        return expanded;
1 ✔
247
    }
248

249
    /**
250
     * Sets the row to be expanded.
251
     *
252
     * @param expanded the new expanded
253
     */
254
    @SuppressWarnings("unchecked")
255
    public <T extends AbstractRow<TColumn, TCell>> T setExpanded(Boolean expanded) {
256
        this.expanded = expanded;
1 ✔
257
        return (T) this;
1 ✔
258
    }
259

260
    /**
261
     * Get a column by it's index.
262
     *
263
     * @param index the column index
264
     * @return the column by index
265
     */
266
    public TColumn getColumnByIndex(int index) {
267
        if (columns == null) {
1 ✔
268
            return null;
1 ✔
269
        }
270
        return columns.stream().filter(column -> column.getIndex() == index).findFirst().orElse(null);
1 ✔
271
    }
272

273
    /**
274
     * Get a column by it's ID.
275
     *
276
     * @param columnId the column id
277
     * @return the column by id
278
     */
279
    public TColumn getColumnById(long columnId) {
280
        if (columns == null) {
1 ✔
281
            return null;
1 ✔
282
        }
283
        return columns.stream().filter(column -> column.getId() == columnId).findFirst().orElse(null);
1 ✔
284
    }
285

286
    /**
287
     * Gets the id of the sheet.
288
     *
289
     * @return the sheet id
290
     */
291
    public Long getSheetId() {
292
        return sheetId;
1 ✔
293
    }
294

295
    /**
296
     * Sets the sheet id.
297
     *
298
     * @param sheetId the new sheet id
299
     */
300
    @SuppressWarnings("unchecked")
301
    public <T extends AbstractRow<TColumn, TCell>> T setSheetId(Long sheetId) {
302
        this.sheetId = sheetId;
1 ✔
303
        return (T) this;
1 ✔
304
    }
305

306
    /**
307
     * Gets the row number.
308
     *
309
     * @return the row number
310
     */
311
    public Integer getRowNumber() {
312
        return rowNumber;
1 ✔
313
    }
314

315
    /**
316
     * Sets the row number.
317
     *
318
     * @param rowNumber the new row number
319
     */
320
    @SuppressWarnings("unchecked")
321
    public <T extends AbstractRow<TColumn, TCell>> T setRowNumber(Integer rowNumber) {
322
        this.rowNumber = rowNumber;
1 ✔
323
        return (T) this;
1 ✔
324
    }
325

326
    /**
327
     * Gets the parent row number.
328
     *
329
     * @return the parent row number
330
     */
331
    public Integer getParentRowNumber() {
332
        return parentRowNumber;
1 ✔
333
    }
334

335
    /**
336
     * Sets the parent row number.
337
     *
338
     * @param parentRowNumber the new parent row number
339
     */
340
    @SuppressWarnings("unchecked")
341
    public <T extends AbstractRow<TColumn, TCell>> T setParentRowNumber(Integer parentRowNumber) {
342
        this.parentRowNumber = parentRowNumber;
×
343
        return (T) this;
×
344
    }
345

346
    /**
347
     * Gets the cells.
348
     *
349
     * @return the cells
350
     */
351
    public List<TCell> getCells() {
352
        return cells;
1 ✔
353
    }
354

355
    /**
356
     * Sets the cells.
357
     *
358
     * @param cells the new cells
359
     */
360
    @SuppressWarnings("unchecked")
361
    public <T extends AbstractRow<TColumn, TCell>> T setCells(List<TCell> cells) {
362
        this.cells = cells;
1 ✔
363
        return (T) this;
1 ✔
364
    }
365

366
    /**
367
     * Gets the discussions.
368
     *
369
     * @return the discussions
370
     */
371
    public List<Discussion> getDiscussions() {
372
        return discussions;
1 ✔
373
    }
374

375
    /**
376
     * Sets the discussions.
377
     *
378
     * @param discussions the new discussions
379
     */
380
    @SuppressWarnings("unchecked")
381
    public <T extends AbstractRow<TColumn, TCell>> T setDiscussions(List<Discussion> discussions) {
382
        this.discussions = discussions;
1 ✔
383
        return (T) this;
1 ✔
384
    }
385

386
    /**
387
     * Gets the attachments.
388
     *
389
     * @return the attachments
390
     */
391
    public List<Attachment> getAttachments() {
392
        return attachments;
1 ✔
393
    }
394

395
    /**
396
     * Sets the attachments.
397
     *
398
     * @param attachments the new attachments
399
     */
400
    @SuppressWarnings("unchecked")
401
    public <T extends AbstractRow<TColumn, TCell>> T setAttachments(List<Attachment> attachments) {
402
        this.attachments = attachments;
1 ✔
403
        return (T) this;
1 ✔
404
    }
405

406
    /**
407
     * Gets the proof.
408
     *
409
     * @return the proof
410
     */
411
    public Proof getProof() {
412
        return proof;
1 ✔
413
    }
414

415
    /**
416
     * Sets the proof.
417
     *
418
     * @param proof the new proof
419
     */
420
    @SuppressWarnings("unchecked")
421
    public <T extends AbstractRow<TColumn, TCell>> T setProof(Proof proof) {
422
        this.proof = proof;
1 ✔
423
        return (T) this;
1 ✔
424
    }
425

426
    /**
427
     * Gets the columns.
428
     *
429
     * @return the columns
430
     */
431
    public List<TColumn> getColumns() {
432
        return columns;
1 ✔
433
    }
434

435
    /**
436
     * Sets the columns.
437
     *
438
     * @param columns the new columns
439
     */
440
    @SuppressWarnings("unchecked")
441
    public <T extends AbstractRow<TColumn, TCell>> T setColumns(List<TColumn> columns) {
442
        this.columns = columns;
1 ✔
443
        return (T) this;
1 ✔
444
    }
445

446
    /**
447
     * Gets the date and time a row was created.
448
     *
449
     * @return the created at
450
     */
451
    public Date getCreatedAt() {
452
        return createdAt;
1 ✔
453
    }
454

455
    /**
456
     * Sets the date and time a row was created.
457
     *
458
     * @param createdAt the new created at
459
     */
460
    @SuppressWarnings("unchecked")
461
    public <T extends AbstractRow<TColumn, TCell>> T setCreatedAt(Date createdAt) {
462
        this.createdAt = createdAt;
1 ✔
463
        return (T) this;
1 ✔
464
    }
465

466
    /**
467
     * Gets the date and time a row was modified.
468
     *
469
     * @return the modified at
470
     */
471
    public Date getModifiedAt() {
472
        return modifiedAt;
1 ✔
473
    }
474

475
    /**
476
     * Sets the date and time a row was modified.
477
     *
478
     * @param modifiedAt the new modified at
479
     */
480
    @SuppressWarnings("unchecked")
481
    public <T extends AbstractRow<TColumn, TCell>> T setModifiedAt(Date modifiedAt) {
482
        this.modifiedAt = modifiedAt;
1 ✔
483
        return (T) this;
1 ✔
484
    }
485

486
    /**
487
     * Indicates whether a row is locked or not.
488
     *
489
     * @return the locked status
490
     */
491
    public Boolean isLocked() {
492
        return locked;
1 ✔
493
    }
494

495
    /**
496
     * @param locked the locked status
497
     */
498
    @SuppressWarnings("unchecked")
499
    public <T extends AbstractRow<TColumn, TCell>> T setLocked(Boolean locked) {
500
        this.locked = locked;
1 ✔
501
        return (T) this;
1 ✔
502
    }
503

504
    /**
505
     * Indicates whether a row is locked for the user. Users cannot modify rows that are locked for them.
506
     *
507
     * @return the lock status for the user
508
     */
509
    public Boolean isLockedForUser() {
510
        return lockedForUser;
1 ✔
511
    }
512

513
    /**
514
     * Set locked For User
515
     */
516
    @SuppressWarnings("unchecked")
517
    public <T extends AbstractRow<TColumn, TCell>> T setLockedForUser(Boolean lockedForUser) {
518
        this.lockedForUser = lockedForUser;
×
519
        return (T) this;
×
520
    }
521

522
    /**
523
     * @return the {@link Format}
524
     */
525
    public Format getFormat() {
526
        return format;
1 ✔
527
    }
528

529
    /**
530
     * @param format the {@link Format} to set
531
     */
532
    @SuppressWarnings("unchecked")
533
    public <T extends AbstractRow<TColumn, TCell>> T setFormat(Format format) {
534
        this.format = format;
1 ✔
535
        return (T) this;
1 ✔
536
    }
537

538
    /**
539
     * Gets the row's parent ID.
540
     *
541
     * @return the ID of the parent
542
     */
543
    public Long getParentId() {
544
        return parentId;
1 ✔
545
    }
546

547
    /**
548
     * Sets the parent row id.
549
     *
550
     * @param parentId the parent row id
551
     */
552
    @SuppressWarnings("unchecked")
553
    public <T extends AbstractRow<TColumn, TCell>> T setParentId(Long parentId) {
554
        this.parentId = parentId;
1 ✔
555
        return (T) this;
1 ✔
556
    }
557

558
    /**
559
     * Gets the row's sibling ID.
560
     *
561
     * @return the ID of the sibling
562
     */
563
    public Long getSiblingId() {
564
        return siblingId;
1 ✔
565
    }
566

567
    /**
568
     * Sets the sibling row id.
569
     *
570
     * @param siblingId the sibling row id
571
     */
572
    @SuppressWarnings("unchecked")
573
    public <T extends AbstractRow<TColumn, TCell>> T setSiblingId(Long siblingId) {
574
        this.siblingId = siblingId;
1 ✔
575
        return (T) this;
1 ✔
576
    }
577

578
    /**
579
     * Gets the row's permalink URL.
580
     *
581
     * @return the permalink URL of the row
582
     */
583
    public String getPermalink() {
584
        return permalink;
1 ✔
585
    }
586

587
    /**
588
     * Sets the parmalink URL.
589
     *
590
     * @param permalink the URL to the row
591
     */
592
    @SuppressWarnings("unchecked")
593
    public <T extends AbstractRow<TColumn, TCell>> T setPermalink(String permalink) {
594
        this.permalink = permalink;
×
595
        return (T) this;
×
596
    }
597

598
    /**
599
     * Check if the row is filtered out
600
     *
601
     * @return true, if it is filtered out
602
     */
603
    public Boolean isFilteredOut() {
604
        return filteredOut;
1 ✔
605
    }
606

607
    /**
608
     * Sets the row to be filtered out.
609
     *
610
     * @param filteredOut if the row is filtered out
611
     */
612
    @SuppressWarnings("unchecked")
613
    public <T extends AbstractRow<TColumn, TCell>> T setFilteredOut(Boolean filteredOut) {
614
        this.filteredOut = filteredOut;
×
615
        return (T) this;
×
616
    }
617

618
    /**
619
     * Check if the row is in critical path
620
     *
621
     * @return true, if it is in critical path
622
     */
623
    public Boolean isInCriticalPath() {
624
        return inCriticalPath;
1 ✔
625
    }
626

627
    /**
628
     * Sets the row to be in critical path.
629
     *
630
     * @param inCriticalPath if the row is in critical path
631
     */
632
    @SuppressWarnings("unchecked")
633
    public <T extends AbstractRow<TColumn, TCell>> T setInCriticalPath(Boolean inCriticalPath) {
634
        this.inCriticalPath = inCriticalPath;
×
635
        return (T) this;
×
636
    }
637

638
    /**
639
     * @return the conditional {@link Format}
640
     */
641
    public Format getConditionalFormat() {
642
        return conditionalFormat;
1 ✔
643
    }
644

645
    /**
646
     * Sets the conditional format of the row.
647
     *
648
     * @param conditionalFormat the conditional format
649
     */
650
    @SuppressWarnings("unchecked")
651
    public <T extends AbstractRow<TColumn, TCell>> T setConditionalFormat(Format conditionalFormat) {
652
        this.conditionalFormat = conditionalFormat;
×
653
        return (T) this;
×
654
    }
655

656
    /**
657
     * Gets the to top.
658
     *
659
     * @return true, if row should be at the top
660
     */
661
    public Boolean getToTop() {
662
        return toTop;
1 ✔
663
    }
664

665
    /**
666
     * Sets the to top
667
     *
668
     * @param toTop if the row is to the top
669
     */
670
    @SuppressWarnings("unchecked")
671
    public <T extends AbstractRow<TColumn, TCell>> T setToTop(Boolean toTop) {
672
        this.toTop = toTop;
1 ✔
673
        return (T) this;
1 ✔
674
    }
675

676
    /**
677
     * Gets the to bottom.
678
     *
679
     * @return true, if row should be at the bottom
680
     */
681
    public Boolean getToBottom() {
682
        return toBottom;
1 ✔
683
    }
684

685
    /**
686
     * Sets the to bottom
687
     *
688
     * @param toBottom if the row is to the bottom
689
     */
690
    @SuppressWarnings("unchecked")
691
    public <T extends AbstractRow<TColumn, TCell>> T setToBottom(Boolean toBottom) {
692
        this.toBottom = toBottom;
1 ✔
693
        return (T) this;
1 ✔
694
    }
695

696
    /**
697
     * Gets the above.
698
     *
699
     * @return true, if row should be above the specified sibling ID
700
     */
701
    public Boolean getAbove() {
702
        return above;
1 ✔
703
    }
704

705
    /**
706
     * Sets the above
707
     *
708
     * @param above if the row is above a specified row
709
     */
710
    @SuppressWarnings("unchecked")
711
    public <T extends AbstractRow<TColumn, TCell>> T setAbove(Boolean above) {
712
        this.above = above;
1 ✔
713
        return (T) this;
1 ✔
714
    }
715

716
    /**
717
     * Get integer value specifying the number of levels to indent this row (update only).
718
     *
719
     * @return value specifying the number of levels to indent this row
720
     */
721
    public Integer getIndent() {
722
        return indent;
1 ✔
723
    }
724

725
    /**
726
     * Sets integer value specifying the number of levels to indent this row (update only).
727
     *
728
     * @param indent integer value specifying the number of levels to indent
729
     */
730
    @SuppressWarnings("unchecked")
731
    public <T extends AbstractRow<TColumn, TCell>> T setIndent(Integer indent) {
732
        this.indent = indent;
1 ✔
733
        return (T) this;
1 ✔
734
    }
735

736
    /**
737
     * Get integer value specifying the number of levels to outdent this row (update only).
738
     *
739
     * @return value specifying the number of levels to outdent this row
740
     */
741
    public Integer getOutdent() {
742
        return outdent;
1 ✔
743
    }
744

745
    /**
746
     * Sets integer value specifying the number of levels to outdent this row (update only).
747
     *
748
     * @param outdent integer value specifying number of levels to outdent
749
     */
750
    @SuppressWarnings("unchecked")
751
    public <T extends AbstractRow<TColumn, TCell>> T setOutdent(Integer outdent) {
752
        this.outdent = outdent;
1 ✔
753
        return (T) this;
1 ✔
754
    }
755

756
    /**
757
     * Gets the User object containing name and email of the creator of this row.
758
     *
759
     * @return User object
760
     */
761
    public User getCreatedBy() {
762
        return createdBy;
1 ✔
763
    }
764

765
    /**
766
     * Gets the User object containing name and email of the last person to modify this row.
767
     *
768
     * @return User object
769
     */
770
    public User getModifiedBy() {
771
        return modifiedBy;
1 ✔
772
    }
773
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc