📄 nullcustomizer.java
字号:
import java.sql.*;
import org.apache.ecs.*;
import org.apache.ecs.html.*;
public class NullCustomizer implements TableCustomizer {
public boolean accept(int columnType, String columnTypeName,
String columnName, ResultSet rs, int index)
throws SQLException {
rs.getObject(index);
return rs.wasNull();
}
public Element display(int columnType, String columnTypeName,
String columnName, ResultSet rs, int index)
throws SQLException {
// Print an "N/A" for null entries
return new StringElement("N/A");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -