| Constructor and Description |
|---|
AbstractDb() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Connection |
connection()
Obtem a ligação a usar para executar o SQL
Implementações deste método podem ser a simples devolução de uma Connection previamente definida, ou obtenção de uma Connection definida na Thread por frameworks transacionais |
Delete |
delete(Table table) |
Long |
fetchAutoNumber(Column<? extends Number> column,
boolean after) |
Long |
fetchAutoNumberBefore(Column<? extends Number> column) |
Long |
fetchCurrentAutoNumberAfter(Column<? extends Number> column) |
Connection |
getConnection() |
Driver |
getDriver() |
JdbcSession |
getJdbcSession() |
Insert |
insert(Table table) |
<T> T |
loadAssociation(Object bean,
Association association)
gets the value at the end of the association from the database, puts in the input bean and returns the value.
|
Query |
query(Query query) |
Query |
query(Table table)
selct over a table.
If no columns are added, when executing a select or list all columns of the driving table will be added. |
void |
setDriver(Driver driver) |
Object |
transformParameter(Object parameter) |
Map<String,Object> |
transformParameters(Map<String,Object> parameters) |
Object[] |
transformParameters(Object... parameters) |
Update |
update(Table table) |
protected abstract Connection connection()
Spring ex: Connection conn = DataSourceUtils.getConnection(dataSource);
public Connection getConnection()
public <T> T loadAssociation(Object bean, Association association)
bean - the target beanassociation - the mappingpublic Query query(Table table)
table - public Driver getDriver()
public void setDriver(Driver driver)
public JdbcSession getJdbcSession()
public Long fetchCurrentAutoNumberAfter(Column<? extends Number> column)
Copyright © 2019. All rights reserved.