C - the context typeI - the identifier typepublic interface ColumnsHandler<C,I>
| Modifier and Type | Method and Description |
|---|---|
int |
count(Predicate<C> predicate)
Returns the number of rows that match the provided predicate.
|
<D> boolean |
insert(D dependent,
DependentColumn<?,C,D>... columns)
Inserts the given values into a new row, as taken from the dependent object.
|
boolean |
insert(UpdateValues<C> updateValues)
Inserts the given values into a new row.
|
DataSourceValues |
retrieve(I identifier,
Column<?,C>... columns)
Retrieves multiple values from a given row.
|
<T> DataSourceValue<T> |
retrieve(I identifier,
Column<T,C> column)
Retrieves the given column from a given row.
|
List<DataSourceValues> |
retrieve(Predicate<C> predicate,
Column<?,C>... columns)
Retrieves the given columns' values from all rows that satisfy the given predicate.
|
<T> List<T> |
retrieve(Predicate<C> predicate,
Column<T,C> column)
Retrieves a column's value for all rows that satisfy the given predicate.
|
<T> boolean |
update(I identifier,
Column<T,C> column,
T value)
Changes a column from a specific row to the given value.
|
<D> boolean |
update(I identifier,
D dependent,
DependentColumn<?,C,D>... columns)
Updates a row to have the values as retrieved from the dependent object.
|
boolean |
update(I identifier,
UpdateValues<C> updateValues)
Updates a row to have the given values.
|
<T> int |
update(Predicate<C> predicate,
Column<T,C> column,
T value)
Sets the given value to the provided column for all rows which match the predicate.
|
int |
update(Predicate<C> predicate,
UpdateValues<C> updateValues)
Updates all rows that match the given predicate with the provided values.
|
<T> DataSourceValue<T> retrieve(I identifier, Column<T,C> column) throws Exception
T - the column typeidentifier - the id of the row to look upcolumn - the column whose value should be retrievedExceptionDataSourceValues retrieve(I identifier, Column<?,C>... columns) throws Exception
identifier - the id of the row to look upcolumns - the columns to retrieveException<T> List<T> retrieve(Predicate<C> predicate, Column<T,C> column) throws Exception
T - the column's value typepredicate - the predicate to fulfillcolumn - the column to retrieve from the matching rowsExceptionList<DataSourceValues> retrieve(Predicate<C> predicate, Column<?,C>... columns) throws Exception
predicate - the predicate to fulfillcolumns - the columns to retrieve from the matching rowsException<T> boolean update(I identifier, Column<T,C> column, T value) throws Exception
T - the column typeidentifier - the id of the row to modifycolumn - the column to modifyvalue - the value to set the column toExceptionboolean update(I identifier, UpdateValues<C> updateValues) throws Exception
identifier - the id of the row to modifyupdateValues - the values to set on the rowException<D> boolean update(I identifier, D dependent, DependentColumn<?,C,D>... columns) throws Exception
D - the dependent typeidentifier - the id of the row to modifydependent - the dependent to get values fromcolumns - the columns to update in the rowException<T> int update(Predicate<C> predicate, Column<T,C> column, T value) throws Exception
T - the column typepredicate - the predicate to filter rows bycolumn - the column to modify on the matched rowsvalue - the new value to setExceptionint update(Predicate<C> predicate, UpdateValues<C> updateValues) throws Exception
predicate - the predicate to filter rows byupdateValues - the values to set on the matched rowsExceptionboolean insert(UpdateValues<C> updateValues) throws Exception
updateValues - the values to insertIllegalStateException - if there is not at least one column that is not skippedException<D> boolean insert(D dependent,
DependentColumn<?,C,D>... columns)
throws Exception
D - the dependent typedependent - the dependent to get values fromcolumns - the columns to insertIllegalStateException - if there is not at least one column that is not skippedExceptionCopyright © 2017–2024. All rights reserved.