1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/SingleRecordFormatter.java Sat Aug 15 10:04:28 2015 +0200
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/SingleRecordFormatter.java Sat Aug 15 10:20:39 2015 +0200
1.3 @@ -18,6 +18,9 @@
1.4 package info.globalcode.sql.dk.formatting;
1.5
1.6 import info.globalcode.sql.dk.ColorfulPrintWriter;
1.7 +import info.globalcode.sql.dk.configuration.PropertyDeclaration;
1.8 +import static info.globalcode.sql.dk.formatting.CommonProperties.COLORFUL;
1.9 +import static info.globalcode.sql.dk.formatting.CommonProperties.COLORFUL_DESCRIPTION;
1.10
1.11 /**
1.12 * Formatter intended for printing one record (or few records) with many columns.
1.13 @@ -25,17 +28,17 @@
1.14 *
1.15 * @author Ing. František Kučera (frantovo.cz)
1.16 */
1.17 +@PropertyDeclaration(name = COLORFUL, type = Boolean.class, description = COLORFUL_DESCRIPTION)
1.18 public class SingleRecordFormatter extends AbstractFormatter {
1.19
1.20 public static final String NAME = "record"; // bash-completion:formatter
1.21 - public static final String PROPERTY_COLORFUL = "color";
1.22 private final ColorfulPrintWriter out;
1.23 private boolean firstResult = true;
1.24
1.25 public SingleRecordFormatter(FormatterContext formatterContext) {
1.26 super(formatterContext);
1.27 out = new ColorfulPrintWriter(formatterContext.getOutputStream());
1.28 - out.setColorful(formatterContext.getProperties().getBoolean(PROPERTY_COLORFUL, true));
1.29 + out.setColorful(formatterContext.getProperties().getBoolean(COLORFUL, true));
1.30 }
1.31
1.32 @Override