private Map<String, Object> createColumnMap(Column column) { final Map<String, Object> map = new HashMap<>(); map.put("name", column.getName()); map.put("number", column.getColumnNumber()); map.put("type", getTypeName(column)); map.put("size", column.getColumnSize()); map.put("nativeType", column.getNativeType()); map.put("nullable", column.isNullable()); map.put("remarks", column.getRemarks()); map.put("indexed", column.isIndexed()); map.put("quote", column.getQuote()); map.put("primaryKey", column.isPrimaryKey()); return map; }
sb.append(' '); sb.append(type.toString()); Integer columnSize = column.getColumnSize(); if (columnSize != null) { sb.append('(');
sb.append(' '); sb.append(type.toString()); Integer columnSize = column.getColumnSize(); if (columnSize != null) { sb.append('(');
sb.append(' '); final String nativeType = column.getNativeType(); final Integer columnSize = column.getColumnSize(); if (nativeType == null) { ColumnType columnType = column.getType();
sb.append(' '); final String nativeType = column.getNativeType(); final Integer columnSize = column.getColumnSize(); if (nativeType == null) { ColumnType columnType = column.getType();
/** * Gets the size (in bytes) of a single {@link Column} */ protected int getValueSize(Column column) { ColumnType type = column.getType(); if (type == null) { return DEFAULT_COLUMN_SIZE; } else { Integer columnSize = column.getColumnSize(); if (columnSize == null) { // if column size is missing, then use // size-indifferent approach return getSize(type); } else if (columnSize > 10000 && !type.isLargeObject()) { // if column size is unrealistically high, then use // size-indifferent approach return getSize(type); } else { return getSize(type, columnSize); } } }
/** * Gets the size (in bytes) of a single {@link Column} */ protected int getValueSize(Column column) { ColumnType type = column.getType(); if (type == null) { return DEFAULT_COLUMN_SIZE; } else { Integer columnSize = column.getColumnSize(); if (columnSize == null) { // if column size is missing, then use // size-indifferent approach return getSize(type); } else if (columnSize > 10000 && !type.isLargeObject()) { // if column size is unrealistically high, then use // size-indifferent approach return getSize(type); } else { return getSize(type, columnSize); } } }
c.getColumnSize(), c.isNullable(), c.isIndexed(), t.getName(), c.getRemarks() }));
protected ImmutableColumn(Column column, ImmutableTable table) { this(column.getName(), column.getType(), table, column.getColumnNumber(), column.getColumnSize(), column .getNativeType(), column.isNullable(), column.getRemarks(), column.isIndexed(), column.getQuote(), column.isPrimaryKey()); }
protected ImmutableColumn(Column column, ImmutableTable table) { this(column.getName(), column.getType(), table, column.getColumnNumber(), column.getColumnSize(), column .getNativeType(), column.isNullable(), column.getRemarks(), column.isIndexed(), column.getQuote(), column.isPrimaryKey()); }
c.getColumnSize(), c.isNullable(), c.isIndexed(), t.getName(), c.getRemarks() }));
@Override public final T like(Column column) { _column.setColumnSize(column.getColumnSize()); _column.setNativeType(column.getNativeType()); _column.setType(column.getType()); _column.setNullable(column.isNullable()); _column.setPrimaryKey(column.isPrimaryKey()); return getReturnObject(); }
@Override public final T like(Column column) { _column.setColumnSize(column.getColumnSize()); _column.setNativeType(column.getNativeType()); _column.setType(column.getType()); _column.setNullable(column.isNullable()); _column.setPrimaryKey(column.isPrimaryKey()); return getReturnObject(); }
/** * Constructs an {@link ImmutableColumn} based on an existing column and a * table. * * @param column * the column to immitate * @param table * the table that the constructed column will pertain to */ public ImmutableColumn(Column column, Table table) { this.name = column.getName(); this.type = column.getType(); this.table = table; this.columnNumber = column.getColumnNumber(); this.columnSize = column.getColumnSize(); this.nativeType = column.getNativeType(); this.nullable = column.isNullable(); this.remarks = column.getRemarks(); this.indexed = column.isIndexed(); this.quote = column.getQuote(); this.primaryKey = column.isPrimaryKey(); }
model.setValueAt(column.getType(), i, 2); model.setValueAt(column.getNativeType(), i, 3); model.setValueAt(column.getColumnSize(), i, 4);
/** * Constructs an {@link ImmutableColumn} based on an existing column and a * table. * * @param column * the column to immitate * @param table * the table that the constructed column will pertain to */ public ImmutableColumn(Column column, Table table) { this.name = column.getName(); this.type = column.getType(); this.table = table; this.columnNumber = column.getColumnNumber(); this.columnSize = column.getColumnSize(); this.nativeType = column.getNativeType(); this.nullable = column.isNullable(); this.remarks = column.getRemarks(); this.indexed = column.isIndexed(); this.quote = column.getQuote(); this.primaryKey = column.isPrimaryKey(); }