@Override public boolean isBinary() { return _delegate.isBinary(); }
@Override public boolean isBinary() { return _delegate.isBinary(); }
public static ScalarAttributeType toAttributeType(ColumnType type) { if (type == null) { return ScalarAttributeType.S; } if (type.isBinary()) { return ScalarAttributeType.B; } if (type.isNumber()) { return ScalarAttributeType.S; } // default to string return ScalarAttributeType.S; }
final byte[] bytes = FileHelper.readAsBytes(inputStream); return bytes; } else if (type.isBinary()) { return resultSet.getBytes(columnIndex); } else if (type == ColumnType.CLOB || type == ColumnType.NCLOB) {
final byte[] bytes = FileHelper.readAsBytes(inputStream); return bytes; } else if (type.isBinary()) { return resultSet.getBytes(columnIndex); } else if (type == ColumnType.CLOB || type == ColumnType.NCLOB) {
/** * Gets the size (in bytes) of a column with a specific {@link ColumnType} * and size */ private int getSize(ColumnType type, int columnSize) { final int baseSize; if (type.isBinary()) { baseSize = 1; } else if (type.isBoolean()) { baseSize = 1; } else if (type.isLiteral()) { baseSize = 2; } else if (type.isNumber()) { baseSize = 16; } else { baseSize = DEFAULT_COLUMN_SIZE; } int result = baseSize * columnSize; if (type.isLargeObject()) { // assign at least 4KB for LOBs. result = Math.max(result, 4 * KB); } return result; }
/** * Gets the size (in bytes) of a column with a specific {@link ColumnType} * and size */ private int getSize(ColumnType type, int columnSize) { final int baseSize; if (type.isBinary()) { baseSize = 1; } else if (type.isBoolean()) { baseSize = 1; } else if (type.isLiteral()) { baseSize = 2; } else if (type.isNumber()) { baseSize = 16; } else { baseSize = DEFAULT_COLUMN_SIZE; } int result = baseSize * columnSize; if (type.isLargeObject()) { // assign at least 4KB for LOBs. result = Math.max(result, 4 * KB); } return result; }
/** * Gets the (approximate) size (in bytes) of a column with a specific * {@link ColumnType}. */ private int getSize(ColumnType type) { if (type.isBinary()) { return 4 * KB; } else if (type.isBoolean()) { return 2; } else if (type.isLargeObject()) { return 4 * KB; } else if (type.isLiteral()) { return KB; } else if (type.isNumber()) { return 16; } else { return DEFAULT_COLUMN_SIZE; } } }
/** * Gets the (approximate) size (in bytes) of a column with a specific * {@link ColumnType}. */ private int getSize(ColumnType type) { if (type.isBinary()) { return 4 * KB; } else if (type.isBoolean()) { return 2; } else if (type.isLargeObject()) { return 4 * KB; } else if (type.isLiteral()) { return KB; } else if (type.isNumber()) { return 16; } else { return DEFAULT_COLUMN_SIZE; } } }