| Package | Description |
|---|---|
| com.github.fabienbarbero.sql | |
| com.github.fabienbarbero.sql.helper |
| Modifier and Type | Method and Description |
|---|---|
void |
DAO.addEntity(T entity) |
void |
SQLTransaction.close() |
void |
SQLSavepoint.close() |
void |
SQLTransaction.commit()
Commit the current transaction
|
long |
SQLRunner.count(SQLQueryBuilder query)
Execute a "count" query
|
void |
AbstractBaseDAO.deleteEntity(E entity) |
void |
AbstractBaseDAO.deleteEntity(PK key) |
void |
BaseDAO.deleteEntity(PK key)
Delete an entity by its primary key
|
void |
BaseDAO.deleteEntity(T entity)
Delete an entity
|
int |
SQLRunner.execute(SQLQueryBuilder query)
Execute a query for UPDATE, INSERT or DELETE
|
E |
AbstractBaseDAO.find(PK key) |
T |
BaseDAO.find(PK key)
Find an entity by its primary key
|
List<E> |
AbstractDAO.findAll() |
List<T> |
DAO.findAll() |
Optional<BigDecimal> |
SQLRecord.getBigDecimal(String column)
Get an optional
BigDecimal from this record |
Optional<Blob> |
SQLRecord.getBlob(String column)
Get an optional
Blob from this record |
Optional<Boolean> |
SQLRecord.getBoolean(String column)
Get an optional Boolean from this record
|
Optional<byte[]> |
SQLRecord.getBytes(String column)
Get an optional byte array from this record
|
Optional<Clob> |
SQLRecord.getClob(String column)
Get an optional
Clob from this record |
List<SQLRecord.Column> |
SQLRecord.getColumns()
Get the available columns from this record
|
<E extends Enum<E>> |
SQLRecord.getEnum(String column,
Class<E> type)
Get an optional Enum from this record.
|
Optional<Float> |
SQLRecord.getFloat(String column)
Get an optional Float from this record
|
Optional<Instant> |
SQLRecord.getInstant(String column)
Get an optional
Instant from this record |
Optional<Integer> |
SQLRecord.getInteger(String column)
Get an optional Integer from this record
|
Optional<LocalDate> |
SQLRecord.getLocalDate(String column)
Get an optional
LocalDate from this record |
Optional<LocalTime> |
SQLRecord.getLocalTime(String column)
Get an optional
LocalTime from this record |
Optional<Long> |
SQLRecord.getLong(String column)
Get an optional Long from this record
|
Optional<Short> |
SQLRecord.getShort(String column)
Get an optional Short from this record
|
Optional<String> |
SQLRecord.getString(String column)
Get an optional String from this record
|
<T> List<T> |
SQLRunner.query(SQLRecordMapper<T> mapper,
SQLQueryBuilder query)
Select entities from a given SQL query
|
<T> T |
SQLRunner.querySingle(SQLRecordMapper<T> mapper,
SQLQueryBuilder query)
Select a single entity from a given SQL query
|
void |
SQLTransaction.rollback()
Rollback the current transaction
|
void |
SQLSavepoint.rollback()
Rollback the savepoint to its creation state
|
Object |
SQLObject.toSQLObject(Connection conn)
Convert the current object to SQL object (String, Blob ...)
|
void |
BaseDAO.updateEntity(T entity)
Update an entity
|
| Modifier and Type | Method and Description |
|---|---|
SQLTable |
SQLHelper.getTable(String tableName) |
List<SQLTable> |
SQLHelper.getTables()
Get the tables information
|
boolean |
SQLHelper.isTableColumnExists(String tableName,
String columnName)
Indicates if a table column exists
|
boolean |
SQLHelper.isTableExists(String tableName)
Indicates if a table exists
|
Copyright © 2018. All rights reserved.