@Test() public void convertToBoolean() { assertTrue(byteConverter.toBoolean(new Byte((byte)1))); assertFalse(byteConverter.toBoolean(new Byte((byte)0))); assertTrue(byteConverter.toBoolean(Byte.MAX_VALUE)); }
@AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BOOLEAN, concerns = {AtlasConversionConcern.CONVENTION}) public Boolean toBoolean(Byte value) { if (value == null) { return null; } return value.byteValue() != 0; }
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BOOLEAN, concerns = {AtlasConversionConcern.CONVENTION}) public Boolean toBoolean(Byte value) { if (value == null) { return null; } return value.byteValue() != 0; } }
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BOOLEAN, concerns = {AtlasConversionConcern.CONVENTION}) public Boolean toBoolean(Byte value) { if (value == null) { return null; } return value.byteValue() != 0; }  }
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BOOLEAN, concerns = {AtlasConversionConcern.CONVENTION}) public Boolean toBoolean(Byte value) { if (value == null) { return null; } return value.byteValue() != 0; }  @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BIG_INTEGER) BigInteger toBigInteger(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BOOLEAN, concerns = {AtlasConversionConcern.CONVENTION}) Boolean toBoolean(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BYTE) Byte toByte(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.CHAR) Character toCharacter(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DATE_TIME) Date toDate(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DOUBLE) Double toDouble(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.FLOAT) Float toFloat(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.INTEGER) Integer toInteger(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DATE) LocalDate toLocalDate(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.TIME) LocalTime toLocalTime(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DATE_TIME) LocalDateTime toLocalDateTime(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.LONG) Long toLong(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.NUMBER) Number toNumber(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.SHORT) Short toShort(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.STRING, concerns = {AtlasConversionConcern.CONVENTION}) String toString(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DATE_TIME_TZ) ZonedDateTime toZonedDateTime(Byte value); }
ByteConverter implements AtlasConverter<Byte> { @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BOOLEAN, concerns = {AtlasConversionConcern.CONVENTION}) public Boolean toBoolean(Byte value) { if (value == null) { return null; } return value.byteValue() != 0; }  @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BIG_INTEGER) BigInteger toBigInteger(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BOOLEAN, concerns = {AtlasConversionConcern.CONVENTION}) Boolean toBoolean(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.BYTE) Byte toByte(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.CHAR) Character toCharacter(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DATE_TIME) Date toDate(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DOUBLE) Double toDouble(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.FLOAT) Float toFloat(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.INTEGER) Integer toInteger(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DATE) LocalDate toLocalDate(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.TIME) LocalTime toLocalTime(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DATE_TIME) LocalDateTime toLocalDateTime(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.LONG) Long toLong(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.NUMBER) Number toNumber(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.SHORT) Short toShort(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.STRING, concerns = {AtlasConversionConcern.CONVENTION}) String toString(Byte value); @AtlasConversionInfo(sourceType = FieldType.BYTE, targetType = FieldType.DATE_TIME_TZ) ZonedDateTime toZonedDateTime(Byte value);  }