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

smartsheet / smartsheet-java-sdk / #55

02 Oct 2024 07:40PM UTC coverage: 60.548% (+0.7%) from 59.836%
#55

push

github

web-flow
Release prep for 3.2.1 (#103)

4156 of 6864 relevant lines covered (60.55%)

0.61 hits per line

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

39.26
/src/main/java/com/smartsheet/api/models/Column.java
1
/*
2
 * Copyright (C) 2024 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.ColumnTag;
20
import com.smartsheet.api.models.enums.ColumnType;
21
import com.smartsheet.api.models.enums.Symbol;
22
import com.smartsheet.api.models.enums.SystemColumnType;
23
import com.smartsheet.api.models.format.Format;
24

25
import java.util.List;
26

27
/**
28
 * Represents the Column object.
29
 */
30
public class Column extends IdentifiableModel<Long> {
31

32
    /**
33
     * Represents the system column type.
34
     */
35
    private SystemColumnType systemColumnType;
36

37
    /**
38
     * Represents the column type.
39
     */
40
    private ColumnType type;
41

42
    /**
43
     * Represents the format for the auto generated numbers (if the SystemColumnType is an AUTO_NUMBER).
44
     */
45
    private AutoNumberFormat autoNumberFormat;
46

47
    /**
48
     * List containing contact options
49
     */
50
    private List<Contact> contactOptions;
51

52
    /**
53
     * Column description
54
     */
55
    private String description;
56

57
    /**
58
     * Represents the {@link Format} for this column.
59
     */
60
    private Format format;
61

62
    /**
63
     * The formula for a column, if set, for instance '=data@row'.
64
     */
65
    private String formula;
66

67
    /**
68
     * Represents the hidden flag for the column.
69
     */
70
    private Boolean hidden;
71

72
    /**
73
     * Represents the position.
74
     */
75
    private Integer index;
76

77
    /**
78
     * Represents if the column is locked
79
     */
80
    private Boolean locked;
81

82
    /**
83
     * Represents if the column is locked for the user
84
     */
85
    private Boolean lockedForUser;
86

87
    /**
88
     * Represents the list of options for the column.
89
     */
90
    private List<String> options;
91

92
    /**
93
     * Represents the primary flag.
94
     */
95
    private Boolean primary;
96

97
    /**
98
     * Represents the symbol used for the column.
99
     */
100
    private Symbol symbol;
101

102
    /**
103
     * Represents the tags to indicate a special type of column.
104
     */
105
    private List<ColumnTag> tags;
106

107
    /**
108
     * Represents the title.
109
     */
110
    private String title;
111

112
    /**
113
     * Flag indicating whether validation has been enabled for the column
114
     */
115
    private Boolean validation;
116

117
    /**
118
     * Determines the compatibility level of this client, 0 for existing types, 1 for multi-assign,
119
     * greater than 1 for future types.
120
     */
121
    private Integer version;
122

123
    /**
124
     * The width of the cell.
125
     */
126
    private Integer width;
127

128
    /**
129
     * Default constructor
130
     */
131
    public Column() {
1✔
132
    }
1✔
133

134
    /**
135
     * Construct a Column with specified id
136
     *
137
     * @param id Column id
138
     */
139
    public Column(Long id) {
×
140
        this.setId(id);
×
141
    }
×
142

143
    /**
144
     * Gets the system column type.
145
     *
146
     * @return the system column type
147
     */
148
    public SystemColumnType getSystemColumnType() {
149
        return systemColumnType;
1✔
150
    }
151

152
    /**
153
     * Sets the system column type.
154
     *
155
     * @param systemColumnType the new system column type
156
     */
157
    public Column setSystemColumnType(SystemColumnType systemColumnType) {
158
        this.systemColumnType = systemColumnType;
×
159
        return this;
×
160
    }
161

162
    /**
163
     * Gets the column type.
164
     *
165
     * @return the type
166
     */
167
    public ColumnType getType() {
168
        return type;
1✔
169
    }
170

171
    /**
172
     * Sets the column type.
173
     *
174
     * @param type the new type
175
     */
176
    public Column setType(ColumnType type) {
177
        this.type = type;
1✔
178
        return this;
1✔
179
    }
180

181
    /**
182
     * Gets the format for the auto generated numbers.
183
     *
184
     * @return the auto number format
185
     */
186
    public AutoNumberFormat getAutoNumberFormat() {
187
        return autoNumberFormat;
1✔
188
    }
189

190
    /**
191
     * Sets the format for the auto generated numbers.
192
     *
193
     * @param autoNumberFormat the new auto number format
194
     */
195
    public Column setAutoNumberFormat(AutoNumberFormat autoNumberFormat) {
196
        this.autoNumberFormat = autoNumberFormat;
×
197
        return this;
×
198
    }
199

200
    /**
201
     * Gets a list of contact options
202
     *
203
     * @return list of contact options
204
     */
205
    public List<Contact> getContactOptions() {
206
        return contactOptions;
1✔
207
    }
208

209
    /**
210
     * Sets the list of contact options
211
     *
212
     * @param contactOptions the new list of contact options
213
     * @return Column
214
     */
215
    public Column setContactOptions(List<Contact> contactOptions) {
216
        this.contactOptions = contactOptions;
×
217
        return this;
×
218
    }
219

220
    /**
221
     * Gets the column description
222
     *
223
     * @return the column description
224
     */
225
    public String getDescription() {
226
        return description;
1✔
227
    }
228

229
    /**
230
     * Sets the column description
231
     */
232
    public Column setDescription(String description) {
233
        this.description = description;
×
234
        return this;
×
235
    }
236

237
    /**
238
     * @return the {@link Format}
239
     */
240
    public Format getFormat() {
241
        return format;
1✔
242
    }
243

244
    /**
245
     * @param format the {@link Format} to set
246
     */
247
    public Column setFormat(Format format) {
248
        this.format = format;
1✔
249
        return this;
1✔
250
    }
251

252
    /**
253
     * @return the column formula
254
     */
255
    public String getFormula() {
256
        return formula;
1✔
257
    }
258

259
    /**
260
     * @param formula the column formula
261
     */
262
    public Column setFormula(String formula) {
263
        this.formula = formula;
×
264
        return this;
×
265
    }
266

267
    /**
268
     * Gets the hidden flag.
269
     *
270
     * @return the hidden flag
271
     */
272
    public Boolean getHidden() {
273
        return hidden;
1✔
274
    }
275

276
    /**
277
     * Sets the hidden flag.
278
     *
279
     * @param hidden the new hidden flag
280
     */
281
    public Column setHidden(Boolean hidden) {
282
        this.hidden = hidden;
×
283
        return this;
×
284
    }
285

286
    /**
287
     * Gets the position of the column.
288
     *
289
     * @return the index
290
     */
291
    public Integer getIndex() {
292
        return index;
1✔
293
    }
294

295
    /**
296
     * Sets the position of the column.
297
     *
298
     * @param index the new index
299
     */
300
    public Column setIndex(Integer index) {
301
        this.index = index;
1✔
302
        return this;
1✔
303
    }
304

305
    /**
306
     * Gets the locked flag
307
     *
308
     * @return the locked flag
309
     */
310
    public Boolean isLocked() {
311
        return locked;
1✔
312
    }
313

314
    /**
315
     * Sets the locked flag
316
     *
317
     * @param locked the locked flag
318
     */
319
    public Column setLocked(Boolean locked) {
320
        this.locked = locked;
1✔
321
        return this;
1✔
322
    }
323

324
    /**
325
     * Gets the locked for user flag
326
     *
327
     * @return the locked for user flag
328
     */
329
    public Boolean isLockedForUser() {
330
        return lockedForUser;
1✔
331
    }
332

333
    /**
334
     * Sets the locked for user flag
335
     *
336
     * @param lockedForUser the locked for user flag
337
     */
338
    public Column setLockedForUser(Boolean lockedForUser) {
339
        this.lockedForUser = lockedForUser;
1✔
340
        return this;
1✔
341
    }
342

343
    /**
344
     * Gets the list of options for the column.
345
     *
346
     * @return the options
347
     */
348
    public List<String> getOptions() {
349
        return options;
1✔
350
    }
351

352
    /**
353
     * Sets the list of options for the column.
354
     *
355
     * @param options the new options
356
     */
357
    public Column setOptions(List<String> options) {
358
        this.options = options;
1✔
359
        return this;
1✔
360
    }
361

362
    /**
363
     * Gets the primary flag for the column.
364
     *
365
     * @return the primary flag
366
     */
367
    public Boolean getPrimary() {
368
        return primary;
1✔
369
    }
370

371
    /**
372
     * Sets the primary flag for the column.
373
     *
374
     * @param primary the new primary flag
375
     */
376
    public Column setPrimary(Boolean primary) {
377
        this.primary = primary;
1✔
378
        return this;
1✔
379
    }
380

381
    /**
382
     * Gets the symbol for the column.
383
     *
384
     * @return the symbol
385
     */
386
    public Symbol getSymbol() {
387
        return symbol;
1✔
388
    }
389

390
    /**
391
     * Sets the symbol for the column.
392
     *
393
     * @param symbol the new symbol
394
     */
395
    public Column setSymbol(Symbol symbol) {
396
        this.symbol = symbol;
1✔
397
        return this;
1✔
398
    }
399

400
    /**
401
     * Gets the tags that indicate a special type of column.
402
     *
403
     * @return the tags
404
     */
405
    public List<ColumnTag> getTags() {
406
        return tags;
1✔
407
    }
408

409
    /**
410
     * Sets the tags to indicate a special type of column.
411
     *
412
     * @param tags the new tags
413
     */
414
    public Column setTags(List<ColumnTag> tags) {
415
        this.tags = tags;
1✔
416
        return this;
1✔
417
    }
418

419
    /**
420
     * Gets the title for the column.
421
     *
422
     * @return the title
423
     */
424
    public String getTitle() {
425
        return title;
1✔
426
    }
427

428
    /**
429
     * Sets the title for the column.
430
     *
431
     * @param title the new title
432
     */
433
    public Column setTitle(String title) {
434
        this.title = title;
1✔
435
        return this;
1✔
436
    }
437

438
    /**
439
     * Gets the value of the validation flag
440
     *
441
     * @return the validation flag
442
     */
443
    public Boolean getValidation() {
444
        return validation;
1✔
445
    }
446

447
    /**
448
     * Sets the value of the validation flag
449
     *
450
     * @return the Column
451
     */
452
    public Column setValidation(Boolean validation) {
453
        this.validation = validation;
×
454
        return this;
×
455
    }
456

457
    /**
458
     * Gets the column compatibility version
459
     *
460
     * @return version 0 for existing types, 1 for multi-assign, greater than 1 for future types.
461
     */
462
    public Integer getVersion() {
463
        return version;
1✔
464
    }
465

466
    /**
467
     * Sets the column compatibility version
468
     *
469
     * @param version 0 for existing types, 1 for multi-assign, greater than 1 for future types.
470
     * @return the Column
471
     */
472
    public Column setVersion(Integer version) {
473
        this.version = version;
×
474
        return this;
×
475
    }
476

477
    /**
478
     * Gets the width
479
     *
480
     * @return the width
481
     */
482
    public Integer getWidth() {
483
        return width;
1✔
484
    }
485

486
    /**
487
     * Sets the width
488
     *
489
     * @param width the width
490
     */
491
    public Column setWidth(Integer width) {
492
        this.width = width;
1✔
493
        return this;
1✔
494
    }
495

496
    /**
497
     * A convenience class to help create a column object with the appropriate fields for adding to a sheet.
498
     */
499
    public static class AddColumnToSheetBuilder {
1✔
500
        /**
501
         * The title.
502
         */
503
        private String title;
504

505
        /**
506
         * The index
507
         **/
508
        private Integer index;
509

510
        /**
511
         * The type.
512
         */
513
        private ColumnType type;
514

515
        /**
516
         * The options.
517
         */
518
        private List<String> options;
519

520
        /**
521
         * The symbol.
522
         */
523
        private Symbol symbol;
524

525
        /**
526
         * The system column type.
527
         */
528
        private SystemColumnType systemColumnType;
529

530
        /**
531
         * The auto number format.
532
         */
533
        private AutoNumberFormat autoNumberFormat;
534

535
        /**
536
         * The column width.
537
         */
538
        private Integer width;
539

540
        /**
541
         * Represents the primary flag.
542
         */
543
        private Boolean primary;
544

545
        /**
546
         * The column format
547
         */
548
        private Format format;
549

550
        /**
551
         * Flag indicating whether validation has been enabled for the column
552
         */
553
        private Boolean validation;
554

555
        /**
556
         * Gets the width for the column.
557
         *
558
         * @return the width
559
         */
560
        public Integer getWidth() {
561
            return width;
×
562
        }
563

564
        /**
565
         * Sets the width for the column.
566
         *
567
         * @param width the width
568
         * @return the column to sheet builder
569
         */
570
        public AddColumnToSheetBuilder setWidth(Integer width) {
571
            this.width = width;
×
572
            return this;
×
573
        }
574

575
        /**
576
         * Gets the primary status for the column.
577
         *
578
         * @return the boolean primary
579
         */
580
        public Boolean getPrimary() {
581
            return primary;
×
582
        }
583

584
        /**
585
         * Sets the primary status for the column.
586
         *
587
         * @param primary the boolean primary
588
         * @return the column to sheet builder
589
         */
590
        public AddColumnToSheetBuilder setPrimary(Boolean primary) {
591
            this.primary = primary;
1✔
592
            return this;
1✔
593
        }
594

595
        /**
596
         * Sets the title for the column.
597
         *
598
         * @param title the title
599
         * @return the add the column to sheet builder
600
         */
601
        public AddColumnToSheetBuilder setTitle(String title) {
602
            this.title = title;
1✔
603
            return this;
1✔
604
        }
605

606
        /**
607
         * Gets the title.
608
         *
609
         * @return the title
610
         */
611
        public String getTitle() {
612
            return title;
×
613
        }
614

615
        /**
616
         * Sets the type for the column.
617
         *
618
         * @param type the type
619
         * @return the adds the column to sheet builder
620
         */
621
        public AddColumnToSheetBuilder setType(ColumnType type) {
622
            this.type = type;
1✔
623
            return this;
1✔
624
        }
625

626
        /**
627
         * Gets the type for the column.
628
         *
629
         * @return the type
630
         */
631
        public ColumnType getType() {
632
            return type;
×
633
        }
634

635
        /**
636
         * Sets the options for the column.
637
         *
638
         * @param options the options
639
         * @return the adds the column to sheet builder
640
         */
641
        public AddColumnToSheetBuilder setOptions(List<String> options) {
642
            this.options = options;
×
643
            return this;
×
644
        }
645

646
        /**
647
         * Gets the option for the column.
648
         *
649
         * @return the option
650
         */
651
        public List<String> getOptions() {
652
            return options;
×
653
        }
654

655
        /**
656
         * Sets the symbol for the column.
657
         *
658
         * @param symbol the symbol
659
         * @return the adds the column to sheet builder
660
         */
661
        public AddColumnToSheetBuilder setSymbol(Symbol symbol) {
662
            this.symbol = symbol;
×
663
            return this;
×
664
        }
665

666
        /**
667
         * Gets the symbol for the column.
668
         *
669
         * @return the symbol
670
         */
671
        public Symbol getSymbol() {
672
            return symbol;
×
673
        }
674

675
        /**
676
         * Sets the system column type.
677
         *
678
         * @param systemColumnType the system column type
679
         * @return the adds the column to sheet builder
680
         */
681
        public AddColumnToSheetBuilder setSystemColumnType(SystemColumnType systemColumnType) {
682
            this.systemColumnType = systemColumnType;
×
683
            return this;
×
684
        }
685

686
        /**
687
         * Gets the system column type.
688
         *
689
         * @return the system column type
690
         */
691
        public SystemColumnType getSystemColumnType() {
692
            return systemColumnType;
×
693
        }
694

695
        /**
696
         * Sets the format for an auto number column.
697
         *
698
         * @param autoNumberFormat the auto number format
699
         * @return the adds the column to sheet builder
700
         */
701
        public AddColumnToSheetBuilder setAutoNumberFormat(AutoNumberFormat autoNumberFormat) {
702
            this.autoNumberFormat = autoNumberFormat;
×
703
            return this;
×
704
        }
705

706
        /**
707
         * Gets the format for an auto number column.
708
         *
709
         * @return the format for an auto number column
710
         */
711
        public AutoNumberFormat getAutoNumberFormat() {
712
            return autoNumberFormat;
×
713
        }
714

715
        /**
716
         * Gets the index specified for the new column.
717
         *
718
         * @return the index
719
         */
720
        public Integer getIndex() {
721
            return index;
×
722
        }
723

724
        /**
725
         * Sets the index for the column. Set this to any value greater than the index of
726
         * the last column to add it as the last column.
727
         *
728
         * @param index the index
729
         * @return the index
730
         */
731
        public AddColumnToSheetBuilder setIndex(Integer index) {
732
            this.index = index;
×
733
            return this;
×
734
        }
735

736
        /**
737
         * Gets the format for a column.
738
         *
739
         * @return the format for a column
740
         */
741
        public Format getFormat() {
742
            return format;
×
743
        }
744

745
        /**
746
         * Sets the format for a column.
747
         *
748
         * @param format the format.
749
         * @return the AddColumnToSheetBuilder.
750
         */
751
        public AddColumnToSheetBuilder setFormat(Format format) {
752
            this.format = format;
×
753
            return this;
×
754
        }
755

756
        /**
757
         * Gets the value of the validation flag
758
         */
759
        public Boolean getValidation() {
760
            return validation;
×
761
        }
762

763
        /**
764
         * Sets the value of the validation flag
765
         *
766
         * @return the AddColumn builder
767
         */
768
        public AddColumnToSheetBuilder setValidation(Boolean validation) {
769
            this.validation = validation;
×
770
            return this;
×
771
        }
772

773
        /**
774
         * Builds the column.
775
         *
776
         * @return the column
777
         */
778
        public Column build() {
779
            if (title == null || type == null) {
1✔
780
                throw new InstantiationError();
×
781
            }
782

783
            Column column = new Column();
1✔
784
            column.title = title;
1✔
785
            column.type = type;
1✔
786
            column.options = options;
1✔
787
            column.symbol = symbol;
1✔
788
            column.index = index;
1✔
789
            column.width = width;
1✔
790
            column.systemColumnType = systemColumnType;
1✔
791
            column.autoNumberFormat = autoNumberFormat;
1✔
792
            column.primary = primary;
1✔
793
            column.format = format;
1✔
794
            column.validation = validation;
1✔
795
            return column;
1✔
796
        }
797

798
    }
799

800
    /**
801
     * The Class UpdateColumnBuilder.
802
     */
803
    public static class UpdateColumnBuilder {
×
804
        /**
805
         * The position of the column.
806
         */
807
        private int index;
808

809
        /**
810
         * The title for the column.
811
         */
812
        private String title;
813

814
        /**
815
         * The type of the column.
816
         */
817
        private ColumnType type;
818

819
        /**
820
         * The options for the column.
821
         */
822
        private List<String> options;
823

824
        /**
825
         * The symbol for the column.
826
         */
827
        private Symbol symbol;
828

829
        /**
830
         * The system column type.
831
         */
832
        private SystemColumnType systemColumnType;
833

834
        /**
835
         * The format for an auto number column.
836
         */
837
        private AutoNumberFormat autoNumberFormat;
838

839
        /**
840
         * The sheet id.
841
         */
842
        private Long sheetId;
843

844
        /**
845
         * The width
846
         */
847
        private Integer width;
848

849
        /**
850
         * The format
851
         */
852
        private Format format;
853

854
        /**
855
         * The column id
856
         */
857
        private Long id;
858

859
        /**
860
         * Flag indicating whether validation has been enabled for the column
861
         */
862
        private Boolean validation;
863

864
        /**
865
         * Gets the column id.
866
         *
867
         * @return the column id
868
         */
869
        public Long getColumnId() {
870
            return id;
×
871
        }
872

873
        /**
874
         * Sets the position for the column.
875
         *
876
         * @param columnId the columnId
877
         * @return the modify column builder
878
         */
879
        public UpdateColumnBuilder setColumnId(Long columnId) {
880
            this.id = columnId;
×
881
            return this;
×
882
        }
883

884
        /**
885
         * Sets the position for the column.
886
         *
887
         * @param index the position
888
         * @return the modify column builder
889
         */
890
        public UpdateColumnBuilder setIndex(int index) {
891
            this.index = index;
×
892
            return this;
×
893
        }
894

895
        /**
896
         * Sets the title for the column.
897
         *
898
         * @param title the title
899
         * @return the modify column builder
900
         */
901
        public UpdateColumnBuilder setTitle(String title) {
902
            this.title = title;
×
903
            return this;
×
904
        }
905

906
        /**
907
         * Sets the type for the column.
908
         *
909
         * @param type the type
910
         * @return the modify column builder
911
         */
912
        public UpdateColumnBuilder setType(ColumnType type) {
913
            this.type = type;
×
914
            return this;
×
915
        }
916

917
        /**
918
         * Sets the options for the column.
919
         *
920
         * @param options the options
921
         * @return the modify column builder
922
         */
923
        public UpdateColumnBuilder setOptions(List<String> options) {
924
            this.options = options;
×
925
            return this;
×
926
        }
927

928
        /**
929
         * Sets the symbol for the column.
930
         *
931
         * @param symbol the symbol
932
         * @return the modify column builder
933
         */
934
        public UpdateColumnBuilder setSymbol(Symbol symbol) {
935
            this.symbol = symbol;
×
936
            return this;
×
937
        }
938

939
        /**
940
         * Sets the system column type for the column.
941
         *
942
         * @param systemColumnType the system column type
943
         * @return the modify column builder
944
         */
945
        public UpdateColumnBuilder setSystemColumnType(SystemColumnType systemColumnType) {
946
            this.systemColumnType = systemColumnType;
×
947
            return this;
×
948
        }
949

950
        /**
951
         * Sets the format for an auto number column.
952
         *
953
         * @param autoNumberFormat the auto number format
954
         * @return the modify column builder
955
         */
956
        public UpdateColumnBuilder setAutoNumberFormat(AutoNumberFormat autoNumberFormat) {
957
            this.autoNumberFormat = autoNumberFormat;
×
958
            return this;
×
959
        }
960

961
        /**
962
         * Sets the sheet id.
963
         *
964
         * @param sheetId the sheet id
965
         * @return the modify column builder
966
         */
967
        public UpdateColumnBuilder setSheetId(Long sheetId) {
968
            this.sheetId = sheetId;
×
969
            return this;
×
970
        }
971

972
        /**
973
         * Sets the format
974
         *
975
         * @param format the format
976
         * @return the modify column builder
977
         */
978
        public UpdateColumnBuilder setFormat(Format format) {
979
            this.format = format;
×
980
            return this;
×
981
        }
982

983
        /**
984
         * Sets the width
985
         *
986
         * @param width the width
987
         * @return the modify column builder
988
         */
989
        public UpdateColumnBuilder setWidth(Integer width) {
990
            this.width = width;
×
991
            return this;
×
992
        }
993

994
        /**
995
         * Sets the value of the validation flag
996
         *
997
         * @return the modify column builder
998
         */
999
        public UpdateColumnBuilder setValidation(Boolean validation) {
1000
            this.validation = validation;
×
1001
            return this;
×
1002
        }
1003

1004
        /**
1005
         * Gets the index.
1006
         *
1007
         * @return the index
1008
         */
1009
        public int getIndex() {
1010
            return index;
×
1011
        }
1012

1013
        /**
1014
         * Gets the title.
1015
         *
1016
         * @return the title
1017
         */
1018
        public String getTitle() {
1019
            return title;
×
1020
        }
1021

1022
        /**
1023
         * Gets the type.
1024
         *
1025
         * @return the type
1026
         */
1027
        public ColumnType getType() {
1028
            return type;
×
1029
        }
1030

1031
        /**
1032
         * Gets the options.
1033
         *
1034
         * @return the options
1035
         */
1036
        public List<String> getOptions() {
1037
            return options;
×
1038
        }
1039

1040
        /**
1041
         * Gets the symbol.
1042
         *
1043
         * @return the symbol
1044
         */
1045
        public Symbol getSymbol() {
1046
            return symbol;
×
1047
        }
1048

1049
        /**
1050
         * Gets the system column type.
1051
         *
1052
         * @return the system column type
1053
         */
1054
        public SystemColumnType getSystemColumnType() {
1055
            return systemColumnType;
×
1056
        }
1057

1058
        /**
1059
         * Gets the auto number format.
1060
         *
1061
         * @return the auto number format
1062
         */
1063
        public AutoNumberFormat getAutoNumberFormat() {
1064
            return autoNumberFormat;
×
1065
        }
1066

1067
        /**
1068
         * Gets the sheet id.
1069
         *
1070
         * @return the sheet id
1071
         */
1072
        public Long getSheetId() {
1073
            return sheetId;
×
1074
        }
1075

1076
        /**
1077
         * Gets the width
1078
         *
1079
         * @return the width
1080
         */
1081
        public Integer getWidth() {
1082
            return width;
×
1083
        }
1084

1085
        /**
1086
         * Gets the format
1087
         *
1088
         * @return the format
1089
         */
1090
        public Format getFormat() {
1091
            return format;
×
1092
        }
1093

1094
        /**
1095
         * Gets the value of the validation flag
1096
         *
1097
         * @return the validation flag
1098
         */
1099
        public Boolean getValidation() {
1100
            return validation;
×
1101
        }
1102

1103
        /**
1104
         * Builds the column.
1105
         *
1106
         * @return the column
1107
         */
1108
        public Column build() {
1109
            if (title == null || id == null) {
×
1110
                throw new InstantiationError("A title and a column id are required");
×
1111
            }
1112

1113
            Column column = new Column();
×
1114
            column.index = index;
×
1115
            column.title = title;
×
1116
            column.type = type;
×
1117
            column.options = options;
×
1118
            column.symbol = symbol;
×
1119
            column.systemColumnType = systemColumnType;
×
1120
            column.autoNumberFormat = autoNumberFormat;
×
1121
            column.width = width;
×
1122
            column.format = format;
×
1123
            column.validation = validation;
×
1124
            column.setId(id);
×
1125
            return column;
×
1126
        }
1127
    }
1128
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc