org.omnaest.utils.structure.table.concrete.internal.selection
Class SelectionImpl<E>

java.lang.Object
  extended by org.omnaest.utils.structure.table.concrete.internal.selection.SelectionImpl<E>
Type Parameters:
E -
All Implemented Interfaces:
TableSelectable.Selection<E>, TableSelectable.SelectionJoin<E>

public class SelectionImpl<E>
extends Object
implements TableSelectable.SelectionJoin<E>

Author:
Omnaest
See Also:
TableSelectable.Selection

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.omnaest.utils.structure.table.subspecification.TableSelectable.Selection
TableSelectable.Selection.Order
 
Field Summary
protected  SelectionData<E> selectionData
           
protected  SelectionExecutor<E> selectionExecutor
           
 
Constructor Summary
SelectionImpl(TableInternal<E> tableInternal)
           
 
Method Summary
 TableSelectable.Selection<E> allColumns()
          Sets all Table.Columns to be selected
 Table<E> asTable()
          Returns the declared TableSelectable.Selection as a new Table instance. .
 TableView<E> asTableView()
          Creates a TableView of the TableSelectable.Selection.
 TableSelectable.Selection<E> columns(Table.Column<E>... columns)
          Sets the Table.Columns of the TableSelectable.Selection.
 TableSelectable.Selection<E> distinct()
          Merges Table.Rows if there Table.Cell elements are all equal
 TableSelectable.Selection<E> from(Table<E>... tables)
          Sets the Table
 TableSelectable.SelectionJoin<E> innerJoin(Table<E> table)
          Join clause of a TableSelectable.Selection
 TableSelectable.SelectionJoin<E> on(TableSelectable.Predicate<E>... predicates)
          Adds further TableSelectable.Predicates to an TableSelectable.SelectionJoin
 TableSelectable.Selection<E> orderBy(Table.Column<E> column)
          Orders the TableSelectable.Selection after the given Table.Column by TableSelectable.Selection.Order.ASCENDING
 TableSelectable.Selection<E> orderBy(Table.Column<E> column, TableSelectable.Selection.Order order)
          Adds a Table.Column and TableSelectable.Selection.Order declaration for a TableSelectable.Selection which results in an ordered Table after the given Table.Column by the given TableSelectable.Selection.Order.
 TableSelectable.Selection<E> top(int numberOfRows)
          Selects the given number of Table.Rows
 TableSelectable.Selection<E> where(TableSelectable.Predicate<E>... predicates)
          Where clause of a TableSelectable.Selection which declares one ore multiple TableSelectable.Predicates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selectionData

protected SelectionData<E> selectionData

selectionExecutor

protected SelectionExecutor<E> selectionExecutor
Constructor Detail

SelectionImpl

public SelectionImpl(TableInternal<E> tableInternal)
Parameters:
tableInternal -
See Also:
SelectionImpl
Method Detail

innerJoin

public TableSelectable.SelectionJoin<E> innerJoin(Table<E> table)
Description copied from interface: TableSelectable.Selection
Join clause of a TableSelectable.Selection

Specified by:
innerJoin in interface TableSelectable.Selection<E>
Returns:
this as TableSelectable.SelectionJoin

on

public TableSelectable.SelectionJoin<E> on(TableSelectable.Predicate<E>... predicates)
Description copied from interface: TableSelectable.SelectionJoin
Adds further TableSelectable.Predicates to an TableSelectable.SelectionJoin

Specified by:
on in interface TableSelectable.SelectionJoin<E>
Returns:
this

columns

public TableSelectable.Selection<E> columns(Table.Column<E>... columns)
Description copied from interface: TableSelectable.Selection
Sets the Table.Columns of the TableSelectable.Selection.

Specified by:
columns in interface TableSelectable.Selection<E>
Returns:
this

from

public TableSelectable.Selection<E> from(Table<E>... tables)
Description copied from interface: TableSelectable.Selection
Sets the Table

Specified by:
from in interface TableSelectable.Selection<E>
Returns:
this

distinct

public TableSelectable.Selection<E> distinct()
Description copied from interface: TableSelectable.Selection
Merges Table.Rows if there Table.Cell elements are all equal

Specified by:
distinct in interface TableSelectable.Selection<E>
Returns:
this

where

public TableSelectable.Selection<E> where(TableSelectable.Predicate<E>... predicates)
Description copied from interface: TableSelectable.Selection
Where clause of a TableSelectable.Selection which declares one ore multiple TableSelectable.Predicates

Specified by:
where in interface TableSelectable.Selection<E>
Returns:
this

orderBy

public TableSelectable.Selection<E> orderBy(Table.Column<E> column,
                                            TableSelectable.Selection.Order order)
Description copied from interface: TableSelectable.Selection
Adds a Table.Column and TableSelectable.Selection.Order declaration for a TableSelectable.Selection which results in an ordered Table after the given Table.Column by the given TableSelectable.Selection.Order. If this method is called multiple times the Table.Columns and TableSelectable.Selection.Order will be chained together.

Specified by:
orderBy in interface TableSelectable.Selection<E>
Returns:
this
See Also:
#orderBy(Column)

orderBy

public TableSelectable.Selection<E> orderBy(Table.Column<E> column)
Description copied from interface: TableSelectable.Selection
Orders the TableSelectable.Selection after the given Table.Column by TableSelectable.Selection.Order.ASCENDING

Specified by:
orderBy in interface TableSelectable.Selection<E>
Returns:
See Also:
#orderBy(Column, Order)

allColumns

public TableSelectable.Selection<E> allColumns()
Description copied from interface: TableSelectable.Selection
Sets all Table.Columns to be selected

Specified by:
allColumns in interface TableSelectable.Selection<E>
Returns:
this

asTableView

public TableView<E> asTableView()
Description copied from interface: TableSelectable.Selection
Creates a TableView of the TableSelectable.Selection. This should be called after all other configurations have been set.

Specified by:
asTableView in interface TableSelectable.Selection<E>
Returns:
TableView

asTable

public Table<E> asTable()
Description copied from interface: TableSelectable.Selection
Returns the declared TableSelectable.Selection as a new Table instance. . This should be called after all other configurations have been set.

Specified by:
asTable in interface TableSelectable.Selection<E>
Returns:

top

public TableSelectable.Selection<E> top(int numberOfRows)
Description copied from interface: TableSelectable.Selection
Selects the given number of Table.Rows

Specified by:
top in interface TableSelectable.Selection<E>
Returns:
this


Copyright © 2011. All Rights Reserved.