Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ssogabe/ignoreNotFoundSheet
ignoreSheetNotFound not work correctly
- Loading branch information
Showing
6 changed files
with
182 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/net/java/amateras/xlsbeans/xssfconverter/NullWSheetImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package net.java.amateras.xlsbeans.xssfconverter; | ||
|
||
/** | ||
* Sheet wrapper that indicates no sheet found. | ||
* | ||
* @author Seiji Sogabe | ||
*/ | ||
public class NullWSheetImpl implements WSheet { | ||
|
||
public static final NullWSheetImpl INSTANCE = new NullWSheetImpl(); | ||
|
||
public String getName() { | ||
return null; | ||
} | ||
|
||
public WCell[] getColumn(int i) { | ||
return null; | ||
} | ||
|
||
public WCell getCell(int column, int row) { | ||
return null; | ||
} | ||
|
||
public int getColumns() { | ||
return 0; | ||
} | ||
|
||
public int getRows() { | ||
return 0; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
src/test/java/net/java/amateras/xlsbeans/UserListNoSheet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
package net.java.amateras.xlsbeans; | ||
|
||
import java.util.List; | ||
|
||
import net.java.amateras.xlsbeans.annotation.HorizontalRecords; | ||
import net.java.amateras.xlsbeans.annotation.IterateTables; | ||
import net.java.amateras.xlsbeans.annotation.LabelledCell; | ||
import net.java.amateras.xlsbeans.annotation.LabelledCellType; | ||
import net.java.amateras.xlsbeans.annotation.Sheet; | ||
import net.java.amateras.xlsbeans.annotation.VerticalRecords; | ||
|
||
/** | ||
* | ||
* @author Naoki Takezoe | ||
*/ | ||
@Sheet(name="NoSheet") | ||
public class UserListNoSheet { | ||
|
||
private List<User> horizontalUsers; | ||
private List<User> verticalUsers; | ||
private String title; | ||
private String lastUpdate; | ||
private List<Unit> unitUsers; | ||
private String actionClassName; | ||
private String formClassName; | ||
private String labelSkip0; | ||
private String labelSkip1; | ||
|
||
public List<Unit> getUnitUsers() { | ||
return unitUsers; | ||
} | ||
|
||
@IterateTables(tableLabel="部門情報", tableClass=Unit.class, bottom=2) | ||
public void setUnitUsers(List<Unit> unitUsers) { | ||
this.unitUsers = unitUsers; | ||
} | ||
|
||
public List<User> getVerticalUsers() { | ||
return verticalUsers; | ||
} | ||
|
||
@VerticalRecords(tableLabel="Vertical Table", recordClass=User.class) | ||
public void setVerticalUsers(List<User> verticalUsers) { | ||
this.verticalUsers = verticalUsers; | ||
} | ||
|
||
@HorizontalRecords(tableLabel="User Informations", recordClass=User.class, terminateLabel="Terminate") | ||
public void setHorizontalUsers(List<User> users){ | ||
this.horizontalUsers = users; | ||
} | ||
|
||
public List<User> getHorizontalUsers(){ | ||
return this.horizontalUsers; | ||
} | ||
|
||
@LabelledCell(label="Title", type=LabelledCellType.Right) | ||
public void setTitle(String title){ | ||
this.title = title; | ||
} | ||
|
||
public String getTitle(){ | ||
return this.title; | ||
} | ||
|
||
@LabelledCell(label="LastUpdated", type=LabelledCellType.Right) | ||
public void setLastUpdate(String lastUpdate){ | ||
this.lastUpdate = lastUpdate; | ||
} | ||
|
||
public String getLastUpdate(){ | ||
return this.lastUpdate; | ||
} | ||
|
||
public String getActionClassName() { | ||
return actionClassName; | ||
} | ||
|
||
@LabelledCell(label="クラス名", headerLabel="アクション", type=LabelledCellType.Right) | ||
public void setActionClassName(String actionClassName) { | ||
this.actionClassName = actionClassName; | ||
} | ||
|
||
public String getFormClassName() { | ||
return formClassName; | ||
} | ||
|
||
@LabelledCell(label="クラス名", headerLabel="アクションフォーム", type=LabelledCellType.Right) | ||
public void setFormClassName(String formClassName) { | ||
this.formClassName = formClassName; | ||
} | ||
|
||
public String getLabelSkip0() { | ||
return labelSkip0; | ||
} | ||
|
||
@LabelledCell(label="離れたラベル", type=LabelledCellType.Right) | ||
public void setLabelSkip0(String labelSkip0) { | ||
this.labelSkip0 = labelSkip0; | ||
} | ||
|
||
public String getLabelSkip1() { | ||
return labelSkip1; | ||
} | ||
|
||
@LabelledCell(label="離れたラベル", type=LabelledCellType.Right, skip=1, range=2) | ||
public void setLabelSkip1(String labelSkip1) { | ||
this.labelSkip1 = labelSkip1; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters