public class SearchColumnList extends TextualSearchList<DBColumn>
A list of DBColumn
elements ordered by their ADQL name in an ascending manner.
In addition to an ADQL name, DBColumn
elements can be searched by specifying their table, schema and catalog.
These last information will be used only if the ADQL column name is ambiguous, otherwise all matching elements are returned.
Note: Table aliases can be listed here with their corresponding table name. Consequently, a table alias can be given as table name in the search parameters.
TextualSearchList.DefaultKeyExtractor<E>, TextualSearchList.KeyExtractor<E>
csMap, keyExtractor, ncsMap
Constructor and Description |
---|
SearchColumnList()
Void constructor.
|
SearchColumnList(java.util.Collection<DBColumn> collection)
Constructor by copy: all the elements of the given collection of
DBColumn are copied ordered into this list. |
SearchColumnList(int initialCapacity)
Constructor with the initial capacity.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(DBColumn item)
Adds the given object at the end of this list.
|
boolean |
addAll(java.util.Collection<? extends DBColumn> c)
Appends all the objects of the given collection in this list.
|
int |
getNbTableAliases() |
boolean |
isDistinct()
Tells whether multiple occurrences are allowed.
|
void |
putTableAlias(java.lang.String tableAlias,
java.lang.String tableName)
Adds the given association between a table name and its alias in a query.
|
boolean |
removeAll(java.util.Collection<?> c) |
void |
removeAllTableAliases()
Removes all table name/alias associations.
|
void |
removeTableAlias(java.lang.String tableAlias)
Removes the given alias from this list.
|
java.util.List<DBColumn> |
search(ADQLColumn column)
Searches all
DBColumn elements corresponding to the given ADQLColumn (case insensitive). |
java.util.List<DBColumn> |
search(java.lang.String columnName)
Searches all
DBColumn elements which has the given name (case insensitive). |
java.util.List<DBColumn> |
search(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String column)
Searches all
DBColumn elements which have the given catalog, schema, table and column name (case insensitive). |
java.util.List<DBColumn> |
search(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.lang.String column,
byte caseSensitivity)
Searches all
DBColumn elements which have the given catalog, schema, table and column name, with the specified case sensitivity. |
void |
setDistinct(boolean distinct)
Lets indicating that multiple occurrences are allowed.
|
add, addAll, clear, contains, get, get, remove, remove, removeRange, set
clone, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeIf, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize
public SearchColumnList()
public SearchColumnList(java.util.Collection<DBColumn> collection)
DBColumn
are copied ordered into this list.collection
- Collection of DBColumn
to copy.public SearchColumnList(int initialCapacity)
initialCapacity
- Initial capacity of this list.public final boolean isDistinct()
public final void setDistinct(boolean distinct)
distinct
- true means that multiple occurrences are allowed, false otherwise.public final void putTableAlias(java.lang.String tableAlias, java.lang.String tableName)
tableAlias
- Table alias.tableName
- Table name.public final void removeTableAlias(java.lang.String tableAlias)
tableAlias
- The table alias which must be removed.public final void removeAllTableAliases()
public final int getNbTableAliases()
public java.util.List<DBColumn> search(java.lang.String columnName)
DBColumn
elements which has the given name (case insensitive).columnName
- ADQL name of DBColumn
to search for.DBColumn
elements.TextualSearchList.get(String)
public final java.util.List<DBColumn> search(java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String column)
DBColumn
elements which have the given catalog, schema, table and column name (case insensitive).catalog
- Catalog name.schema
- Schema name.table
- Table name.column
- Column name.DBColumn
elements.search(String, String, String, String, byte)
public java.util.List<DBColumn> search(ADQLColumn column)
DBColumn
elements corresponding to the given ADQLColumn
(case insensitive).column
- An ADQLColumn
.DBColumn
elements.search(String, String, String, String, byte)
public java.util.List<DBColumn> search(java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String column, byte caseSensitivity)
DBColumn
elements which have the given catalog, schema, table and column name, with the specified case sensitivity.catalog
- Catalog name.schema
- Schema name.table
- Table name.column
- Column name.caseSensitivity
- Case sensitivity for each column parts (one bit by part ; 0=sensitive,1=insensitive ; see IdentifierField
for more details).DBColumn
elements.IdentifierField
public boolean add(DBColumn item)
TextualSearchList
add
in interface java.util.Collection<DBColumn>
add
in interface java.util.List<DBColumn>
add
in class TextualSearchList<DBColumn>
item
- Object to add (different from NULL).ArrayList.add(java.lang.Object)
public boolean addAll(java.util.Collection<? extends DBColumn> c)
TextualSearchList
addAll
in interface java.util.Collection<DBColumn>
addAll
in interface java.util.List<DBColumn>
addAll
in class TextualSearchList<DBColumn>
c
- Collection of objects to add.true
if this list changed as a result of the call, false
otherwise.ArrayList.addAll(java.util.Collection)
,
TextualSearchList.add(Object)