@Immutable public class Selectors extends Object
Because tables can be included and excluded based upon their fully-qualified names and based upon the database names, this
class defines a builder to collect the various regular expression patterns the predicate(s) will use
to determine which columns and tables are included. The builder is then used to
build the immutable table selection predicate.
By default all columns in included tables will be selected, except when they are specifically excluded using regular
expressions that match the columns' fully-qualified names. Therefore, the predicate is constructed using a simple
static method.
| Modifier and Type | Class and Description |
|---|---|
static class |
Selectors.DatabaseSelectionPredicateBuilder
A builder of a database predicate.
|
static class |
Selectors.TableSelectionPredicateBuilder
A builder of a table predicate.
|
| Constructor and Description |
|---|
Selectors() |
| Modifier and Type | Method and Description |
|---|---|
static Selectors.DatabaseSelectionPredicateBuilder |
databaseSelector()
Obtain a new
builder for a table selection predicate. |
static Predicate<ColumnId> |
excludeColumns(String fullyQualifiedTableNames)
|
static Selectors.TableSelectionPredicateBuilder |
tableSelector()
Obtain a new
builder for a table selection predicate. |
public static Selectors.DatabaseSelectionPredicateBuilder databaseSelector()
builder for a table selection predicate.public static Selectors.TableSelectionPredicateBuilder tableSelector()
builder for a table selection predicate.public static Predicate<ColumnId> excludeColumns(String fullyQualifiedTableNames)
Predicate that determines whether a column identified by a given ColumnId is to be included,
using the given comma-separated regular expression patterns defining which columns (if any) should be excluded.
Note that this predicate is completely independent of the table selection predicate, so it is expected that this predicate be used only after the table selection predicate determined the table containing the column(s) is to be used.
fullyQualifiedTableNames - the comma-separated list of fully-qualified table names to exclude; may be null or
emptyCopyright © 2016 JBoss by Red Hat. All rights reserved.