@Test public void convertToInteger() { Boolean t = Boolean.TRUE; Boolean f = Boolean.FALSE; Integer i = converter.toInteger(t); assertNotNull(i); assertEquals(1, i.intValue()); i = converter.toInteger(f); assertNotNull(i); assertEquals(0, i.intValue()); }
@AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.INTEGER) public Integer toInteger(Boolean value) { return value != null ? (value ? 1 : 0) : null; }
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.INTEGER) public Integer toInteger(Boolean value) { return value != null ? (value ? 1 : 0) : null; } }
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.INTEGER) public Integer toInteger(Boolean value) { return value != null ? (value ? 1 : 0) : null; }  }
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.INTEGER) public Integer toInteger(Boolean value) { return value != null ? (value ? 1 : 0) : null; }  @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BIG_INTEGER) BigInteger toBigInteger(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BOOLEAN) Boolean toBoolean(Boolean value, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BYTE) Byte toByte(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.CHAR) Character toCharacter(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.DOUBLE) Double toDouble(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.FLOAT) Float toFloat(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.INTEGER) Integer toInteger(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.LONG) Long toLong(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.NUMBER) Number toNumber(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.SHORT) Short toShort(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.STRING, concerns = { AtlasConversionConcern.CONVENTION }) String toString(Boolean value, String sourceFormat, String targetFormat); }
BooleanConverter implements AtlasConverter<Boolean> { @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.INTEGER) public Integer toInteger(Boolean value) { return value != null ? (value ? 1 : 0) : null; }  @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.DECIMAL) BigDecimal toBigDecimal(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BIG_INTEGER) BigInteger toBigInteger(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BOOLEAN) Boolean toBoolean(Boolean value, String sourceFormat, String targetFormat); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.BYTE) Byte toByte(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.CHAR) Character toCharacter(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.DOUBLE) Double toDouble(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.FLOAT) Float toFloat(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.INTEGER) Integer toInteger(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.LONG) Long toLong(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.NUMBER) Number toNumber(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.SHORT) Short toShort(Boolean value); @AtlasConversionInfo(sourceType = FieldType.BOOLEAN, targetType = FieldType.STRING, concerns = { AtlasConversionConcern.CONVENTION }) String toString(Boolean value, String sourceFormat, String targetFormat);  }