Package org.apache.openjpa.jdbc.sql
Class SelectImpl.Selects
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList
org.apache.openjpa.jdbc.sql.SelectImpl.Selects
- All Implemented Interfaces:
Iterable,Collection,List
- Enclosing class:
- SelectImpl
Helper class to track selected columns, with fast contains method.
Acts as a list of select ids, with additional methods to manipulate
the alias of each selected id.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Mapprotected DBDictionaryprotected Listprotected Listprotected MapFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAll(SelectImpl.Selects sels) Add all aliases from another instance.voidclear()voidClear all placeholders and select AS clauses.booleanget(int i) Returns the alias of a given id.getAliases(boolean ident, boolean inner) A list representation of the aliases, in select order, with AS aliases present.intindexOfAlias(Object alias) Return the index of the given alias.voidinsertAlias(int idx, Object id, Object alias) Insert an alias before the given index, using negative indexes to count backwards.voidSet an alias for a given index.intSet an alias for a given id.voidsetSelectAs(Object id, String as) Set that a given id's alias has an AS value.intsize()Methods inherited from class java.util.AbstractList
add, add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
_ids
-
_idents
-
_aliases
-
_selectAs
-
_dict
-
-
Constructor Details
-
Selects
protected Selects()
-
-
Method Details
-
addAll
Add all aliases from another instance. -
getAlias
Returns the alias of a given id. -
setAlias
Set an alias for a given id. -
setAlias
Set an alias for a given index. -
insertAlias
Insert an alias before the given index, using negative indexes to count backwards. -
indexOfAlias
Return the index of the given alias. -
getAliases
A list representation of the aliases, in select order, with AS aliases present. -
setSelectAs
Set that a given id's alias has an AS value. -
clearPlaceholders
public void clearPlaceholders()Clear all placeholders and select AS clauses. -
contains
- Specified by:
containsin interfaceCollection- Specified by:
containsin interfaceList- Overrides:
containsin classAbstractCollection
-
get
- Specified by:
getin interfaceList- Specified by:
getin classAbstractList
-
size
public int size()- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceList- Specified by:
sizein classAbstractCollection
-
clear
public void clear()- Specified by:
clearin interfaceCollection- Specified by:
clearin interfaceList- Overrides:
clearin classAbstractList
-