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

protected static class SelectImpl.Selects extends AbstractList
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 Details

    • _ids

      protected List _ids
    • _idents

      protected List _idents
    • _aliases

      protected Map _aliases
    • _selectAs

      protected Map _selectAs
    • _dict

      protected DBDictionary _dict
  • Constructor Details

    • Selects

      protected Selects()
  • Method Details

    • addAll

      public void addAll(SelectImpl.Selects sels)
      Add all aliases from another instance.
    • getAlias

      public Object getAlias(Object id)
      Returns the alias of a given id.
    • setAlias

      public int setAlias(Object id, Object alias, boolean ident)
      Set an alias for a given id.
    • setAlias

      public void setAlias(int idx, Object alias)
      Set an alias for a given index.
    • insertAlias

      public void insertAlias(int idx, Object id, Object alias)
      Insert an alias before the given index, using negative indexes to count backwards.
    • indexOfAlias

      public int indexOfAlias(Object alias)
      Return the index of the given alias.
    • getAliases

      public List getAliases(boolean ident, boolean inner)
      A list representation of the aliases, in select order, with AS aliases present.
    • setSelectAs

      public void setSelectAs(Object id, String as)
      Set that a given id's alias has an AS value.
    • clearPlaceholders

      public void clearPlaceholders()
      Clear all placeholders and select AS clauses.
    • contains

      public boolean contains(Object id)
      Specified by:
      contains in interface Collection
      Specified by:
      contains in interface List
      Overrides:
      contains in class AbstractCollection
    • get

      public Object get(int i)
      Specified by:
      get in interface List
      Specified by:
      get in class AbstractList
    • size

      public int size()
      Specified by:
      size in interface Collection
      Specified by:
      size in interface List
      Specified by:
      size in class AbstractCollection
    • clear

      public void clear()
      Specified by:
      clear in interface Collection
      Specified by:
      clear in interface List
      Overrides:
      clear in class AbstractList