• 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

80.0
/src/main/java/com/smartsheet/api/models/ReportColumn.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.smartsheet.api.models.enums.ColumnType;
20
import com.smartsheet.api.models.enums.Symbol;
21
import com.smartsheet.api.models.enums.SystemColumnType;
22
import com.smartsheet.api.models.format.Format;
23

24
import java.util.List;
25

26
/**
27
 * Represents the “virtual” Column object for Report.
28
 */
29
public class ReportColumn extends Column {
1 ✔
30

31
    /**
32
     * Represents the virtual ID of the report column.
33
     */
34
    private Long virtualId;
35

36
    /**
37
     * Represents the special “Sheet Name” report column (value = “true”).
38
     */
39
    private boolean sheetNameColumn;
40

41
    /**
42
     * Gets the sheet name for the column.
43
     *
44
     * @return the sheet name
45
     */
46
    public boolean getSheetNameColumn() {
47
        return sheetNameColumn;
1 ✔
48
    }
49

50
    /**
51
     * Sets the sheet name for the column.
52
     *
53
     * @param sheetNameColumn the sheetname for column
54
     */
55
    public ReportColumn setSheetNameColumn(boolean sheetNameColumn) {
56
        this.sheetNameColumn = sheetNameColumn;
1 ✔
57
        return this;
1 ✔
58
    }
59

60
    /**
61
     * Gets the virtual id for the column.
62
     *
63
     * @return the virtual id
64
     */
65
    public Long getVirtualId() {
66
        return virtualId;
1 ✔
67
    }
68

69
    /**
70
     * Sets the virtual id for the column.
71
     *
72
     * @param virtualId the virtual id
73
     */
74

75
    public ReportColumn setVirtualId(Long virtualId) {
76
        this.virtualId = virtualId;
1 ✔
77
        return this;
1 ✔
78
    }
79

80
    /**
81
     * A convenience class to help create a ReportColumn object with the appropriate fields for adding to a report.
82
     */
83
    public static class AddReportColumnBuilder {
1 ✔
84
        private String title;
85
        private Integer index;
86
        private ColumnType type;
87
        private List<String> options;
88
        private Symbol symbol;
89
        private SystemColumnType systemColumnType;
90
        private AutoNumberFormat autoNumberFormat;
91
        private Integer width;
92
        private Boolean primary;
93
        private Format format;
94
        private Boolean validation;
95
        private boolean sheetNameColumn;
96

97
        /**
98
         * Sets the title for the column.
99
         *
100
         * @param title the title
101
         * @return the AddReportColumnBuilder
102
         */
103
        public AddReportColumnBuilder setTitle(String title) {
104
            this.title = title;
1 ✔
105
            return this;
1 ✔
106
        }
107

108
        /**
109
         * Gets the title.
110
         *
111
         * @return the title
112
         */
113
        public String getTitle() {
114
            return title;
×
115
        }
116

117
        /**
118
         * Sets the index for the column.
119
         *
120
         * @param index the index
121
         * @return the AddReportColumnBuilder
122
         */
123
        public AddReportColumnBuilder setIndex(Integer index) {
124
            this.index = index;
1 ✔
125
            return this;
1 ✔
126
        }
127

128
        /**
129
         * Gets the index.
130
         *
131
         * @return the index
132
         */
133
        public Integer getIndex() {
134
            return index;
×
135
        }
136

137
        /**
138
         * Sets the type for the column.
139
         *
140
         * @param type the type
141
         * @return the AddReportColumnBuilder
142
         */
143
        public AddReportColumnBuilder setType(ColumnType type) {
144
            this.type = type;
1 ✔
145
            return this;
1 ✔
146
        }
147

148
        /**
149
         * Gets the type.
150
         *
151
         * @return the type
152
         */
153
        public ColumnType getType() {
154
            return type;
×
155
        }
156

157
        /**
158
         * Sets the options for the column.
159
         *
160
         * @param options the options
161
         * @return the AddReportColumnBuilder
162
         */
163
        public AddReportColumnBuilder setOptions(List<String> options) {
164
            this.options = options;
1 ✔
165
            return this;
1 ✔
166
        }
167

168
        /**
169
         * Gets the options.
170
         *
171
         * @return the options
172
         */
173
        public List<String> getOptions() {
174
            return options;
×
175
        }
176

177
        /**
178
         * Sets the symbol for the column.
179
         *
180
         * @param symbol the symbol
181
         * @return the AddReportColumnBuilder
182
         */
183
        public AddReportColumnBuilder setSymbol(Symbol symbol) {
184
            this.symbol = symbol;
1 ✔
185
            return this;
1 ✔
186
        }
187

188
        /**
189
         * Gets the symbol.
190
         *
191
         * @return the symbol
192
         */
193
        public Symbol getSymbol() {
194
            return symbol;
×
195
        }
196

197
        /**
198
         * Sets the system column type.
199
         *
200
         * @param systemColumnType the system column type
201
         * @return the AddReportColumnBuilder
202
         */
203
        public AddReportColumnBuilder setSystemColumnType(SystemColumnType systemColumnType) {
204
            this.systemColumnType = systemColumnType;
1 ✔
205
            return this;
1 ✔
206
        }
207

208
        /**
209
         * Gets the system column type.
210
         *
211
         * @return the system column type
212
         */
213
        public SystemColumnType getSystemColumnType() {
214
            return systemColumnType;
×
215
        }
216

217
        /**
218
         * Sets the format for an auto number column.
219
         *
220
         * @param autoNumberFormat the auto number format
221
         * @return the AddReportColumnBuilder
222
         */
223
        public AddReportColumnBuilder setAutoNumberFormat(AutoNumberFormat autoNumberFormat) {
224
            this.autoNumberFormat = autoNumberFormat;
1 ✔
225
            return this;
1 ✔
226
        }
227

228
        /**
229
         * Gets the auto number format.
230
         *
231
         * @return the auto number format
232
         */
233
        public AutoNumberFormat getAutoNumberFormat() {
234
            return autoNumberFormat;
×
235
        }
236

237
        /**
238
         * Sets the width for the column.
239
         *
240
         * @param width the width
241
         * @return the AddReportColumnBuilder
242
         */
243
        public AddReportColumnBuilder setWidth(Integer width) {
244
            this.width = width;
1 ✔
245
            return this;
1 ✔
246
        }
247

248
        /**
249
         * Gets the width.
250
         *
251
         * @return the width
252
         */
253
        public Integer getWidth() {
254
            return width;
×
255
        }
256

257
        /**
258
         * Sets the primary flag for the column.
259
         *
260
         * @param primary the primary flag
261
         * @return the AddReportColumnBuilder
262
         */
263
        public AddReportColumnBuilder setPrimary(Boolean primary) {
264
            this.primary = primary;
1 ✔
265
            return this;
1 ✔
266
        }
267

268
        /**
269
         * Gets the primary flag.
270
         *
271
         * @return the primary flag
272
         */
273
        public Boolean getPrimary() {
274
            return primary;
×
275
        }
276

277
        /**
278
         * Sets the format for the column.
279
         *
280
         * @param format the format
281
         * @return the AddReportColumnBuilder
282
         */
283
        public AddReportColumnBuilder setFormat(Format format) {
284
            this.format = format;
1 ✔
285
            return this;
1 ✔
286
        }
287

288
        /**
289
         * Gets the format.
290
         *
291
         * @return the format
292
         */
293
        public Format getFormat() {
294
            return format;
×
295
        }
296

297
        /**
298
         * Sets the validation flag for the column.
299
         *
300
         * @param validation the validation flag
301
         * @return the AddReportColumnBuilder
302
         */
303
        public AddReportColumnBuilder setValidation(Boolean validation) {
304
            this.validation = validation;
1 ✔
305
            return this;
1 ✔
306
        }
307

308
        /**
309
         * Gets the validation flag.
310
         *
311
         * @return the validation flag
312
         */
313
        public Boolean getValidation() {
314
            return validation;
×
315
        }
316

317
        /**
318
         * Sets the sheet name column flag.
319
         *
320
         * @param sheetNameColumn the sheet name column flag
321
         * @return the AddReportColumnBuilder
322
         */
323
        public AddReportColumnBuilder setSheetNameColumn(boolean sheetNameColumn) {
324
            this.sheetNameColumn = sheetNameColumn;
1 ✔
325
            return this;
1 ✔
326
        }
327

328
        /**
329
         * Gets the sheet name column flag.
330
         *
331
         * @return the sheet name column flag
332
         */
333
        public boolean getSheetNameColumn() {
334
            return sheetNameColumn;
×
335
        }
336

337
        /**
338
         * Builds the ReportColumn.
339
         *
340
         * @return the ReportColumn
341
         */
342
        public ReportColumn build() {
343
            if (title == null || type == null) {
1 ✔
344
                throw new InstantiationError();
1 ✔
345
            }
346

347
            ReportColumn column = new ReportColumn();
1 ✔
348
            column.setTitle(title);
1 ✔
349
            column.setType(type);
1 ✔
350
            column.setIndex(index);
1 ✔
351
            column.setOptions(options);
1 ✔
352
            column.setSymbol(symbol);
1 ✔
353
            column.setSystemColumnType(systemColumnType);
1 ✔
354
            column.setAutoNumberFormat(autoNumberFormat);
1 ✔
355
            column.setWidth(width);
1 ✔
356
            column.setPrimary(primary);
1 ✔
357
            column.setFormat(format);
1 ✔
358
            column.setValidation(validation);
1 ✔
359
            column.setSheetNameColumn(sheetNameColumn);
1 ✔
360
            return column;
1 ✔
361
        }
362
    }
363
}
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