org.omnaest.utils.structure.table.subspecification
Interface TableSelectable.Selection<E>

All Known Subinterfaces:
TableSelectable.SelectionJoin<E>
All Known Implementing Classes:
SelectionImpl
Enclosing interface:
TableSelectable<E>

public static interface TableSelectable.Selection<E>

TableSelectable.Selection from a Table. The TableSelectable.Selection uses a builder pattern to create a TableView or a new Table instance based on parameters like Tables, TableSelectable.Predicates and TableSelectable.Selection.Order

See Also:
TableSelectable.select(), Selection#columns(Column...), allColumns(), Selection#from(Table), Selection#where(Predicate...), Selection#orderBy(Order), asTableView(), asTable(), TableSelectable.SelectionJoin, TableSelectable.Predicate, TableSelectable.Selection.Order, TableView, TableSelectable, Table

Nested Class Summary
static class TableSelectable.Selection.Order
           
 
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.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
 

Method Detail

columns

TableSelectable.Selection<E> columns(Table.Column<E>... columns)
Sets the Table.Columns of the TableSelectable.Selection.

Parameters:
columns -
Returns:
this

allColumns

TableSelectable.Selection<E> allColumns()
Sets all Table.Columns to be selected

Returns:
this

from

TableSelectable.Selection<E> from(Table<E>... tables)
Sets the Table

Parameters:
tables -
Returns:
this

innerJoin

TableSelectable.SelectionJoin<E> innerJoin(Table<E> table)
Join clause of a TableSelectable.Selection

Parameters:
table -
Returns:
this as TableSelectable.SelectionJoin

where

TableSelectable.Selection<E> where(TableSelectable.Predicate<E>... predicates)
Where clause of a TableSelectable.Selection which declares one ore multiple TableSelectable.Predicates

Parameters:
predicates -
Returns:
this

orderBy

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. If this method is called multiple times the Table.Columns and TableSelectable.Selection.Order will be chained together.

Parameters:
column -
order -
Returns:
this
See Also:
#orderBy(Column)

orderBy

TableSelectable.Selection<E> orderBy(Table.Column<E> column)
Orders the TableSelectable.Selection after the given Table.Column by TableSelectable.Selection.Order.ASCENDING

Parameters:
column -
Returns:
See Also:
#orderBy(Column, Order)

asTableView

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

Returns:
TableView

distinct

TableSelectable.Selection<E> distinct()
Merges Table.Rows if there Table.Cell elements are all equal

Returns:
this

top

TableSelectable.Selection<E> top(int numberOfRows)
Selects the given number of Table.Rows

Parameters:
numberOfRows -
Returns:
this

asTable

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

Returns:


Copyright © 2011. All Rights Reserved.