@Test(expected = AtlasConversionException.class) public void convertToCharacterMIN() throws Exception { Float df = -1.00f; converter.toCharacter(df); }
@AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) public Character toCharacter(Float value) throws AtlasConversionException { if (value == null) { return null; } if (value < Character.MIN_VALUE || value > Character.MAX_VALUE) { throw new AtlasConversionException(String .format("Float %s is greater than Character.MAX_VALUE or is less than Character.MIN_VALUE", value)); } return Character.valueOf((char) value.intValue()); }
FloatConverter implements AtlasConverter<Float> { @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) public Character toCharacter(Float value) throws AtlasConversionException { if (value == null) { return null; } if (value < Character.MIN_VALUE || value > Character.MAX_VALUE) { throw new AtlasConversionException(String .format("Float %s is greater than Character.MAX_VALUE or is less than Character.MIN_VALUE", value)); } return Character.valueOf((char) value.intValue()); } }
FloatConverter implements AtlasConverter<Float> { @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) public Character toCharacter(Float value) throws AtlasConversionException { if (value == null) { return null; } if (value < Character.MIN_VALUE || value > Character.MAX_VALUE) { throw new AtlasConversionException(String .format("Float %s is greater than Character.MAX_VALUE or is less than Character.MIN_VALUE", value)); } return Character.valueOf((char) value.intValue()); }  }
FloatConverter implements AtlasConverter<Float> { @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) public Character toCharacter(Float value) throws AtlasConversionException { if (value == null) { return null; } if (value < Character.MIN_VALUE || value > Character.MAX_VALUE) { throw new AtlasConversionException(String .format("Float %s is greater than Character.MAX_VALUE or is less than Character.MIN_VALUE", value)); } return Character.valueOf((char) value.intValue()); }  @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.BIG_INTEGER, concerns = AtlasConversionConcern.FRACTIONAL_PART) BigInteger toBigInteger(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.BOOLEAN, concerns = { AtlasConversionConcern.CONVENTION }) Boolean toBoolean(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.BYTE, concerns = { AtlasConversionConcern.RANGE }) Byte toByte(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) Character toCharacter(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DATE, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) Date toDate(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DOUBLE) Double toDouble(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.FLOAT) Float toFloat(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.INTEGER, concerns = AtlasConversionConcern.RANGE) Integer toInteger(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DATE, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) LocalDate toLocalDate(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.TIME, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) LocalTime toLocalTime(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DATE_TIME, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) LocalDateTime toLocalDateTime(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.LONG, concerns = AtlasConversionConcern.RANGE) Long toLong(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.NUMBER) Number toNumber(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.SHORT, concerns = AtlasConversionConcern.RANGE) Short toShort(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.STRING) String toString(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DATE_TIME_TZ, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) ZonedDateTime toZonedDateTime(Float value); }
FloatConverter implements AtlasConverter<Float> { @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) public Character toCharacter(Float value) throws AtlasConversionException { if (value == null) { return null; } if (value < Character.MIN_VALUE || value > Character.MAX_VALUE) { throw new AtlasConversionException(String .format("Float %s is greater than Character.MAX_VALUE or is less than Character.MIN_VALUE", value)); } return Character.valueOf((char) value.intValue()); }  @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.BIG_INTEGER, concerns = AtlasConversionConcern.FRACTIONAL_PART) BigInteger toBigInteger(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.BOOLEAN, concerns = { AtlasConversionConcern.CONVENTION }) Boolean toBoolean(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.BYTE, concerns = { AtlasConversionConcern.RANGE }) Byte toByte(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.CHAR, concerns = { AtlasConversionConcern.RANGE, AtlasConversionConcern.CONVENTION }) Character toCharacter(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DATE, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) Date toDate(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DOUBLE) Double toDouble(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.FLOAT) Float toFloat(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.INTEGER, concerns = AtlasConversionConcern.RANGE) Integer toInteger(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DATE, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) LocalDate toLocalDate(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.TIME, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) LocalTime toLocalTime(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DATE_TIME, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) LocalDateTime toLocalDateTime(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.LONG, concerns = AtlasConversionConcern.RANGE) Long toLong(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.NUMBER) Number toNumber(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.SHORT, concerns = AtlasConversionConcern.RANGE) Short toShort(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.STRING) String toString(Float value); @AtlasConversionInfo(sourceType = FieldType.FLOAT, targetType = FieldType.DATE_TIME_TZ, concerns = {AtlasConversionConcern.RANGE, AtlasConversionConcern.FRACTIONAL_PART}) ZonedDateTime toZonedDateTime(Float value);  }