本文整理汇总了Java中org.apache.metamodel.schema.Column.isNullable方法的典型用法代码示例。如果您正苦于以下问题:Java Column.isNullable方法的具体用法?Java Column.isNullable怎么用?Java Column.isNullable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.metamodel.schema.Column
的用法示例。
在下文中一共展示了Column.isNullable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateComponents
import org.apache.metamodel.schema.Column; //导入方法依赖的package包/类
private void updateComponents() {
final AnalysisJobMetadata metadata = _analysisJobBuilder.getAnalysisJobMetadata();
if (metadata != null) {
_jobNameTextField.setText(Strings.nullToEmpty(metadata.getJobName()));
_jobDescriptionTextField.setText(Strings.nullToEmpty(metadata.getJobDescription()));
_authorTextField.setText(Strings.nullToEmpty(metadata.getAuthor()));
}
final SortedSet<InputColumn<?>> sourceColumns = new TreeSet<>(_analysisJobBuilder.getSourceColumns());
final Icon validIcon = ImageManager.get().getImageIcon(IconUtils.STATUS_VALID, IconUtils.ICON_SIZE_SMALL);
final DefaultTableModel model = new DefaultTableModel(COLUMN_NAMES, sourceColumns.size());
int i = 0;
for (final InputColumn<?> inputColumn : sourceColumns) {
final Column column = inputColumn.getPhysicalColumn();
model.setValueAt(column.getTable().getName(), i, 0);
model.setValueAt(column.getName(), i, 1);
model.setValueAt(column.getType(), i, 2);
model.setValueAt(column.getNativeType(), i, 3);
model.setValueAt(column.getColumnSize(), i, 4);
final Boolean nullable = column.isNullable();
if (nullable != null && nullable.booleanValue()) {
model.setValueAt(validIcon, i, 5);
} else {
model.setValueAt("", i, 5);
}
final boolean indexed = column.isIndexed();
if (indexed) {
model.setValueAt(validIcon, i, 6);
} else {
model.setValueAt("", i, 6);
}
i++;
}
_table.setModel(model);
}