java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java
branchv_0
changeset 209 8dfe037b3274
parent 203 504c4ba56d1c
child 210 f8aa3686d512
     1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Sat Aug 15 10:44:36 2015 +0200
     1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/InfoLister.java	Sat Aug 15 10:47:56 2015 +0200
     1.3 @@ -176,6 +176,12 @@
     1.4  		}
     1.5  	}
     1.6  
     1.7 +	private void listFormatterProperties() {
     1.8 +		for (String name : options.getFormatterNamesToListProperties()) {
     1.9 +			log.log(Level.SEVERE, "TODO: list formatter properties for {0}", name);
    1.10 +		}
    1.11 +	}
    1.12 +
    1.13  	public void listTypes() throws FormatterException, ConfigurationException {
    1.14  		ColumnsHeader header = constructHeader(new HeaderField("name", SQLType.VARCHAR), new HeaderField("code", SQLType.INTEGER));
    1.15  		List<Object[]> data = new ArrayList<>();
    1.16 @@ -346,16 +352,13 @@
    1.17  		}
    1.18  
    1.19  		for (final String dbName : options.getDatabaseNamesToTest()) {
    1.20 -			es.submit(new Runnable() {
    1.21 -				// TODO: Java 8 – lambda
    1.22 -				@Override
    1.23 -				public void run() {
    1.24 -					final Object[] row = testConnection(dbName);
    1.25 -					synchronized (currentFormatter) {
    1.26 -						printRow(currentFormatter, row);
    1.27 -					}
    1.28 +			es.submit(() -> {
    1.29 +				final Object[] row = testConnection(dbName);
    1.30 +				synchronized (currentFormatter) {
    1.31 +					printRow(currentFormatter, row);
    1.32  				}
    1.33 -			});
    1.34 +			}
    1.35 +			);
    1.36  		}
    1.37  
    1.38  		es.shutdown();
    1.39 @@ -565,6 +568,12 @@
    1.40  						infoLister.listFormatters();
    1.41  					}
    1.42  				},
    1.43 +		FORMATTER_PROPERTIES {
    1.44 +					@Override
    1.45 +					public void showInfo(InfoLister infoLister) throws FormatterException, ConfigurationException {
    1.46 +						infoLister.listFormatterProperties();
    1.47 +					}
    1.48 +				},
    1.49  		TYPES {
    1.50  					@Override
    1.51  					public void showInfo(InfoLister infoLister) throws FormatterException, ConfigurationException {