public abstract static class Selector.Factory
extends java.lang.Object
Selector
instances.Constructor and Description |
---|
Factory() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addColumnMapping(SelectionColumnMapping mapping,
ColumnSpecification resultsColumn)
Record a mapping between the ColumnDefinitions that are used by the selector
instances created by this factory and a column in the ResultSet.Metadata
returned with a query.
|
void |
addFunctionsTo(java.util.List<Function> functions) |
protected abstract java.lang.String |
getColumnName()
Returns the name of the column corresponding to the output value of the selector instances created by
this factory.
|
ColumnSpecification |
getColumnSpecification(TableMetadata table)
Returns the column specification corresponding to the output value of the selector instances created by
this factory.
|
protected abstract AbstractType<?> |
getReturnType()
Returns the type of the values returned by the selector instances created by this factory.
|
boolean |
isAggregateSelectorFactory()
Checks if this factory creates selectors instances that creates aggregates.
|
boolean |
isSimpleSelectorFactory()
Checks if this factory creates
Selector s that simply return a column value. |
boolean |
isSimpleSelectorFactoryFor(int index)
Checks if this factory creates
Selector s that simply return the specified column. |
boolean |
isTTLSelectorFactory()
Checks if this factory creates
TTL selectors instances. |
boolean |
isWritetimeSelectorFactory()
Checks if this factory creates
writetime selectors instances. |
abstract Selector |
newInstance(QueryOptions options)
Creates a new
Selector instance. |
public void addFunctionsTo(java.util.List<Function> functions)
public ColumnSpecification getColumnSpecification(TableMetadata table)
table
- the table meta datapublic abstract Selector newInstance(QueryOptions options) throws InvalidRequestException
Selector
instance.options
- the options of the query for which the instance is created (some selector
depends on the bound values in particular).Selector
instanceInvalidRequestException
public boolean isAggregateSelectorFactory()
true
if this factory creates selectors instances that creates aggregates,
false
otherwisepublic boolean isWritetimeSelectorFactory()
writetime
selectors instances.true
if this factory creates writetime
selectors instances,
false
otherwisepublic boolean isTTLSelectorFactory()
TTL
selectors instances.true
if this factory creates TTL
selectors instances,
false
otherwisepublic boolean isSimpleSelectorFactory()
Selector
s that simply return a column value.index
- the column indextrue
if this factory creates Selector
s that simply return a column value,
false
otherwise.public boolean isSimpleSelectorFactoryFor(int index)
Selector
s that simply return the specified column.index
- the column indextrue
if this factory creates Selector
s that simply return
the specified column, false
otherwise.protected abstract java.lang.String getColumnName()
protected abstract AbstractType<?> getReturnType()
protected abstract void addColumnMapping(SelectionColumnMapping mapping, ColumnSpecification resultsColumn)
mapping
- the instance of the column mapping belonging to the current query's SelectionresultsColumn
- the column in the ResultSet.Metadata to which the ColumnDefinitions used
by the Selector are to be mappedCopyright © 2009- The Apache Software Foundation