final class PrintCommand extends AbstractCommand
Modifier and Type | Field and Description |
---|---|
private static char |
DELIMITER
The field delimiter for print output.
|
private static Logger |
LOGGER
Initialize the logger.
|
(package private) static org.apache.commons.cli.Options |
options
Defines command options.
|
private File |
outputFile
Output file if printing to a file.
|
private boolean |
printHeaders
Flag to print out column headers.
|
private boolean |
printIDs
Flag to print row IDs.
|
private PrintStream |
ps
This is the
PrintStream for printing the collections to the console or a file. |
Constructor and Description |
---|
PrintCommand()
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
execute(String[] arguments)
Print out the conditions sets selected by the user's command line arguments.
|
private void |
printCollection(ConditionsObjectCollection<?> collection)
Print a single collection.
|
private void |
printCollectionHeader(ConditionsObjectCollection<?> collection)
Print the header for a collection.
|
private void |
printCollections(List<ConditionsObjectCollection<?>> collectionList)
Print the list of collections.
|
private void |
printColumnNames(TableMetaData tableMetaData)
Print the column names for a table.
|
private void |
printConditionsRecords(Set<String> conditionsKeys)
Print out the conditions records either to the console or a file (if that option is enabled).
|
cleanup, getDescription, getManager, getName, getOptions, parse, printUsage
private static final Logger LOGGER
static org.apache.commons.cli.Options options
private static final char DELIMITER
private File outputFile
private boolean printHeaders
private boolean printIDs
private PrintStream ps
PrintStream
for printing the collections to the console or a file.final void execute(String[] arguments)
execute
in class AbstractCommand
arguments
- the command line argumentsprivate void printCollection(ConditionsObjectCollection<?> collection)
collection
- the collection to printprivate void printCollectionHeader(ConditionsObjectCollection<?> collection)
PrintStream
.collection
- the collectionprivate void printCollections(List<ConditionsObjectCollection<?>> collectionList)
collectionList
- the list of collectionsprivate void printColumnNames(TableMetaData tableMetaData)
tableMetaData
- the table meta dataCopyright © 2019. All rights reserved.