Skip to content

Commit c69e974

Browse files
authored
Merge branch 'main' into patch_005
2 parents 2bae031 + 424d12c commit c69e974

65 files changed

Lines changed: 2338 additions & 538 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

fesod-sheet/src/main/java/org/apache/fesod/sheet/metadata/CellExtra.java

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
package org.apache.fesod.sheet.metadata;
2727

28+
import lombok.Getter;
29+
import lombok.Setter;
2830
import org.apache.fesod.sheet.constant.ExcelXmlConstants;
2931
import org.apache.fesod.sheet.enums.CellExtraTypeEnum;
3032
import org.apache.poi.ss.util.CellReference;
@@ -34,6 +36,8 @@
3436
*
3537
*
3638
*/
39+
@Getter
40+
@Setter
3741
public class CellExtra extends AbstractCell {
3842
/**
3943
* Cell extra type
@@ -99,52 +103,4 @@ public CellExtra(
99103
this.lastRowIndex = lastRowIndex;
100104
this.lastColumnIndex = lastColumnIndex;
101105
}
102-
103-
public CellExtraTypeEnum getType() {
104-
return type;
105-
}
106-
107-
public void setType(CellExtraTypeEnum type) {
108-
this.type = type;
109-
}
110-
111-
public String getText() {
112-
return text;
113-
}
114-
115-
public void setText(String text) {
116-
this.text = text;
117-
}
118-
119-
public Integer getFirstRowIndex() {
120-
return firstRowIndex;
121-
}
122-
123-
public void setFirstRowIndex(Integer firstRowIndex) {
124-
this.firstRowIndex = firstRowIndex;
125-
}
126-
127-
public Integer getFirstColumnIndex() {
128-
return firstColumnIndex;
129-
}
130-
131-
public void setFirstColumnIndex(Integer firstColumnIndex) {
132-
this.firstColumnIndex = firstColumnIndex;
133-
}
134-
135-
public Integer getLastRowIndex() {
136-
return lastRowIndex;
137-
}
138-
139-
public void setLastRowIndex(Integer lastRowIndex) {
140-
this.lastRowIndex = lastRowIndex;
141-
}
142-
143-
public Integer getLastColumnIndex() {
144-
return lastColumnIndex;
145-
}
146-
147-
public void setLastColumnIndex(Integer lastColumnIndex) {
148-
this.lastColumnIndex = lastColumnIndex;
149-
}
150106
}

fesod-sheet/src/main/java/org/apache/fesod/sheet/metadata/property/ColumnWidthProperty.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@
2525

2626
package org.apache.fesod.sheet.metadata.property;
2727

28+
import lombok.Getter;
29+
import lombok.Setter;
2830
import org.apache.fesod.sheet.annotation.write.style.ColumnWidth;
2931

3032
/**
3133
* Configuration from annotations
3234
*
3335
*
3436
*/
37+
@Getter
38+
@Setter
3539
public class ColumnWidthProperty {
3640
private Integer width;
3741

@@ -45,12 +49,4 @@ public static ColumnWidthProperty build(ColumnWidth columnWidth) {
4549
}
4650
return new ColumnWidthProperty(columnWidth.value());
4751
}
48-
49-
public Integer getWidth() {
50-
return width;
51-
}
52-
53-
public void setWidth(Integer width) {
54-
this.width = width;
55-
}
5652
}

fesod-sheet/src/main/java/org/apache/fesod/sheet/metadata/property/LoopMergeProperty.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@
2525

2626
package org.apache.fesod.sheet.metadata.property;
2727

28+
import lombok.Getter;
29+
import lombok.Setter;
2830
import org.apache.fesod.sheet.annotation.write.style.ContentLoopMerge;
2931

3032
/**
3133
* Configuration from annotations
3234
*
3335
*
3436
*/
37+
@Getter
38+
@Setter
3539
public class LoopMergeProperty {
3640
/**
3741
* Each row
@@ -53,20 +57,4 @@ public static LoopMergeProperty build(ContentLoopMerge contentLoopMerge) {
5357
}
5458
return new LoopMergeProperty(contentLoopMerge.eachRow(), contentLoopMerge.columnExtend());
5559
}
56-
57-
public int getEachRow() {
58-
return eachRow;
59-
}
60-
61-
public void setEachRow(int eachRow) {
62-
this.eachRow = eachRow;
63-
}
64-
65-
public int getColumnExtend() {
66-
return columnExtend;
67-
}
68-
69-
public void setColumnExtend(int columnExtend) {
70-
this.columnExtend = columnExtend;
71-
}
7260
}

fesod-sheet/src/main/java/org/apache/fesod/sheet/metadata/property/NumberFormatProperty.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@
2626
package org.apache.fesod.sheet.metadata.property;
2727

2828
import java.math.RoundingMode;
29+
import lombok.Getter;
30+
import lombok.Setter;
2931
import org.apache.fesod.sheet.annotation.format.NumberFormat;
3032

3133
/**
3234
* Configuration from annotations
3335
*
3436
*
3537
*/
38+
@Getter
39+
@Setter
3640
public class NumberFormatProperty {
3741
private String format;
3842
private RoundingMode roundingMode;
@@ -48,20 +52,4 @@ public static NumberFormatProperty build(NumberFormat numberFormat) {
4852
}
4953
return new NumberFormatProperty(numberFormat.value(), numberFormat.roundingMode());
5054
}
51-
52-
public String getFormat() {
53-
return format;
54-
}
55-
56-
public void setFormat(String format) {
57-
this.format = format;
58-
}
59-
60-
public RoundingMode getRoundingMode() {
61-
return roundingMode;
62-
}
63-
64-
public void setRoundingMode(RoundingMode roundingMode) {
65-
this.roundingMode = roundingMode;
66-
}
6755
}

fesod-sheet/src/main/java/org/apache/fesod/sheet/metadata/property/OnceAbsoluteMergeProperty.java

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@
2525

2626
package org.apache.fesod.sheet.metadata.property;
2727

28+
import lombok.Getter;
29+
import lombok.Setter;
2830
import org.apache.fesod.sheet.annotation.write.style.OnceAbsoluteMerge;
2931

3032
/**
3133
* Configuration from annotations
3234
*
3335
*
3436
*/
37+
@Getter
38+
@Setter
3539
public class OnceAbsoluteMergeProperty {
3640
/**
3741
* First row
@@ -67,36 +71,4 @@ public static OnceAbsoluteMergeProperty build(OnceAbsoluteMerge onceAbsoluteMerg
6771
onceAbsoluteMerge.firstColumnIndex(),
6872
onceAbsoluteMerge.lastColumnIndex());
6973
}
70-
71-
public int getFirstRowIndex() {
72-
return firstRowIndex;
73-
}
74-
75-
public void setFirstRowIndex(int firstRowIndex) {
76-
this.firstRowIndex = firstRowIndex;
77-
}
78-
79-
public int getLastRowIndex() {
80-
return lastRowIndex;
81-
}
82-
83-
public void setLastRowIndex(int lastRowIndex) {
84-
this.lastRowIndex = lastRowIndex;
85-
}
86-
87-
public int getFirstColumnIndex() {
88-
return firstColumnIndex;
89-
}
90-
91-
public void setFirstColumnIndex(int firstColumnIndex) {
92-
this.firstColumnIndex = firstColumnIndex;
93-
}
94-
95-
public int getLastColumnIndex() {
96-
return lastColumnIndex;
97-
}
98-
99-
public void setLastColumnIndex(int lastColumnIndex) {
100-
this.lastColumnIndex = lastColumnIndex;
101-
}
10274
}

fesod-sheet/src/main/java/org/apache/fesod/sheet/metadata/property/RowHeightProperty.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
package org.apache.fesod.sheet.metadata.property;
2727

28+
import lombok.Getter;
29+
import lombok.Setter;
2830
import org.apache.fesod.sheet.annotation.write.style.ContentRowHeight;
2931
import org.apache.fesod.sheet.annotation.write.style.HeadRowHeight;
3032

@@ -33,6 +35,8 @@
3335
*
3436
*
3537
*/
38+
@Getter
39+
@Setter
3640
public class RowHeightProperty {
3741
private Short height;
3842

@@ -53,12 +57,4 @@ public static RowHeightProperty build(ContentRowHeight contentRowHeight) {
5357
}
5458
return new RowHeightProperty(contentRowHeight.value());
5559
}
56-
57-
public Short getHeight() {
58-
return height;
59-
}
60-
61-
public void setHeight(Short height) {
62-
this.height = height;
63-
}
6460
}

fesod-sheet/src/main/java/org/apache/fesod/sheet/read/metadata/holder/ReadRowHolder.java

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
package org.apache.fesod.sheet.read.metadata.holder;
2727

2828
import java.util.Map;
29+
import lombok.Getter;
30+
import lombok.Setter;
2931
import org.apache.fesod.sheet.enums.HolderEnum;
3032
import org.apache.fesod.sheet.enums.RowTypeEnum;
3133
import org.apache.fesod.sheet.metadata.Cell;
@@ -37,6 +39,8 @@
3739
*
3840
*
3941
*/
42+
@Getter
43+
@Setter
4044
public class ReadRowHolder implements Holder {
4145
/**
4246
* Returns row index of a row in the sheet that contains this cell.Start form 0.
@@ -70,46 +74,6 @@ public ReadRowHolder(
7074
this.cellMap = cellMap;
7175
}
7276

73-
public GlobalConfiguration getGlobalConfiguration() {
74-
return globalConfiguration;
75-
}
76-
77-
public void setGlobalConfiguration(GlobalConfiguration globalConfiguration) {
78-
this.globalConfiguration = globalConfiguration;
79-
}
80-
81-
public Object getCurrentRowAnalysisResult() {
82-
return currentRowAnalysisResult;
83-
}
84-
85-
public void setCurrentRowAnalysisResult(Object currentRowAnalysisResult) {
86-
this.currentRowAnalysisResult = currentRowAnalysisResult;
87-
}
88-
89-
public Integer getRowIndex() {
90-
return rowIndex;
91-
}
92-
93-
public void setRowIndex(Integer rowIndex) {
94-
this.rowIndex = rowIndex;
95-
}
96-
97-
public RowTypeEnum getRowType() {
98-
return rowType;
99-
}
100-
101-
public void setRowType(RowTypeEnum rowType) {
102-
this.rowType = rowType;
103-
}
104-
105-
public Map<Integer, Cell> getCellMap() {
106-
return cellMap;
107-
}
108-
109-
public void setCellMap(Map<Integer, Cell> cellMap) {
110-
this.cellMap = cellMap;
111-
}
112-
11377
@Override
11478
public HolderEnum holderType() {
11579
return HolderEnum.ROW;

fesod-sheet/src/main/java/org/apache/fesod/sheet/util/ClassUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,11 @@ private static FieldCache doDeclaredFields(Class<?> clazz, ConfigurationHolder c
364364
// The current field needs to be ignored
365365
if (writeHolder.ignore(field.getFieldName(), entry.getKey())) {
366366
ignoreSet.add(field.getFieldName());
367-
indexFieldMap.remove(index);
367+
// indexFieldMap is keyed by the field's explicit @ExcelProperty(index), which for
368+
// explicit-index fields equals the sortedFieldMap position (entry.getKey()); remove
369+
// by that key, not the running counter, otherwise an unrelated explicit-index entry
370+
// is dropped and the ignored field's entry may survive.
371+
indexFieldMap.remove(key);
368372
} else {
369373
// Mandatory sorted fields
370374
if (indexFieldMap.containsKey(key)) {

fesod-sheet/src/main/java/org/apache/fesod/sheet/write/metadata/fill/FillWrapper.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@
2626
package org.apache.fesod.sheet.write.metadata.fill;
2727

2828
import java.util.Collection;
29+
import lombok.Getter;
30+
import lombok.Setter;
2931

3032
/**
3133
* Multiple lists are supported when packing
3234
*
3335
*
3436
**/
37+
@Getter
38+
@Setter
3539
public class FillWrapper {
3640
/**
3741
* The collection prefix that needs to be filled.
@@ -50,20 +54,4 @@ public FillWrapper(String name, Collection collectionData) {
5054
this.name = name;
5155
this.collectionData = collectionData;
5256
}
53-
54-
public String getName() {
55-
return name;
56-
}
57-
58-
public void setName(String name) {
59-
this.name = name;
60-
}
61-
62-
public Collection getCollectionData() {
63-
return collectionData;
64-
}
65-
66-
public void setCollectionData(Collection collectionData) {
67-
this.collectionData = collectionData;
68-
}
6957
}

0 commit comments

Comments
 (0)