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<R> |
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 <T> java.util.List<T> |
delete(java.lang.String query,
JdbcAbstractStore.Creator<T> creator,
java.util.List<JdbcAbstractStore.EntityPopulator<T>> populators) |
protected <T> java.util.List<T> |
delete(java.lang.String query,
JdbcAbstractStore.Creator<T> creator,
java.util.List<JdbcAbstractStore.EntityPopulator<T>> populators,
java.lang.Object[] parameters) |
protected int |
delete(java.lang.String query,
java.lang.Object[] parameters) |
static <R> R |
doOrContinue(java.lang.String action,
JdbcAbstractStore.SqlOperation<R> op) |
static <R> R |
doOrFail(JdbcAbstractStore.SqlOperation<R> op) |
protected java.sql.Connection |
getConnection() |
protected 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 int |
insertWithSerial(java.lang.String query,
java.lang.Object[] parameters) |
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) |
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> populator,
java.lang.Object param) |
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 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 final 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, JdbcAbstractStore.EntityPopulator<T> populator, java.lang.Object param) 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 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 int delete(java.lang.String query, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected <T> java.util.List<T> delete(java.lang.String query, JdbcAbstractStore.Creator<T> creator, java.util.List<JdbcAbstractStore.EntityPopulator<T>> populators) throws java.sql.SQLException
java.sql.SQLException
protected <T> java.util.List<T> delete(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> 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 int insert(java.lang.String query, java.lang.Object[] parameters) throws java.sql.SQLException
java.sql.SQLException
protected 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 <R> R doOrFail(JdbcAbstractStore.SqlOperation<R> op)
public static <R> R doOrContinue(java.lang.String action, JdbcAbstractStore.SqlOperation<R> op)
Copyright © 2021. All Rights Reserved.