public class JdbcAbstractStore
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
JdbcAbstractStore.Creator<T> |
static class |
JdbcAbstractStore.DataType |
static interface |
JdbcAbstractStore.EntityPopulator<T> |
static interface |
JdbcAbstractStore.SqlOperation<Res> |
static interface |
JdbcAbstractStore.StatementValues<T> |
Modifier and Type | Field and Description |
---|---|
protected javax.sql.DataSource |
datasource |
protected static org.slf4j.Logger |
logger |
Constructor and Description |
---|
JdbcAbstractStore(javax.sql.DataSource dataSource) |
Modifier and Type | Method and Description |
---|---|
protected <T> void |
batchInsert(java.lang.String query,
java.util.Collection<T> values,
java.util.Collection<JdbcAbstractStore.StatementValues<T>> statementValues) |
protected <T> void |
batchInsert(java.lang.String query,
java.util.Collection<T> values,
JdbcAbstractStore.StatementValues<T> statementValues) |
protected void |
delete(java.lang.String query,
java.lang.Object[] parameters) |
static <Res> Res |
doOrContinue(java.lang.String action,
JdbcAbstractStore.SqlOperation<Res> op) |
static <Res> Res |
doOrFail(JdbcAbstractStore.SqlOperation<Res> op) |
protected java.sql.Connection |
getConnection() |
protected <T> int |
insert(java.lang.String query,
java.lang.Object[] parameters) |
protected <T> void |
insert(java.lang.String query,
T value,
JdbcAbstractStore.StatementValues<T> values) |
protected <T> void |
insert(java.lang.String query,
T value,
JdbcAbstractStore.StatementValues<T> stValue,
java.lang.Object[] parameters) |
protected <T> void |
insert(java.lang.String query,
T value,
java.util.List<JdbcAbstractStore.StatementValues<T>> values) |
protected <T,P> P |
insertAndReturn(java.lang.String query,
T value,
java.util.List<JdbcAbstractStore.StatementValues<T>> values,
JdbcAbstractStore.Creator<P> creator,
JdbcAbstractStore.EntityPopulator<P> populator) |
protected <T> int |
insertWithSerial(java.lang.String query,
java.lang.Object[] parameters) |
<Res> Res |
inTransaction(JdbcAbstractStore.SqlOperation<Res> op) |
int |
lastInsertId(java.sql.Connection con) |
protected <T> java.util.List<T> |
select(java.lang.String query,
JdbcAbstractStore.Creator<T> creator,
JdbcAbstractStore.EntityPopulator<T> populator) |
protected <T> java.util.List<T> |
select(java.lang.String query,
JdbcAbstractStore.Creator<T> creator,
JdbcAbstractStore.EntityPopulator<T> populator,
java.lang.Object[] parameters) |
protected <T> java.util.List<T> |
select(java.lang.String query,
JdbcAbstractStore.Creator<T> creator,
java.util.List<JdbcAbstractStore.EntityPopulator<T>> populators,
java.lang.Object[] parameters) |
static <Res> Res |
staticInTransaction(JdbcAbstractStore.SqlOperation<Res> op) |
protected <T> T |
unique(java.lang.String query,
JdbcAbstractStore.Creator<T> creator,
JdbcAbstractStore.EntityPopulator<T> populator) |
protected <T> T |
unique(java.lang.String query,
JdbcAbstractStore.Creator<T> creator,
JdbcAbstractStore.EntityPopulator<T> populators,
java.lang.Object[] parameters) |
protected <T> T |
unique(java.lang.String query,
JdbcAbstractStore.Creator<T> creator,
java.util.List<JdbcAbstractStore.EntityPopulator<T>> populators) |
protected <T> T |
unique(java.lang.String query,
JdbcAbstractStore.Creator<T> creator,
java.util.List<JdbcAbstractStore.EntityPopulator<T>> populators,
java.lang.Object[] parameters) |
protected <T> int |
update(java.lang.String query,
java.lang.Object[] parameters) |
protected <T> int |
update(java.lang.String query,
T value,
JdbcAbstractStore.StatementValues<T> values) |
protected <T> int |
update(java.lang.String query,
T value,
JdbcAbstractStore.StatementValues<T> values,
java.lang.Object[] parameters) |
protected <T> int |
update(java.lang.String query,
T value,
java.util.List<JdbcAbstractStore.StatementValues<T>> stValues,
java.lang.Object[] parameters) |
protected <T> int |
update(java.lang.String query,
T value,
java.lang.Object[] parameters) |
protected static final org.slf4j.Logger logger
protected javax.sql.DataSource datasource
protected <T> java.util.List<T> select(java.lang.String query, JdbcAbstractStore.Creator<T> creator, JdbcAbstractStore.EntityPopulator<T> populator) throws java.sql.SQLException
java.sql.SQLException
protected <T> java.util.List<T> select(java.lang.String query, JdbcAbstractStore.Creator<T> creator, JdbcAbstractStore.EntityPopulator<T> populator, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> java.util.List<T> select(java.lang.String query, JdbcAbstractStore.Creator<T> creator, java.util.List<JdbcAbstractStore.EntityPopulator<T>> populators, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> T unique(java.lang.String query, JdbcAbstractStore.Creator<T> creator, java.util.List<JdbcAbstractStore.EntityPopulator<T>> populators) throws java.sql.SQLException
java.sql.SQLException
protected <T> T unique(java.lang.String query, JdbcAbstractStore.Creator<T> creator, java.util.List<JdbcAbstractStore.EntityPopulator<T>> populators, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> T unique(java.lang.String query, JdbcAbstractStore.Creator<T> creator, JdbcAbstractStore.EntityPopulator<T> populators, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> T unique(java.lang.String query, JdbcAbstractStore.Creator<T> creator, JdbcAbstractStore.EntityPopulator<T> populator) throws java.sql.SQLException
java.sql.SQLException
protected <T> int update(java.lang.String query, T value, JdbcAbstractStore.StatementValues<T> values) throws java.sql.SQLException
java.sql.SQLException
protected <T> int update(java.lang.String query, T value, JdbcAbstractStore.StatementValues<T> values, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> int update(java.lang.String query, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> int update(java.lang.String query, T value, java.util.List<JdbcAbstractStore.StatementValues<T>> stValues, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> int update(java.lang.String query, T value, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> void insert(java.lang.String query, T value, JdbcAbstractStore.StatementValues<T> values) throws java.sql.SQLException
java.sql.SQLException
protected void delete(java.lang.String query, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> void batchInsert(java.lang.String query, java.util.Collection<T> values, JdbcAbstractStore.StatementValues<T> statementValues) throws java.sql.SQLException
java.sql.SQLException
protected <T> void batchInsert(java.lang.String query, java.util.Collection<T> values, java.util.Collection<JdbcAbstractStore.StatementValues<T>> statementValues) throws java.sql.SQLException
java.sql.SQLException
protected <T> void insert(java.lang.String query, T value, java.util.List<JdbcAbstractStore.StatementValues<T>> values) throws java.sql.SQLException
java.sql.SQLException
protected <T> void insert(java.lang.String query, T value, JdbcAbstractStore.StatementValues<T> stValue, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T,P> P insertAndReturn(java.lang.String query, T value, java.util.List<JdbcAbstractStore.StatementValues<T>> values, JdbcAbstractStore.Creator<P> creator, JdbcAbstractStore.EntityPopulator<P> populator) throws java.sql.SQLException
java.sql.SQLException
protected <T> int insert(java.lang.String query, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> int insertWithSerial(java.lang.String query, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
public int lastInsertId(java.sql.Connection con) throws java.sql.SQLException
java.sql.SQLException
public static <Res> Res staticInTransaction(JdbcAbstractStore.SqlOperation<Res> op) throws ServerFault
ServerFault
public <Res> Res inTransaction(JdbcAbstractStore.SqlOperation<Res> op) throws ServerFault
ServerFault
public static <Res> Res doOrFail(JdbcAbstractStore.SqlOperation<Res> op) throws ServerFault
ServerFault
public static <Res> Res doOrContinue(java.lang.String action, JdbcAbstractStore.SqlOperation<Res> op)
Copyright © 2021. All Rights Reserved.